From 656a44664d3d16fc4179f06f0e902c1c8df861a1 Mon Sep 17 00:00:00 2001 From: Steve Cotton Date: Fri, 4 Oct 2019 03:51:15 +0200 Subject: [PATCH] Tutorial S02: Make the grunt cross the bridge without bait (#4425) Not a code-revert, but a behavior-revert of the switch of this unit to use the guardian AI. 26327a5bdc41180ae1a4b73bffbaf668ca2c31da. If he somehow doesn't get across the bridge, warn the player that something has broken. --- changelog.md | 2 + .../tutorial/scenarios/02_Tutorial_part_2.cfg | 75 +++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/changelog.md b/changelog.md index 9cc3006e461e..13ea531eafdb 100644 --- a/changelog.md +++ b/changelog.md @@ -8,6 +8,8 @@ * S1: Fix reference to LoW events * The South Guard: * Change Halidel to be Deoran's great-grandfather + * Tutorial: + * S2: Make the first grunt cross the bridge, otherwise the scenario is too hard ### Language and i18n * Updated translations: Chinese (Simplified), Italian, Korean, Portuguese (Brazil) diff --git a/data/campaigns/tutorial/scenarios/02_Tutorial_part_2.cfg b/data/campaigns/tutorial/scenarios/02_Tutorial_part_2.cfg index 0ca940152047..dd94aec6fd2f 100644 --- a/data/campaigns/tutorial/scenarios/02_Tutorial_part_2.cfg +++ b/data/campaigns/tutorial/scenarios/02_Tutorial_part_2.cfg @@ -484,6 +484,81 @@ A full list of abilities and weapons specials, along with traits, may be found i )} [/event] + # If the player didn't provide bait for Dumbo, the guardian AI won't move + # him, and that makes the scenario much harder than it should be. Hardcode + # the exact move that we want rather than switching to the normal AI, as + # the normal AI would probably take the village instead. + [event] + name=side 2 turn 2 end + + [if] + [have_unit] + id=Dumbo + x,y=9,13 + [/have_unit] + [not] + # Sanity check, if there's a unit anywhere here then the Guardian AI + # is expected to have attacked it; if not then something complex is + # happening (maybe the player already has a Ranger with Ambush). + # + # The sanity check isn't to see if the guardian AI has moved + # the unit, it's to check that moving from 9,13 to 9,8 doesn't + # walk through a ZoC. We're in a side-end-turn event and + # Dumbo's still on his starting point, so the guardian AI has + # already decided not to move him (or a unit managed to get to + # 9,12 for a fight, in which case let's show the sanity check + # failure message anyway). + [have_unit] + x=8-10 + y=8-12 + [/have_unit] + [/not] + [then] + [move_unit] + id=Dumbo + to_x,to_y=9,8 + [/move_unit] + [/then] + [/if] + + # Something has triggered the sanity check. If you want to test this, + # use a unit with Ambush to put a ZoC on his path (which the player + # won't have at this stage of the tutorial, any elvish archers that + # they have will be fresh recruits). + [if] + [have_unit] + id=Dumbo + [/have_unit] + [not] + [have_unit] + id=Dumbo + y=1-9 + [/have_unit] + [/not] + # But not if the player has run on to the bridge themselves to attack. + # That does make it harder, but the player can likely attack from 2 or + # 3 sides, if they ignore the warning about attacking from water. + [not] + [have_unit] + side=1 + [filter_adjacent] + id=Dumbo + [/filter_adjacent] + [/have_unit] + [/not] + [then] + [message] + speaker=narrator + caption= _ "The tutorial isn’t meant to be this difficult" + image=wesnoth-icon.png + message= _ "The orc on the island was supposed to move over the bridge, so that he could be attacked by several elves at once. Something’s broken the scripted event, which will make the scenario harder by leaving him in a defensive position. + +Please report the bug." + [/message] + [/then] + [/if] + [/event] + [event] name=turn 3