UtBS S05 add logic to the main cavern event so scouting is taken into account (#7427)
This commit is contained in:
parent
5fbfed386e
commit
252d4148c4
2 changed files with 76 additions and 5 deletions
|
@ -2,6 +2,8 @@
|
|||
### Add-ons client
|
||||
### Add-ons server
|
||||
### Campaigns
|
||||
* Under the Burning Suns
|
||||
* S05 Fixed the main cavern event not taking scouting into account. (issue #7394)
|
||||
### Editor
|
||||
### Multiplayer
|
||||
### Lua API
|
||||
|
|
|
@ -843,7 +843,7 @@
|
|||
|
||||
#2 troll whelps
|
||||
{DEFENDER 3 (Troll Whelp) 31 30 (Troll Defender) ( _ "Troll Defender")}
|
||||
{DEFENDER 2 (Troll Whelp) 29 28 (Troll Defender) ( _ "Troll Defender")}
|
||||
{DEFENDER 2 (Troll Whelp) 29 29 (Troll Defender) ( _ "Troll Defender")}
|
||||
|
||||
#western reinforcements
|
||||
|
||||
|
@ -930,10 +930,79 @@
|
|||
#dwarf/troll/elf dialogue
|
||||
|
||||
{CHECK_EXPLORER}
|
||||
[message]
|
||||
speaker=$explorer.id
|
||||
message= _ "Whoa."
|
||||
[/message]
|
||||
# {DEBUG_MSG "Explorer id is $explorer.id, position is $explorer.x , $explorer.y"}
|
||||
[if]
|
||||
[variable]
|
||||
name=explorer.id
|
||||
equals="Kaleh"
|
||||
[/variable]
|
||||
[then]
|
||||
[message]
|
||||
speaker=$explorer.id
|
||||
message= _ "Whoa."
|
||||
[/message]
|
||||
[/then]
|
||||
[else]
|
||||
[message]
|
||||
speaker=$explorer.id
|
||||
#po: "this" refers to the trolls and dwarves fighting
|
||||
message= _ "Whoa. Kaleh, you have to come see this."
|
||||
[/message]
|
||||
# if the explorer is too far ahead (x>26), put kaleh safely behind
|
||||
[if]
|
||||
[variable]
|
||||
name=explorer.x
|
||||
greater_than=26
|
||||
[/variable]
|
||||
[then]
|
||||
[move_unit]
|
||||
id=Kaleh
|
||||
to_x=24
|
||||
to_y=28
|
||||
[/move_unit]
|
||||
[/then]
|
||||
[else]
|
||||
[move_unit]
|
||||
id=Kaleh
|
||||
to_x=$explorer.x
|
||||
to_y=$explorer.y
|
||||
[/move_unit]
|
||||
[/else]
|
||||
[/if]
|
||||
[/else]
|
||||
[/if]
|
||||
[store_unit]
|
||||
[filter]
|
||||
id=Kaleh
|
||||
[/filter]
|
||||
variable=kaleh_restore_mp
|
||||
kill=no
|
||||
[/store_unit]
|
||||
#ifndef HARD
|
||||
[modify_unit]
|
||||
[filter]
|
||||
id=Kaleh
|
||||
[/filter]
|
||||
moves=$kaleh_restore_mp.max_moves
|
||||
[/modify_unit]
|
||||
#else
|
||||
# Give Kaleh just a few moves, if necessary, in case he is in a dangerous position after the movement.
|
||||
[if]
|
||||
[variable]
|
||||
name=kaleh_restore_mp.moves
|
||||
less_than=3
|
||||
[/variable]
|
||||
[then]
|
||||
[modify_unit]
|
||||
[filter]
|
||||
id=Kaleh
|
||||
[/filter]
|
||||
moves=3
|
||||
[/modify_unit]
|
||||
[/then]
|
||||
[/if]
|
||||
#endif
|
||||
{CLEAR_VARIABLE kaleh_restore_mp}
|
||||
|
||||
# Unhide the dwarves' and trolls' sides
|
||||
[modify_side]
|
||||
|
|
Loading…
Add table
Reference in a new issue