Tabs to 4 spaces for ANL (it was using only tabs for indentation).

This commit is contained in:
Lari Nieminen 2008-04-15 12:26:26 +00:00
parent 7330f5f271
commit 1f9b1219c7
8 changed files with 1919 additions and 1919 deletions

File diff suppressed because it is too large Load diff

View file

@ -6,69 +6,69 @@
#define AUTO_STUDYING TYPES
[event]
name=side turn
first_time_only=no
name=side turn
first_time_only=no
[store_unit]
[filter]
type={TYPES}
side="$side_number"
canrecruit=no
[filter_location]
terrain="Gg^Ve,Gg^Vea"
[/filter_location]
[/filter]
variable=researchers
kill=no
[/store_unit]
[store_unit]
[filter]
type={TYPES}
side="$side_number"
canrecruit=no
[filter_location]
terrain="Gg^Ve,Gg^Vea"
[/filter_location]
[/filter]
variable=researchers
kill=no
[/store_unit]
{VARIABLE sound no}
{FOREACH researchers i}
{VARIABLE_OP idle to_variable "researchers[$i].variables.idle"}
{VARIABLE sound no}
{FOREACH researchers i}
{VARIABLE_OP idle to_variable "researchers[$i].variables.idle"}
[if]
{CONDITION idle equals yes}
[then]
{CLEAR_VARIABLE "researchers[$i].variables.idle"}
[if]
{CONDITION idle equals yes}
[then]
{CLEAR_VARIABLE "researchers[$i].variables.idle"}
[unstore_unit]
variable=researchers[$i]
[/unstore_unit]
[/then]
[else]
{VARIABLE_OP temp_x format "$researchers[$i].x"}
{VARIABLE_OP temp_y format "$researchers[$i].y"}
[unstore_unit]
variable=researchers[$i]
[/unstore_unit]
[/then]
[else]
{VARIABLE_OP temp_x format "$researchers[$i].x"}
{VARIABLE_OP temp_y format "$researchers[$i].y"}
{VARIABLE_OP credited_side format $researchers[$i].side}
{VARIABLE_OP amount format $researchers.level}
{ADDING_TO_CURRENT_RESEARCH_FIELD $credited_side| $amount}
{VARIABLE_OP credited_side format $researchers[$i].side}
{VARIABLE_OP amount format $researchers.level}
{ADDING_TO_CURRENT_RESEARCH_FIELD $credited_side| $amount}
{VARIABLE sound yes}
{SCROLL_TO $temp_x $temp_y}
{VARIABLE sound yes}
{SCROLL_TO $temp_x $temp_y}
[unstore_unit]
variable=researchers[$i]
text="$amount"
{COLOR_WHITE}
[/unstore_unit]
[/else]
[/if]
{NEXT i}
[if]
{CONDITION sound equals yes}
[then]
{PLAY_SOUND ("magic-holy-miss-3.ogg")}
{DELAY 200}
[/then]
[/if]
[unstore_unit]
variable=researchers[$i]
text="$amount"
{COLOR_WHITE}
[/unstore_unit]
{CLEAR_VARIABLE sound}
{CLEAR_VARIABLE researchers}
{CLEAR_VARIABLE idle}
{CLEAR_VARIABLE amount}
{CLEAR_VARIABLE credited_side}
{REDRAW}
[/else]
[/if]
{NEXT i}
[if]
{CONDITION sound equals yes}
[then]
{PLAY_SOUND ("magic-holy-miss-3.ogg")}
{DELAY 200}
[/then]
[/if]
{CLEAR_VARIABLE sound}
{CLEAR_VARIABLE researchers}
{CLEAR_VARIABLE idle}
{CLEAR_VARIABLE amount}
{CLEAR_VARIABLE credited_side}
{REDRAW}
[/event]
#enddef
@ -78,116 +78,116 @@
#define AUTO_FARMING TYPES
[event]
name=side turn
first_time_only=no
name=side turn
first_time_only=no
[store_unit]
[filter]
type={TYPES}
side="$side_number"
[filter_location]
terrain=Re^Gvs
[/filter_location]
[/filter]
variable=harvesters
kill=no
[/store_unit]
[store_unit]
[filter]
type={TYPES}
side="$side_number"
[filter_location]
terrain=Re^Gvs
[/filter_location]
[/filter]
variable=harvesters
kill=no
[/store_unit]
[store_unit]
[filter]
type={TYPES}
side="$side_number"
[filter_location]
terrain=Re
[/filter_location]
[/filter]
variable=planters
kill=no
[/store_unit]
[store_unit]
[filter]
type={TYPES}
side="$side_number"
[filter_location]
terrain=Re
[/filter_location]
[/filter]
variable=planters
kill=no
[/store_unit]
{VARIABLE sound no}
{FOREACH harvesters i}
{VARIABLE_OP idle to_variable "harvesters[$i].variables.idle"}
{VARIABLE sound no}
{FOREACH harvesters i}
{VARIABLE_OP idle to_variable "harvesters[$i].variables.idle"}
[if]
{CONDITION idle equals yes}
[then]
{CLEAR_VARIABLE "harvesters[$i].variables.idle"}
[if]
{CONDITION idle equals yes}
[then]
{CLEAR_VARIABLE "harvesters[$i].variables.idle"}
[unstore_unit]
variable=harvesters[$i]
[/unstore_unit]
[/then]
[else]
{VARIABLE_OP temp_x format "$harvesters[$i].x"}
{VARIABLE_OP temp_y format "$harvesters[$i].y"}
[unstore_unit]
variable=harvesters[$i]
[/unstore_unit]
[/then]
[else]
{VARIABLE_OP temp_x format "$harvesters[$i].x"}
{VARIABLE_OP temp_y format "$harvesters[$i].y"}
{VARIABLE_OP credited_side format $harvesters[$i].side}
{VARIABLE_OP amount format $player_$credited_side|.farming.gold}
{VARIABLE_OP credited_side format $harvesters[$i].side}
{VARIABLE_OP amount format $player_$credited_side|.farming.gold}
# auto-harvest
{ADD_GOLD $credited_side $amount}
{MODIFY_TERRAIN "Re" $temp_x $temp_y}
{REMOVE_ITEM $temp_x $temp_y}
{VARIABLE sound yes}
{SCROLL_TO $temp_x $temp_y}
[unstore_unit]
variable=harvesters[$i]
text="$amount"
red,green,blue=204,204,51
[/unstore_unit]
[/else]
[/if]
{NEXT i}
[if]
{CONDITION sound equals yes}
[then]
{PLAY_SOUND ("gold.ogg")}
{DELAY 200}
[/then]
[/if]
# auto-harvest
{ADD_GOLD $credited_side $amount}
{MODIFY_TERRAIN "Re" $temp_x $temp_y}
{REMOVE_ITEM $temp_x $temp_y}
{VARIABLE sound yes}
{SCROLL_TO $temp_x $temp_y}
{VARIABLE sound no}
{FOREACH planters i}
{VARIABLE_OP idle to_variable "planters[$i].variables.idle"}
[unstore_unit]
variable=harvesters[$i]
text="$amount"
red,green,blue=204,204,51
[/unstore_unit]
[/else]
[/if]
{NEXT i}
[if]
{CONDITION sound equals yes}
[then]
{PLAY_SOUND ("gold.ogg")}
{DELAY 200}
[/then]
[/if]
[if]
{CONDITION idle equals yes}
[then]
{CLEAR_VARIABLE "planters[$i].variables.idle"}
[/then]
[else]
{VARIABLE_OP temp_x format "$planters[$i].x"}
{VARIABLE_OP temp_y format "$planters[$i].y"}
{VARIABLE sound no}
{FOREACH planters i}
{VARIABLE_OP idle to_variable "planters[$i].variables.idle"}
# auto-plant
{MODIFY_TERRAIN "Re^Gvs" $temp_x $temp_y }
{REMOVE_ITEM $temp_x $temp_y}
{SET_IMAGE $temp_x $temp_y ("items/flower4.png")}
{VARIABLE sound yes}
[/else]
[/if]
[unstore_unit]
variable=planters[$i]
[/unstore_unit]
{NEXT i}
[if]
{CONDITION sound equals yes}
[then]
{PLAY_SOUND ("entangle.wav")}
{DELAY 200}
[/then]
[/if]
[if]
{CONDITION idle equals yes}
[then]
{CLEAR_VARIABLE "planters[$i].variables.idle"}
[/then]
[else]
{VARIABLE_OP temp_x format "$planters[$i].x"}
{VARIABLE_OP temp_y format "$planters[$i].y"}
{CLEAR_VARIABLE sound}
{CLEAR_VARIABLE harvesters}
{CLEAR_VARIABLE planters}
{CLEAR_VARIABLE idle}
{CLEAR_VARIABLE amount}
{CLEAR_VARIABLE credited_side}
# auto-plant
{MODIFY_TERRAIN "Re^Gvs" $temp_x $temp_y }
{REMOVE_ITEM $temp_x $temp_y}
{SET_IMAGE $temp_x $temp_y ("items/flower4.png")}
{VARIABLE sound yes}
[/else]
[/if]
[unstore_unit]
variable=planters[$i]
[/unstore_unit]
{NEXT i}
[if]
{CONDITION sound equals yes}
[then]
{PLAY_SOUND ("entangle.wav")}
{DELAY 200}
[/then]
[/if]
{REDRAW}
{CLEAR_VARIABLE sound}
{CLEAR_VARIABLE harvesters}
{CLEAR_VARIABLE planters}
{CLEAR_VARIABLE idle}
{CLEAR_VARIABLE amount}
{CLEAR_VARIABLE credited_side}
{REDRAW}
[/event]
#enddef
@ -197,105 +197,105 @@
#define AUTO_MINING TYPES
[event]
name=side turn
first_time_only=no
name=side turn
first_time_only=no
[store_unit]
[filter]
type={TYPES}
side="$side_number"
[filter_location]
terrain=Hh^Vhh,Ha^Vhha,Mm^Vhh
[/filter_location]
[/filter]
variable=miners
kill=no
[/store_unit]
[store_unit]
[filter]
type={TYPES}
side="$side_number"
[filter_location]
terrain=Hh^Vhh,Ha^Vhha,Mm^Vhh
[/filter_location]
[/filter]
variable=miners
kill=no
[/store_unit]
{VARIABLE sound no}
{FOREACH miners i}
{VARIABLE_OP idle to_variable "miners[$i].variables.idle"}
{VARIABLE sound no}
{FOREACH miners i}
{VARIABLE_OP idle to_variable "miners[$i].variables.idle"}
[if]
{CONDITION idle equals yes}
[then]
{CLEAR_VARIABLE "miners[$i].variables.idle"}
[if]
{CONDITION idle equals yes}
[then]
{CLEAR_VARIABLE "miners[$i].variables.idle"}
[unstore_unit]
variable=miners[$i]
[/unstore_unit]
[/then]
[else]
{VARIABLE_OP temp_x format "$miners[$i].x"}
{VARIABLE_OP temp_y format "$miners[$i].y"}
[unstore_unit]
variable=miners[$i]
[/unstore_unit]
[/then]
[else]
{VARIABLE_OP temp_x format "$miners[$i].x"}
{VARIABLE_OP temp_y format "$miners[$i].y"}
{VARIABLE_OP credited_side format $miners[$i].side}
{VARIABLE_OP amount format $player_$credited_side|.mining.gold}
{VARIABLE_OP credited_side format $miners[$i].side}
{VARIABLE_OP amount format $player_$credited_side|.mining.gold}
# auto-mine
{ADD_GOLD $credited_side $amount}
{SCROLL_TO $temp_x $temp_y}
{VARIABLE sound yes}
[unstore_unit]
variable=miners[$i]
text="$amount"
red,green,blue=204,204,51
[/unstore_unit]
[/else]
[/if]
{NEXT i}
[if]
{CONDITION sound equals yes}
[then]
{PLAY_SOUND ("gold.ogg")}
{DELAY 200}
[/then]
[/if]
# auto-mine
{ADD_GOLD $credited_side $amount}
{SCROLL_TO $temp_x $temp_y}
{VARIABLE sound yes}
{CLEAR_VARIABLE sound}
{CLEAR_VARIABLE miners}
{CLEAR_VARIABLE idle}
{CLEAR_VARIABLE amount}
{CLEAR_VARIABLE credited_side}
[unstore_unit]
variable=miners[$i]
text="$amount"
red,green,blue=204,204,51
[/unstore_unit]
[/else]
[/if]
{NEXT i}
[if]
{CONDITION sound equals yes}
[then]
{PLAY_SOUND ("gold.ogg")}
{DELAY 200}
[/then]
[/if]
{REDRAW}
{CLEAR_VARIABLE sound}
{CLEAR_VARIABLE miners}
{CLEAR_VARIABLE idle}
{CLEAR_VARIABLE amount}
{CLEAR_VARIABLE credited_side}
{REDRAW}
[/event]
#enddef
#define AUTO_MOVE_INIT TYPES
# This macro enables a peasant to move onto an existing farm or
# mine and auto-harvest or auto-mine at the start of next turn.
[event]
name=moveto
first_time_only=no
[filter]
type={TYPES}
[filter_location]
terrain="Re,Re^Gvs,Hh^Vhh,Ha^Vhha,Mm^Vhh,Re^Uf,Uu^Uf"
[/filter_location]
[/filter]
# This macro enables a peasant to move onto an existing farm or
# mine and auto-harvest or auto-mine at the start of next turn.
[event]
name=moveto
first_time_only=no
[filter]
type={TYPES}
[filter_location]
terrain="Re,Re^Gvs,Hh^Vhh,Ha^Vhha,Mm^Vhh,Re^Uf,Uu^Uf"
[/filter_location]
[/filter]
[store_unit]
[filter]
x=$x1
y=$y1
[/filter]
variable=unit
[/store_unit]
[store_unit]
[filter]
x=$x1
y=$y1
[/filter]
variable=unit
[/store_unit]
[if]
{CONDITION unit.moves greater_than_equal_to 1}
[then]
{CLEAR_VARIABLE unit.variables.idle}
[/then]
[else]
{VARIABLE unit.variables.idle yes}
[/else]
[/if]
[if]
{CONDITION unit.moves greater_than_equal_to 1}
[then]
{CLEAR_VARIABLE unit.variables.idle}
[/then]
[else]
{VARIABLE unit.variables.idle yes}
[/else]
[/if]
[unstore_unit]
variable=unit
[/unstore_unit]
[/event]
[unstore_unit]
variable=unit
[/unstore_unit]
[/event]
#enddef

