From 2b6787c8294e757b5232b696c064b2d653e8bb9a Mon Sep 17 00:00:00 2001 From: Lari Nieminen Date: Sun, 24 Jan 2010 20:00:02 +0000 Subject: [PATCH] Fixed duplicate id's of the elvish bodyguards. --- .../scenarios/04_Vale_of_Tears.cfg | 25 +++++++------------ .../scenarios/06a_Tidings_Good_And_Ill.cfg | 2 +- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/data/campaigns/The_South_Guard/scenarios/04_Vale_of_Tears.cfg b/data/campaigns/The_South_Guard/scenarios/04_Vale_of_Tears.cfg index 47d28b6e76b..b42067b8485 100644 --- a/data/campaigns/The_South_Guard/scenarios/04_Vale_of_Tears.cfg +++ b/data/campaigns/The_South_Guard/scenarios/04_Vale_of_Tears.cfg @@ -364,24 +364,25 @@ #endif [/variable] [do] - {VARIABLE guard_x 0} - {VARIABLE guard_y 0} + # fallback coordinates, in case no nearby vacant forest is found + {VARIABLE guard_x $ethiliel_loc.x} + {VARIABLE guard_y $ethiliel_loc.y} + [set_variable] name=guard_x - to_variable=bodyguard_loc[$number].x + value=$bodyguard_loc[$number].x [/set_variable] [set_variable] name=guard_y - to_variable=bodyguard_loc[$number].y + value=$bodyguard_loc[$number].y [/set_variable] [unit] - id=Elvish Bodyguard + role=Elvish Bodyguard name= _ "Elvish Bodyguard" type=Elvish Ranger side=1 - name=Elvish Bodyguard x,y=$guard_x,$guard_y random_traits=yes [modifications] @@ -394,18 +395,10 @@ [/do] [/while] - [clear_variable] - name=bodyguard_loc - [/clear_variable] - [clear_variable] - name=ethiliel_loc - [/clear_variable] - [clear_variable] - name=number - [/clear_variable] + {CLEAR_VARIABLE bodyguard_loc,ethiliel_loc,number} [message] - speaker=Elvish Bodyguard + role=Elvish Bodyguard message= _ "We stand ready, my lady, to protect you! We shall lead these men of Wesnoth into the fray!" [/message] [/event] diff --git a/data/campaigns/The_South_Guard/scenarios/06a_Tidings_Good_And_Ill.cfg b/data/campaigns/The_South_Guard/scenarios/06a_Tidings_Good_And_Ill.cfg index 7dfbe1bca5d..99b671c0385 100644 --- a/data/campaigns/The_South_Guard/scenarios/06a_Tidings_Good_And_Ill.cfg +++ b/data/campaigns/The_South_Guard/scenarios/06a_Tidings_Good_And_Ill.cfg @@ -135,7 +135,7 @@ [store_unit] [filter] side=1 - id=Elvish Bodyguard + role=Elvish Bodyguard [/filter] kill=yes