diff --git a/data/campaigns/tutorial/scenarios/01_Tutorial_part_1.cfg b/data/campaigns/tutorial/scenarios/01_Tutorial_part_1.cfg index 3deab5558afa..917ee9cbd786 100644 --- a/data/campaigns/tutorial/scenarios/01_Tutorial_part_1.cfg +++ b/data/campaigns/tutorial/scenarios/01_Tutorial_part_1.cfg @@ -80,7 +80,6 @@ {IS_HERO} [modifications] {TRAIT_INTELLIGENT} - {TRAIT_QUICK} [object] [effect] apply_to=new_animation @@ -266,17 +265,30 @@ message= _ "Quiet! I will summon an enemy for you..." [/message] - # Delfador steps 2 hexes northeast to a new summoning position - {MOVE_UNIT (id=Delfador) 15 4} - {MODIFY_UNIT (id=Delfador) facing sw} - - # Adjust Delfador's MP as if he really moved - [lua] - code= << - local unit = wesnoth.get_units({id = "Delfador"})[1] - unit.moves = 5 - >> - [/lua] + # Explicitly check if the spot is free. The place where the engine + # would place the unit (nw of it) is less helpful, because the place + # where Delfador moves later is then more than 5 moves away. + [if] + [not] + [have_unit] + x=14 + y=4 + [/have_unit] + [/not] + [then] + # Delfador steps 1 hex northeast to a new summoning position + {MOVE_UNIT (id=Delfador) 14 4} + {MODIFY_UNIT (id=Delfador) facing sw} + [/then] + [else] + # Delfador steps 1 hex southeast to a new summoning position + {MOVE_UNIT (id=Delfador) 14 5} + {MODIFY_UNIT (id=Delfador) facing nw} + [/else] + [/if] + + # Adjust Delfador's MP as if he really moved, disabled due to issue #3344 + # {MODIFY_UNIT (id=Delfador) moves 5} [scroll_to_unit] id=Delfador @@ -343,7 +355,6 @@ [/message] )} - # wmllint: local spelling OK {GENDER ( [message] speaker=narrator @@ -406,15 +417,24 @@ [/message] )} - {MOVE_UNIT (id=Delfador) 14 8} - - # Adjust Delfador's MP as if he really moved - [lua] - code= << - local unit = wesnoth.get_units({id = "Delfador"})[1] - unit.moves = 0 - >> - [/lua] + # Check where Delfador is, to set the remaining moves accordingly + [if] + [have_unit] + id=Delfador + x=14 + y=4 + [/have_unit] + [then] + {MOVE_UNIT (id=Delfador) 14 8} + # Adjust Delfador's MP as if he really moved, disabled due to issue #3344 + # {MODIFY_UNIT (id=Delfador) moves 0} + [/then] + [else] + {MOVE_UNIT (id=Delfador) 14 8} + # Adjust Delfador's MP as if he really moved, disabled due to issue #3344 + # {MODIFY_UNIT (id=Delfador) moves 2} + [/else] + [/if] {MODIFY_UNIT (id=Delfador) facing nw} @@ -475,17 +495,8 @@ text= _ "Village" visible_in_fog=yes visible_in_shroud=no - x=10 - y=3 - [/label] - - [label] - immutable=yes - text= _ "Village" - visible_in_fog=yes - visible_in_shroud=no - x=11 - y=7 + x=10,11 + y=3,7 [/label] {GENDER ( @@ -900,7 +911,6 @@ [/color_adjust] [unit] - id=Quintain1 type=Quintain ai_special=guardian x,y=16,10 @@ -908,7 +918,6 @@ [/unit] [unit] - id=Quintain2 type=Quintain ai_special=guardian x,y=13,11 @@ -916,7 +925,6 @@ [/unit] [unit] - id=Quintain3 type=Quintain ai_special=guardian x,y=9,11 diff --git a/data/campaigns/tutorial/utils/utils.cfg b/data/campaigns/tutorial/utils/utils.cfg index 8cb0a0f0fa5e..c6e47e4e1c9f 100644 --- a/data/campaigns/tutorial/utils/utils.cfg +++ b/data/campaigns/tutorial/utils/utils.cfg @@ -38,10 +38,13 @@ [filter] id=student [/filter] + [allow_end_turn][/allow_end_turn] [/event] + [event] name=turn end + [remove_event] id=prevent deadlock [/remove_event]