View file

@ -1,92 +1,92 @@
#textdomain wesnoth-anl
#define CONDITION VAR TEST VALUE
[variable]
name={VAR}
{TEST}={VALUE}
[/variable]
[variable]
name={VAR}
{TEST}={VALUE}
[/variable]
#enddef
#define ADD_GOLD SIDE AMOUNT
[gold]
side={SIDE}
amount={AMOUNT}
[/gold]
[gold]
side={SIDE}
amount={AMOUNT}
[/gold]
#enddef
#define ALLOW_RECRUIT SIDE TYPE
[allow_recruit]
side={SIDE}
type={TYPE}
[/allow_recruit]
[allow_recruit]
side={SIDE}
type={TYPE}
[/allow_recruit]
#enddef
#define DISALLOW_RECRUIT SIDE TYPE
[disallow_recruit]
side={SIDE}
type={TYPE}
[/disallow_recruit]
[disallow_recruit]
side={SIDE}
type={TYPE}
[/disallow_recruit]
#enddef
#define ANL_CAPTURE_VILLAGE
[capture_village]
x=$x1
y=$y1
side=$side_number
[/capture_village]
[capture_village]
x=$x1
y=$y1
side=$side_number
[/capture_village]
#enddef
#define REMOVE_ITEM X Y
[removeitem]
x={X}
y={Y}
[/removeitem]
[removeitem]
x={X}
y={Y}
[/removeitem]
#enddef
#define PLAY_SOUND SOUND_FILE
[sound]
name={SOUND_FILE}
[/sound]
[sound]
name={SOUND_FILE}
[/sound]
#enddef
#define DELAY TIME
[delay]
time={TIME}
[/delay]
[delay]
time={TIME}
[/delay]
#enddef
#define REDRAW
[redraw]
[/redraw]
[redraw]
[/redraw]
#enddef
#define OPEN_CHEST X Y TREASURE
{PLAY_SOUND open-chest.wav}
[removeitem]
x={X}
y={Y}
image=items/chest-plain-closed.png
[/removeitem]
x={X}
y={Y}
image=items/chest-plain-closed.png
[/removeitem]
{PLACE_IMAGE items/chest-plain-open.png {X} {Y}}
[message]
speaker=narrator
image=items/chest-plain-open.png
message= _ "The chest contains {TREASURE} gold."
speaker=narrator
image=items/chest-plain-open.png
message= _ "The chest contains {TREASURE} gold."
[/message]
{ADD_GOLD $side_number {TREASURE}}
#enddef
#define MOVEMENT_RESTRICTION TERRAIN_1 TERRAIN_2
[object]
silent=yes
duration=forever
[effect]
apply_to=movement_costs
replace=true
[movement_costs]
{TERRAIN_1}=99
{TERRAIN_2}=99
[/movement_costs]
[/effect]
[/object]
silent=yes
duration=forever
[effect]
apply_to=movement_costs
replace=true
[movement_costs]
{TERRAIN_1}=99
{TERRAIN_2}=99
[/movement_costs]
[/effect]
[/object]
#enddef

View file

