Page 1 of 1

Blood Spray refills vim before spending

Posted: Wed Apr 20, 2011 9:00 pm
by complexityQuantifier
b25:

If I cast Blood Spray while my vim level is at maximum, it always costs full vim, no matter how many creatures I kill with it (or what I'm targeting). On the other hand, when I'm missing a lot of vim, it's correctly free when I kill with it.

I think that Blood Spray might be somehow refunding its vim cost before you've actually paid the cost? So if your vim was previously full, you don't go over the maximum, and then it drops.

Edit: Actually, this is happening with Blood Boil too; maybe it happens for all area-effects?
Edit: Well, no, it doesn't happen with Darkfire; I guess it's with spells that emanate from you?

Re: Blood Spray refills vim before spending

Posted: Thu Apr 21, 2011 7:09 pm
by yufra
IIRC the vim recover is a bit difficult to code. The current method is to store the amount and turn you last used vim during, and if the NEXT turn you kill something you recover the vim. This doesn't work for attacks that take time to kill, for example projectiles. Not sure if this is how it works now, though.

Re: Blood Spray refills vim before spending

Posted: Thu Apr 21, 2011 8:00 pm
by Marcotte
Couldn't the refund cost be stored in a variable that is sent to the projectile (or project), and have the damage code decide on the refund?

Re: Blood Spray refills vim before spending

Posted: Thu Apr 21, 2011 10:03 pm
by yufra
Marcotte wrote:Couldn't the refund cost be stored in a variable that is sent to the projectile (or project), and have the damage code decide on the refund?
That sounds workable... want to code it? :wink:

Re: Blood Spray refills vim before spending

Posted: Sat Jul 23, 2011 8:47 am
by Frumple
Just bumping this to say it's still in b31 and apparently effects blood boil as well. I can only assume the issue occurs with all vim-based AoE attacks, not just the ones that inflict damage over time.

Re: Blood Spray refills vim before spending

Posted: Sat Jul 23, 2011 6:42 pm
by greycat
Swallow also works this way -- you get the EQ back from the monster you eat, and then you're charged the cost of Swallow itself after that, so you always end up at 4 EQ (plus whatever sustains you have) instead of 0.