[Ohrrpgce] [ohrrpgce/ohrrpgce] Attack costs deducted at a dubious time (#1122)

Ralph Versteegen notifications at github.com
Sat Apr 25 18:39:30 PDT 2020


I think when costs are deducted is wrong in some ways and problematic in others.

I think it's intuitive that costs be deducted at the start of the attack, maybe even at the start of the attack delay -- an attack bit to deduct costs before instead of after the delay seems reasonable. Note we have a "Recheck costs after delay" attack bit; that one would be shadowed by a new bit.

If an attack hits multiple targets, or a target multiple times, then costs are deducted after the first attack, which is surely a bug because HP and MP might be used as base ATK stat by the attack.

Also, `battle_attack_do_inflict` does
``IF liveherocount(bslot()) = 0 THEN bat.atk.id = -1``
at the end (I don't know whether there's a dead attacker check elsewhere), so it looks like if an HP cost kills an attacking hero then the attack gets cancelled after hitting the first target, but not so for enemies. The attack should instead stop after all attacks happen.

So it looks like HP costs should happen after an attack, but that could be made a special case, or if they happen before, the attacker death-check should happen after.

Attack tags are evaluated again for each target, which is correct, but it happens before costs on the first target, and then after costs are subtracted for all remaining targets, which is inconsistent. Again, it would be better if costs happen either before all attacks or after all attacks.

It would be a backcompat break to deduct costs before instead of after, but we were going to add a backcompat bit to enable the uncountable other attack cost bugfixes for #1098, so we can reuse that bit. Or maybe make it preference bit instead.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/ohrrpgce/ohrrpgce/issues/1122
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20200425/6cbb9e23/attachment.html>


More information about the Ohrrpgce mailing list