@ -2,164 +2,164 @@
#define ANL_RETURN_TO_MENU
[option]
message= _ "Return to menu"
[command]
[/command]
message= _ "Return to menu"
[command]
[/command]
[/option]
#enddef
#define ANL_HELP_PEASANTS
[message]
speaker=narrator
caption=Peasants
image=units/human-peasants/peasant.png~TC(1,magenta)
message= _ "Peasants are your workers. Depending on the terrain, right-clicking on a peasant allows you to terraform the landscape and/or build castles, mines, farms, villages and universities."
{ANL_RETURN_TO_MENU}
speaker=narrator
caption=Peasants
image=units/human-peasants/peasant.png~TC(1,magenta)
message= _ "Peasants are your workers. Depending on the terrain, right-clicking on a peasant allows you to terraform the landscape and/or build castles, mines, farms, villages and universities."
{ANL_RETURN_TO_MENU}
[/message]
#enddef
#define ANL_HELP_MAGES
[message]
speaker=narrator
caption=Mages
image=units/human-magi/mage.png~TC(1,magenta)
message= _ "Mages are your wise men. They can study at universities, pursuing advances in mining, farming and recruitment."
{ANL_RETURN_TO_MENU}
speaker=narrator
caption=Mages
image=units/human-magi/mage.png~TC(1,magenta)
message= _ "Mages are your wise men. They can study at universities, pursuing advances in mining, farming and recruitment."
{ANL_RETURN_TO_MENU}
[/message]
#enddef
#define ANL_HELP_FARMS
[message]
speaker=narrator
caption=Farms
image="items/flower4.png"
message= _ "Farms can only be planted on grassland. Move a peasant onto a farm and he will begin to automatically harvest the cash crop."
{ANL_RETURN_TO_MENU}
speaker=narrator
caption=Farms
image="items/flower4.png"
message= _ "Farms can only be planted on grassland. Move a peasant onto a farm and he will begin to automatically harvest the cash crop."
{ANL_RETURN_TO_MENU}
[/message]
#enddef
#define ANL_HELP_VILLAGES
[message]
speaker=narrator
caption=Villages
image="terrain/village/human-tile.png"
message= _ "Villages can only be built on grassland. They provide income and healing as usual. Right-click on a peasant in a village and you can establish a university."
{ANL_RETURN_TO_MENU}
speaker=narrator
caption=Villages
image="terrain/village/human-tile.png"
message= _ "Villages can only be built on grassland. They provide income and healing as usual. Right-click on a peasant in a village and you can establish a university."
{ANL_RETURN_TO_MENU}
[/message]
#enddef
#define ANL_HELP_MINES
[message]
speaker=narrator
caption=Mines
image="terrain/village/human-hills-tile.png"
message= _ "Mines can be built on hills or mountains. A peasant on a mine will automatically dig for gold at the start of your turn."
{ANL_RETURN_TO_MENU}
speaker=narrator
caption=Mines
image="terrain/village/human-hills-tile.png"
message= _ "Mines can be built on hills or mountains. A peasant on a mine will automatically dig for gold at the start of your turn."
{ANL_RETURN_TO_MENU}
[/message]
#enddef
#define ANL_HELP_UNIVERSITIES
[message]
speaker=narrator
caption=Universities
image="terrain/village/elven-tile.png"
message= _ "Any of the 'Elven' style villages represent universities. At the start of your turn, Mages in universities automatically add to the study progress of your chosen research target. Right-click on a mage in a university to change research target."
{ANL_RETURN_TO_MENU}
speaker=narrator
caption=Universities
image="terrain/village/elven-tile.png"
message= _ "Any of the 'Elven' style villages represent universities. At the start of your turn, Mages in universities automatically add to the study progress of your chosen research target. Right-click on a mage in a university to change research target."
{ANL_RETURN_TO_MENU}
[/message]
#enddef
#define ANL_HELP_DIPLOMACY
[message]
speaker=narrator
caption=Diplomacy
image="terrain/village/elven-tile.png"
message= _ "Right-clicking on your leader when in a univerity allows you to select special diplomatic options."
{ANL_RETURN_TO_MENU}
speaker=narrator
caption=Diplomacy
image="terrain/village/elven-tile.png"
message= _ "Right-clicking on your leader when in a univerity allows you to select special diplomatic options."
{ANL_RETURN_TO_MENU}
[/message]
#enddef
#define ANL_HELP
[set_menu_item]
id=anl_help
description="Help"
[show_if]
[have_unit]
side=$side_number
x,y=$x1,$y1
canrecruit=yes
[/have_unit]
[/show_if]
[command]
{VARIABLE finished_help no}
[while]
{CONDITION finished_help equals no}
[do]
[message]
speaker=narrator
image=wesnoth-icon.png
caption="A New Land - Help"
message= _ "Select a topic."
[option]
message= _ "Done"
[command]
{VARIABLE finished_help yes}
[/command]
[/option]
[option]
message= _ "@Peasants"
[command]
{ANL_HELP_PEASANTS}
[/command]
[/option]
[option]
message= _ "@Mages"
[command]
{ANL_HELP_MAGES}
[/command]
[/option]
[option]
message= _ "@Farms"
[command]
{ANL_HELP_FARMS}
[/command]
[/option]
[option]
message= _ "@Villages"
[command]
{ANL_HELP_VILLAGES}
[/command]
[/option]
[option]
message= _ "@Mines"
[command]
{ANL_HELP_MINES}
[/command]
[/option]
[option]
message= _ "@Universities"
[command]
{ANL_HELP_UNIVERSITIES}
[/command]
[/option]
[option]
message= _ "@Diplomacy"
[command]
{ANL_HELP_DIPLOMACY}
[/command]
[/option]
[/message]
[/do]
[/while]
[/command]
id=anl_help
description="Help"
[show_if]
[have_unit]
side=$side_number
x,y=$x1,$y1
canrecruit=yes
[/have_unit]
[/show_if]
[command]
{VARIABLE finished_help no}
[while]
{CONDITION finished_help equals no}
[do]
[message]
speaker=narrator
image=wesnoth-icon.png
caption="A New Land - Help"
message= _ "Select a topic."
[option]
message= _ "Done"
[command]
{VARIABLE finished_help yes}
[/command]
[/option]
[option]
message= _ "@Peasants"
[command]
{ANL_HELP_PEASANTS}
[/command]
[/option]
[option]
message= _ "@Mages"
[command]
{ANL_HELP_MAGES}
[/command]
[/option]
[option]
message= _ "@Farms"
[command]
{ANL_HELP_FARMS}
[/command]
[/option]
[option]
message= _ "@Villages"
[command]
{ANL_HELP_VILLAGES}
[/command]
[/option]
[option]
message= _ "@Mines"
[command]
{ANL_HELP_MINES}
[/command]
[/option]
[option]
message= _ "@Universities"
[command]
{ANL_HELP_UNIVERSITIES}
[/command]
[/option]
[option]
message= _ "@Diplomacy"
[command]
{ANL_HELP_DIPLOMACY}
[/command]
[/option]
[/message]
[/do]
[/while]
[/command]
[/set_menu_item]
#enddef

View file

