Skip to content

Commit

Permalink
SoF S7: Don't let the player kill all of the enemies
Browse files Browse the repository at this point in the history
  • Loading branch information
DisherProject authored and sevu committed Sep 14, 2018
1 parent 581d9aa commit 0d19b22
Showing 1 changed file with 54 additions and 2 deletions.
Expand Up @@ -48,8 +48,7 @@
value=0.1
[/goal]
[avoid]
x=11,17,18,16,14,22
y=5,12,20,33,28,14
terrain=*^V*
[/avoid]
village_value=0
aggression=1.0
Expand Down Expand Up @@ -195,6 +194,59 @@
[/unit]
[/event]

# More outriders will come if there are too few of them
[event]
name=die
first_time_only=no
[filter]
side=2
[/filter]
[filter_condition]
[have_unit]
side=2
count=0-2
[/have_unit]
[/filter_condition]

[store_unit]
[filter]
id=Alanin
[/filter]
variable=alanin
[/store_unit]

# In order to put pressure, the outriders will be spawned 12 hexes
# north from Alanin. 12 hexes ensure that not even a quick Elvish
# Outrider (11 MP) can reach Alanin in one turn.
# Anyway, the "y" is set between 1 and 60 by the Formula, because
# null or negative values would break the code, and because beyond
# "y=60" there is the human outpost.
[store_locations]
terrain=Rd
[or]
terrain=Wwf
[/or]
[and]
y="$(min([$(max([($alanin.y - 12), 1])), 60]))"
[/and]
variable=outriders_loc
[/store_locations]

[move_unit_fake]
type=Elvish Outrider
side=2
x=18,$outriders_loc[0].x
y= 1,$outriders_loc[0].y
[/move_unit_fake]

{GENERIC_UNIT 2 "Elvish Outrider" $outriders_loc[0].x $outriders_loc[0].y}
{GENERIC_UNIT 2 "Elvish Outrider" $outriders_loc[0].x $outriders_loc[0].y}
{GENERIC_UNIT 2 "Elvish Outrider" $outriders_loc[0].x $outriders_loc[0].y}
{GENERIC_UNIT 2 "Elvish Outrider" $outriders_loc[0].x $outriders_loc[0].y}

{CLEAR_VARIABLE alanin,outriders_loc}
[/event]

[event]
name=capture
[filter]
Expand Down

0 comments on commit 0d19b22

Please sign in to comment.