; messages

def messages
the_queue_is_full 143
not_enough_resource_0 135 131
not_enough_resource_1 135 132
not_enough_food 135 133
population_limit_reached 4246
production_deferred 142
cannot_build_here 4204
not_enough_mana 4252
not_enough_space 1027
count_limit_reached 4335

; miscellaneous parameters

def parameters
no_path_in_this_direction 1027
requires 129
and 23
resource_0_title 131
resource_1_title 132
food_title 133
recommended_maps jl8 jl7 jl6 jl5

; units menus

def enter
title 4282
; no index (won't appear in the menu)

def go
title 100 115
index 1

def attack ; imperative go
title 114
; no index (won't appear in the menu)

def patrol
title 103 115
index 2
shortcut p

def load
title 4278
index 3

def load_all
title 4279
index 3

def unload
title 4280 $1 115
index 3

def unload_all
title 4281
index 3

def gather
title 102
index 3

def use
title $1
index 4

def build
title 101 $1 119 ; if the order is "build farm", $1 is replaced with the title of "farm"
index 5

def build_phase_two ; working on a construction site
title 101
; no index (won't appear in the menu)

def block
title 4333 
; no index (won't appear in the menu)

def repair
title 118
index 6

def train
title 123 $1 ; if the order is "train peasant", $1 is replaced with the title of "peasant"
index 7

def research
title 4248 $1
index 8

;def upgrade
;title 4214 $1

def upgrade_to
title 4214 4219 $1 ; if the order is "upgrade_to keep", $1 is replaced with the title of "keep"
index 9

def enable_auto_gather
title 4355
index 9.4

def disable_auto_gather
title 4356
index 9.4

def enable_auto_repair
title 4353
index 9.5

def disable_auto_repair
title 4354
index 9.5

def mode_offensive
title 104 110
index 10

def mode_defensive
title 104 111
index 10

def cancel_building
title 127 128
index 10

def cancel_upgrading
title 127 4214
index 10

def cancel_training
title 127 147
index 10

def rallying_point
title 125 115
comment 4255
index 11

def stop
title 106
index 12

; abilities?

def a_teleportation
title 4250 4251
alert 1328
shortcut t

def a_recall
title 4307
alert 1328
shortcut r

def a_holy_vision
title 4299
alert 1339
shortcut v

def a_conversion
title 4274
alert 6114
shortcut c

def a_summon_dragon
title 4292 4231
alert 1338
shortcut d

def a_deadly_fog
title 4305
alert
shortcut f

def a_raise_dead
title 4293
alert 1340
shortcut r

def a_resurrection
title 4294
alert 1339
shortcut r

def a_meteors
title 4306
alert
shortcut m

def a_exorcism
title 4300
alert
shortcut e

; upgrades

def melee_weapon
title 4215

def melee_armor
title 4217

def archer_weapon
title 4216

def archer_armor
title 4218

def archer_range
title 4233

def horse_speed
title 4254

; research

def superhealer
title 4249

def u_teleportation
title 4250

def u_recall
title 4307

def u_conversion
title 4274

def u_summon_dragon
title 4292 4231

def u_deadly_fog
title 4305

def u_raise_dead
title 4293

def u_resurrection
title 4294

def u_meteors
title 4306

def u_exorcism
title 4300


; "abstract" classes (not used directly)

def thing
title
noise
missed 1012
attack_hit
death
proportion_0 if_me 6100 else 6000
proportion_1 if_me 6101 else 6001
proportion_2 if_me 6102 else 6002
proportion_3 if_me 6103 else 6003
proportion_4 if_me 6104 else 6004
proportion_5 if_me 6105 else 6005
proportion_6 if_me 6106 else 6006
proportion_7 if_me 6107 else 6007
proportion_8 if_me 6108 else 6008
proportion_9 if_me 6109 else 6009
proportion_10 if_me 6110 else 6010
ground
lose_fight 1324
order_ok if_me 1194 1195 1196 else 1094 1095 1096
order_impossible 1029
research_complete_msg 4248 126
added 1329
added_msg $1 
enter 1330
exit 1331

def unit
is_a thing
shape circle
complete
complete_msg $1 124
launch_attack
death if_me 1310 else 1309 1051
alert 1078 ; horn
production 1327 ; research, train or upgrade_to
win_fight if_me 1326 else 1325
attack if_me 1130 else 1030
flee if_me 1174 else 1074
healed 1097
blocked 1027
noise_if_damaged if_me repeat 12 1172 else repeat 12 1072
noise_if_very_damaged if_me repeat 12 1173 else repeat 12 1073

def building
is_a unit
shape square
complete if_me 1200 else 1100
complete_msg $1 126
death 1047
alert 1079 ; bell
noise_if_damaged loop 1016 .5 ; half volume
noise_if_very_damaged loop 1016
ground grass
keyboard building

def walking_unit
is_a unit
move 1053 1054
move_on_grass 1053 1054
move_on_leaves 1069 1070
move_on_gravel 1344 1345
move_on_wood 1067 1350
move_on_mud 1087 1349
move_on_water 1088 1348
move_on_snow 1346 1347

def resource_deposit
is_a thing
exhausted


; terrain

def _meadows ; this terrain is applied automatically to any square with meadows and without woods
title 4362
noise
ground ; footstep noise determined by the nearest object
color

def _forest ; this terrain is applied automatically to any square with some woods
title 4363
noise
ground ; footstep noise determined by the nearest object
color

def _dense_forest ; this terrain is applied automatically to any square with many woods
title 4364
noise
ground ; footstep noise determined by the nearest object
color

def river
title 4346
noise loop 1065
color blue4

def lake
title 4345
noise loop 1342
color blue4

def sea
title 4344
noise loop 1342
color blue

def ocean
title 4351
noise loop 1089
color blue

def mountain
title 4347
noise loop 1000
color dimgray

def mountain_pass
title 4352
noise loop 1000
ground snow

def big_bridge
title 4348
noise loop 1065
ground wood
color brown

def ford
title 4349
noise loop 1090
ground water
color blue2

def marsh
title 4350
noise loop 1343
ground mud
color brown


; buildings

def buildingsite
is_a building
title 107 128
noise_if_damaged
noise_if_very_damaged
ground gravel

def farm
is_a building
title 83
color hotpink
noise repeat 15 1050
shortcut f

def lumbermill
is_a building
title 148
noise repeat 15 1052
shortcut l

def barracks
is_a building
title 99
color violetred
shortcut b

def townhall
is_a building
title 82
color white
noise repeat 6 1064
shortcut h

def keep
is_a townhall
title 4220
noise repeat 6 1307

def castle
is_a keep
title 4221
noise repeat 6 1308

def blacksmith
is_a building
title 4213
noise repeat 15 1300
shortcut k

def stables
is_a building
title 4222
noise repeat 15 1305 1306
shortcut s

def workshop
is_a building
title 4226
noise repeat 15 1321
shortcut w

def dragonslair
is_a building
title 4227
noise repeat 15 1320
shortcut d

def magestower
is_a building
title 4228
noise repeat 15 1319
shortcut m

def temple
is_a building
title 4298
shortcut p

def necropolis
is_a building
title 4304
shortcut n

def scouttower
is_a building
title 4275
noise repeat 6 6111
shortcut t

def guardtower
is_a building
title 4276
noise repeat 6 6112
launch_attack 1042
attack_hit 1301

def cannontower
is_a building
title 4277
noise repeat 6 6113
launch_attack 1084
attack_hit 1085

def wall
is_a building
title 4331
shortcut a

def massive_wall
is_a building
title 4338

def gate
is_a building
title 4332
shortcut g

def massive_gate
is_a building
title 4339

def shipyard
is_a building
title 4357

; units

def peasant
is_a walking_unit
title 85
color brown
noise_when_exploiting_goldmine repeat 1.6 1038 ; 1081
noise_when_exploiting_wood repeat 1.5 1034 1035 1036 1037
noise_when_building repeat 4 1046 1048 1049
attack_hit 1008
store_resource_0 1099
store_resource_1 1098
keyboard worker
shortcut p

def footman
is_a walking_unit
title 86
color red
attack_hit 1039 1040 1041
attack_hit_level_1 1302
keyboard soldier1
shortcut f

def zombie
is_a footman
title 4295
noise if_me repeat 6 1336 else repeat 6 1335
attack 1031

def archer
is_a walking_unit
title 87
color darkorange
launch_attack 1042
attack_hit 1043
attack_hit_level_1 1301
keyboard soldier2
shortcut a

def darkarcher
is_a archer
title 4283
shortcut d

def skeleton
is_a archer
title 4296
noise repeat 6 1337
attack 1031

def knight
is_a unit
title 4225
noise repeat 30 1305 1306
attack_hit 1039 1040 1041
attack_hit_level_1 1302
move 1303 1304
keyboard soldier3
shortcut k

def catapult
is_a unit
title 4201
noise repeat 9 1311 1312 1313 ; 1082 1083 ?
launch_attack 1084
attack_hit 1085
move 1082 1083
keyboard soldier4
shortcut c

def dragon
is_a unit
title 4231
noise repeat 6 1314
launch_attack 1084
attack_hit 1085
death 1316
move 1317 1318
keyboard soldier5
shortcut d

def mage
is_a walking_unit
title 4229
launch_attack 1322
attack_hit 1323
keyboard soldier6
shortcut m

def priest
is_a walking_unit
title 4297
keyboard soldier6
shortcut p

def necromancer
is_a walking_unit
title 4303
keyboard soldier6
shortcut n

def new_flyingmachine
is_a unit
title 4230
move 1317 1318
keyboard soldier7
shortcut f

def flyingmachine ; old flying machine
is_a new_flyingmachine
title 110 4230 ; offensive flying machine
launch_attack 1322
attack_hit 1323
shortcut f

def boat
is_a unit
title 4358
move 1088 1088
keyboard soldier7

def destroyer
is_a unit
title 4359
launch_attack 1042
attack_hit 1043
attack_hit_level_1 1301
move 1088 1088
keyboard soldier7

def battleship
is_a unit
title 4360
noise repeat 9 1311 1312 1313 ; 1082 1083 ?
launch_attack 1084
attack_hit 1085
move 1088 1088
keyboard soldier7

def submarine
is_a unit
title 4361
move 1088 1088
keyboard soldier7

def holy_vision
is_a thing
title
alert

def meteors
is_a thing
noise ambient repeat .5 1341

def exorcism
is_a thing
noise ambient repeat .5 1339

; resources

def goldmine
is_a resource_deposit
title 81
color gold
exhausted 1047
ground gravel

def wood
is_a resource_deposit
title 80
color forestgreen
noise repeat 6 1055 1056 1057 1058 9999 9999
ground leaves

def meadow
is_a thing
title 122
color yellowgreen
noise repeat 1.5 1059 1060 1061 1062 1063 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999
ground grass

def corpse
is_a thing
title
noise repeat 6 1332 1333 1334 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999

; passages

def path
title 84
color dimgray
noise repeat 15 1000
ground grass
when_moving_through 1091

def bridge
title 153
color blue
noise loop 1065
ground wood .5 ; smaller area of effect
when_moving_through 1092


; factions

def random_faction
title 4334

def human_faction
title 4301