@ -1,293 +1,293 @@
#textdomain wesnoth-anl
#define DONATE_FUNDS_OPTION TARGET_SIDE
[option]
message= _ "@$player_{TARGET_SIDE}.name"
[show_if]
{CONDITION leader.gold greater_than_equal_to 20}
[have_unit]
side={TARGET_SIDE}
canrecruit=yes
[/have_unit]
[/show_if]
[command]
[message]
speaker=unit
message= _ "I hereby donate 20 gold to the coffers of $player_{TARGET_SIDE}.name|."
[/message]
{ADD_GOLD {TARGET_SIDE} 20}
{ADD_GOLD $side_number -20}
{VARIABLE_OP leader.gold add -20}
{VARIABLE finished_options yes}
{VARIABLE finished_suboptions yes}
{VARIABLE_OP unit.moves format 0}
{REDRAW}
[/command]
message= _ "@$player_{TARGET_SIDE}.name"
[show_if]
{CONDITION leader.gold greater_than_equal_to 20}
[have_unit]
side={TARGET_SIDE}
canrecruit=yes
[/have_unit]
[/show_if]
[command]
[message]
speaker=unit
message= _ "I hereby donate 20 gold to the coffers of $player_{TARGET_SIDE}.name|."
[/message]
{ADD_GOLD {TARGET_SIDE} 20}
{ADD_GOLD $side_number -20}
{VARIABLE_OP leader.gold add -20}
{VARIABLE finished_options yes}
{VARIABLE finished_suboptions yes}
{VARIABLE_OP unit.moves format 0}
{REDRAW}
[/command]
[/option]
#enddef
#define SHARE_FARMING_KNOWLEDGE_OPTION TARGET_SIDE
[option]
message= {MENU_IMG_TXT "items/flower4.png" _"@$player_{TARGET_SIDE}.name
message= {MENU_IMG_TXT "items/flower4.png" _"@$player_{TARGET_SIDE}.name
Share knowledge of agriculture"}
[show_if]
{CONDITION player_$side_number|.farming.target greater_than $player_{TARGET_SIDE}.farming.target}
[have_unit]
side={TARGET_SIDE}
canrecruit=yes
[/have_unit]
[/show_if]
[command]
{VARIABLE_OP player_{TARGET_SIDE}.farming.progress add 1}
{VARIABLE finished_options yes}
{VARIABLE finished_suboptions yes}
{VARIABLE_OP unit.moves format 0}
{REDRAW}
[message]
speaker=unit
message= _ "$player_{TARGET_SIDE}.name|, since our wisdom exceeds yours I have instructed my scholars to further your understanding of agriculture."
[/message]
[/command]
[show_if]
{CONDITION player_$side_number|.farming.target greater_than $player_{TARGET_SIDE}.farming.target}
[have_unit]
side={TARGET_SIDE}
canrecruit=yes
[/have_unit]
[/show_if]
[command]
{VARIABLE_OP player_{TARGET_SIDE}.farming.progress add 1}
{VARIABLE finished_options yes}
{VARIABLE finished_suboptions yes}
{VARIABLE_OP unit.moves format 0}
{REDRAW}
[message]
speaker=unit
message= _ "$player_{TARGET_SIDE}.name|, since our wisdom exceeds yours I have instructed my scholars to further your understanding of agriculture."
[/message]
[/command]
[/option]
#enddef
#define SHARE_MINING_KNOWLEDGE_OPTION TARGET_SIDE
[option]
message= {MENU_IMG_TXT "items/gold-coins-small.png" _"@$player_{TARGET_SIDE}.name
message= {MENU_IMG_TXT "items/gold-coins-small.png" _"@$player_{TARGET_SIDE}.name
Share knowledge of mining"}
[show_if]
{CONDITION player_$side_number|.mining.target greater_than $player_{TARGET_SIDE}.mining.target}
[have_unit]
side={TARGET_SIDE}
canrecruit=yes
[/have_unit]
[/show_if]
[command]
{VARIABLE_OP player_{TARGET_SIDE}.mining.progress add 1}
{VARIABLE finished_options yes}
{VARIABLE finished_suboptions yes}
{VARIABLE_OP unit.moves format 0}
{REDRAW}
[message]
speaker=unit
message= _ "$player_{TARGET_SIDE}.name|, since the wisdom of my people exceeds yours I have instructed my scholars to aid you in your efforts to learn the science of mining."
[/message]
[/command]
[show_if]
{CONDITION player_$side_number|.mining.target greater_than $player_{TARGET_SIDE}.mining.target}
[have_unit]
side={TARGET_SIDE}
canrecruit=yes
[/have_unit]
[/show_if]
[command]
{VARIABLE_OP player_{TARGET_SIDE}.mining.progress add 1}
{VARIABLE finished_options yes}
{VARIABLE finished_suboptions yes}
{VARIABLE_OP unit.moves format 0}
{REDRAW}
[message]
speaker=unit
message= _ "$player_{TARGET_SIDE}.name|, since the wisdom of my people exceeds yours I have instructed my scholars to aid you in your efforts to learn the science of mining."
[/message]
[/command]
[/option]
#enddef
#define SHARE_WARFARE_KNOWLEDGE_OPTION TARGET_SIDE
[option]
message= {MENU_IMG_TXT "wesnoth-icon.png" _"@$player_{TARGET_SIDE}.name
message= {MENU_IMG_TXT "wesnoth-icon.png" _"@$player_{TARGET_SIDE}.name
Share knowledge of warfare"}
[show_if]
{CONDITION player_$side_number|.warfare.target greater_than $player_{TARGET_SIDE}.warfare.target}
[have_unit]
side={TARGET_SIDE}
canrecruit=yes
[/have_unit]
[/show_if]
[command]
{VARIABLE_OP player_{TARGET_SIDE}.warfare.progress add 1}
{VARIABLE finished_options yes}
{VARIABLE finished_suboptions yes}
{VARIABLE_OP unit.moves format 0}
{REDRAW}
[message]
speaker=unit
message= _ "You know worryingly little about the arts of war, $player_{TARGET_SIDE}.name|. I feel an obligation to instruct you in this vital matter."
[/message]
[/command]
[show_if]
{CONDITION player_$side_number|.warfare.target greater_than $player_{TARGET_SIDE}.warfare.target}
[have_unit]
side={TARGET_SIDE}
canrecruit=yes
[/have_unit]
[/show_if]
[command]
{VARIABLE_OP player_{TARGET_SIDE}.warfare.progress add 1}
{VARIABLE finished_options yes}
{VARIABLE finished_suboptions yes}
{VARIABLE_OP unit.moves format 0}
{REDRAW}
[message]
speaker=unit
message= _ "You know worryingly little about the arts of war, $player_{TARGET_SIDE}.name|. I feel an obligation to instruct you in this vital matter."
[/message]
[/command]
[/option]
#enddef
#define LEADER_OPTIONS
[set_menu_item]
id=anl_diplomacy
description="Diplomacy"
[show_if]
[have_unit]
side=$side_number
x,y=$x1,$y1
canrecruit=yes
[not]
[filter_wml]
moves=0
[/filter_wml]
[/not]
[/have_unit]
[/show_if]
[filter_location]
terrain="Gg^Ve,Gg^Vea"
[/filter_location]
id=anl_diplomacy
description="Diplomacy"
[show_if]
[have_unit]
side=$side_number
x,y=$x1,$y1
canrecruit=yes
[not]
[filter_wml]
moves=0
[/filter_wml]
[/not]
[/have_unit]
[/show_if]
[filter_location]
terrain="Gg^Ve,Gg^Vea"
[/filter_location]
[command]
[store_side]
side=$side_number
variable=leader
[/store_side]
[store_unit]
[filter]
x=$x1
y=$y1
[/filter]
variable=unit
[/store_unit]
side=$side_number
variable=leader
[/store_side]
{VARIABLE_OP side format $unit.side}
{VARIABLE finished_options no}
[while]
{CONDITION finished_options equals no}
[do]
[message]
caption="Diplomatic Options"
speaker=unit
[store_unit]
[filter]
x=$x1
y=$y1
[/filter]
variable=unit
[/store_unit]
{VARIABLE_OP side format $unit.side}
{VARIABLE finished_options no}
[while]
{CONDITION finished_options equals no}
[do]
[message]
caption="Diplomatic Options"
speaker=unit
#wmllint: display on
message= _ "What shall I do?
message= _ "What shall I do?
"
#wmllint: display off
# Nothing
[option]
message= _ "Nothing"
[command]
{VARIABLE finished_options yes}
[/command]
[/option]
# Giving Money
[option]
message= {MENU_IMG_TXT "items/gold-coins-small.png" _"@Donate Funds
# Nothing
[option]
message= _ "Nothing"
[command]
{VARIABLE finished_options yes}
[/command]
[/option]
# Giving Money
[option]
message= {MENU_IMG_TXT "items/gold-coins-small.png" _"@Donate Funds
Give 20 gold to another player"}
[command]
{VARIABLE finished_suboptions no}
[while]
{CONDITION finished_suboptions equals no}
[do]
[message]
caption="Diplomatic Options"
speaker=unit
image=items/gold-coins-small.png
message= _ "Who will you donate funds to?"
[command]
{VARIABLE finished_suboptions no}
[while]
{CONDITION finished_suboptions equals no}
[do]
[message]
caption="Diplomatic Options"
speaker=unit
image=items/gold-coins-small.png
message= _ "Who will you donate funds to?"
[option]
message= _ "Back"
[command]
{VARIABLE finished_suboptions yes}
[/command]
[/option]
{DONATE_FUNDS_OPTION 1}
{DONATE_FUNDS_OPTION 2}
{DONATE_FUNDS_OPTION 3}
{DONATE_FUNDS_OPTION 4}
[/message]
[/do]
[/while]
[/command]
[/option]
[option]
message= _ "Back"
[command]
{VARIABLE finished_suboptions yes}
[/command]
[/option]
# Sharing Knowledge
[option]
message= {MENU_IMG_TXT "items/book4.png" _"@Share Knowledge
{DONATE_FUNDS_OPTION 1}
{DONATE_FUNDS_OPTION 2}
{DONATE_FUNDS_OPTION 3}
{DONATE_FUNDS_OPTION 4}
[/message]
[/do]
[/while]
[/command]
[/option]
# Sharing Knowledge
[option]
message= {MENU_IMG_TXT "items/book4.png" _"@Share Knowledge
Help an ally with their research"}
[command]
{VARIABLE finished_suboptions no}
[while]
{CONDITION finished_suboptions equals no}
[do]
[message]
caption="Diplomatic Options"
speaker=unit
image=items/book4.png
message= _ "Who will you share knowledge with?"
[command]
{VARIABLE finished_suboptions no}
[while]
{CONDITION finished_suboptions equals no}
[do]
[message]
caption="Diplomatic Options"
speaker=unit
image=items/book4.png
message= _ "Who will you share knowledge with?"
[option]
message= _ "Back"
[command]
{VARIABLE finished_suboptions yes}
[/command]
[/option]
{SHARE_FARMING_KNOWLEDGE_OPTION 1}
{SHARE_MINING_KNOWLEDGE_OPTION 1}
{SHARE_WARFARE_KNOWLEDGE_OPTION 1}
{SHARE_FARMING_KNOWLEDGE_OPTION 2}
{SHARE_MINING_KNOWLEDGE_OPTION 2}
{SHARE_WARFARE_KNOWLEDGE_OPTION 2}
{SHARE_FARMING_KNOWLEDGE_OPTION 3}
{SHARE_MINING_KNOWLEDGE_OPTION 3}
{SHARE_WARFARE_KNOWLEDGE_OPTION 3}
{SHARE_FARMING_KNOWLEDGE_OPTION 4}
{SHARE_MINING_KNOWLEDGE_OPTION 4}
{SHARE_WARFARE_KNOWLEDGE_OPTION 4}
[/message]
[/do]
[/while]
[/command]
[/option]
[option]
message= _ "Back"
[command]
{VARIABLE finished_suboptions yes}
[/command]
[/option]
{SHARE_FARMING_KNOWLEDGE_OPTION 1}
{SHARE_MINING_KNOWLEDGE_OPTION 1}
{SHARE_WARFARE_KNOWLEDGE_OPTION 1}
{SHARE_FARMING_KNOWLEDGE_OPTION 2}
{SHARE_MINING_KNOWLEDGE_OPTION 2}
{SHARE_WARFARE_KNOWLEDGE_OPTION 2}
{SHARE_FARMING_KNOWLEDGE_OPTION 3}
{SHARE_MINING_KNOWLEDGE_OPTION 3}
{SHARE_WARFARE_KNOWLEDGE_OPTION 3}
{SHARE_FARMING_KNOWLEDGE_OPTION 4}
{SHARE_MINING_KNOWLEDGE_OPTION 4}
{SHARE_WARFARE_KNOWLEDGE_OPTION 4}
[/message]
[/do]
[/while]
[/command]
[/option]
# Negotiations
# Dwarves
[option]
message= {MENU_IMG_TXT "units/dwarves/lord.png~TC(1,magenta)" _"@Negotiate with the Dwarves
# Dwarves
[option]
message= {MENU_IMG_TXT "units/dwarves/lord.png~TC(1,magenta)" _"@Negotiate with the Dwarves
Lets you recruit a Dwarvish unit
Negotiation Progress: $player_$side_number|.leader_option_1.progress|/$player_$side_number|.leader_option_1.target"}
[show_if]
{CONDITION player_$side_number|.ally_1 equals no}
[or]
{CONDITION player_$side_number|.ally_2 equals no}
[/or]
[or]
{CONDITION player_$side_number|.ally_3 equals no}
[/or]
[or]
{CONDITION player_$side_number|.ally_4 equals no}
[/or]
[/show_if]
[command]
{VARIABLE finished_options yes}
{VARIABLE_OP unit.moves format 0}
{VARIABLE_OP player_$side_number|.leader_option_1.progress add 1}
[/command]
[/option]
# Elves
[option]
message= {MENU_IMG_TXT "units/elves-wood/marshal.png~TC(1,magenta)" _"@Negotiate with the Elves
[show_if]
{CONDITION player_$side_number|.ally_1 equals no}
[or]
{CONDITION player_$side_number|.ally_2 equals no}
[/or]
[or]
{CONDITION player_$side_number|.ally_3 equals no}
[/or]
[or]
{CONDITION player_$side_number|.ally_4 equals no}
[/or]
[/show_if]
[command]
{VARIABLE finished_options yes}
{VARIABLE_OP unit.moves format 0}
{VARIABLE_OP player_$side_number|.leader_option_1.progress add 1}
[/command]
[/option]
# Elves
[option]
message= {MENU_IMG_TXT "units/elves-wood/marshal.png~TC(1,magenta)" _"@Negotiate with the Elves
Lets you recruit an Elvish unit
Negotiation Progress: $player_$side_number|.leader_option_2.progress|/$player_$side_number|.leader_option_2.target"}
[show_if]
{CONDITION player_$side_number|.ally_5 equals no}
[or]
{CONDITION player_$side_number|.ally_6 equals no}
[/or]
[or]
{CONDITION player_$side_number|.ally_7 equals no}
[/or]
[or]
{CONDITION player_$side_number|.ally_8 equals no}
[/or]
[/show_if]
[command]
{VARIABLE finished_options yes}
{VARIABLE_OP unit.moves format 0}
{VARIABLE_OP player_$side_number|.leader_option_2.progress add 1}
[/command]
[/option]
[show_if]
{CONDITION player_$side_number|.ally_5 equals no}
[or]
{CONDITION player_$side_number|.ally_6 equals no}
[/or]
[or]
{CONDITION player_$side_number|.ally_7 equals no}
[/or]
[or]
{CONDITION player_$side_number|.ally_8 equals no}
[/or]
[/show_if]
[command]
{VARIABLE finished_options yes}
{VARIABLE_OP unit.moves format 0}
{VARIABLE_OP player_$side_number|.leader_option_2.progress add 1}
[/command]
[/option]
[/message]
@ -297,57 +297,57 @@ Negotiation Progress: $player_$side_number|.leader_option_2.progress|/$player_$s
# Picking a Diplomactic recruit
# Dwarves
# Dwarves
[if]
{CONDITION player_$side_number|.leader_option_1.progress greater_than_equal_to $player_$side_number|.leader_option_1.target}
[then]
[message]
speaker=narrator
caption="Negotiation Complete"
image="images/portraits/James_Woo/dwarf-guard.png"
[if]
{CONDITION player_$side_number|.leader_option_1.progress greater_than_equal_to $player_$side_number|.leader_option_1.target}
[then]
[message]
speaker=narrator
caption="Negotiation Complete"
image="images/portraits/James_Woo/dwarf-guard.png"
#wmllint: display on
message= _ "Our talks are complete - the Dwarves will gladly fight by your side. Which of our brethren do you want to recruit?
message= _ "Our talks are complete - the Dwarves will gladly fight by your side. Which of our brethren do you want to recruit?
"
#wmllint: display off
{PICK_RECRUIT_OPTION ("units/dwarves/fighter.png~TC(1,magenta)") ("Dwarvish Fighter") ally_1}
{PICK_RECRUIT_OPTION ("units/dwarves/guard.png~TC(1,magenta)") ("Dwarvish Guardsman") ally_2}
{PICK_RECRUIT_OPTION ("units/dwarves/thunderer.png~TC(1,magenta)") ("Dwarvish Thunderer") ally_3}
{PICK_RECRUIT_OPTION ("units/dwarves/ulfserker.png~TC(1,magenta)") ("Dwarvish Ulfserker") ally_4}
[/message]
{VARIABLE_OP player_$side_number|.leader_option_1.progress format 0}
[/then]
[/if]
# Elves
{PICK_RECRUIT_OPTION ("units/dwarves/fighter.png~TC(1,magenta)") ("Dwarvish Fighter") ally_1}
{PICK_RECRUIT_OPTION ("units/dwarves/guard.png~TC(1,magenta)") ("Dwarvish Guardsman") ally_2}
{PICK_RECRUIT_OPTION ("units/dwarves/thunderer.png~TC(1,magenta)") ("Dwarvish Thunderer") ally_3}
{PICK_RECRUIT_OPTION ("units/dwarves/ulfserker.png~TC(1,magenta)") ("Dwarvish Ulfserker") ally_4}
[if]
{CONDITION player_$side_number|.leader_option_2.progress greater_than_equal_to $player_$side_number|.leader_option_2.target}
[then]
[message]
speaker=narrator
caption="Negotiation Complete"
image="images/portraits/Kitty/elvish-high-lord.png"
[/message]
{VARIABLE_OP player_$side_number|.leader_option_1.progress format 0}
[/then]
[/if]
# Elves
[if]
{CONDITION player_$side_number|.leader_option_2.progress greater_than_equal_to $player_$side_number|.leader_option_2.target}
[then]
[message]
speaker=narrator
caption="Negotiation Complete"
image="images/portraits/Kitty/elvish-high-lord.png"
#wmllint: display on
message= _ "Our talks are complete - the Elves shall aid you in this battle. Which our of kin do you wish to recruit?
"
message= _ "Our talks are complete - the Elves shall aid you in this battle. Which our of kin do you wish to recruit?
"
#wmllint: display off
{PICK_RECRUIT_OPTION ("units/elves-wood/archer.png~TC(1,magenta)") ("Elvish Archer") ally_5}
{PICK_RECRUIT_OPTION ("units/elves-wood/fighter.png~TC(1,magenta)") ("Elvish Fighter") ally_6}
{PICK_RECRUIT_OPTION ("units/elves-wood/scout.png~TC(1,magenta)") ("Elvish Scout") ally_7}
{PICK_RECRUIT_OPTION ("units/elves-wood/shaman.png~TC(1,magenta)") ("Elvish Shaman") ally_8}
[/message]
{VARIABLE_OP player_$side_number|.leader_option_2.progress format 0}
[/then]
[/if]
[unstore_unit]
variable=unit
[/unstore_unit]
{PICK_RECRUIT_OPTION ("units/elves-wood/archer.png~TC(1,magenta)") ("Elvish Archer") ally_5}
{PICK_RECRUIT_OPTION ("units/elves-wood/fighter.png~TC(1,magenta)") ("Elvish Fighter") ally_6}
{PICK_RECRUIT_OPTION ("units/elves-wood/scout.png~TC(1,magenta)") ("Elvish Scout") ally_7}
{PICK_RECRUIT_OPTION ("units/elves-wood/shaman.png~TC(1,magenta)") ("Elvish Shaman") ally_8}
[/message]
{VARIABLE_OP player_$side_number|.leader_option_2.progress format 0}
[/then]
[/if]
[unstore_unit]
variable=unit
[/unstore_unit]
[/command]
[/set_menu_item]

View file

@ -5,182 +5,182 @@
# Picking new recruit
[set_menu_item]
id=anl_choose_new_recruit
description="Choose New Recruit"
[show_if]
{CONDITION player_$side_number|.warfare.troop_available greater_than_equal_to 1}
[have_unit]
side=$side_number
x,y=$x1,$y1
type={TYPES}
canrecruit=no
[not]
[filter_wml]
moves=0
[/filter_wml]
[/not]
[/have_unit]
[/show_if]
[filter_location]
terrain="Gg^Ve,Gg^Vea"
[/filter_location]
# wmlindent: start ignoring
[command]
[message]
speaker=unit
caption="Study Complete"
id=anl_choose_new_recruit
description="Choose New Recruit"
[show_if]
{CONDITION player_$side_number|.warfare.troop_available greater_than_equal_to 1}
[have_unit]
side=$side_number
x,y=$x1,$y1
type={TYPES}
canrecruit=no
[not]
[filter_wml]
moves=0
[/filter_wml]
[/not]
[/have_unit]
[/show_if]
[filter_location]
terrain="Gg^Ve,Gg^Vea"
[/filter_location]
# wmlindent: start ignoring
[command]
[message]
speaker=unit
caption="Study Complete"
#wmllint: display on
message= _ "Which type of unit would you like to be able to recruit?
message= _ "Which type of unit would you like to be able to recruit?
"
#wmllint: display off
{PICK_RECRUIT_OPTION ("units/human-loyalists/spearman.png~TC(1,magenta)") ("Spearman") troop_1}
{PICK_RECRUIT_OPTION ("units/human-loyalists/bowman.png~TC(1,magenta)") ("Bowman") troop_2}
{PICK_RECRUIT_OPTION ("units/human-loyalists/fencer.png~TC(1,magenta)") ("Fencer") troop_3}
{PICK_RECRUIT_OPTION ("units/human-loyalists/heavyinfantry.png~TC(1,magenta)") ("Heavy Infantryman") troop_4}
{PICK_RECRUIT_OPTION ("units/human-loyalists/sergeant.png~TC(1,magenta)") ("Sergeant") troop_5}
{PICK_RECRUIT_OPTION ("units/human-loyalists/cavalryman.png~TC(1,magenta)") ("Cavalryman") troop_6}
{PICK_RECRUIT_OPTION ("units/human-loyalists/horseman.png~TC(1,magenta)") ("Horseman") troop_7}
[/message]
{VARIABLE_OP player_$side_number|.warfare.troop_available add -1}
[/command]
{PICK_RECRUIT_OPTION ("units/human-loyalists/spearman.png~TC(1,magenta)") ("Spearman") troop_1}
{PICK_RECRUIT_OPTION ("units/human-loyalists/bowman.png~TC(1,magenta)") ("Bowman") troop_2}
{PICK_RECRUIT_OPTION ("units/human-loyalists/fencer.png~TC(1,magenta)") ("Fencer") troop_3}
{PICK_RECRUIT_OPTION ("units/human-loyalists/heavyinfantry.png~TC(1,magenta)") ("Heavy Infantryman") troop_4}
{PICK_RECRUIT_OPTION ("units/human-loyalists/sergeant.png~TC(1,magenta)") ("Sergeant") troop_5}
{PICK_RECRUIT_OPTION ("units/human-loyalists/cavalryman.png~TC(1,magenta)") ("Cavalryman") troop_6}
{PICK_RECRUIT_OPTION ("units/human-loyalists/horseman.png~TC(1,magenta)") ("Horseman") troop_7}
[/message]
{VARIABLE_OP player_$side_number|.warfare.troop_available add -1}
[/command]
# wmlindent: stop ignoring
[/set_menu_item]
# Changing Research Target
[set_menu_item]
id=anl_oversee_research
description="Oversee Research"
[show_if]
[have_unit]
side=$side_number
x,y=$x1,$y1
type={TYPES}
canrecruit=no
[not]
[filter_wml]
moves=0
[/filter_wml]
[/not]
[/have_unit]
[/show_if]
[filter_location]
terrain="Gg^Ve,Gg^Vea"
[/filter_location]
[command]
[store_unit]
[filter]
x=$x1
y=$y1
[/filter]
kill=no
variable=unit
[/store_unit]
id=anl_oversee_research
description="Oversee Research"
[show_if]
[have_unit]
side=$side_number
x,y=$x1,$y1
type={TYPES}
canrecruit=no
[not]
[filter_wml]
moves=0
[/filter_wml]
[/not]
[/have_unit]
[/show_if]
[filter_location]
terrain="Gg^Ve,Gg^Vea"
[/filter_location]
{VARIABLE finished_options no}
{VARIABLE cancelled no}
[while]
{CONDITION finished_options equals no}
[do]
# wmlindent: start ignoring
[message]
speaker=unit
caption="Research"
[command]
[store_unit]
[filter]
x=$x1
y=$y1
[/filter]
kill=no
variable=unit
[/store_unit]
{VARIABLE finished_options no}
{VARIABLE cancelled no}
[while]
{CONDITION finished_options equals no}
[do]
# wmlindent: start ignoring
[message]
speaker=unit
caption="Research"
#wmllint: display on
message= _ "We are currently studying $player_$side_number|.research.current_target|. To which end would you have our scholars devote their minds?
message= _ "We are currently studying $player_$side_number|.research.current_target|. To which end would you have our scholars devote their minds?
Our farms produce $player_$side_number|.farming.gold|g
Our mines produce $player_$side_number|.mining.gold|g
"
#wmllint: display off
[option]
message= _ "Continue as before"
[command]
{VARIABLE finished_options yes}
{VARIABLE cancelled yes}
[/command]
[/option]
# wmlindent: stop ignoring
# Farming
[option]
message= {MENU_IMG_TXT "items/flower4.png" _"@Agriculture
[option]
message= _ "Continue as before"
[command]
{VARIABLE finished_options yes}
{VARIABLE cancelled yes}
[/command]
[/option]
# wmlindent: stop ignoring
# Farming
[option]
message= {MENU_IMG_TXT "items/flower4.png" _"@Agriculture
Farmers produce +1 gold
Study Progress: $player_$side_number|.farming.progress|/$player_$side_number|.farming.target"}
[command]
{VARIABLE player_$side_number|.research.current_target "agriculture"}
{VARIABLE finished_options yes}
{VARIABLE_OP unit.moves format 0}
[/command]
[/option]
# Mining
[option]
message= {MENU_IMG_TXT "items/gold-coins-small.png" _"@Mining
Miners produce +1 gold
[command]
{VARIABLE player_$side_number|.research.current_target "agriculture"}
{VARIABLE finished_options yes}
{VARIABLE_OP unit.moves format 0}
[/command]
[/option]
# Mining
[option]
message= {MENU_IMG_TXT "items/gold-coins-small.png" _"@Mining
Miners produce +1 gold
Study Progress: $player_$side_number|.mining.progress|/$player_$side_number|.mining.target"}
[command]
{VARIABLE player_$side_number|.research.current_target "mining"}
{VARIABLE finished_options yes}
{VARIABLE_OP unit.moves format 0}
[/command]
[/option]
#Warfare
[option]
message= {MENU_IMG_TXT "wesnoth-icon.png" _"@Warfare
[command]
{VARIABLE player_$side_number|.research.current_target "mining"}
{VARIABLE finished_options yes}
{VARIABLE_OP unit.moves format 0}
[/command]
[/option]
#Warfare
[option]
message= {MENU_IMG_TXT "wesnoth-icon.png" _"@Warfare
Allows you to recruit a new type of unit
Study Progress: $player_$side_number|.warfare.progress|/$player_$side_number|.warfare.target"}
[show_if]
{CONDITION player_$side_number|.troop_1 equals no}
[or]
{CONDITION player_$side_number|.troop_2 equals no}
[/or]
[or]
{CONDITION player_$side_number|.troop_3 equals no}
[/or]
[or]
{CONDITION player_$side_number|.troop_4 equals no}
[/or]
[or]
{CONDITION player_$side_number|.troop_5 equals no}
[/or]
[or]
{CONDITION player_$side_number|.troop_6 equals no}
[/or]
[or]
{CONDITION player_$side_number|.troop_7 equals no}
[/or]
[/show_if]
[command]
{VARIABLE player_$side_number|.research.current_target "warfare"}
{VARIABLE finished_options yes}
{VARIABLE_OP unit.moves format 0}
[/command]
[/option]
[/message]
[/do]
[/while]
[if]
[variable]
name=cancelled
not_equals=yes
[/variable]
[then]
[show_if]
{CONDITION player_$side_number|.troop_1 equals no}
[or]
{CONDITION player_$side_number|.troop_2 equals no}
[/or]
[or]
{CONDITION player_$side_number|.troop_3 equals no}
[/or]
[or]
{CONDITION player_$side_number|.troop_4 equals no}
[/or]
[or]
{CONDITION player_$side_number|.troop_5 equals no}
[/or]
[or]
{CONDITION player_$side_number|.troop_6 equals no}
[/or]
[or]
{CONDITION player_$side_number|.troop_7 equals no}
[/or]
[/show_if]
[command]
{VARIABLE player_$side_number|.research.current_target "warfare"}
{VARIABLE finished_options yes}
{VARIABLE_OP unit.moves format 0}
[/command]
[/option]
[/message]
[/do]
[/while]
[if]
[variable]
name=cancelled
not_equals=yes
[/variable]
[then]
[unstore_unit]
variable=unit
find_vacant=no
variable=unit
find_vacant=no
[/unstore_unit]
[/then]
[else]
[allow_undo][/allow_undo]
[/else]
@ -194,51 +194,51 @@ Study Progress: $player_$side_number|.warfare.progress|/$player_$side_number|.wa
#define FARMING_RESEARCH_COMPLETE
[if]
{CONDITION player_$side_number|.farming.progress greater_than_equal_to $player_$side_number|.farming.target}
[then]
{VARIABLE_OP player_$side_number|.farming.gold add 1}
[message]
speaker=narrator
caption="Study Complete"
image="items/flower4.png"
message= _ "$player_$side_number|.name|'s farms now produce $player_$side_number|.farming.gold gold."
[/message]
{VARIABLE_OP player_$side_number|.farming.progress add -$player_$side_number|.farming.target}
{VARIABLE_OP player_$side_number|.farming.target add 1}
[/then]
{CONDITION player_$side_number|.farming.progress greater_than_equal_to $player_$side_number|.farming.target}
[then]
{VARIABLE_OP player_$side_number|.farming.gold add 1}
[message]
speaker=narrator
caption="Study Complete"
image="items/flower4.png"
message= _ "$player_$side_number|.name|'s farms now produce $player_$side_number|.farming.gold gold."
[/message]
{VARIABLE_OP player_$side_number|.farming.progress add -$player_$side_number|.farming.target}
{VARIABLE_OP player_$side_number|.farming.target add 1}
[/then]
[/if]
#enddef
#define MINING_RESEARCH_COMPLETE
[if]
{CONDITION player_$side_number|.mining.progress greater_than_equal_to $player_$side_number|.mining.target}
[then]
{VARIABLE_OP player_$side_number|.mining.gold add 1}
[message]
speaker=narrator
caption="Study Complete"
image="items/gold-coins-small.png"
message= _ "$player_$side_number|.name|'s mines now produce $player_$side_number|.mining.gold gold."
[/message]
{VARIABLE_OP player_$side_number|.mining.progress add -$player_$side_number|.mining.target}
{VARIABLE_OP player_$side_number|.mining.target add 1}
[/then]
{CONDITION player_$side_number|.mining.progress greater_than_equal_to $player_$side_number|.mining.target}
[then]
{VARIABLE_OP player_$side_number|.mining.gold add 1}
[message]
speaker=narrator
caption="Study Complete"
image="items/gold-coins-small.png"
message= _ "$player_$side_number|.name|'s mines now produce $player_$side_number|.mining.gold gold."
[/message]
{VARIABLE_OP player_$side_number|.mining.progress add -$player_$side_number|.mining.target}
{VARIABLE_OP player_$side_number|.mining.target add 1}
[/then]
[/if]
#enddef
#define WARFARE_RESEARCH_COMPLETE
[if]
{CONDITION player_$side_number|.warfare.progress greater_than_equal_to $player_$side_number|.warfare.target}
[then]
[message]
speaker=narrator
caption="Study Complete"
image="wesnoth-icon.png"
message= _ "$player_$side_number|.name|, we have finished researching warfare. Right-click on a mage in a university to select a unit to recruit."
[/message]
{VARIABLE_OP player_$side_number|.warfare.troop_available add 1}
{VARIABLE_OP player_$side_number|.warfare.progress add -$player_$side_number|.warfare.target}
{VARIABLE_OP player_$side_number|.warfare.target add 1}
[/then]
{CONDITION player_$side_number|.warfare.progress greater_than_equal_to $player_$side_number|.warfare.target}
[then]
[message]
speaker=narrator
caption="Study Complete"
image="wesnoth-icon.png"
message= _ "$player_$side_number|.name|, we have finished researching warfare. Right-click on a mage in a university to select a unit to recruit."
[/message]
{VARIABLE_OP player_$side_number|.warfare.troop_available add 1}
{VARIABLE_OP player_$side_number|.warfare.progress add -$player_$side_number|.warfare.target}
{VARIABLE_OP player_$side_number|.warfare.target add 1}
[/then]
[/if]
#enddef

View file

@ -1,67 +1,67 @@
#textdomain wesnoth-anl
#define COMPLETE_ACTION GOLD
{VARIABLE finished yes}
{VARIABLE_OP unit.moves format 0}
[unstore_unit]
variable=unit
[/unstore_unit]
[gold]
amount={GOLD}
side=$side_number
[/gold]
{VARIABLE finished yes}
{VARIABLE_OP unit.moves format 0}
[unstore_unit]
variable=unit
[/unstore_unit]
[gold]
amount={GOLD}
side=$side_number
[/gold]
#enddef
#define ANL_SHOW_IF TYPE LETTERS
[show_if]
[have_unit]
side=$side_number
x,y=$x1,$y1
type={TYPE}
[filter_location]
terrain={LETTERS}
[/filter_location]
[/have_unit]
[/show_if]
#define ANL_SHOW_IF TYPE LETTERS
[show_if]
[have_unit]
side=$side_number
x,y=$x1,$y1
type={TYPE}
[filter_location]
terrain={LETTERS}
[/filter_location]
[/have_unit]
[/show_if]
#enddef
#define SET_NAMES SIDE
[store_unit]
[filter]
side={SIDE}
canrecruit=yes
[/filter]
variable=leader
[/store_unit]
[filter]
side={SIDE}
canrecruit=yes
[/filter]
variable=leader
[/store_unit]
{VARIABLE player_{SIDE}.name $leader.name}
[unstore_unit]
variable=leader
[/unstore_unit]
variable=leader
[/unstore_unit]
#enddef
#define SET_SIDE_VARIABLES SIDE
[set_variables]
name=player_{SIDE}
[value]
[farming]
progress=0
target=4
gold=3
[/farming]
[mining]
progress=0
target=5
gold=4
[/mining]
[warfare]
progress=0
target=4
troop_available=0
[/warfare]
troop_1=no
troop_2=no
troop_3=no
@ -69,26 +69,26 @@
troop_5=no
troop_6=no
troop_7=no
[research]
current_target=agriculture
[/research]
[leader_option_1]
progress=0
target=4
[/leader_option_1]
ally_1=no
ally_2=no
ally_3=no
ally_4=no
[leader_option_2]
progress=0
target=4
[/leader_option_2]
ally_5=no
ally_6=no
ally_7=no
@ -100,72 +100,72 @@
#define PICK_RECRUIT_OPTION UNIT_IMAGE UNIT_TYPE VAR
[option]
message= {MENU_IMG_TXT {UNIT_IMAGE} _{UNIT_TYPE}}
[show_if]
{CONDITION player_$side_number|.{VAR} equals no}
[/show_if]
[command]
{VARIABLE player_$side_number|.{VAR} yes}
[allow_recruit]
type={UNIT_TYPE}
side=$side_number
[/allow_recruit]
[/command]
[show_if]
{CONDITION player_$side_number|.{VAR} equals no}
[/show_if]
[command]
{VARIABLE player_$side_number|.{VAR} yes}
[allow_recruit]
type={UNIT_TYPE}
side=$side_number
[/allow_recruit]
[/command]
[/option]
#enddef
#define ADDING_TO_CURRENT_RESEARCH_FIELD SIDE NUM
[if]
{CONDITION player_{SIDE}.research.current_target equals "agriculture"}
[then]
{VARIABLE_OP player_{SIDE}.farming.progress add {NUM}}
[/then]
{CONDITION player_{SIDE}.research.current_target equals "agriculture"}
[then]
{VARIABLE_OP player_{SIDE}.farming.progress add {NUM}}
[/then]
[/if]
[if]
{CONDITION player_{SIDE}.research.current_target equals "mining"}
[then]
{VARIABLE_OP player_{SIDE}.mining.progress add {NUM}}
[/then]
{CONDITION player_{SIDE}.research.current_target equals "mining"}
[then]
{VARIABLE_OP player_{SIDE}.mining.progress add {NUM}}
[/then]
[/if]
[if]
{CONDITION player_{SIDE}.research.current_target equals "warfare"}
[then]
{VARIABLE_OP player_{SIDE}.warfare.progress add {NUM}}
[/then]
{CONDITION player_{SIDE}.research.current_target equals "warfare"}
[then]
{VARIABLE_OP player_{SIDE}.warfare.progress add {NUM}}
[/then]
[/if]
#enddef
#define ANL_RESCUE_TRAPPED_UNIT X Y X2 Y2
[event]
name=moveto
[filter]
side=1,2,3,4
x={X}
y={Y}
[/filter]
[message]
speaker=unit
message= _ "Let's cut you free!"
[/message]
[message]
speaker=narrator
message= _ "You release the creature from the web and it agrees to help you."
image=wesnoth-icon.png
[/message]
[store_unit]
[filter]
x={X2}
y={Y2}
[/filter]
variable=critter
kill=no
[/store_unit]
{VARIABLE critter.side $side_number}
{VARIABLE critter.overlays "none"}
[unstore_unit]
variable=critter
[/unstore_unit]
name=moveto
[filter]
side=1,2,3,4
x={X}
y={Y}
[/filter]
[message]
speaker=unit
message= _ "Let's cut you free!"
[/message]
[message]
speaker=narrator
message= _ "You release the creature from the web and it agrees to help you."
image=wesnoth-icon.png
[/message]
[store_unit]
[filter]
x={X2}
y={Y2}
[/filter]
variable=critter
kill=no
[/store_unit]
{VARIABLE critter.side $side_number}
{VARIABLE critter.overlays "none"}
[unstore_unit]
variable=critter
[/unstore_unit]
[/event]
#enddef
@ -221,29 +221,29 @@ y={Y}
#enddef
#define BUILD_SOUND_1
{PLAY_SOUND ("miss-1.ogg")}
{DELAY 120}
{PLAY_SOUND ("bite.ogg")}
{DELAY 220}
{PLAY_SOUND ("dart.wav")}
{DELAY 180}
{PLAY_SOUND ("dart.wav")}
{PLAY_SOUND ("miss-1.ogg")}
{DELAY 120}
{PLAY_SOUND ("bite.ogg")}
{DELAY 220}
{PLAY_SOUND ("dart.wav")}
{DELAY 180}
{PLAY_SOUND ("dart.wav")}
#enddef
#define BUILD_SOUND_2
{PLAY_SOUND ("staff.wav")}
{DELAY 100}
{PLAY_SOUND ("pincers.ogg")}
{DELAY 160}
{PLAY_SOUND ("sling.ogg")}
{PLAY_SOUND ("staff.wav")}
{DELAY 100}
{PLAY_SOUND ("pincers.ogg")}
{DELAY 160}
{PLAY_SOUND ("sling.ogg")}
#enddef
#define BUILD_SOUND_3
{PLAY_SOUND ("bite.ogg")}
{DELAY 280}
{PLAY_SOUND ("staff.wav")}
{DELAY 100}
{PLAY_SOUND ("dart.wav")}
{DELAY 180}
{PLAY_SOUND ("dart.wav")}
{PLAY_SOUND ("bite.ogg")}
{DELAY 280}
{PLAY_SOUND ("staff.wav")}
{DELAY 100}
{PLAY_SOUND ("dart.wav")}
{DELAY 180}
{PLAY_SOUND ("dart.wav")}
#enddef

View file

@ -2,54 +2,54 @@
#define WORKER_OPTIONS TYPES
[set_menu_item]
id=anl_get_to_work
description="Get to Work!"
[show_if]
[have_unit]
side=$side_number
x,y=$x1,$y1
type={TYPES}
[not]
[filter_wml]
moves=0
[/filter_wml]
[/not]
[/have_unit]
[/show_if]
id=anl_get_to_work
description="Get to Work!"
[show_if]
[have_unit]
side=$side_number
x,y=$x1,$y1
type={TYPES}
[not]
[filter_wml]
moves=0
[/filter_wml]
[/not]
[/have_unit]
[/show_if]
[command]
[store_side]
side=$side_number
variable=worker
[/store_side]
side=$side_number
variable=worker
[/store_side]
[store_unit]
[filter]
x=$x1
y=$y1
[/filter]
variable=unit
[filter]
x=$x1
y=$y1
[/filter]
variable=unit
[/store_unit]
{VARIABLE finished no}
[while]
{CONDITION finished equals no}
[do]
[while]
{CONDITION finished equals no}
[do]
# wmlindent: start ignoring
[message]
speaker=unit
[message]
speaker=unit
#wmllint: display on
message= _ "What shall I do my liege?
message= _ "What shall I do my liege?
"
#wmllint: display off
[option]
message= _ "Nothing"
[command]
{VARIABLE finished yes}
[allow_undo][/allow_undo]
[/command]
[command]
{VARIABLE finished yes}
[allow_undo][/allow_undo]
[/command]
[/option]
# ----------------------------------------------
@ -59,123 +59,123 @@ message= _ "Nothing"
[option]
message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Convert to Grassland" _"`Cost: 0g"}
{ANL_SHOW_IF ("Peasant") "Re"}
[command]
{COMPLETE_ACTION 0}
{MODIFY_TERRAIN Gg $x1 $y1}
{PLAY_SOUND ("dagger-swish.wav")}
[/command]
[/option]
{ANL_SHOW_IF ("Peasant") "Re"}
[command]
{COMPLETE_ACTION 0}
{MODIFY_TERRAIN Gg $x1 $y1}
{PLAY_SOUND ("dagger-swish.wav")}
[/command]
[/option]
# ----------------------------------------------
# GRASSLAND
# Plant Farm
[option]
message= {MENU_IMG_TXT2 "terrain/flat/farm-veg-spring-icon.png" _"@Plant Farm" _"`Cost: 0g"}
{ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
[command]
{COMPLETE_ACTION 0}
{MODIFY_TERRAIN Re $x1 $y1}
{PLAY_SOUND ("entangle.wav")}
[/command]
[/option]
{ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
[command]
{COMPLETE_ACTION 0}
{MODIFY_TERRAIN Re $x1 $y1}
{PLAY_SOUND ("entangle.wav")}
[/command]
[/option]
# Build Village
[option]
message= {MENU_IMG_TXT2 "terrain/village/human-tile.png" _"@Build Village" _"`Cost: 15g"}
{ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 15}
[then]
{COMPLETE_ACTION (-15)}
{MODIFY_TERRAIN "Gg^Vh" $x1 $y1}
{ANL_CAPTURE_VILLAGE}
{BUILD_SOUND_1}
[/then]
[/if]
[/command]
[/option]
{ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 15}
[then]
{COMPLETE_ACTION (-15)}
{MODIFY_TERRAIN "Gg^Vh" $x1 $y1}
{ANL_CAPTURE_VILLAGE}
{BUILD_SOUND_1}
[/then]
[/if]
[/command]
[/option]
# Build Castle
[option]
message= {MENU_IMG_TXT2 "terrain/castle/castle-tile.png" _"@Build Castle" _"`Cost: 6g"}
{ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 6}
[then]
{COMPLETE_ACTION (-6)}
{MODIFY_TERRAIN "Ch" $x1 $y1}
{BUILD_SOUND_2}
[/then]
[/if]
[/command]
{ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 6}
[then]
{COMPLETE_ACTION (-6)}
{MODIFY_TERRAIN "Ch" $x1 $y1}
{BUILD_SOUND_2}
[/then]
[/if]
[/command]
[/option]
# Flood
[option]
message= {MENU_IMG_TXT2 "terrain/water/coast.png" _"@Flood the Field" _"`Cost: 4g"}
{ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 4}
[then]
{COMPLETE_ACTION -4}
{MODIFY_TERRAIN "Ww" $x1 $y1}
{PLAY_SOUND ("water-blast.wav")}
[/then]
[/if]
[/command]
{ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 4}
[then]
{COMPLETE_ACTION -4}
{MODIFY_TERRAIN "Ww" $x1 $y1}
{PLAY_SOUND ("water-blast.wav")}
[/then]
[/if]
[/command]
[/option]
# Plant Saplings
[option]
message= {MENU_IMG_TXT2 "terrain/forest/pine-tile.png" _"@Plant Saplings" _"`Cost: 1g"}
{ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 1}
[then]
{COMPLETE_ACTION -1}
{MODIFY_TERRAIN "Gs^Fp" $x1 $y1}
{PLAY_SOUND ("entangle.wav")}
[/then]
[/if]
[/command]
{ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 1}
[then]
{COMPLETE_ACTION -1}
{MODIFY_TERRAIN "Gs^Fp" $x1 $y1}
{PLAY_SOUND ("entangle.wav")}
[/then]
[/if]
[/command]
[/option]
# ----------------------------------------------
# FOREST
# Chop Down Forest
[option]
message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Chop Down Forest" _"`Earns: 1g"}
{ANL_SHOW_IF ("Peasant") "Gs^Fp,Gs^Ft,Aa^Fpa,Gg^Fet"}
[command]
{VARIABLE finished yes}
{VARIABLE_OP unit.moves format 0}
{ADD_GOLD $side_number 1}
{PLAY_SOUND ("dagger-swish.wav")}
{DELAY 250}
{PLAY_SOUND ("axe.ogg")}
{DELAY 150}
{PLAY_SOUND ("wose-die.ogg")}
{MODIFY_TERRAIN "Gg" $x1 $y1}
[unstore_unit]
variable=unit
text=1
red,green,blue=204,204,51
[/unstore_unit]
[/command]
[/option]
{ANL_SHOW_IF ("Peasant") "Gs^Fp,Gs^Ft,Aa^Fpa,Gg^Fet"}
[command]
{VARIABLE finished yes}
{VARIABLE_OP unit.moves format 0}
{ADD_GOLD $side_number 1}
{PLAY_SOUND ("dagger-swish.wav")}
{DELAY 250}
{PLAY_SOUND ("axe.ogg")}
{DELAY 150}
{PLAY_SOUND ("wose-die.ogg")}
{MODIFY_TERRAIN "Gg" $x1 $y1}
[unstore_unit]
variable=unit
text=1
red,green,blue=204,204,51
[/unstore_unit]
[/command]
[/option]
# ----------------------------------------------
# HILLS
@ -184,19 +184,19 @@ message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Chop Down Forest" _"`Earn
[option]
message= {MENU_IMG_TXT2 "terrain/village/human-hills-tile.png" _"@Build Mine" _"`Cost: 25g"}
{ANL_SHOW_IF ("Peasant") "Hh"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 25}
[then]
{COMPLETE_ACTION (-25)}
{MODIFY_TERRAIN "Hh^Vhh" $x1 $y1}
{ANL_CAPTURE_VILLAGE}
{BUILD_SOUND_1}
[/then]
[/if]
[/command]
[/option]
{ANL_SHOW_IF ("Peasant") "Hh"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 25}
[then]
{COMPLETE_ACTION (-25)}
{MODIFY_TERRAIN "Hh^Vhh" $x1 $y1}
{ANL_CAPTURE_VILLAGE}
{BUILD_SOUND_1}
[/then]
[/if]
[/command]
[/option]
# ----------------------------------------------
# MOUNTAINS
@ -205,19 +205,19 @@ message= {MENU_IMG_TXT2 "terrain/village/human-hills-tile.png" _"@Build Mine" _"
[option]
message= {MENU_IMG_TXT2 "terrain/village/human-mountain-tile.png" _"@Build Mine" _"`Cost: 25g"}
{ANL_SHOW_IF ("Peasant") "Mm"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 25}
[then]
{COMPLETE_ACTION (-25)}
{MODIFY_TERRAIN "Mm^Vhh" $x1 $y1}
{ANL_CAPTURE_VILLAGE}
{BUILD_SOUND_1}
[/then]
[/if]
[/command]
[/option]
{ANL_SHOW_IF ("Peasant") "Mm"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 25}
[then]
{COMPLETE_ACTION (-25)}
{MODIFY_TERRAIN "Mm^Vhh" $x1 $y1}
{ANL_CAPTURE_VILLAGE}
{BUILD_SOUND_1}
[/then]
[/if]
[/command]
[/option]
# ----------------------------------------------
# WATER
@ -226,37 +226,37 @@ message= {MENU_IMG_TXT2 "terrain/village/human-mountain-tile.png" _"@Build Mine"
[option]
message= {MENU_IMG_TXT2 "terrain/water/ford.png" _"@Make a Ford" _"`Cost: 3g"}
{ANL_SHOW_IF ("Peasant") "Ww"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 3}
[then]
{COMPLETE_ACTION (-3)}
{DELAY 200}
{PLAY_SOUND ("dagger-swish.wav")}
{MODIFY_TERRAIN "Wwf" $x1 $y1}
[/then]
[/if]
[/command]
[/option]
{ANL_SHOW_IF ("Peasant") "Ww"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 3}
[then]
{COMPLETE_ACTION (-3)}
{DELAY 200}
{PLAY_SOUND ("dagger-swish.wav")}
{MODIFY_TERRAIN "Wwf" $x1 $y1}
[/then]
[/if]
[/command]
[/option]
# Landfill
[option]
message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Landfill" _"`Cost: 5g"}
{ANL_SHOW_IF ("Peasant") "Ww"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 5}
[then]
{COMPLETE_ACTION (-5)}
{DELAY 200}
{PLAY_SOUND ("claws.ogg")}
{MODIFY_TERRAIN "Gg" $x1 $y1}
[/then]
[/if]
[/command]
[/option]
{ANL_SHOW_IF ("Peasant") "Ww"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 5}
[then]
{COMPLETE_ACTION (-5)}
{DELAY 200}
{PLAY_SOUND ("claws.ogg")}
{MODIFY_TERRAIN "Gg" $x1 $y1}
[/then]
[/if]
[/command]
[/option]
# ----------------------------------------------
# FORD
@ -265,34 +265,34 @@ message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Landfill" _"`Cost: 5g"}
[option]
message= {MENU_IMG_TXT2 "terrain/water/coast.png" _"@Destroy the Ford" _"`Cost: 0g"}
{ANL_SHOW_IF ("Peasant") "Wwf"}
[command]
{COMPLETE_ACTION 0}
{DELAY 200}
{MODIFY_TERRAIN "Ww" $x1 $y1}
{PLAY_SOUND ("pincers.ogg")}
{DELAY 200}
{PLAY_SOUND ("water-blast.wav")}
[/command]
[/option]
{ANL_SHOW_IF ("Peasant") "Wwf"}
[command]
{COMPLETE_ACTION 0}
{DELAY 200}
{MODIFY_TERRAIN "Ww" $x1 $y1}
{PLAY_SOUND ("pincers.ogg")}
{DELAY 200}
{PLAY_SOUND ("water-blast.wav")}
[/command]
[/option]
# Landfill
[option]
message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Landfill" _"`Cost: 1g"}
{ANL_SHOW_IF ("Peasant") "Wwf"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 1}
[then]
{COMPLETE_ACTION (-1)}
{DELAY 200}
{PLAY_SOUND ("claws.ogg")}
{MODIFY_TERRAIN "Gg" $x1 $y1}
[/then]
[/if]
[/command]
[/option]
{ANL_SHOW_IF ("Peasant") "Wwf"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 1}
[then]
{COMPLETE_ACTION (-1)}
{DELAY 200}
{PLAY_SOUND ("claws.ogg")}
{MODIFY_TERRAIN "Gg" $x1 $y1}
[/then]
[/if]
[/command]
[/option]
# ----------------------------------------------
# CAVE
@ -301,56 +301,56 @@ message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Landfill" _"`Cost: 1g"}
[option]
message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Smash Cave Floor" _"`Cost: 2g"}
{ANL_SHOW_IF ("Peasant") "Uu,Uu^Ii"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 2}
[then]
{COMPLETE_ACTION (-2)}
{PLAY_SOUND ("claws.ogg")}
{MODIFY_TERRAIN "Gg" $x1 $y1}
[/then]
[/if]
[/command]
[/option]
{ANL_SHOW_IF ("Peasant") "Uu,Uu^Ii"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 2}
[then]
{COMPLETE_ACTION (-2)}
{PLAY_SOUND ("claws.ogg")}
{MODIFY_TERRAIN "Gg" $x1 $y1}
[/then]
[/if]
[/command]
[/option]
# Convert Cave To Hills
[option]
message= {MENU_IMG_TXT2 "terrain/hills-variation2.png" _"@Smash Cave Floor" _"`Cost: 3g"}
{ANL_SHOW_IF ("Peasant") "Uh,Uh^Ii"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 3}
[then]
{COMPLETE_ACTION (-3)}
{PLAY_SOUND ("claws.ogg")}
{MODIFY_TERRAIN "Hh" $x1 $y1}
[/then]
[/if]
[/command]
[/option]
{ANL_SHOW_IF ("Peasant") "Uh,Uh^Ii"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 3}
[then]
{COMPLETE_ACTION (-3)}
{PLAY_SOUND ("claws.ogg")}
{MODIFY_TERRAIN "Hh" $x1 $y1}
[/then]
[/if]
[/command]
[/option]
# Harvest Cave Mushrooms
[option]
message= {MENU_IMG_TXT2 "terrain/cave/floor1.png" _"@Harvest Mushrooms" _"`Earns: 3g"}
{ANL_SHOW_IF ("Peasant") "Uu^Uf"}
[command]
{VARIABLE finished yes}
{VARIABLE_OP unit.moves format 0}
{ADD_GOLD $side_number 3}
{PLAY_SOUND ("dagger-swish.wav")}
{DELAY 250}
{PLAY_SOUND ("axe.ogg")}
{MODIFY_TERRAIN "Uu" $x1 $y1}
[unstore_unit]
variable=unit
text=3
red,green,blue=204,204,51
[/unstore_unit]
[/command]
[/option]
{ANL_SHOW_IF ("Peasant") "Uu^Uf"}
[command]
{VARIABLE finished yes}
{VARIABLE_OP unit.moves format 0}
{ADD_GOLD $side_number 3}
{PLAY_SOUND ("dagger-swish.wav")}
{DELAY 250}
{PLAY_SOUND ("axe.ogg")}
{MODIFY_TERRAIN "Uu" $x1 $y1}
[unstore_unit]
variable=unit
text=3
red,green,blue=204,204,51
[/unstore_unit]
[/command]
[/option]
# ----------------------------------------------
# CASTLE
@ -359,17 +359,17 @@ message= {MENU_IMG_TXT2 "terrain/cave/floor1.png" _"@Harvest Mushrooms" _"`Earns
[option]
message= {MENU_IMG_TXT2 "terrain/castle/keep-tile.png" _"@Build a Keep" _"`Cost: 6g"}
{ANL_SHOW_IF ("Peasant") "Ch,Ce,Cv,Cud,Chr,Chw,Chs"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 6}
[then]
{COMPLETE_ACTION (-6)}
{MODIFY_TERRAIN "Kh" $x1 $y1}
{BUILD_SOUND_2}
[/then]
[/if]
[/command]
{ANL_SHOW_IF ("Peasant") "Ch,Ce,Cv,Cud,Chr,Chw,Chs"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 6}
[then]
{COMPLETE_ACTION (-6)}
{MODIFY_TERRAIN "Kh" $x1 $y1}
{BUILD_SOUND_2}
[/then]
[/if]
[/command]
[/option]
# ----------------------------------------------
@ -379,19 +379,19 @@ message= {MENU_IMG_TXT2 "terrain/castle/keep-tile.png" _"@Build a Keep" _"`Cost:
[option]
message= {MENU_IMG_TXT2 "terrain/village/elven-tile.png" _"@Establish Univeristy" _"`Cost: 7g"}
{ANL_SHOW_IF ("Peasant") "Gg^Vh,Aa^Vha"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 7}
[then]
{COMPLETE_ACTION (-7)}
{MODIFY_TERRAIN "Gg^Ve" $x1 $y1}
{ANL_CAPTURE_VILLAGE}
{BUILD_SOUND_2}
[/then]
[/if]
[/command]
[/option]
{ANL_SHOW_IF ("Peasant") "Gg^Vh,Aa^Vha"}
[command]
[if]
{CONDITION worker.gold greater_than_equal_to 7}
[then]
{COMPLETE_ACTION (-7)}
{MODIFY_TERRAIN "Gg^Ve" $x1 $y1}
{ANL_CAPTURE_VILLAGE}
{BUILD_SOUND_2}
[/then]
[/if]
[/command]
[/option]
# ----------------------------------------------
# RUBBLE
@ -400,20 +400,20 @@ message= {MENU_IMG_TXT2 "terrain/village/elven-tile.png" _"@Establish Univeristy
[option]
message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Clear the Ground" _"`Cost: 0g"}
{ANL_SHOW_IF ("Peasant") "Rd"}
[command]
{COMPLETE_ACTION (-0)}
{DELAY 200}
{PLAY_SOUND ("claws.ogg")}
{MODIFY_TERRAIN "Gg" $x1 $y1}
{REMOVE_ITEM $x1 $y1}
[/command]
{ANL_SHOW_IF ("Peasant") "Rd"}
[command]
{COMPLETE_ACTION (-0)}
{DELAY 200}
{PLAY_SOUND ("claws.ogg")}
{MODIFY_TERRAIN "Gg" $x1 $y1}
{REMOVE_ITEM $x1 $y1}
[/command]
[/option]
[/message]
[/message]
[/do]
[/while]
[/command]
[/set_menu_item]
#enddef