bugBattle for Wesnoth - Bugs: bug #16850, 'enemies defeated' events fired at...

Show feedback again

bug #16850: 'enemies defeated' events fired at odd times

Submitted by:  Lari Nieminen <zookeeper>
Submitted on:  Sun Oct 10 21:27:25 2010  
Category: Feature RequestSeverity: 3 - Normal
Priority: 5 - NormalItem Group: WML
Status: Wont FixPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Release: trunkOperating System: win xp

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


Sun Nov 9 17:51:24 2014, comment #3:

like i said in https://gna.org/bugs/index.php?16820 killing all units with [kill] is not guaranteed to invoke a victory or a defeat becasue wml might give them the units back in the same event.

The "enemies defeated" event is the event that fires before getting a victory that's not caused by [endlevel]. Also it replaces the victory invokation on victory_when_enemies_defeated=no.

I really think that changing this event into fireing on [kill] would be a huge change that most likeley breaks some scenarios. On the other side i think it would be easy to define a cutom [kill_check] wmlaction in lua that does the kill and checks for existent leaders afterwards and fires an event if needed.

Marking as wontfix.

Daniel <gfgtdf>
Project Member
Thu Oct 20 20:35:44 2011, comment #2:

Changing to feature request like bug #16820. The bug part (enemies defeated fired every side turn if no longer any enemy leaders alive) doesn't make sense since existing wml could depend on it.

Anonymissimus <anonymissimus>
Project Member
Fri Aug 12 18:11:42 2011, comment #1:

Well...after thinking high and low around this and the related bug #16820 and patch #2241...
Does it make sense to fix this "bug" ? It could for instance be fixed by basically using first_time_only=true on the C++ side. But it would make the event less useful. It is fired at the correct time, that is, when the last enemy leader dies, since check_victory is called after every fight. Usually it's first_time_only=yes in this event so it isn't noticable.
Perhaps someone has some wml based on this event firing on the subsequent (side) turns which would break ?
(Of course I also noticed that it's much harder to fix than expected, especially taking into consideration silene's post in patch #2241...)

Anonymissimus <anonymissimus>
Project Member
Sun Oct 10 21:27:25 2010, original submission:

'enemies defeated' events seem to be fired whenever the player ends their turn, if there are no enemy leaders present at that time.

The sensible behaviour would be to fire them only at the same times when a die event for a leader would also be fired. That is, when the last enemy leader is killed in combat or [kill]ed with fire_event=yes.

Lari Nieminen <zookeeper>
Project Administrator


(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 shadowmaster (Updated the item)
  • -unavailable- added by gfgtdf (Posted a comment)
  • -unavailable- added by anonymissimus (Posted a comment)
  • -unavailable- added by zookeeper (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



    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Nov 10 00:10:37 2014shadowmasterOpen/ClosedOpen=>Closed
    Sun Nov 9 17:51:24 2014gfgtdfStatusNone=>Wont Fix
    Thu Oct 20 20:35:44 2011anonymissimusCategoryBug=>Feature Request
    Fri Aug 12 18:21:47 2011anonymissimusAssigned toanonymissimus=>None
    Thu Aug 11 16:03:44 2011anonymissimusAssigned toNone=>anonymissimus
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup