[global]
descname=_ Trainingscamp
type=training
size=big
buildable=yes
buildicon=trainingscamp_build.png
worker=trainer
max_soldiers=12
train=attack,hp
program=Sleep
program=upgrade_attack_0 # This is needed to run the scripts
program=upgrade_attack_1
program=upgrade_attack_2
program=upgrade_attack_3
program=upgrade_hp_0
program=upgrade_hp_1
program=upgrade_hp_2
program=upgrade_hp_3

[Sleep]
0=sleep 5000

[attack]
min_level=0
max_level=3

[hp]
min_level=0
max_level=3

[upgrade_attack_0]
0=check lance
1=check meat,fish,bread 1
2=check_soldier attack 0 # Fails when aren't any soldier of level 0 attack
3=sleep 30000
4=check_soldier attack 0 # Because the soldier can be expulsed by the player
5=consume lance
6=consume meat,fish,bread
7=train attack 0 1

[upgrade_attack_1]
0=check advanced_lance
1=check meat,fish,bread 1
2=check_soldier attack 1
3=sleep 30000
4=check_soldier attack 1
5=consume advanced_lance
6=consume meat,fish,bread
7=train attack 1 2

[upgrade_attack_2]
0=check heavy_lance
1=check meat,fish,bread 1
2=check_soldier attack 2
3=sleep 30000
4=check_soldier attack 2
5=consume heavy_lance
6=consume meat,fish,bread
7=train attack 2 3

[upgrade_attack_3]
0=check war_lance
1=check meat,fish,bread 2
2=check_soldier attack 3
3=sleep 30000
4=check_soldier attack 3
5=consume war_lance
6=consume meat,fish,bread 2
7=train attack 3 4

[upgrade_hp_0]
0=check helm
1=check meat,fish,bread 1
2=check_soldier hp 0
3=sleep 30000
4=check_soldier hp 0
5=consume helm
6=consume meat,fish,bread 1
7=train hp 0 1

[upgrade_hp_1]
0=check armour
1=check meat,fish,bread 2
2=check_soldier hp 1
3=sleep 30000
4=check_soldier hp 1
5=consume armour
6=consume meat,fish,bread 2
7=train hp 1 2

[upgrade_hp_2]
0=check chain_armour
1=check meat,fish,bread 3
2=check_soldier hp 2
3=sleep 30000
4=check_soldier hp 2
5=consume chain_armour
6=consume meat,fish,bread 3
7=train hp 2 3

[upgrade_hp_3]
0=check plate_armour
1=check meat,fish,bread 4
2=check_soldier hp 3
3=sleep 30000
4=check_soldier hp 3
5=consume plate_armour
6=consume meat,fish,bread 4
7=train hp 3 4

[inputs]
bread=10
fish=6
meat=6
lance=2
advanced_lance=2
heavy_lance=2
war_lance=2
helm=2
armour=2
chain_armour=2
plate_armour=2

[buildcost]
trunk=2
stone=5
wood=4
marble=5
gold=4
marblecolumn=3
cloth=2

[idle]
pics=trainingscamp_i_??.png  # ???
hotspot=82 105

[working]
pics=trainingscamp_i_??.png # should be changed to working animation, as soon as it exists
hotspot=82 105

[build]
pics=trainingscamp_i_??.png # should be changed to building animation, as soon as it exists
hotspot=82 105
