From 59e9dd1c43f4da1921b380dc32b857827c1da0e2 Mon Sep 17 00:00:00 2001 From: ln-zookeeper Date: Sun, 13 Apr 2014 14:28:13 +0300 Subject: [PATCH] Don't bother with stolen gold if there wasn't any --- changelog | 3 ++ .../scenarios/11_Captured.cfg | 44 ++++++++++++++++--- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/changelog b/changelog index 926a06708cf..95d3bc392f1 100644 --- a/changelog +++ b/changelog @@ -15,6 +15,9 @@ Version 1.13.0-dev: * Some internal reorganization of Micro AI code to facilitate customizing MAIs for UMC and adding functionality from other versions of Wesnoth * Campaigns: + * Eastern Invasion: + * In 'Captured', stolen gold won't be mentioned if the player had no + carryover gold. * The Hammer of Thursagan: * Fixed missing objective in 'The Court of Karrag'. * Rebalanced scenarios 'Invaders', Mages and Drakes' and 'Fear'. diff --git a/data/campaigns/Eastern_Invasion/scenarios/11_Captured.cfg b/data/campaigns/Eastern_Invasion/scenarios/11_Captured.cfg index acea5417099..b4a78c1b3e5 100644 --- a/data/campaigns/Eastern_Invasion/scenarios/11_Captured.cfg +++ b/data/campaigns/Eastern_Invasion/scenarios/11_Captured.cfg @@ -102,7 +102,6 @@ {PLACE_IMAGE scenery/gate-rusty-se.png 21 8} {PLACE_IMAGE scenery/gate-rusty-se.png 17 10} {PLACE_IMAGE scenery/gate-rusty-sw.png 29 9} - {PLACE_IMAGE items/chest-plain-closed.png 33 11} {PLACE_IMAGE scenery/trash.png 22 2} @@ -188,6 +187,17 @@ variable=stored_player_gold [/store_gold] + [if] + [variable] + name=stored_player_gold + greater_than_equal_to=1 + [/variable] + + [then] + {PLACE_IMAGE items/chest-plain-closed.png 33 11} + [/then] + [/if] + [modify_side] side=1 gold=0 @@ -985,12 +995,21 @@ message= _ "The eastern entrance is teeming with orcs. We have to find another way to exit to the west!" [/message] - [message] - speaker=Gweddry - message= _ "We have to get our gold back first! It must have been taken to their treasury." - [/message] + [if] + [variable] + name=stored_player_gold + greater_than_equal_to=1 + [/variable] - {HIGHLIGHT_IMAGE 33 11 items/chest-plain-closed.png ()} + [then] + [message] + speaker=Gweddry + message= _ "We have to get our gold back first! It must have been taken to their treasury." + [/message] + + {HIGHLIGHT_IMAGE 33 11 items/chest-plain-closed.png ()} + [/then] + [/if] [modify_turns] value="$($turn_number + 15)" @@ -1005,6 +1024,12 @@ [objective] description= _ "Retrieve the stolen gold" condition=win + [show_if] + [variable] + name=stored_player_gold + greater_than_equal_to=1 + [/variable] + [/show_if] [/objective] [objective] description= _ "Release the remaining prisoners" @@ -1138,6 +1163,13 @@ x,y=33,11 [/filter] + [filter_condition] + [variable] + name=stored_player_gold + greater_than_equal_to=1 + [/variable] + [/filter_condition] + [message] speaker=unit message= _ "All the gold the orcs took is in this chest!"