diff --git a/data/buttons/troll_unit_training.cfg b/data/buttons/troll_unit_training.cfg deleted file mode 100644 index 8d17cffb7d..0000000000 --- a/data/buttons/troll_unit_training.cfg +++ /dev/null @@ -1,9 +0,0 @@ -[button] - pos = 1 - action = train_unit - value = unit_troll_warrior - key = w - hint = "Hire ~!Warrior" - popup = popup_unit - for_unit = unit_mercenary_camp -[/button] diff --git a/data/unit_types/buildings/mercenary_camp.txt b/data/unit_types/buildings/mercenary_camp.txt new file mode 100644 index 0000000000..c72abfc3c7 --- /dev/null +++ b/data/unit_types/buildings/mercenary_camp.txt @@ -0,0 +1,82 @@ +unit_mercenary_camp = { + name = "Mercenary Camp" + parent = unit_template_building + unit_class = mercenary_camp + civilization = neutral + description = "This camp houses a number of mercenary groups, who offer their talents for hire." + image_file = "buildings/neutral/mercenary_camp.png" + frame_size = { 96 99 } + animation_set = animations_mercenary_camp + icon = icon_mercenary_camp + neutral_minimap_color = { 192 192 192 } + tile_size = { 3 3 } + box_size = { 96 96 } + construction = land_building + costs = { + time = 200 + copper = 700 + lumber = 1350 + } + repair_hp = 4 + repair_costs = { + copper = 1 + lumber = 1 + } + hit_points = 800 + armor = 20 + missile = missile_none + priority = 30 + annoy_computer_factor = 35 + explode_when_killed = missile_explosion + corpse_type = unit_destroyed_3x3_place + domain = land + right_mouse_action = rally_point + burn_percent = 50 + burn_damage_rate = 1 + recruit_heroes = true + drops = { + unit_wood_pile + } + unit_stocks = { + unit_ettin = 1 + unit_troll_warrior = 2 + } + unit_class_stocks = { + thief = 6 + infantry = 4 + spearman = 4 + shooter = 3 + gunpowder_infantry = 3 + cavalry = 2 + siege_engine = 1 + glider = 1 + flying_rider = 1 + } + affixes = { + upgrade_prefix_frail + upgrade-item-prefix-impregnable + upgrade-item-prefix-sturdy + upgrade-item-prefix-vulnerable + upgrade-item-suffix-of-frailty + upgrade-item-suffix-of-vulnerability + } + variations = { + mercenary_camp = { + unit_conditions = { + not = { + scripted_condition = is_on_snowy_terrain + } + } + } + mercenary_camp_snow = { + image_file = "buildings/neutral/mercenary_camp_snow.png" + unit_conditions = { + scripted_condition = is_on_snowy_terrain + } + } + } + sounds = { + selected = click + dead = building_destroyed + } +} diff --git a/data/unit_types/buildings/teutonic/dock.txt b/data/unit_types/buildings/teutonic/dock.txt index c31e58c670..d1f775e7b8 100644 --- a/data/unit_types/buildings/teutonic/dock.txt +++ b/data/unit_types/buildings/teutonic/dock.txt @@ -1,6 +1,6 @@ unit_teuton_dock = { parent = unit_template_dock - civilization = teuton + civilization = teutonic description = "Shipbuilding is an ancient craft in the Teuton shores. Already in antiquity they constructed sturdy ships, capable of assaulting the vulnerable coasts to the west. During medieval times, their shipbuilding flourished even further, as the Hanseatic League dominated commerce in the Baltic and North Seas." image_file = "buildings/teutonic/dock.png" frame_size = { 96 96 } diff --git a/graphics/buildings/neutral/mercenary_camp.png b/graphics/buildings/neutral/mercenary_camp.png new file mode 100644 index 0000000000..a9673c8f0b Binary files /dev/null and b/graphics/buildings/neutral/mercenary_camp.png differ diff --git a/graphics/buildings/neutral/mercenary_camp_snow.png b/graphics/buildings/neutral/mercenary_camp_snow.png index b1fef1860e..c0cac4f53d 100644 Binary files a/graphics/buildings/neutral/mercenary_camp_snow.png and b/graphics/buildings/neutral/mercenary_camp_snow.png differ diff --git a/graphics/credits.txt b/graphics/credits.txt index 4937d34847..240eb1a5e6 100644 --- a/graphics/credits.txt +++ b/graphics/credits.txt @@ -72,6 +72,7 @@ /graphics/buildings/neutral/iron_deposit_snow.png (by Jinn) (licensed under the CC0) /graphics/buildings/neutral/iron_mine.png (by Jinn) (licensed under the CC0) /graphics/buildings/neutral/iron_mine_snow.png (by Jinn) (licensed under the CC0) +/graphics/buildings/neutral/mercenary_camp.png (by Jinn) (licensed under the CC0) /graphics/buildings/neutral/mercenary_camp_snow.png (by Jinn) (licensed under the CC0) /graphics/buildings/neutral/mithril_deposit.png (by Jinn) (licensed under the CC0) /graphics/buildings/neutral/mithril_deposit_snow.png (by Jinn) (licensed under the CC0) @@ -1170,8 +1171,6 @@ /graphics/neutral/buildings/gold_rock_small_4_shadow.png (by Jinn) (licensed under the CC0) /graphics/neutral/buildings/land_construction_site.png (by Jinn) (licensed under the CC0) /graphics/neutral/buildings/land_construction_site_1x1.png (by Jinn) (licensed under the CC0) -/graphics/neutral/buildings/mercenary_camp.png (by Jinn and b_o) (licensed under the GPL 2.0 and the CC-BY-SA 3.0) -/graphics/neutral/buildings/mercenary_camp_shadow.png (by Jinn) (licensed under the CC0) /graphics/neutral/buildings/mithril_mine.png (by Jinn) (licensed under the CC0) /graphics/neutral/buildings/mithril_mine_light.png (by Jinn) (licensed under the CC0) /graphics/neutral/buildings/mithril_mine_shadow.png (by Jinn) (licensed under the CC0) diff --git a/graphics/neutral/buildings/mercenary_camp.png b/graphics/neutral/buildings/mercenary_camp.png deleted file mode 100644 index 12797eaca2..0000000000 Binary files a/graphics/neutral/buildings/mercenary_camp.png and /dev/null differ diff --git a/graphics/neutral/buildings/mercenary_camp_shadow.png b/graphics/neutral/buildings/mercenary_camp_shadow.png deleted file mode 100644 index bbd9c49ecc..0000000000 Binary files a/graphics/neutral/buildings/mercenary_camp_shadow.png and /dev/null differ diff --git a/maps/nidavellir/brown-hills.sms b/maps/nidavellir/brown-hills.sms index c1eeb92aa5..035d96163f 100644 --- a/maps/nidavellir/brown-hills.sms +++ b/maps/nidavellir/brown-hills.sms @@ -247,7 +247,7 @@ SetUnitVariable(unit, "Active", false) unit = CreateUnit("unit-potion-of-healing", PlayerNumNeutral, {8, 51}) unit = CreateUnit("unit-potion-of-healing", PlayerNumNeutral, {52, 96}) -CreateNeutralBuildings("unit-mercenary-camp", 1, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, false) +CreateNeutralBuildings("unit_mercenary_camp", 1, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, false) CreateNeutralBuildings("unit_minor_building_site", (CMap:get():get_info():get_map_width() * CMap:get():get_info():get_map_height()) / 256, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, false) CreateNeutralBuildings("unit_building_site", (CMap:get():get_info():get_map_width() * CMap:get():get_info():get_map_height()) / 1024, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, false) diff --git a/maps/nidavellir/southern-tunnels.sms b/maps/nidavellir/southern-tunnels.sms index e26e585276..5b5c9049d0 100644 --- a/maps/nidavellir/southern-tunnels.sms +++ b/maps/nidavellir/southern-tunnels.sms @@ -315,7 +315,7 @@ unit = CreateUnit("unit-dwarven-sentry-tower", 3, {47, 48}) unit = CreateUnit("unit-dwarven-sentry-tower", 3, {51, 48}) if (LoadedGame == false) then - CreateNeutralBuildings("unit-mercenary-camp", 1, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, false) + CreateNeutralBuildings("unit_mercenary_camp", 1, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, false) CreateNeutralBuildings("unit_minor_building_site", (CMap:get():get_info():get_map_width() * CMap:get():get_info():get_map_height()) / 256, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, false) CreateNeutralBuildings("unit_building_site", (CMap:get():get_info():get_map_width() * CMap:get():get_info():get_map_height()) / 1024, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, false) diff --git a/scripts/map_generation.lua b/scripts/map_generation.lua index 279ffeb5c4..b7723a5510 100644 --- a/scripts/map_generation.lua +++ b/scripts/map_generation.lua @@ -1355,7 +1355,7 @@ function CreateNeutralBuildings(building_type, building_number, min_x, max_x, mi local building_player = PlayerNumNeutral while (Count > 0 and WhileCount < building_number * 100) do local building_spawn_point = FindAppropriateNeutralBuildingSpawnPoint(building_type, min_x, max_x, min_y, max_y, symmetric) - if (building_type == "unit-mercenary-camp" and building_player == PlayerNumNeutral) then + if (building_type == "unit_mercenary_camp" and building_player == PlayerNumNeutral) then local tile_terrain = GetTileTerrainName(building_spawn_point[1], building_spawn_point[2]) local potential_civilizations = GetTerrainCivilizations(tile_terrain) local all_factions = GetFactions() @@ -2342,7 +2342,7 @@ function GenerateRandomMap(arg) end if (arg.MercenaryCamp) then - CreateNeutralBuildings("unit-mercenary-camp", 1, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, symmetric) + CreateNeutralBuildings("unit_mercenary_camp", 1, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, symmetric) end CreateNeutralBuildings("unit_minor_building_site", (CMap:get():get_info():get_map_width() * CMap:get():get_info():get_map_height()) / 256, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, symmetric) @@ -4059,7 +4059,7 @@ function GenerateValley(direction, lake_quantity) CreateNeutralBuildings("unit_building_site", (CMap:get():get_info():get_map_width() * CMap:get():get_info():get_map_height()) / 1024, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, symmetric) if (GetCurrentTileset() == "swamp" or GetCurrentTileset() == "cave") then - CreateNeutralBuildings("unit-mercenary-camp", 1, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, symmetric) + CreateNeutralBuildings("unit_mercenary_camp", 1, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, symmetric) end CreateRoamingFog((CMap:get():get_info():get_map_width() * CMap:get():get_info():get_map_height()) / 4096) @@ -6013,7 +6013,7 @@ function GenerateCave(town_halls, symmetric) CreateNeutralBuildings("unit_building_site", (CMap:get():get_info():get_map_width() * CMap:get():get_info():get_map_height()) / 1024, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, symmetric) - CreateNeutralBuildings("unit-mercenary-camp", 1, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, symmetric) + CreateNeutralBuildings("unit_mercenary_camp", 1, 0, CMap:get():get_info():get_map_width() - 3, 0, CMap:get():get_info():get_map_height() - 3, symmetric) for i=0,(PlayerMax - 2) do if (GetPlayerData(i, "Type") == PlayerPerson or GetPlayerData(i, "Type") == PlayerComputer) then diff --git a/scripts/provinces_nidavellir.lua b/scripts/provinces_nidavellir.lua index 930fba5985..024f1c1b3e 100644 --- a/scripts/provinces_nidavellir.lua +++ b/scripts/provinces_nidavellir.lua @@ -235,7 +235,7 @@ DefineProvince("Southern Tunnels", { HistoricalSettlementBuildings = { 25, "unit-dwarven-barracks", true, -- had capability to train warriors 25, "unit-dwarven-lumber-mill", true, -- had the capability to train scouts - 35, "unit-mercenary-camp", true -- at some point between 35 and 40 the Shinsplitters had the capacity to recruit mercenaries, as shown by them having hired the Surghan Mercenaries + 35, "unit_mercenary_camp", true -- at some point between 35 and 40 the Shinsplitters had the capacity to recruit mercenaries, as shown by them having hired the Surghan Mercenaries } }) diff --git a/scripts/settlements_nidavellir.lua b/scripts/settlements_nidavellir.lua index 36c15b17ce..a027893dd8 100644 --- a/scripts/settlements_nidavellir.lua +++ b/scripts/settlements_nidavellir.lua @@ -55,7 +55,7 @@ DefineSite("driftwood", { -- from Will Doyle's "Island of the Lizard God" }, HistoricalBuildings = { 600, 0, "town_hall", - 600, 0, "mercenary-camp", "ape-cartel", + 600, 0, "mercenary_camp", "ape-cartel", 600, 0, "farm", 600, 0, "farm", 600, 0, "farm", diff --git a/scripts/stratagus.lua b/scripts/stratagus.lua index ae98ef8f9a..0c229412ea 100644 --- a/scripts/stratagus.lua +++ b/scripts/stratagus.lua @@ -826,7 +826,7 @@ function StandardTriggers() if (GetArrayIncludes(wyr.preferences.TipsShown, "Mercenary Camp") == false) then AddTrigger("tip-mercenary-camp", function() - if (table.getn(GetSelectedUnits()) > 0 and GetUnitVariable(GetSelectedUnits()[1], "Ident") == "unit-mercenary-camp") then + if (table.getn(GetSelectedUnits()) > 0 and GetUnitVariable(GetSelectedUnits()[1], "Ident") == "unit_mercenary_camp") then return true else return false @@ -1860,7 +1860,6 @@ Units = { "unit-diamond-rock", "unit-diamond-deposit", "unit-diamond-mine", "unit-emerald-rock", "unit-emerald-deposit", "unit-emerald-mine", "unit-yale-hunting-lodge", - "unit-mercenary-camp", -- "unit-cavern-entrance", -- "unit-portal", "unit-road", "unit-railroad", diff --git a/scripts/units.lua b/scripts/units.lua index 72cfad181c..a7b17510fe 100644 --- a/scripts/units.lua +++ b/scripts/units.lua @@ -4767,77 +4767,6 @@ DefineUnitType("unit-long-swordsman", { } } ) --- define the mercenary camp after the rest because it refers to unit types of the civilizations -DefineUnitType("unit-mercenary-camp", { - Name = "Mercenary Camp", - Parent = "unit-template-building", - Civilization = "neutral", - Class = "mercenary_camp", - Description = "This camp houses a number of mercenary groups, who offer their talents for hire.", - Image = {"file", "neutral/buildings/mercenary_camp.png", "size", {96, 99}}, - Shadow = {"file", "neutral/buildings/mercenary_camp_shadow.png", "size", {96, 99}}, - NeutralMinimapColor = {192, 192, 192}, - Animations = "animations-mercenary-camp", Icon = "icon-mercenary-camp", - Costs = {"time", 200, "copper", 700, "lumber", 1350}, - RepairHp = 4, - RepairCosts = {"copper", 1, "lumber", 1}, - Construction = "land_building", - HitPoints = 800, - TileSize = {3, 3}, BoxSize = {96, 96}, - Armor = 20, Missile = "missile-none", - Priority = 30, AnnoyComputerFactor = 35, - Corpse = "unit-destroyed-3x3-place", - ExplodeWhenKilled = "missile-explosion", - Domain = "land", - Drops = {"unit_wood_pile"}, - RightMouseAction = "rally_point", - BurnPercent = 50, - BurnDamageRate = 1, - RecruitHeroes = true, - UnitStock = { - "unit-dwarven-axefighter", 4, "unit-surghan-mercenary-axefighter", 4, "unit-dwarven-guard", 4, "unit-dwarven-scout", 3, "unit-joruvellir-scout", 3, "unit-dwarven-thunderer", 3, "unit-dwarven-yale-rider", 2, "unit-joruvellir-yale-rider", 2, "unit-dwarven-ballista", 1, "unit_dwarven_gryphon_rider", 1, - "unit_goblin_thief", 6, "unit-goblin-swordsman", 4, "unit-goblin-spearman", 4, "unit-goblin-archer", 3, "unit-goblin-gunpowder-infantry", 3, "unit-goblin-war-machine", 1, "unit-goblin-glider", 1, - "unit-kobold-footpad", 4, - "unit-ettin", 1, - "unit-latin-legionary", 4, "unit-latin-javelineer", 3, - "unit-norse-swordsman", 4, - "unit-orc-spearthrower", 3, - "unit-slavic-swordsman", 4, - "unit-troll-warrior", 2 - }, - Affixes = {"upgrade_prefix_frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, - Variations = { - { - "variation-id", "mercenary-camp", - "terrain-forbidden", "snow", - "forbidden-season", "winter" - }, - { - "variation-id", "mercenary-camp-snow-winter", - "file", "buildings/neutral/mercenary_camp_snow.png", - "terrain", "dirt", - "terrain", "dry-mud", - "terrain", "grass", - "terrain", "semi_dry_grass", - "terrain", "dry_grass", - "terrain", "snow", - "season", "winter" - }, - { - "variation-id", "mercenary-camp-snow", - "file", "buildings/neutral/mercenary_camp_snow.png", - "terrain", "snow" - } - }, - Sounds = { - "selected", "click", --- "acknowledge", "barracks-acknowledge", --- "ready", "barracks-ready", --- "help", "basic-dwarf-voices-help", - "dead", "building-destroyed" - } -} ) - DefineUnitType("unit-dungeon-wall", { Name = "Dungeon Wall", TerrainType = "dungeon-wall", diff --git a/scripts/upgrade_faction_types.lua b/scripts/upgrade_faction_types.lua index dcd406c21d..ae96311417 100644 --- a/scripts/upgrade_faction_types.lua +++ b/scripts/upgrade_faction_types.lua @@ -64,12 +64,12 @@ DefineModifier("upgrade_holy_order", -- holy orders' temples have a unit stock f DefineModifier("upgrade_mercenary_company", -- mercenary companies' mercenary camps produce food, to allow them to train units despite not having farms {"Supply", 8}, - {"apply-to", "unit-mercenary-camp"} + {"apply-to", "unit_mercenary_camp"} ) DefineModifier("upgrade_mercenary_company", -- mercenary companies' mercenary camps "regenerate", since they aren't supposed to have workers to repair them {"HitPoints", 1, "Increase"}, - {"apply-to", "unit-mercenary-camp"} + {"apply-to", "unit_mercenary_camp"} ) DefineModifier("upgrade_trading_company",