bugBattle for Wesnoth - Bugs: bug #21622, Reload number of attacks after...

Show feedback again

bug #21622: Reload number of attacks after combat events

Submitted by:  Eli Dupree <elvish_pillager>
Submitted on:  Sat Feb 8 17:12:40 2014  
Category: Feature RequestSeverity: 1 - Wish
Priority: 5 - NormalItem Group: WML
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: 1.11.8+devOperating System: Debian Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sat Feb 8 17:17:47 2014, comment #1:

Whoops - this should be an FR, not a bug.

Eli Dupree <elvish_pillager>
Sat Feb 8 17:12:40 2014, original submission:

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.

Eli Dupree <elvish_pillager>


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by mattsc (Updated the item)
  • -unavailable- added by elvish_pillager (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Feb 8 18:43:17 2014mattscCategoryBug=>Feature Request
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup