diff --git a/data/campaigns/Winds_of_Fate/images/icons/advantage.png b/data/campaigns/Winds_of_Fate/images/icons/advantage.png new file mode 100644 index 00000000000..6ab374f44c3 Binary files /dev/null and b/data/campaigns/Winds_of_Fate/images/icons/advantage.png differ diff --git a/data/campaigns/Winds_of_Fate/lua/lua.lua b/data/campaigns/Winds_of_Fate/lua/lua.lua index b7e1888f85e..2f9ae73e48d 100644 --- a/data/campaigns/Winds_of_Fate/lua/lua.lua +++ b/data/campaigns/Winds_of_Fate/lua/lua.lua @@ -64,9 +64,16 @@ local function determine_advantage() side_comparison = side_comparison .. "\n" .. comparison_text:vformat{side_number = winning_sides[1], other_side_number = winning_sides[2]} result = "tie" end + if dialog_type == "turnsover" then -- po: "Turns Over", meaning "turn limit reached" is the title of the end-of-match summary dialog - local a, b = gui.show_popup(_ "dialog^Turns Over", side_comparison) + local a, b = gui.show_popup(_ "dialog^Turns Over", side_comparison) + else + local a, b = gui.show_popup(_ "dialog^Advantage", side_comparison) + end return result end +arg={...} +-- There need to be two different dialog titles, but the title is not passed directly as a string because it wouldn't be translatable in that case. +dialog_type=arg[1] return determine_advantage() diff --git a/data/campaigns/Winds_of_Fate/scenarios/02x_Victory_Feast.cfg b/data/campaigns/Winds_of_Fate/scenarios/02x_Victory_Feast.cfg index e4e5ff8a3dd..3c86f8772c5 100644 --- a/data/campaigns/Winds_of_Fate/scenarios/02x_Victory_Feast.cfg +++ b/data/campaigns/Winds_of_Fate/scenarios/02x_Victory_Feast.cfg @@ -16,12 +16,12 @@ [part] background={KARRON_PORTRAIT} scale_background=no - story={CAPTION ( _ "Karron")} + _ "Savory... (crunch)" + story={CAPTION ( _ "Karron")} + _ "Savory..." [/part] [part] background={KARRON_PORTRAIT} scale_background=no - story={CAPTION ( _ "Karron")} + _ "Sapid... (chewing)" + story={CAPTION ( _ "Karron")} + _ "Sapid..." [/part] [part] background={KARRON_PORTRAIT} @@ -48,14 +48,8 @@ Speak of it." [part] background={KARRON_PORTRAIT} scale_background=no - story={CAPTION ( _ "Karron")} + _ "(examining his meal) - -... ‘Orkchops’" - [/part] - [part] - background={KARRON_PORTRAIT} - scale_background=no - story={CAPTION ( _ "Karron")} + _ "(CRUNCH)" + #po: This is a pun of “Pork chops” + story={CAPTION ( _ "Karron")} + _ "Hmm... ‘Ork chops’" [/part] [part] background={RESHAN_PORTRAIT} diff --git a/data/campaigns/Winds_of_Fate/scenarios/03_The_Contention.cfg b/data/campaigns/Winds_of_Fate/scenarios/03_The_Contention.cfg index 745813f9915..499bf37fd33 100644 --- a/data/campaigns/Winds_of_Fate/scenarios/03_The_Contention.cfg +++ b/data/campaigns/Winds_of_Fate/scenarios/03_The_Contention.cfg @@ -201,9 +201,13 @@ [event] name=prestart {MODIFY_UNIT side=1 facing s} + [store_side] + side=2 + variable=side_2 + [/store_side] [objectives] [objective] - description= _ "Hold the advantage by turn 24" + description= _ "Hold the advantage at the end of turn 24" condition=win [/objective] [objective] @@ -212,7 +216,7 @@ condition=win [/objective] [objective] - description= _ "Not hold the advantage by turn 24" + description= _ "Not hold the advantage at the end of turn 24" condition=lose [/objective] [objective] @@ -223,8 +227,13 @@ carryover_percentage=0 [/gold_carryover] [note] - description= _ "Advantage is determined by the sum of gold, income and the value of all drakes on the field" + description= _ "Advantage is determined by adding the gold, the value of the drakes on the field, and five times the income; Right-click to see the current score" [/note] +#ifndef EASY + [note] + description= _ "Karron will get an income of $side_2.village_gold gold per village" + [/note] +#endif [note] description= _ "You must recruit one drake from each caste before recruiting any more" [/note] @@ -235,9 +244,10 @@ description= _ "Any drake you lose in combat will not be killed and may be recalled in future scenarios" [/note] [note] - description= _ "From now on, Gorlack will have loyal intendants from the fighter and clasher castes; if one dies, the next recalled drake of the same caste will replace it, if that drake is level 2 or higher" + description= _ "From now on, Gorlack will have loyal intendants from the fighter and clasher castes; if one dies, the next recalled drake of the same caste will replace it as long as that drake is level 2 or higher" [/note] [/objectives] + {CLEAR_VARIABLE side_2} [/event] [event] @@ -342,12 +352,33 @@ You shall learn a pivotal lesson in humility!" [/put_to_recall_list] [/event] + [event] + name=prestart + [set_menu_item] + id=advantage_dialog + description= _ "Show Advantage" + image="icons/advantage.png" + [command] + [lua] + code = << wml.variables["result"] = wesnoth.dofile("campaigns/Winds_of_Fate/lua/lua.lua", "advantage") >> + [/lua] + [/command] + [/set_menu_item] + [/event] + + [event] + name=victory + [clear_menu_item] + id=advantage_dialog + [/clear_menu_item] + [/event] + [event] name=time over first_time_only=no # Determine which side has the advantage. [lua] - code = << wml.variables["result"] = wesnoth.dofile("campaigns/Winds_of_Fate/lua/lua.lua") >> + code = << wml.variables["result"] = wesnoth.dofile("campaigns/Winds_of_Fate/lua/lua.lua", "turnsover") >> [/lua] [switch] variable=result diff --git a/data/campaigns/Winds_of_Fate/scenarios/04_Journey.cfg b/data/campaigns/Winds_of_Fate/scenarios/04_Journey.cfg index 91a780339b2..0799735e791 100644 --- a/data/campaigns/Winds_of_Fate/scenarios/04_Journey.cfg +++ b/data/campaigns/Winds_of_Fate/scenarios/04_Journey.cfg @@ -146,11 +146,11 @@ [objectives] side=1 [objective] - description= _ "Hold all villages by the end of turn 18" + description= _ "Hold all villages at the end of turn 18" condition=win [/objective] [objective] - description= _ "Not hold all villages by the end of turn 18" + description= _ "Not hold all villages at the end of turn 18" condition=lose [/objective] [objective] diff --git a/data/campaigns/Winds_of_Fate/scenarios/05_Threshold.cfg b/data/campaigns/Winds_of_Fate/scenarios/05_Threshold.cfg index 121e4990189..78f6c2b30bd 100644 --- a/data/campaigns/Winds_of_Fate/scenarios/05_Threshold.cfg +++ b/data/campaigns/Winds_of_Fate/scenarios/05_Threshold.cfg @@ -742,6 +742,7 @@ Their resemblance is so strikingly of hatchlings..." speaker=Arinexis image_pos=right mirror=yes + #po: This "rapid clicking" is either a sound made by the saurian tongue or by a non-mammalian vocal organ like the avian syrinx. message= _ "Ssso these are Fire Dragons, eh Zedrix? Hail, dragons! (rapid clicking) Down here!" # no spellcheck