URL:
  <http://gna.org/bugs/?21622>

                 Summary: Reload number of attacks after combat events
                 Project: Battle for Wesnoth
            Submitted by: elvish_pillager
            Submitted on: Sat 08 Feb 2014 05:12:40 PM UTC
                Category: Bug
                Severity: 1 - Wish
                Priority: 5 - Normal
              Item Group: WML
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.11.8+dev
        Operating System: Debian Linux

    _______________________________________________________

Details:

Currently, no script has the power to change a unit's number of swings after a
combat starts (except by invalidating one of the combatants and ending the
combat on both sides). Even if a unit's attacks are completely removed, it
continues to "swing" with a null attack that has zero chance to hit -
including playing the full defense animation.

I recommend that instead of setting n_attacks and then decrementing towards
zero, the code start at zero and increment for each swing, and stop once that
value exceeds a unit's *current* number of attacks. And let a unit get extra
swings even after it's missed a swing once (but don't restart the combat if it
gains swings after attack_end).

This would enable users to intuitively write [event]-based attack specials
such as "gets an extra swing for each time the opponent misses it in combat" -
the only complication is resetting it at attack_end, which is fairly trivial.

Since this would make swarm behave differently, the attack should also record
the original HP values at the beginning of the attack, and use the recorded
values for the purposes of any swarm specials.

If the side effects of this change are too undesirable, the unit should at
least stop calling "perform_hit" if its attack has been removed completely.




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?21622>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to