more variable substitution tricks
This commit is contained in:
parent
b0d058077c
commit
399c3fd3d2
1 changed files with 77 additions and 91 deletions
|
@ -329,18 +329,6 @@
|
|||
side=1
|
||||
[/remove_shroud]
|
||||
|
||||
#ifdef EASY
|
||||
{RANDOM 7..9}
|
||||
#endif
|
||||
#ifdef NORMAL
|
||||
{RANDOM 6..8}
|
||||
#endif
|
||||
#ifdef HARD
|
||||
{RANDOM 6..8}
|
||||
#endif
|
||||
|
||||
{VARIABLE ambush_turn $random}
|
||||
|
||||
{VARIABLE sneak_up 0}
|
||||
{VARIABLE killed_by_azkotep 0}
|
||||
{VARIABLE killed_by_ystara 0}
|
||||
|
@ -2122,109 +2110,107 @@ This unit always strikes first with this attack, even if they are defending."
|
|||
|
||||
# Somewhere around turn 8 an orc raiding party makes an entrance.
|
||||
# Affects variables : $sneak_up
|
||||
# Depends on variables : $ambush_turn
|
||||
# Clears variables : $ambush_turn
|
||||
# Internal variables : $ambush_turn, $orc_warning
|
||||
# Creates warning about incoming orcs two turns before they show up
|
||||
# Creates orcs themselvs on random turn around turn 8
|
||||
# Creates die event for orcish boss and reward for killing him
|
||||
# Internal variables : $orc_warning, $parchment_x, $parchment_y
|
||||
[event]
|
||||
name=new turn
|
||||
first_time_only="no"
|
||||
name=prestart
|
||||
#ifdef EASY
|
||||
{RANDOM 7..9}
|
||||
#endif
|
||||
#ifdef NORMAL
|
||||
{RANDOM 6..8}
|
||||
#endif
|
||||
#ifdef HARD
|
||||
{RANDOM 6..8}
|
||||
#endif
|
||||
{VARIABLE ambush_turn $random}
|
||||
{VARIABLE orc_warning $ambush_turn}
|
||||
{VARIABLE_OP orc_warning sub 2}
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
name=turn_number
|
||||
equals=$orc_warning
|
||||
[/variable]
|
||||
[then]
|
||||
{NAMED_UNIT 1 (Desert Scout) 1 1 (Elven Scout) ( _ "Wounded Elven Scout") (upkeep=free)}
|
||||
[message]
|
||||
speaker=Elven Scout
|
||||
message=_"Orcs... Not far behind me... From the hills..."
|
||||
[/message]
|
||||
[kill]
|
||||
id=Elven Scout
|
||||
animate=yes
|
||||
fire_event=no
|
||||
[/kill]
|
||||
[/then]
|
||||
[/if]
|
||||
{CLEAR_VARIABLE orc_warning}
|
||||
[/event]
|
||||
[event]
|
||||
name=turn_$orc_warning
|
||||
delayed_variable_substitution=no
|
||||
|
||||
[event]
|
||||
name=new turn
|
||||
first_time_only="no"
|
||||
[if]
|
||||
[variable]
|
||||
name=turn_number
|
||||
numerical_equals=$ambush_turn
|
||||
[/variable]
|
||||
[then]
|
||||
[unit]
|
||||
{NAMED_UNIT 1 (Desert Scout) 1 1 (Elven Scout) ( _ "Wounded Elven Scout") (upkeep=free)}
|
||||
[message]
|
||||
speaker=Elven Scout
|
||||
message=_"Orcs... Not far behind me... From the hills..."
|
||||
[/message]
|
||||
[kill]
|
||||
id=Elven Scout
|
||||
animate=yes
|
||||
fire_event=no
|
||||
[/kill]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=turn_$ambush_turn
|
||||
delayed_variable_substitution=no
|
||||
|
||||
[unit]
|
||||
#ifdef EASY
|
||||
type=Orcish Leader
|
||||
type=Orcish Leader
|
||||
#else
|
||||
type=Orcish Ruler
|
||||
type=Orcish Ruler
|
||||
#endif
|
||||
id=Ganthos
|
||||
name= _ "Ganthos"
|
||||
upkeep=free
|
||||
canrecruit=yes
|
||||
side=4
|
||||
x=3
|
||||
y=4
|
||||
[/unit]
|
||||
id=Ganthos
|
||||
name= _ "Ganthos"
|
||||
upkeep=free
|
||||
canrecruit=yes
|
||||
side=4
|
||||
x=3
|
||||
y=4
|
||||
[/unit]
|
||||
#ifdef HARD
|
||||
{GENERIC_UNIT 4 (Goblin Pillager) 2 4}
|
||||
{GENERIC_UNIT 4 (Goblin Pillager) 3 3}
|
||||
{GENERIC_UNIT 4 (Goblin Pillager) 2 4}
|
||||
{GENERIC_UNIT 4 (Goblin Pillager) 3 3}
|
||||
#else
|
||||
{GENERIC_UNIT 4 (Wolf Rider) 2 4}
|
||||
{GENERIC_UNIT 4 (Wolf Rider) 3 3}
|
||||
{GENERIC_UNIT 4 (Wolf Rider) 2 4}
|
||||
{GENERIC_UNIT 4 (Wolf Rider) 3 3}
|
||||
#endif
|
||||
#ifdef HARD
|
||||
{GENERIC_UNIT 4 (Orcish Crossbowman) 1 5}
|
||||
{GENERIC_UNIT 4 (Orcish Crossbowman) 3 2}
|
||||
{GENERIC_UNIT 4 (Orcish Crossbowman) 1 5}
|
||||
{GENERIC_UNIT 4 (Orcish Crossbowman) 3 2}
|
||||
#else
|
||||
{GENERIC_UNIT 4 (Orcish Archer) 1 5}
|
||||
{GENERIC_UNIT 4 (Orcish Archer) 3 2}
|
||||
{GENERIC_UNIT 4 (Orcish Archer) 1 5}
|
||||
{GENERIC_UNIT 4 (Orcish Archer) 3 2}
|
||||
#endif
|
||||
#ifdef NORMAL
|
||||
{GENERIC_UNIT 4 (Orcish Assassin) 2 5}
|
||||
{GENERIC_UNIT 4 (Orcish Assassin) 4 2}
|
||||
{GENERIC_UNIT 4 (Orcish Assassin) 2 5}
|
||||
{GENERIC_UNIT 4 (Orcish Assassin) 4 2}
|
||||
#endif
|
||||
#ifdef HARD
|
||||
{GENERIC_UNIT 4 (Orcish Slayer) 2 5}
|
||||
{GENERIC_UNIT 4 (Orcish Slayer) 4 2}
|
||||
{GENERIC_UNIT 4 (Orcish Slayer) 2 5}
|
||||
{GENERIC_UNIT 4 (Orcish Slayer) 4 2}
|
||||
#endif
|
||||
#ifdef EASY
|
||||
{GENERIC_UNIT 4 (Orcish Grunt) 3 6}
|
||||
{GENERIC_UNIT 4 (Orcish Grunt) 5 3}
|
||||
{GENERIC_UNIT 4 (Orcish Grunt) 3 6}
|
||||
{GENERIC_UNIT 4 (Orcish Grunt) 5 3}
|
||||
#else
|
||||
{GENERIC_UNIT 4 (Orcish Warrior) 3 6}
|
||||
{GENERIC_UNIT 4 (Orcish Warrior) 5 3}
|
||||
{GENERIC_UNIT 4 (Orcish Warrior) 3 6}
|
||||
{GENERIC_UNIT 4 (Orcish Warrior) 5 3}
|
||||
#endif
|
||||
#give orcs an income, if they ever capture a keep to use it
|
||||
[modify_side]
|
||||
side=4
|
||||
{INCOME 20 25 30}
|
||||
{GOLD 75 100 125}
|
||||
[/modify_side]
|
||||
[message]
|
||||
speaker=Ganthos
|
||||
# wmllint: local spelling Stinkin'
|
||||
message= _ "What’s this on our borders? Stinkin’ elves and more undead? We’ll teach them a lesson they won’t soon forget. Attack!"
|
||||
[/message]
|
||||
[message]
|
||||
speaker=Kaleh
|
||||
message= _ "If those raiders capture any of our encampments, I fear our people’s fate will be just as bad as if it was captured by the undead."
|
||||
[/message]
|
||||
{CLEAR_VARIABLE ambush_turn}
|
||||
[/then]
|
||||
[/if]
|
||||
#give orcs an income, if they ever capture a keep to use it
|
||||
[modify_side]
|
||||
side=4
|
||||
{INCOME 20 25 30}
|
||||
{GOLD 75 100 125}
|
||||
[/modify_side]
|
||||
[message]
|
||||
speaker=Ganthos
|
||||
# wmllint: local spelling Stinkin'
|
||||
message= _ "What’s this on our borders? Stinkin’ elves and more undead? We’ll teach them a lesson they won’t soon forget. Attack!"
|
||||
[/message]
|
||||
[message]
|
||||
speaker=Kaleh
|
||||
message= _ "If those raiders capture any of our encampments, I fear our people’s fate will be just as bad as if it was captured by the undead."
|
||||
[/message]
|
||||
[/event]
|
||||
|
||||
{CLEAR_VARIABLE orc_warning}
|
||||
{CLEAR_VARIABLE ambush_turn}
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
|
|
Loading…
Add table
Reference in a new issue