Quantcast
Channel: The Battle for Wesnoth Forums
Viewing all articles
Browse latest Browse all 1507

WML Workshop • defeat_condition=never query

$
0
0
Hi,
Bit puzzled and would appreciate some clarification before I go down rabbit-holes...

I have a scenario which includes an evacuation element.
At this point the player controls two sides; 1 and 3.

Side 1 needs to evacuate all units via [put_to_recall_list] which works fine.

However for gameplay reasons I wanted the player to be able to evacuate leaders first (if they wished to do so) and then as many other units as possible before time runs out.

When the last leader (this side has multiple leaders) is [put_to_recall_list] this code kicks in:

Code:

...          [have_unit]            id=$this_item.id            canrecruit=yes          [/have_unit]          [have_unit]            side=1            canrecruit=yes            count=1          [/have_unit]        [then]# Current unit is last side 1 leader on map          [modify_side]            side=1            defeat_condition=never          [/modify_side]...
Which according to :debug :inspect also works.
However the next side 1 turn auto-loses, I'm guessing because there are no leaders for side 1, even tho' (I thought) defeat_condition=never would stop this.
The lose isn't coming from the leader die events because if that were the case the lose should occur immediately the first leader is removed from the map?

I've also used this in my other campaign (been on hold for 6+ months now) where I start a scenario with defeat_condition=never because one player side's leader doesn't appear until later on. That worked fine (tested on 1.16, not tried 1.18 yet).

So... am I doing something stupid here?
Have I misunderstood something?

Any clarification greatly appreciated.

Cheers!
-- Spannerbag

Statistics: Posted by Spannerbag — 9 minutes ago



Viewing all articles
Browse latest Browse all 1507

Trending Articles