Skip to content

Commit

Permalink
DiD utils: use 1.13 syntax
Browse files Browse the repository at this point in the history
It's now possible to have this logic as part of [role]

[ci skip]

(cherry-picked from commit 440efd2)
  • Loading branch information
sevu committed Oct 7, 2018
1 parent b6c7dd1 commit f25243f
Showing 1 changed file with 16 additions and 25 deletions.
41 changes: 16 additions & 25 deletions data/campaigns/Descent_Into_Darkness/utils/macros.cfg
Expand Up @@ -29,39 +29,30 @@
search_recall_list=yes
[/have_unit]
[then]
# Recall an advisor if we have one to do so
# Recall an advisor if we have one
[recall]
role=advisor
[/recall]
[/then]
[elseif]
[else]
# Else, make a new advisor from a ghost unit
[have_unit]
[role]
role=advisor
side=1
type=Spectre,Nightgaunt,Wraith,Shadow,Ghost
search_recall_list=yes
[/have_unit]
[then]
[role]
role=advisor
side=1
type=Spectre,Nightgaunt,Wraith,Shadow,Ghost
[/role]

[recall]
role=advisor
[/recall]
[/then]
[/elseif]
[else]
# If that fails too, make a brand new ghost advisor
[unit]
type=Ghost
side=1
role=advisor
animate=yes
placement=leader
[/unit]
[auto_recall][/auto_recall]
[else]
# If that fails too, make a brand new ghost advisor
[unit]
type=Ghost
side=1
role=advisor
animate=yes
placement=leader
[/unit]
[/else]
[/role]
[/else]
[/if]
#enddef
Expand Down

0 comments on commit f25243f

Please sign in to comment.