more code simplification ported from Eftboren branch

This commit is contained in:
Simon Forsyth 2012-04-05 19:31:13 +00:00
parent 02793353f9
commit 5704aa71c2

View file

@ -198,7 +198,6 @@
#ifdef NORMAL
recruit=Spearman, Pikeman, Swordsman, Javelineer, Cavalryman, Dragoon, Bowman, Longbowman, Shock Trooper
#endif
#ifdef HARD
recruit=Spearman, Pikeman, Swordsman, Javelineer, Cavalryman, Dragoon, Bowman, Longbowman, Shock Trooper
#endif
@ -347,18 +346,6 @@
name=merfolk_dead
value=0
[/set_variable]
[set_variable]
name=eloh_dead
value=0
[/set_variable]
[set_variable]
name=tanstafaal_dead
value=0
[/set_variable]
[set_variable]
name=elf_entered_water
value=0
[/set_variable]
[set_variable]
name=test_counter
value=0
@ -985,18 +972,8 @@
[modify_side]
side=3
#ifdef EASY
income=9
gold=100
#endif
#ifdef NORMAL
income=11
gold=125
#endif
#ifdef HARD
income=13
gold=150
#endif
{INCOME 9 11 13}
{GOLD 100 125 150}
[/modify_side]
# cut off all recruiting for side 1 elves
@ -1776,24 +1753,16 @@
value=$number_merfolk_alive
[/set_variable]
# take number of merfolk freed, multiply by -1, add to 5, and this
# subtract the number of merfolk freed from 5, and this
# gives you the number still left in cages
[set_variable]
name=merfolk_in_cages
value=5
[/set_variable]
[set_variable]
name=temp
value=$number_merfolk_freed
[/set_variable]
[set_variable]
name=temp
multiply=-1
[/set_variable]
[set_variable]
name=merfolk_in_cages
add=$temp
sub=$number_merfolk_freed
[/set_variable]
# add number in cages to number player has to get total
[set_variable]
@ -1801,7 +1770,6 @@
add=$merfolk_in_cages
[/set_variable]
{CLEAR_VARIABLE merfolk_in_cages}
{CLEAR_VARIABLE temp}
[if]
[variable]
name=total_merfolk_alive
@ -1825,49 +1793,21 @@
[event]
name=moveto
first_time_only=no
[filter]
side=1
race=elf
[filter_location]
terrain=W*
[/filter_location]
[/filter]
[message]
speaker=unit
message= _ "Whoa, this water is warm. Imagine if we had this back home, more water than I could drink in a lifetime! Hey... wait a minute. Faugh! This water is salty! It tastes terrible, I cant drink this! What use is all this water if you cant drink it?"
[/message]
[allow_undo]
[/allow_undo]
[if]
[variable]
name=elf_entered_water
numerical_equals=0
[/variable]
[then]
[store_locations]
x=$x1
y=$y1
terrain=Ww
variable=locs
[/store_locations]
[set_variable]
name=temp
value=$locs.length
[/set_variable]
[if]
[variable]
name=temp
numerical_equals=1
[/variable]
[then]
[set_variable]
name=elf_entered_water
value=1
[/set_variable]
[message]
speaker=unit
message= _ "Whoa, this water is warm. Imagine if we had this back home, more water than I could drink in a lifetime! Hey... wait a minute. Faugh! This water is salty! It tastes terrible, I cant drink this! What use is all this water if you cant drink it?"
[/message]
[/then]
[/if]
{CLEAR_VARIABLE locs}
{CLEAR_VARIABLE temp}
[/then]
[/if]
[/event]
# Event 2.3 Easter egg message
@ -2851,18 +2791,8 @@
[modify_side]
side=4
#ifdef EASY
income=5
gold=100
#endif
#ifdef NORMAL
income=7
gold=110
#endif
#ifdef HARD
income=9
gold=130
#endif
{INCOME 5 7 9}
{GOLD 100 110 130}
[/modify_side]
# capture villages for Iron Council (side 4)
@ -2921,7 +2851,6 @@
# the ships before the council appears
# Capturing ships by elves
# each ship is actually a village, when player captures a village
# increment counter, when enemy captures a village, decrement it.
@ -2930,7 +2859,6 @@
[event]
name=capture
first_time_only=no
delayed_variable_substitution=yes
[filter]
side=1
@ -2968,7 +2896,6 @@
[event]
name=capture
first_time_only=no
delayed_variable_substitution=yes
[filter]
[not]
@ -3021,10 +2948,7 @@
[filter]
id=Eloh
[/filter]
[set_variable]
name=eloh_dead
value=1
[/set_variable]
[message]
speaker=Eloh
message= _ "Dont worry Kaleh, we will see each other again... I promise."
@ -3082,10 +3006,11 @@
message= _ "Peace, Zhul, we can discuss theology later. We still have work to do."
[/message]
[if]
[variable]
name=tanstafaal_dead
numerical_equals=1
[/variable]
[not]
[have_unit]
id=Tanstafaal
[/have_unit]
[/not]
[then]
[fire_event]
name=tanstafaal_and_eloh_gone
@ -3124,10 +3049,7 @@
[filter]
id=Tanstafaal
[/filter]
[set_variable]
name=tanstafaal_dead
value=1
[/set_variable]
[message]
speaker=Kaleh
message= _ "No, do not kill him. He may deserve it, but he will not die at my hands."
@ -3154,10 +3076,11 @@
message= _ "Yes, she too will pay for her part in all of this."
[/message]
[if]
[variable]
name=eloh_dead
numerical_equals=1
[/variable]
[not]
[have_unit]
id=Eloh
[/have_unit]
[/not]
[then]
[fire_event]
name=tanstafaal_and_eloh_gone
@ -3255,12 +3178,7 @@
{CLEAR_VARIABLE number_merfolk_alive}
{CLEAR_VARIABLE saw_mermaid_enchantress}
{CLEAR_VARIABLE merfolk_dead}
{CLEAR_VARIABLE elf_entered_water}
{CLEAR_VARIABLE test_counter}
{CLEAR_VARIABLE eloh_dead}
{CLEAR_VARIABLE tanstafaal_dead}
{CLEAR_VARIABLE Zhul_var}
{CLEAR_VARIABLE unitstats}
[/event]
{UTBS_INCLUDE utils/kaleh-abilities.cfg}