Skip to content

Commit

Permalink
Added Gaulish Swordsman unit type definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrettin committed Sep 11, 2022
1 parent 96bcac3 commit 3b8b6fc
Show file tree
Hide file tree
Showing 17 changed files with 183 additions and 11 deletions.
1 change: 1 addition & 0 deletions data/buttons/abilities/abilities.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ cast_puncture = {
unit_elven_swordsman
unit_frank_heroic_swordsman
unit_frank_spearman
unit_gaulish_chieftain
unit_germanic_chieftain
unit_germanic_spearman
unit_gnomish_master_at_arms
Expand Down
5 changes: 4 additions & 1 deletion data/buttons/ability_learning.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ learn_sword_mastery_bronze = {
unit_germanic_chieftain
unit_frank_heroic_swordsman
unit_frank_knight_lord
unit_gaulish_chieftain
unit_gnomish_master_at_arms
unit_goblin_warlord
unit_gothic_horse_lord
Expand Down Expand Up @@ -87,9 +88,10 @@ learn_sword_mastery = {
unit_deep_gnomish_master_at_arms
unit_derro_shadowguard
unit_elven_swordsman
unit_germanic_chieftain
unit_frank_heroic_swordsman
unit_frank_knight_lord
unit_gaulish_chieftain
unit_germanic_chieftain
unit_gnomish_master_at_arms
unit_goblin_warlord
unit_gothic_horse_lord
Expand Down Expand Up @@ -343,6 +345,7 @@ learn_puncture = {
unit_elven_swordsman
unit_frank_heroic_swordsman
unit_frank_spearman
unit_gaulish_chieftain
unit_germanic_chieftain
unit_germanic_spearman
unit_gnomish_master_at_arms
Expand Down
25 changes: 25 additions & 0 deletions data/buttons/units/gaulish_experience_upgrades.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
upgrade_to_gaulish_veteran_swordsman = {
pos = 1
level = choose_individual_upgrade_level
action = experience_upgrade_to
value = unit_gaulish_veteran_swordsman
key = s
hint = "Upgrade to Veteran ~!Swordsman"
popup = popup_unit
unit_types = {
unit_gaulish_swordsman
}
}

upgrade_to_gaulish_chieftain = {
pos = 1
level = choose_individual_upgrade_level
action = experience_upgrade_to
value = unit_gaulish_chieftain
key = c
hint = "Upgrade to ~!Chieftain"
popup = popup_unit
unit_types = {
unit_gaulish_veteran_swordsman
}
}
8 changes: 8 additions & 0 deletions data/cheats/unit_cheats.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ western_footman = {
}
}

gaulish_swordsman = {
code = vercingetorix

effects = {
create_unit = unit_gaulish_swordsman
}
}

latin_legionary = {
code = marius

Expand Down
1 change: 1 addition & 0 deletions data/civilization_groups/western/celtic/celtic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ celtic = {
group = western
class_unit_types = {
town_hall = unit_gaulish_town_hall
infantry = unit_gaulish_swordsman
}

history = {
Expand Down
2 changes: 1 addition & 1 deletion data/historical_units/gauls/aedui_tribesmen.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#some troops to defend against the Suebi

aedui_warriors = {
unit_class = infantry
unit_type = unit_gaulish_swordsman
quantity = 12
ai_active = false

Expand Down
2 changes: 1 addition & 1 deletion data/historical_units/gauls/sequani_tribesmen.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sequani_warriors = {
unit_class = infantry
unit_type = unit_gaulish_swordsman
quantity = 4

history = {
Expand Down
42 changes: 42 additions & 0 deletions data/unit_types/units/gaulish/chieftain.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
unit_gaulish_chieftain = {
name = "Chieftain"
parent = unit_template_heroic_infantry
civilization = gaulish
description = "Gaulish swordsmen are known to be fierce opponents in battle, and their chieftains most of all."
image_file = "units/gaulish/swordsman.png"
frame_size = { 72 72 }
animation_set = animations_melee_unit
icon = suebi_chieftain
corpse_type = unit_human_dead_body
day_sight_range_bonus = 1
night_sight_range_bonus = -1
weapon_classes = {
sword
thrusting_sword
}
hack_damage = true
ai_drops = {
unit_short_sword
unit_broad_sword
unit_spatha
unit_wooden_shield
unit_bronze_shield
unit_iron_shield
unit_kite_shield
unit_boots
unit_carrots
unit_cheese
unit_meat
unit_potion_of_healing
}
default_equipment = {
weapon = unit_short_sword
shield = unit_wooden_shield
boots = unit_boots
}
sounds = {
dead = basic_human_voices_dead
hit = sword_attack
miss = attack_miss
}
}
43 changes: 43 additions & 0 deletions data/unit_types/units/gaulish/swordsman.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
unit_gaulish_swordsman = {
name = "Swordsman"
parent = unit_template_infantry
civilization = gaulish
description = "Gaulish swordsmen are known to be fierce opponents in battle."
image_file = "units/gaulish/swordsman.png"
frame_size = { 72 72 }
animation_set = animations_melee_unit
icon = suebi_swordsman
corpse_type = unit_human_dead_body
day_sight_range_bonus = 1
night_sight_range_bonus = -1
button_key = s
weapon_classes = {
sword
thrusting_sword
}
hack_damage = true
ai_drops = {
unit_short_sword
unit_broad_sword
unit_spatha
unit_wooden_shield
unit_bronze_shield
unit_iron_shield
unit_kite_shield
unit_boots
unit_carrots
unit_cheese
unit_meat
unit_potion_of_healing
}
default_equipment = {
weapon = unit_short_sword
shield = unit_wooden_shield
boots = unit_boots
}
sounds = {
dead = basic_human_voices_dead
hit = sword_attack
miss = attack_miss
}
}
42 changes: 42 additions & 0 deletions data/unit_types/units/gaulish/veteran_swordsman.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
unit_gaulish_veteran_swordsman = {
name = "Veteran Swordsman"
parent = unit_template_veteran_infantry
civilization = gaulish
description = "Gaulish swordsmen are known to be fierce opponents in battle. These battle-hardened veterans are a force to be reckoned with."
image_file = "units/gaulish/swordsman.png"
frame_size = { 72 72 }
animation_set = animations_melee_unit
icon = suebi_veteran_swordsman
corpse_type = unit_human_dead_body
day_sight_range_bonus = 1
night_sight_range_bonus = -1
weapon_classes = {
sword
thrusting_sword
}
hack_damage = true
ai_drops = {
unit_short_sword
unit_broad_sword
unit_spatha
unit_wooden_shield
unit_bronze_shield
unit_iron_shield
unit_kite_shield
unit_boots
unit_carrots
unit_cheese
unit_meat
unit_potion_of_healing
}
default_equipment = {
weapon = unit_short_sword
shield = unit_wooden_shield
boots = unit_boots
}
sounds = {
dead = basic_human_voices_dead
hit = sword_attack
miss = attack_miss
}
}
2 changes: 2 additions & 0 deletions scripts/civilizations/germanic/upgrade.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ DefineModifier("upgrade-germanic-broad-sword",
{"apply-to", "unit-teuton-ritter"}, {"apply-to", "unit-teuton-knight-lord"},
{"apply-to", "unit-frank-horseman"}, {"apply-to", "unit-frank-knight-lord"},
{"apply-to", "unit-gothic-horse-rider"}, {"apply-to", "unit-gothic-horse-lord"},
{"apply-to", "unit_gaulish_swordsman"}, {"apply-to", "unit_gaulish_veteran_swordsman"}, {"apply-to", "unit_gaulish_chieftain"},
{"apply-to", "unit-latin-legionary"}, {"apply-to", "unit-latin-veteran-legionary"}, {"apply-to", "unit-latin-centurion"},
{"apply-to", "unit-slavic-swordsman"}
)
Expand All @@ -95,6 +96,7 @@ DefineModifier("upgrade-germanic-bronze-shield",
{"apply-to", "unit-teuton-ritter"}, {"apply-to", "unit-teuton-knight-lord"},
{"apply-to", "unit-frank-horseman"}, {"apply-to", "unit-frank-knight-lord"},
{"apply-to", "unit-gothic-horse-rider"}, {"apply-to", "unit-gothic-horse-lord"},
{"apply-to", "unit_gaulish_swordsman"}, {"apply-to", "unit_gaulish_veteran_swordsman"}, {"apply-to", "unit_gaulish_chieftain"},
{"apply-to", "unit-latin-legionary"}, {"apply-to", "unit-latin-veteran-legionary"}, {"apply-to", "unit-latin-centurion"},
{"apply-to", "unit-slavic-swordsman"}
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/civilizations/teuton/buttons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ DefineButton( { Pos = 1, Level = "choose-individual-upgrade-level",
DefineButton( { Pos = 2, Level = "choose-individual-upgrade-level", Icon = "icon-teuton-ritter",
Action = "experience_upgrade_to", Value = "unit-teuton-ritter",
Key = "k", Hint = "Upgrade to ~!Knight", Popup = "popup_unit",
ForUnit = {"unit-teuton-swordsman", "unit_suebi_swordsman", "unit-norse-swordsman", "unit-latin-legionary", "unit-slavic-swordsman"}
ForUnit = {"unit-teuton-swordsman", "unit_suebi_swordsman", "unit-norse-swordsman", "unit_gaulish_swordsman", "unit-latin-legionary", "unit-slavic-swordsman"}
} )

DefineButton( { Pos = 1, Level = "choose-individual-upgrade-level",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if (LoadedGame == false) then
unit = CreateUnit("unit-teuton-archer", 0, {GetPlayerData(0, "StartPosX"), GetPlayerData(0, "StartPosY")})
SetUnitVariable(unit, "Active", false)

unit = CreateUnit("unit-teuton-swordsman", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
unit = CreateUnit("unit_gaulish_swordsman", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
SetUnitVariable(unit, "Active", false)
unit = CreateUnit("unit-teuton-archer", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
SetUnitVariable(unit, "Active", false)
Expand Down
12 changes: 6 additions & 6 deletions scripts/civilizations/teuton/scenarios/the_home_of_the_boii.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ if (LoadedGame == false) then
unit = CreateUnit("unit-teuton-archer", 0, {GetPlayerData(0, "StartPosX"), GetPlayerData(0, "StartPosY")})
SetUnitVariable(unit, "Active", false)

unit = CreateUnit("unit-germanic-warrior", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
unit = CreateUnit("unit_gaulish_swordsman", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
SetUnitVariable(unit, "Active", false) -- set town defender to passive AI (so that they do not participate in attacks)
unit = CreateUnit("unit-germanic-warrior", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
unit = CreateUnit("unit_gaulish_swordsman", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
SetUnitVariable(unit, "Active", false)
unit = CreateUnit("unit-germanic-warrior", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
unit = CreateUnit("unit_gaulish_swordsman", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
SetUnitVariable(unit, "Active", false)
unit = CreateUnit("unit-germanic-warrior", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
unit = CreateUnit("unit_gaulish_swordsman", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
SetUnitVariable(unit, "Active", false)
unit = CreateUnit("unit-germanic-warrior", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
unit = CreateUnit("unit_gaulish_swordsman", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
SetUnitVariable(unit, "Active", false)
unit = CreateUnit("unit-germanic-warrior", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
unit = CreateUnit("unit_gaulish_swordsman", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
SetUnitVariable(unit, "Active", false)
unit = CreateUnit("unit-germanic-archer", 1, {GetPlayerData(1, "StartPosX"), GetPlayerData(1, "StartPosY")})
SetUnitVariable(unit, "Active", false)
Expand Down
2 changes: 2 additions & 0 deletions scripts/civilizations/teuton/upgrade.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ DefineModifier("upgrade-teuton-spatha",
{"apply-to", "unit-norse-swordsman"}, {"apply-to", "unit-norse-veteran-swordsman"}, {"apply-to", "unit-norse-heroic-swordsman"},
{"apply-to", "unit-teuton-ritter"}, {"apply-to", "unit-teuton-knight-lord"},
{"apply-to", "unit-gothic-horse-rider"}, {"apply-to", "unit-gothic-horse-lord"},
{"apply-to", "unit_gaulish_swordsman"}, {"apply-to", "unit_gaulish_veteran_swordsman"}, {"apply-to", "unit_gaulish_chieftain"},
{"apply-to", "unit-latin-legionary"}, {"apply-to", "unit-latin-veteran-legionary"}, {"apply-to", "unit-latin-centurion"},
{"apply-to", "unit-slavic-swordsman"}
)
Expand All @@ -112,6 +113,7 @@ DefineModifier("upgrade-teuton-iron-shield",
{"apply-to", "unit-teuton-spearman"}, {"apply-to", "unit-frank-spearman"},
{"apply-to", "unit-teuton-ritter"}, {"apply-to", "unit-teuton-knight-lord"},
{"apply-to", "unit-frank-horseman"}, {"apply-to", "unit-frank-knight-lord"},
{"apply-to", "unit_gaulish_swordsman"}, {"apply-to", "unit_gaulish_veteran_swordsman"}, {"apply-to", "unit_gaulish_chieftain"},
{"apply-to", "unit-gothic-horse-rider"}, {"apply-to", "unit-gothic-horse-lord"},
{"apply-to", "unit-latin-legionary"}, {"apply-to", "unit-latin-veteran-legionary"}, {"apply-to", "unit-latin-centurion"},
{"apply-to", "unit-slavic-swordsman"}
Expand Down
1 change: 1 addition & 0 deletions scripts/stratagus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ function StandardTriggers()
GetUnitVariable(GetSelectedUnits()[1], "Ident") == "unit-teuton-swordsman"
or GetUnitVariable(GetSelectedUnits()[1], "Ident") == "unit_suebi_swordsman"
or GetUnitVariable(GetSelectedUnits()[1], "Ident") == "unit-frank-swordsman"
or GetUnitVariable(GetSelectedUnits()[1], "Ident") == "unit_gaulish_swordsman"
or GetUnitVariable(GetSelectedUnits()[1], "Ident") == "unit-norse-swordsman"
or GetUnitVariable(GetSelectedUnits()[1], "Ident") == "unit-slavic-swordsman"
)
Expand Down
2 changes: 2 additions & 0 deletions scripts/upgrade_military_doctrines.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ DefineModifier("upgrade-shield-wall",
{"apply-to", "unit_suebi_swordsman"}, {"apply-to", "unit_suebi_veteran_swordsman"}, {"apply-to", "unit_suebi_chieftain"},
{"apply-to", "unit-frank-swordsman"}, {"apply-to", "unit-frank-veteran-swordsman"}, {"apply-to", "unit-frank-heroic-swordsman"},
{"apply-to", "unit-teuton-spearman"}, {"apply-to", "unit-frank-spearman"},
{"apply-to", "unit_gaulish_swordsman"}, {"apply-to", "unit_gaulish_veteran_swordsman"}, {"apply-to", "unit_gaulish_chieftain"},
{"apply-to", "unit-latin-legionary"}, {"apply-to", "unit-latin-veteran-legionary"}, {"apply-to", "unit-latin-centurion"},
{"apply-to", "unit-slavic-swordsman"},
{"apply-to", "unit-goblin-militia"},
Expand Down Expand Up @@ -81,6 +82,7 @@ DefineModifier("upgrade-svinfylking",
{"apply-to", "unit_suebi_swordsman"}, {"apply-to", "unit_suebi_veteran_swordsman"}, {"apply-to", "unit_suebi_chieftain"},
{"apply-to", "unit-frank-swordsman"}, {"apply-to", "unit-frank-veteran-swordsman"}, {"apply-to", "unit-frank-heroic-swordsman"},
{"apply-to", "unit-teuton-spearman"}, {"apply-to", "unit-frank-spearman"},
{"apply-to", "unit_gaulish_swordsman"}, {"apply-to", "unit_gaulish_veteran_swordsman"}, {"apply-to", "unit_gaulish_chieftain"},
{"apply-to", "unit-latin-legionary"}, {"apply-to", "unit-latin-veteran-legionary"}, {"apply-to", "unit-latin-centurion"},
{"apply-to", "unit-slavic-swordsman"},
{"apply-to", "unit-goblin-militia"},
Expand Down

0 comments on commit 3b8b6fc

Please sign in to comment.