From f25243f0a39cf8585411386aa9228eaa293c6f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Severin=20Gl=C3=B6ckner?= Date: Sun, 15 Jul 2018 19:58:22 +0200 Subject: [PATCH] DiD utils: use 1.13 syntax It's now possible to have this logic as part of [role] [ci skip] (cherry-picked from commit 440efd25600245ce5a69561312494ff2cdd8332b) --- .../Descent_Into_Darkness/utils/macros.cfg | 41 ++++++++----------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/data/campaigns/Descent_Into_Darkness/utils/macros.cfg b/data/campaigns/Descent_Into_Darkness/utils/macros.cfg index 3a2a32b94e4a..9dc234504663 100644 --- a/data/campaigns/Descent_Into_Darkness/utils/macros.cfg +++ b/data/campaigns/Descent_Into_Darkness/utils/macros.cfg @@ -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