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. 26327a5bdc.

If he somehow doesn't get across the bridge, warn the player
that something has broken.
This commit is contained in:
Steve Cotton 2019-10-04 03:51:15 +02:00
parent 91b84539de
commit 656a44664d
2 changed files with 77 additions and 0 deletions

View file

@ -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)

View file

@ -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 isnt 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. Somethings 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