Changed the player[<side>] array to individual player_<side> blocks...
...and cleaned up their initialization to use [set_variables].
This commit is contained in:
parent
4696bbdfdf
commit
7aa9360b0b
4 changed files with 1107 additions and 1089 deletions
|
@ -1,301 +1,301 @@
|
|||
#textdomain wesnoth-anl
|
||||
|
||||
# ------------------------------------------------------
|
||||
# Automatic Studying
|
||||
# ------------------------------------------------------
|
||||
|
||||
#define AUTO_STUDYING TYPES
|
||||
[event]
|
||||
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]
|
||||
|
||||
{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"}
|
||||
|
||||
[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 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]
|
||||
|
||||
{CLEAR_VARIABLE sound}
|
||||
{CLEAR_VARIABLE researchers}
|
||||
{CLEAR_VARIABLE idle}
|
||||
{CLEAR_VARIABLE amount}
|
||||
{CLEAR_VARIABLE credited_side}
|
||||
{REDRAW}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
# ------------------------------------------------------
|
||||
# Automatic Farming
|
||||
# ------------------------------------------------------
|
||||
|
||||
#define AUTO_FARMING TYPES
|
||||
[event]
|
||||
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
|
||||
[/filter_location]
|
||||
[/filter]
|
||||
variable=planters
|
||||
kill=no
|
||||
[/store_unit]
|
||||
|
||||
{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"}
|
||||
|
||||
[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}
|
||||
|
||||
# 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]
|
||||
|
||||
{VARIABLE sound no}
|
||||
{FOREACH planters i}
|
||||
{VARIABLE_OP idle to_variable "planters[$i].variables.idle"}
|
||||
|
||||
[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"}
|
||||
|
||||
# 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]
|
||||
|
||||
{CLEAR_VARIABLE sound}
|
||||
{CLEAR_VARIABLE harvesters}
|
||||
{CLEAR_VARIABLE planters}
|
||||
{CLEAR_VARIABLE idle}
|
||||
{CLEAR_VARIABLE amount}
|
||||
{CLEAR_VARIABLE credited_side}
|
||||
|
||||
{REDRAW}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
# ------------------------------------------------------
|
||||
# Automatic Mining
|
||||
# ------------------------------------------------------
|
||||
|
||||
#define AUTO_MINING TYPES
|
||||
[event]
|
||||
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]
|
||||
|
||||
{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"}
|
||||
|
||||
[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}
|
||||
|
||||
# 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]
|
||||
|
||||
{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]
|
||||
|
||||
[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]
|
||||
|
||||
[unstore_unit]
|
||||
variable=unit
|
||||
[/unstore_unit]
|
||||
[/event]
|
||||
#enddef
|
||||
#textdomain wesnoth-anl
|
||||
|
||||
# ------------------------------------------------------
|
||||
# Automatic Studying
|
||||
# ------------------------------------------------------
|
||||
|
||||
#define AUTO_STUDYING TYPES
|
||||
[event]
|
||||
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]
|
||||
|
||||
{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"}
|
||||
|
||||
[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 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]
|
||||
|
||||
{CLEAR_VARIABLE sound}
|
||||
{CLEAR_VARIABLE researchers}
|
||||
{CLEAR_VARIABLE idle}
|
||||
{CLEAR_VARIABLE amount}
|
||||
{CLEAR_VARIABLE credited_side}
|
||||
{REDRAW}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
# ------------------------------------------------------
|
||||
# Automatic Farming
|
||||
# ------------------------------------------------------
|
||||
|
||||
#define AUTO_FARMING TYPES
|
||||
[event]
|
||||
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
|
||||
[/filter_location]
|
||||
[/filter]
|
||||
variable=planters
|
||||
kill=no
|
||||
[/store_unit]
|
||||
|
||||
{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"}
|
||||
|
||||
[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}
|
||||
|
||||
# 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]
|
||||
|
||||
{VARIABLE sound no}
|
||||
{FOREACH planters i}
|
||||
{VARIABLE_OP idle to_variable "planters[$i].variables.idle"}
|
||||
|
||||
[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"}
|
||||
|
||||
# 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]
|
||||
|
||||
{CLEAR_VARIABLE sound}
|
||||
{CLEAR_VARIABLE harvesters}
|
||||
{CLEAR_VARIABLE planters}
|
||||
{CLEAR_VARIABLE idle}
|
||||
{CLEAR_VARIABLE amount}
|
||||
{CLEAR_VARIABLE credited_side}
|
||||
|
||||
{REDRAW}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
# ------------------------------------------------------
|
||||
# Automatic Mining
|
||||
# ------------------------------------------------------
|
||||
|
||||
#define AUTO_MINING TYPES
|
||||
[event]
|
||||
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]
|
||||
|
||||
{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"}
|
||||
|
||||
[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}
|
||||
|
||||
# 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]
|
||||
|
||||
{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]
|
||||
|
||||
[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]
|
||||
|
||||
[unstore_unit]
|
||||
variable=unit
|
||||
[/unstore_unit]
|
||||
[/event]
|
||||
#enddef
|
||||
|
|
|
@ -1,348 +1,348 @@
|
|||
#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]
|
||||
[/option]
|
||||
#enddef
|
||||
|
||||
#define SHARE_FARMING_KNOWLEDGE_OPTION TARGET_SIDE
|
||||
[option]
|
||||
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]
|
||||
[/option]
|
||||
#enddef
|
||||
|
||||
#define SHARE_MINING_KNOWLEDGE_OPTION TARGET_SIDE
|
||||
[option]
|
||||
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]
|
||||
[/option]
|
||||
#enddef
|
||||
|
||||
#define SHARE_WARFARE_KNOWLEDGE_OPTION TARGET_SIDE
|
||||
[option]
|
||||
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]
|
||||
[/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]
|
||||
[wml_filter]
|
||||
moves=0
|
||||
[/wml_filter]
|
||||
[/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]
|
||||
|
||||
{VARIABLE_OP side format $unit.side}
|
||||
{VARIABLE finished_options no}
|
||||
[while]
|
||||
{CONDITION finished_options equals no}
|
||||
[do]
|
||||
[message]
|
||||
caption="Diplomatic Options"
|
||||
speaker=unit
|
||||
message= _ "What shall I do?
|
||||
"
|
||||
|
||||
# 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?"
|
||||
|
||||
[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]
|
||||
|
||||
# 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?"
|
||||
|
||||
[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
|
||||
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
|
||||
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]
|
||||
|
||||
[/message]
|
||||
|
||||
[/do]
|
||||
[/while]
|
||||
|
||||
|
||||
# Picking a Diplomactic recruit
|
||||
|
||||
# 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="../data/campaigns/The_Rise_Of_Wesnoth/images/portraits/burin.png"
|
||||
message= _ "Our talks are complete - the Dwarves will gladly fight by your side. Which of our brethren do you want to recruit?
|
||||
"
|
||||
|
||||
{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
|
||||
|
||||
[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="../data/campaigns/The_Rise_Of_Wesnoth/images/portraits/isomithir.png"
|
||||
message= _ "Our talks are complete - the Elves shall aid you in this battle. Which our of kin do you wish to recruit?
|
||||
"
|
||||
|
||||
{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]
|
||||
#enddef
|
||||
#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]
|
||||
[/option]
|
||||
#enddef
|
||||
|
||||
#define SHARE_FARMING_KNOWLEDGE_OPTION TARGET_SIDE
|
||||
[option]
|
||||
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]
|
||||
[/option]
|
||||
#enddef
|
||||
|
||||
#define SHARE_MINING_KNOWLEDGE_OPTION TARGET_SIDE
|
||||
[option]
|
||||
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]
|
||||
[/option]
|
||||
#enddef
|
||||
|
||||
#define SHARE_WARFARE_KNOWLEDGE_OPTION TARGET_SIDE
|
||||
[option]
|
||||
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]
|
||||
[/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]
|
||||
[wml_filter]
|
||||
moves=0
|
||||
[/wml_filter]
|
||||
[/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]
|
||||
|
||||
{VARIABLE_OP side format $unit.side}
|
||||
{VARIABLE finished_options no}
|
||||
[while]
|
||||
{CONDITION finished_options equals no}
|
||||
[do]
|
||||
[message]
|
||||
caption="Diplomatic Options"
|
||||
speaker=unit
|
||||
message= _ "What shall I do?
|
||||
"
|
||||
|
||||
# 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?"
|
||||
|
||||
[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]
|
||||
|
||||
# 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?"
|
||||
|
||||
[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
|
||||
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
|
||||
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]
|
||||
|
||||
[/message]
|
||||
|
||||
[/do]
|
||||
[/while]
|
||||
|
||||
|
||||
# Picking a Diplomactic recruit
|
||||
|
||||
# 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="../data/campaigns/The_Rise_Of_Wesnoth/images/portraits/burin.png"
|
||||
message= _ "Our talks are complete - the Dwarves will gladly fight by your side. Which of our brethren do you want to recruit?
|
||||
"
|
||||
|
||||
{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
|
||||
|
||||
[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="../data/campaigns/The_Rise_Of_Wesnoth/images/portraits/isomithir.png"
|
||||
message= _ "Our talks are complete - the Elves shall aid you in this battle. Which our of kin do you wish to recruit?
|
||||
"
|
||||
|
||||
{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]
|
||||
#enddef
|
||||
|
|
|
@ -1,222 +1,222 @@
|
|||
#textdomain wesnoth-anl
|
||||
|
||||
#define RESEARCH_OPTIONS TYPES
|
||||
|
||||
# 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]
|
||||
[wml_filter]
|
||||
moves=0
|
||||
[/wml_filter]
|
||||
[/not]
|
||||
[/have_unit]
|
||||
[/show_if]
|
||||
[filter_location]
|
||||
terrain="Gg^Ve,Gg^Vea"
|
||||
[/filter_location]
|
||||
# wmlindent: start ignoring
|
||||
[command]
|
||||
[message]
|
||||
speaker=unit
|
||||
caption="Study Complete"
|
||||
message= _ "Which type of unit would you like to be able to recruit?
|
||||
"
|
||||
{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]
|
||||
[wml_filter]
|
||||
moves=0
|
||||
[/wml_filter]
|
||||
[/not]
|
||||
[/have_unit]
|
||||
[/show_if]
|
||||
[filter_location]
|
||||
terrain="Gg^Ve,Gg^Vea"
|
||||
[/filter_location]
|
||||
|
||||
[command]
|
||||
[store_unit]
|
||||
[filter]
|
||||
x=$x1
|
||||
y=$y1
|
||||
[/filter]
|
||||
variable=unit
|
||||
[/store_unit]
|
||||
|
||||
{VARIABLE finished_options no}
|
||||
[while]
|
||||
{CONDITION finished_options equals no}
|
||||
[do]
|
||||
# wmlindent: start ignoring
|
||||
[message]
|
||||
speaker=unit
|
||||
caption="Research"
|
||||
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
|
||||
"
|
||||
|
||||
[option]
|
||||
message= _ "Continue as before"
|
||||
[command]
|
||||
{VARIABLE finished_options 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
|
||||
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
|
||||
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]
|
||||
[unstore_unit]
|
||||
variable=unit
|
||||
[/unstore_unit]
|
||||
[/command]
|
||||
[/set_menu_item]
|
||||
#enddef
|
||||
|
||||
# Research Complete Messages
|
||||
# (These are shown at the start of a player's turn - they are triggered by an event included in the auto-studying macro)
|
||||
|
||||
#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]
|
||||
[/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]
|
||||
[/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]
|
||||
[/if]
|
||||
#enddef
|
||||
#textdomain wesnoth-anl
|
||||
|
||||
#define RESEARCH_OPTIONS TYPES
|
||||
|
||||
# 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]
|
||||
[wml_filter]
|
||||
moves=0
|
||||
[/wml_filter]
|
||||
[/not]
|
||||
[/have_unit]
|
||||
[/show_if]
|
||||
[filter_location]
|
||||
terrain="Gg^Ve,Gg^Vea"
|
||||
[/filter_location]
|
||||
# wmlindent: start ignoring
|
||||
[command]
|
||||
[message]
|
||||
speaker=unit
|
||||
caption="Study Complete"
|
||||
message= _ "Which type of unit would you like to be able to recruit?
|
||||
"
|
||||
{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]
|
||||
[wml_filter]
|
||||
moves=0
|
||||
[/wml_filter]
|
||||
[/not]
|
||||
[/have_unit]
|
||||
[/show_if]
|
||||
[filter_location]
|
||||
terrain="Gg^Ve,Gg^Vea"
|
||||
[/filter_location]
|
||||
|
||||
[command]
|
||||
[store_unit]
|
||||
[filter]
|
||||
x=$x1
|
||||
y=$y1
|
||||
[/filter]
|
||||
variable=unit
|
||||
[/store_unit]
|
||||
|
||||
{VARIABLE finished_options no}
|
||||
[while]
|
||||
{CONDITION finished_options equals no}
|
||||
[do]
|
||||
# wmlindent: start ignoring
|
||||
[message]
|
||||
speaker=unit
|
||||
caption="Research"
|
||||
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
|
||||
"
|
||||
|
||||
[option]
|
||||
message= _ "Continue as before"
|
||||
[command]
|
||||
{VARIABLE finished_options 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
|
||||
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
|
||||
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]
|
||||
[unstore_unit]
|
||||
variable=unit
|
||||
[/unstore_unit]
|
||||
[/command]
|
||||
[/set_menu_item]
|
||||
#enddef
|
||||
|
||||
# Research Complete Messages
|
||||
# (These are shown at the start of a player's turn - they are triggered by an event included in the auto-studying macro)
|
||||
|
||||
#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]
|
||||
[/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]
|
||||
[/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]
|
||||
[/if]
|
||||
#enddef
|
||||
|
|
|
@ -1,218 +1,236 @@
|
|||
#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]
|
||||
#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]
|
||||
#enddef
|
||||
|
||||
#define SET_NAMES SIDE
|
||||
[store_unit]
|
||||
[filter]
|
||||
side={SIDE}
|
||||
canrecruit=yes
|
||||
[/filter]
|
||||
variable=leader
|
||||
[/store_unit]
|
||||
{VARIABLE player[{SIDE}].name $leader.name}
|
||||
[unstore_unit]
|
||||
variable=leader
|
||||
[/unstore_unit]
|
||||
#enddef
|
||||
|
||||
#define SET_SIDE_VARIABLES SIDE
|
||||
{VARIABLE player[{SIDE}].farming.progress 0}
|
||||
{VARIABLE player[{SIDE}].farming.target 4}
|
||||
{VARIABLE player[{SIDE}].farming.gold 3}
|
||||
|
||||
{VARIABLE player[{SIDE}].mining.progress 0}
|
||||
{VARIABLE player[{SIDE}].mining.target 5}
|
||||
{VARIABLE player[{SIDE}].mining.gold 4}
|
||||
|
||||
{VARIABLE player[{SIDE}].warfare.progress 0}
|
||||
{VARIABLE player[{SIDE}].warfare.target 4}
|
||||
{VARIABLE player[{SIDE}].warfare.troop_available 0}
|
||||
|
||||
{VARIABLE player[{SIDE}].troop_1 no}
|
||||
{VARIABLE player[{SIDE}].troop_2 no}
|
||||
{VARIABLE player[{SIDE}].troop_3 no}
|
||||
{VARIABLE player[{SIDE}].troop_4 no}
|
||||
{VARIABLE player[{SIDE}].troop_5 no}
|
||||
{VARIABLE player[{SIDE}].troop_6 no}
|
||||
{VARIABLE player[{SIDE}].troop_7 no}
|
||||
|
||||
{VARIABLE player[{SIDE}].research.current_target "agriculture"}
|
||||
|
||||
{VARIABLE player[{SIDE}].leader_option_1.progress 0}
|
||||
{VARIABLE player[{SIDE}].leader_option_1.target 4}
|
||||
|
||||
{VARIABLE player[{SIDE}].ally_1 no}
|
||||
{VARIABLE player[{SIDE}].ally_2 no}
|
||||
{VARIABLE player[{SIDE}].ally_3 no}
|
||||
{VARIABLE player[{SIDE}].ally_4 no}
|
||||
|
||||
{VARIABLE player[{SIDE}].leader_option_2.progress 0}
|
||||
{VARIABLE player[{SIDE}].leader_option_2.target 4}
|
||||
|
||||
{VARIABLE player[{SIDE}].ally_5 no}
|
||||
{VARIABLE player[{SIDE}].ally_6 no}
|
||||
{VARIABLE player[{SIDE}].ally_7 no}
|
||||
{VARIABLE player[{SIDE}].ally_8 no}
|
||||
#enddef
|
||||
|
||||
#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]
|
||||
[/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]
|
||||
[/if]
|
||||
[if]
|
||||
{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]
|
||||
[/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]
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ANL_PLACE_UNIT SIDE TYPE X Y
|
||||
[unit]
|
||||
side={SIDE}
|
||||
type={TYPE}
|
||||
generate_name=yes
|
||||
ai_special=guardian
|
||||
random_traits=no
|
||||
x={X}
|
||||
y={Y}
|
||||
[/unit]
|
||||
#enddef
|
||||
|
||||
#define ANL_PLACE_WOUNDED_UNIT SIDE TYPE X Y HITPOINTS
|
||||
[unit]
|
||||
side={SIDE}
|
||||
type={TYPE}
|
||||
generate_name=yes
|
||||
hitpoints={HITPOINTS}
|
||||
ai_special=guardian
|
||||
random_traits=no
|
||||
x={X}
|
||||
y={Y}
|
||||
[/unit]
|
||||
#enddef
|
||||
|
||||
#define ANL_PLACE_TRAPPED_UNIT SIDE TYPE X Y
|
||||
[unit]
|
||||
side={SIDE}
|
||||
type={TYPE}
|
||||
generate_name=yes
|
||||
ai_special=guardian
|
||||
random_traits=no
|
||||
overlays=projectiles/web.png
|
||||
x={X}
|
||||
y={Y}
|
||||
[/unit]
|
||||
#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")}
|
||||
#enddef
|
||||
|
||||
#define BUILD_SOUND_2
|
||||
{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")}
|
||||
#enddef
|
||||
#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]
|
||||
#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]
|
||||
#enddef
|
||||
|
||||
#define SET_NAMES SIDE
|
||||
[store_unit]
|
||||
[filter]
|
||||
side={SIDE}
|
||||
canrecruit=yes
|
||||
[/filter]
|
||||
variable=leader
|
||||
[/store_unit]
|
||||
{VARIABLE player_{SIDE}.name $leader.name}
|
||||
[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
|
||||
troop_4=no
|
||||
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
|
||||
ally_8=no
|
||||
[/value]
|
||||
[/set_variables]
|
||||
#enddef
|
||||
|
||||
#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]
|
||||
[/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]
|
||||
[/if]
|
||||
[if]
|
||||
{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]
|
||||
[/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]
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ANL_PLACE_UNIT SIDE TYPE X Y
|
||||
[unit]
|
||||
side={SIDE}
|
||||
type={TYPE}
|
||||
generate_name=yes
|
||||
ai_special=guardian
|
||||
random_traits=no
|
||||
x={X}
|
||||
y={Y}
|
||||
[/unit]
|
||||
#enddef
|
||||
|
||||
#define ANL_PLACE_WOUNDED_UNIT SIDE TYPE X Y HITPOINTS
|
||||
[unit]
|
||||
side={SIDE}
|
||||
type={TYPE}
|
||||
generate_name=yes
|
||||
hitpoints={HITPOINTS}
|
||||
ai_special=guardian
|
||||
random_traits=no
|
||||
x={X}
|
||||
y={Y}
|
||||
[/unit]
|
||||
#enddef
|
||||
|
||||
#define ANL_PLACE_TRAPPED_UNIT SIDE TYPE X Y
|
||||
[unit]
|
||||
side={SIDE}
|
||||
type={TYPE}
|
||||
generate_name=yes
|
||||
ai_special=guardian
|
||||
random_traits=no
|
||||
overlays=projectiles/web.png
|
||||
x={X}
|
||||
y={Y}
|
||||
[/unit]
|
||||
#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")}
|
||||
#enddef
|
||||
|
||||
#define BUILD_SOUND_2
|
||||
{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")}
|
||||
#enddef
|
||||
|
|
Loading…
Add table
Reference in a new issue