Habitica: Rogue skills are re-casting themselves (Mage/other skills might have problems too)

Created on 6 May 2018  路  7Comments  路  Source: HabitRPG/habitica

Several players have reported in the Report a Bug guild that they cast Rogue skills and discovered that the skills were cast more than once. I've copied the reports below, including an insightful analysis by loveroflibraries at the bottom.

There's also this report by krumeluuri (267135db-e7f8-42d9-bed2-f84b4261b64e) about a Mage skill being cast twice but only once works, which might be related: _"Earlier I cast two Ethereal Surges. I'm down 60 MP but only one skill shows up in the party chat. I will use FCV to restore the lost mana but just thought you should know."_

Dusty (eb65a25d-6a1a-42bd-8261-d14a9a5addcb): _"Hello! I just cast Tools of the Trade for my party 3 times, but 100 mana was used (instead of the expected 75)."_

M2 (3250dfa9-6c99-4e23-bf42-39e417779f01): _"casting Tools of the Trade (25 mana) while having 32 mana (more than 25) results in 25 mana being wasted and then me being told that I don't have enough mana to cast it"_ [I believe the first cast succeeded and then a second, incorrect cast was attempted, resulting in the "not enough mana" message.]

RobotKing (7966165f-4b5c-4ad3-b761-e99f3b729400): _"For some reason, every time I use Backstab, it goes through twice, giving me negative mana. I'm using the web client. Any help would be useful."_
...
_"... it doesn't fix itself on refresh. I just used Fix Character Values to try all my skills, and it doesn't happen on Stealth or Tools of The Trade. When I tried Backstab, it did happen, and when I tried Pickpocket, it came up with the not enough mana error, even through I got the gold once."_ [Not happening on Stealth or Tools of the Trade for this player might be because they tried another skill after those two and that overwrote whatever caching / re-casting effect is happening, so that it didn't happen for Stealth and ToT.]


And here's the conversation with loveroflibraries (2ce80a58-32fd-4275-a046-c9a84099b6f5), the first post of which was around 30+ hours ago, so that gives an indication about when this bug might have started (I hadn't seen any reports before loveroflisbraries'):

loveroflibraries: _"I mysteriously lost 16.3 Mana points. I used Tools of the Trade and lost the expected 25 Mana. checked off two dailies and the last effect to pop up was lost 16.3 Mana which took me down to zero. It's the wrong Mana amount for Pickpocket or Backstab and I didn't receive a boost to either my gold or experience. I had been logged in for several hours, tried refreshing and syncing but the Mana was still gone, and there are no Mages in my party so it can't be an intelligence boost wearing off (suggested causes or fixes on the Habitica Help: Ask a Question Guild board). I can't find an explanation except for a bug so I thought I'd report it. It's been several hours since it happened but this was the first chance I had to report it."_

SabreCat: _"That is strange! At first I thought maybe you were suffering Rage attacks from Anti'zinnya, but it doesn't look like you're fighting her right now. Both times, did it take you all the way to 0?"_

loveroflibraries: _"The second time it didn't take me quite to zero. It just happened again and this time it's all the way to zero."_

Alys: _"How much mana did you lose this most recent time? What had you been doing in the minute or two before it happened?"_

loveroflibraries: _"I lost almost 10 points. I had used Tools of the Trade a couple minutes earlier. And was editing my tasks. Looking at other peoples bugs it could very well be tied to rogue skills. My second loss (which didn't take me down to zero) was a couple hours after I used Pickpocket but my habitica page was open the entire time on my computer and it was only a few clicks later in regards to what I had done on Habitica. Both of my complete drops were 3 or 4 actions after using Tools of the Trade. The first time my Party only got a standard Buff but yesterday we got a double Buff (100 instead of the 50 it should have been)"_

loveroflibraries: _"Hopefully, this will help find or diagnose the problem. I refreshed my page and checked my party's stats, used Tools of the Trade which worked normally and checked everyone stats - up by 50 like they should be. I then checked off a daily I had completed and the last alert was red used -25 Mana. I refreshed and checked our stats again. Everyone up by 100 Perception but no second alert that Tools of the Trade has been used. Something is definitely causing the Rogue Skills to sort of double cast. If we have full Mana when it casts again it might give us the effect twice. I restored some Mana points so I would be able to PickPocket and used it. So far no Mana drop or double cast. I'll keep a close eye on it today and add any other details I can to this post (copy, delete, paste and add to) instead of making new ones if you haven't already replied. Update - it took the Mana and upped my gold (like I had cast Pickpocket again) when I posted here. So for me checking a daily is triggering the Tools of the Trade second cast and posting in a Chat (Guild) is triggering the second Pickpocket."_

help wanted important Task Page

All 7 comments

I've marked this as important because it's likely to be reported a lot and because we probably have a better chance of working out what's gone wrong with recent code before too many other changes are merged.

I can confirm this and it's also the case for other classes as well, the issue happened between v4.40.0 and v4.41.5. Bisecting...

I'll look into this. I'm pretty sure my spell changes caused the issue

Not yet done, but I'd suspect 8d25a5d140958faa790e3c245ebb16bb9616945f has introduced the bug.

@TheHollidayInn: :+1: - stopping bisect :-)

@TheHollidayInn: While looking at the code there doesn't seem to be a server-side check whether there is sufficient MP, so MP could become negative.

This is the check: https://github.com/HabitRPG/habitica/blob/c26696a9ebf090747cee8aa6a297dd3232ee6350/website/server/controllers/api-v3/user/spells.js#L90

But it doesn't take in to consideration the qty, although I'm removing our client side use for that atm.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Alys picture Alys  路  3Comments

kantamablade picture kantamablade  路  4Comments

Alys picture Alys  路  3Comments

audiolion picture audiolion  路  4Comments

thebadwolfgirl picture thebadwolfgirl  路  4Comments