NR: use 1.13 syntax for finding suitable units for [role]

[ci skip]
This commit is contained in:
Severin Glöckner 2018-07-27 20:48:46 +02:00
parent e55f192634
commit 59b205a404
3 changed files with 41 additions and 71 deletions

View file

@ -1055,15 +1055,7 @@
type=Thug,Bandit
search_recall_list=no
role=Admirer
[/role]
[if]
[not]
[have_unit]
role=Admirer
[/have_unit]
[/not]
[then]
[else]
[role]
[not]
id=Tallin
@ -1078,24 +1070,16 @@
side=1
search_recall_list=no
role=Admirer
[else]
[role]
# Supporter and Camerin shouldnt get Admirer role
id=Tallin
role=Admirer
[/role]
[/else]
[/role]
[/then]
[/if]
[if]
[not]
[have_unit]
role=Admirer
[/have_unit]
[/not]
[then]
# Supporter and Camerin shouldnt get Admirer role
[role]
id=Tallin
role=Admirer
[/role]
[/then]
[/if]
[/else]
[/role]
[message]
role=Admirer

View file

@ -797,24 +797,21 @@
message= _ "Farewell, my friends. I now go to join my fallen brothers."
[/message]
# not necessarily a unit has to be matched
[role]
type=Dwarvish Berserker,Dwarvish Ulfsurker
role=Shinsplitter
search_recall_list=no
[else]
[role]
type=Dwarvish Berserker,Dwarvish Ulfsurker
role=Shinsplitter
search_recall_list=only
[auto_recall][/auto_recall]
[/role]
[/else]
[/role]
[if]
[not]
[have_unit]
role=Shinsplitter
[/have_unit]
[/not]
[then]
[recall]
role=Shinsplitter
[/recall]
[/then]
[/if]
[message]
role=Shinsplitter
message= _ "No, Stalrag! Without you what will become of the Shinsplitters?"
@ -891,7 +888,8 @@
{SUPPORTER_DEATH_HANDLER}
#enddef
# This death event makes sure there is always a supporter around
# This death event tries to find a new supporter.
# In case it fails, a supporter will be availaible at the next scenario.
#define SUPPORTER_DEATH_HANDLER
[event]
name=die
@ -900,12 +898,10 @@
[/filter]
[role]
type_adv_tree=Peasant,Mage
side=1
type_adv_tree=Pesant,Mage
[not]
id=Camerin
[/not]
[not]
id=Tallin
id=Camerin,Tallin
[/not]
[not]
type_adv_tree=White Mage
@ -914,6 +910,7 @@
role=Supporter
[/not]
role=Supporter
search_recall_list=no
[/role]
[/event]
#enddef

View file

@ -19,38 +19,27 @@
role=Supporter
[/recall]
[/then]
[elseif]
[else]
# Else, make a new supporter
[have_unit]
[role]
role=Supporter
side=1
[not]
id=Tallin
[/not]
search_recall_list=yes
[/have_unit]
[then]
[role]
side=1
[not]
id=Tallin
[/not]
role=Supporter
[/role]
[recall]
role=Supporter
[/recall]
[/then]
[/elseif]
[else]
# If that fails too, make a brand new supporter
[unit]
type=Peasant
side=1
role=Supporter
animate=yes
placement=leader
[/unit]
[auto_recall][/auto_recall]
[else]
# If that fails too, make a brand new supporter
[unit]
type=Peasant
side=1
role=Supporter
animate=yes
placement=leader
[/unit]
[/else]
[/role]
[/else]
[/if]
#enddef