1-- _________ __ __ 2-- / _____// |_____________ _/ |______ ____ __ __ ______ 3-- \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ 4-- / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ 5-- /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > 6-- \/ \/ \//_____/ \/ 7-- ______________________ ______________________ 8-- T H E W A R B E G I N S 9-- Stratagus - A free fantasy real time strategy game engine 10-- 11-- (c) Copyright 1998-2019 by Lutz Sammer, Jimmy Salmon and Andrettin 12-- 13-- This program is free software; you can redistribute it and/or modify 14-- it under the terms of the GNU General Public License as published by 15-- the Free Software Foundation; either version 2 of the License, or 16-- (at your option) any later version. 17-- 18-- This program is distributed in the hope that it will be useful, 19-- but WITHOUT ANY WARRANTY; without even the implied warranty of 20-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21-- GNU General Public License for more details. 22-- 23-- You should have received a copy of the GNU General Public License 24-- along with this program; if not, write to the Free Software 25-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 26-- 27 28UnitTypeFiles = {} 29 30Units = { 31 "upgrade-holy-order", "upgrade-mercenary-company", "upgrade-trading-company", 32 "upgrade-wood-plow", "upgrade-iron-tipped-wood-plow", "upgrade-iron-plow", 33 "upgrade-ironworking", 34 "upgrade-masonry", 35 "upgrade-mathematics", "upgrade-engineering", "upgrade-architecture", "upgrade-philosophy", "upgrade-gunpowder", 36 "upgrade-egyptian-civilization", 37 "upgrade-elven-civilization", 38 "upgrade-latin-civilization", 39 "unit-latin-legionary", "unit-latin-veteran-legionary", "unit-latin-centurion", 40 "unit-latin-javelineer", 41 "unit-latin-town-hall", "unit-latin-farm", "unit-latin-barracks", "unit-latin-smithy", "unit-latin-stables", 42 "upgrade-germanic-civilization", 43 "upgrade-faction-asa-tribe", "upgrade-faction-jarling-tribe", "upgrade-faction-karling-tribe", "upgrade-faction-skeldung-tribe", "upgrade-faction-thielung-tribe", "upgrade-faction-thralling-tribe", "upgrade-faction-yngling-tribe", 44 "unit-germanic-worker", "unit-germanic-warrior", "unit-germanic-veteran-warrior", "unit-germanic-chieftain", "unit-germanic-spearman", "unit-germanic-archer", 45 "unit-germanic-priest", 46 "unit-germanic-transport-ship", 47 "unit-germanic-town-hall", "unit-germanic-farm", "unit-germanic-barracks", 48 "unit-germanic-carpenters-shop", "unit-germanic-smithy", "unit-germanic-temple", "unit-germanic-market", 49 "unit-germanic-dock", 50 "upgrade-germanic-broad-sword", "upgrade-germanic-long-spear", "upgrade-germanic-bronze-shield", 51 "upgrade-germanic-barbed-arrow", 52 "upgrade-greek-civilization", 53 "upgrade-norse-civilization", 54 "upgrade-faction-dane-tribe", "upgrade-faction-geat-tribe", "upgrade-faction-gute-tribe", "upgrade-faction-sitone-tribe", "upgrade-faction-swede-tribe", 55 "upgrade-faction-denmark", "upgrade-faction-gautland", "upgrade-faction-gotland", "upgrade-faction-norway", "upgrade-faction-sweden", 56 "unit-norse-swordsman", "unit-norse-veteran-swordsman", "unit-norse-heroic-swordsman", 57-- "unit-norse-longship", 58 "unit-norse-town-hall", 59 "unit-norse-farm", "unit-norse-barracks", 60 "unit-norse-lumber-mill", "unit-norse-smithy", 61 "unit-norse-temple", "unit-norse-market", 62 "unit-norse-watch-tower", 63 "unit-norse-dock", 64 "unit-norse-palisade", 65 "upgrade-slavic-civilization", 66 "unit-slavic-swordsman", 67 "upgrade-teuton-civilization", 68 "upgrade-faction-bavarian-tribe", 69 "upgrade-faction-saxon-tribe", "upgrade-faction-chauci-tribe", "upgrade-faction-cherusci-tribe", "upgrade-faction-varini-tribe", 70 "upgrade-faction-frisian-tribe", 71 "upgrade-faction-lombard-tribe", 72 "upgrade-faction-austria", "upgrade-faction-bavaria", "upgrade-faction-carinthia", 73 "upgrade-faction-thuringia", 74 "upgrade-faction-baden", "upgrade-faction-swabia", "upgrade-faction-switzerland", "upgrade-faction-wurtemberg", 75 "upgrade-faction-cologne", "upgrade-faction-franconia", "upgrade-faction-hesse", 76 "upgrade-faction-saxony", "upgrade-faction-brandenburg", "upgrade-faction-bremen", "upgrade-faction-brunswick", "upgrade-faction-magdeburg", "upgrade-faction-mecklenburg", "upgrade-faction-prussia", "upgrade-faction-westphalia", 77 "upgrade-faction-friesland", 78 "upgrade-faction-brabant", "upgrade-faction-drenthe", "upgrade-faction-holland", "upgrade-faction-netherlands", "upgrade-faction-overijssel", 79 "upgrade-faction-lombardy", 80 "upgrade-faction-holy-rome", 81 "unit-teuton-worker", "unit-teuton-swordsman", "unit-teuton-veteran-swordsman", "unit-teuton-heroic-swordsman", 82 "unit-teuton-spearman", 83 "unit-teuton-archer", 84 "unit-teuton-gunpowder-infantry", 85 "unit-teuton-ritter", "unit-teuton-knight-lord", 86 "unit-teuton-priest", 87 "unit-teuton-catapult", 88 "unit-teuton-kogge", 89 "unit-norse-longship", 90 "unit-teuton-town-hall", "unit-teuton-stronghold", 91 "unit-teuton-farm", "unit-teuton-barracks", 92 "unit-teuton-lumber-mill", "unit-teuton-smithy", "unit-teuton-masons-shop", 93 "unit-teuton-stables", "unit-teuton-temple", "unit-teuton-market", "unit-teuton-university", 94 "unit-teuton-watch-tower", "unit-teuton-guard-tower", "unit-teuton-catapult-tower", 95 "unit-teuton-dock", 96 "unit-teuton-wall", 97 "upgrade-teuton-spatha", "upgrade-frank-spatha", "upgrade-teuton-pike", "upgrade-teuton-iron-shield", "upgrade-teuton-bodkin-arrow", 98 "upgrade-teuton-catapult-projectile-1", "upgrade-teuton-catapult-projectile-2", 99 "upgrade-teuton-coinage", "upgrade-teuton-writing", "upgrade-teuton-alchemy", 100 "upgrade-anglo-saxon-civilization", 101 "upgrade-faction-angle-tribe", "upgrade-faction-avione-tribe", "upgrade-faction-bernice-tribe", "upgrade-faction-charude-tribe", "upgrade-faction-cantware-tribe", "upgrade-faction-dere-tribe", "upgrade-faction-gumeninga-tribe", "upgrade-faction-jute-tribe", "upgrade-faction-lindisfaran-tribe", "upgrade-faction-mierce-tribe", "upgrade-faction-teuton-tribe", 102 "upgrade-faction-bernicia", "upgrade-faction-deira", "upgrade-faction-east-anglia", "upgrade-faction-englaland", "upgrade-faction-essex", "upgrade-faction-jutland", "upgrade-faction-kent", "upgrade-faction-mercia", "upgrade-faction-middle-anglia", "upgrade-faction-middlesex", "upgrade-faction-northumbria", "upgrade-faction-sussex", "upgrade-faction-wessex", 103 "upgrade-english-civilization", 104 "upgrade-faction-england", "upgrade-faction-scotland", 105 "upgrade-suebi-civilization", 106 "upgrade-faction-suebi-tribe", "upgrade-faction-semnone-tribe", 107 "upgrade-faction-marcomanni-tribe", "upgrade-faction-quadi-tribe", "upgrade-faction-buri-tribe", 108 "upgrade-faction-alamanni-tribe", 109 "upgrade-faction-hermunduri-tribe", "upgrade-faction-thuringian-tribe", 110 "upgrade-faction-galicia", 111 "unit-suebi-swordsman", 112 "upgrade-frankish-civilization", 113 "upgrade-faction-ampsivarii-tribe", "upgrade-faction-batavian-tribe", "upgrade-faction-chamavi-tribe", "upgrade-faction-chatti-tribe", "upgrade-faction-frank-tribe", "upgrade-faction-sugambri-tribe", "upgrade-faction-ubii-tribe", 114 "upgrade-faction-austrasia", "upgrade-faction-burgundia", "upgrade-faction-east-francia", "upgrade-faction-francia", "upgrade-faction-neustria", "upgrade-faction-salia", 115 "unit-frank-swordsman", "unit-frank-veteran-swordsman", "unit-frank-heroic-swordsman", "unit-frank-spearman", 116 "unit-frank-horseman", "unit-frank-knight-lord", 117 "upgrade-gothic-civilization", 118 "upgrade-faction-bastarnae-tribe", "upgrade-faction-burgundian-tribe", "upgrade-faction-gepidae-tribe", "upgrade-faction-goth-tribe", "upgrade-faction-herulian-tribe", "upgrade-faction-lugii-tribe", "upgrade-faction-ostrogoth-tribe", "upgrade-faction-rugian-tribe", "upgrade-faction-silingae-tribe", "upgrade-faction-turcilingian-tribe", "upgrade-faction-vandal-tribe", "upgrade-faction-visigoth-tribe", 119 "upgrade-faction-burgundy", "upgrade-faction-gothia", "upgrade-faction-ostrogothia", "upgrade-faction-vandalia", "upgrade-faction-visigothia", 120 "unit-gothic-horse-rider", "unit-gothic-horse-lord", 121 "unit-celt-farm", 122 "upgrade-celt-civilization", 123 "upgrade-faction-norlund-clan", "upgrade-faction-oinling-clan", "upgrade-faction-shadowcharm-clan", "upgrade-faction-shinsplitter-clan", "upgrade-faction-shorbear-clan", "upgrade-faction-whitesteel-clan", 124 "upgrade-faction-kal-kartha", "upgrade-faction-knalga", 125 "upgrade-dwarven-civilization", 126 "unit-dwarven-miner", "unit-dwarven-skilled-miner", "unit-dwarven-expert-miner", 127 "unit-dwarven-runesmith", "unit-dwarven-runemaster", "unit-dwarven-arcanister", 128 "unit-dwarven-militia", 129 "unit-dwarven-axefighter", "unit-dwarven-steelclad", "unit-dwarven-thane", 130 "unit-dwarven-guard", "unit-dwarven-stalwart", "unit-dwarven-sentinel", 131 "unit-dwarven-scout", "unit-dwarven-pathfinder", "unit-dwarven-explorer", 132 "unit-dwarven-thunderer", 133 "unit-dwarven-yale-rider", "unit-dwarven-yale-lord", "unit-dwarven-ballista", 134 "unit-dwarven-witness", "unit-dwarven-annalist", "unit-dwarven-loremaster", 135 "unit-dwarven-gryphon-rider", 136 "unit-dwarven-transport-ship", "unit-dwarven-ballista-warship", 137 "unit-dwarven-town-hall", "unit-dwarven-stronghold", 138 "unit-dwarven-mushroom-farm", "unit-dwarven-barracks", 139 "unit-dwarven-lumber-mill", "unit-dwarven-smithy", "unit-dwarven-masons-shop", 140 "unit-dwarven-yale-pen", "unit-dwarven-temple", "unit-dwarven-market", 141 "unit-dwarven-academy", 142 "unit-dwarven-sentry-tower", "unit-dwarven-guard-tower", "unit-dwarven-ballista-tower", "unit-dwarven-cannon-tower", 143 "unit-dwarven-dock", 144 "unit-dwarven-wall", 145 "upgrade-dwarven-broad-axe", "upgrade-dwarven-great-axe", "upgrade-dwarven-shield-1", "upgrade-dwarven-shield-2", 146 "upgrade-dwarven-long-spear", "upgrade-dwarven-pike", 147 "upgrade-dwarven-sharp-throwing-axe", "upgrade-dwarven-bearded-throwing-axe", "upgrade-dwarven-ballista-bolt-1", "upgrade-dwarven-ballista-bolt-2", 148 "upgrade-dwarven-coinage", "upgrade-dwarven-runewriting", "upgrade-dwarven-alchemy", 149 "upgrade-faction-brising-clan", "upgrade-faction-lyr", 150 "unit-brising-miner", "unit-brising-skilled-miner", "unit-brising-expert-miner", "unit-brising-militia", 151 "unit-brising-smithy", 152 "upgrade-faction-eikinskjaldi-clan", "upgrade-faction-goldhoof-clan", "upgrade-faction-joruvellir", "upgrade-faction-yawning-yales", 153 "unit-joruvellir-scout", "unit-joruvellir-pathfinder", "unit-joruvellir-explorer", 154 "unit-joruvellir-yale-rider", "unit-joruvellir-yale-lord", 155 "unit-joruvellir-yale-pen", 156 "upgrade-faction-surghan-mercenaries", 157 "unit-surghan-mercenary-axefighter", "unit-surghan-mercenary-steelclad", "unit-surghan-mercenary-thane", 158 "upgrade-gnomish-civilization", 159 "upgrade-faction-acthnic-tribe", "upgrade-faction-derro-tribe", "upgrade-faction-sagan-tribe", 160 "unit-gnomish-worker", "unit-gnomish-recruit", "unit-gnomish-duelist", "unit-gnomish-master-at-arms", "unit-gnomish-herbalist", "unit-gnomish-caravan", 161 "unit-gnomish-town-hall", "unit-gnomish-farm", "unit-gnomish-barracks", 162 "unit-deep-gnomish-worker", "unit-deep-gnomish-recruit", "unit-deep-gnomish-duelist", "unit-deep-gnomish-master-at-arms", "unit-deep-gnomish-herbalist", 163 "unit-derro-worker", "unit-derro-thug", "unit-derro-executioner", "unit-derro-shadowguard", 164 "upgrade-goblin-civilization", 165 "upgrade-faction-aelak-tribe", "upgrade-faction-issudru-tribe", "upgrade-faction-mabom-tribe", "upgrade-faction-sigre-tribe", 166 "upgrade-faction-aurvangling-tribe", "upgrade-faction-dreadskull-tribe", "upgrade-faction-khag-tribe", "upgrade-faction-lggi-tribe", "upgrade-faction-prideblade-tribe", "upgrade-faction-wildfang-tribe", 167 "upgrade-faction-aurvang", "upgrade-faction-driftwood", "upgrade-faction-ezmarria", "upgrade-faction-myridia", "upgrade-faction-stilgar", "upgrade-faction-tenebris", 168 "unit-goblin-worker", "unit-goblin-militia", "unit-goblin-magnate", 169 "unit-goblin-swordsman", "unit-goblin-barbarian", "unit-goblin-warlord", "unit-goblin-spearman", 170 "unit-goblin-archer", "unit-goblin-headhunter", "unit-goblin-shadowstalker", 171 "unit-goblin-gunpowder-infantry", 172 "unit-goblin-thief", "unit-goblin-shaman", 173 "unit-goblin-war-machine", "unit-goblin-glider", 174 "unit-goblin-transport-ship", "unit-goblin-warship", 175 "unit-goblin-town-hall", "unit-goblin-stronghold", 176 "unit-goblin-mess-hall", "unit-goblin-farm", "unit-goblin-lumber-mill", "unit-goblin-smithy", "unit-goblin-masons-shop", 177 "unit-goblin-temple", "unit-goblin-market", "unit-goblin-academy", 178 "unit-goblin-watch-tower", "unit-goblin-guard-tower", "unit-goblin-catapult-tower", 179 "unit-goblin-dock", 180 "unit-goblin-wall", 181 "unit-goblin-banner", 182 "upgrade-goblin-broad-sword", "upgrade-goblin-long-sword", "upgrade-goblin-rimmed-shield", "upgrade-goblin-embossed-shield", 183 "upgrade-goblin-long-spear", "upgrade-goblin-pike", 184 "upgrade-goblin-barbed-arrow", "upgrade-goblin-bodkin-arrow", 185 "upgrade-goblin-catapult-projectile-1", "upgrade-goblin-catapult-projectile-2", 186 "upgrade-goblin-coinage", "upgrade-goblin-writing", "upgrade-goblin-alchemy", 187 "upgrade-kobold-civilization", 188 "unit-kobold-footpad", "unit-kobold-slasher", "unit-kobold-champion", 189 "unit-elven-swordsman", "unit-elven-priest", 190 "unit-orc-spearthrower", "unit-orc-sea-orc", "unit-orc-shaman", 191 "unit-ettin", 192 "unit-ettin-town-hall", 193 "unit-caravan", 194 "unit-minecart", 195-- "unit-adelobasileus-cromptoni", "unit-galerix-exilis", "unit-megacricetodon-collongensis", "unit-rat", 196 "unit-adelobasileus-cromptoni", "unit-galerix-exilis", "unit-rat", 197 "unit-goat", "unit-boar", "unit-horse", 198 "unit-wolf", 199 "unit-slime", "unit-yale", "unit-gryphon", "unit-wyrm", "unit-water-elemental", 200 "unit-unicorn", 201 "unit-settlement-site", 202 "unit-gold-rock", "unit-gold-deposit", "unit-gold-mine", 203 "unit-silver-rock", "unit-silver-deposit", "unit-silver-mine", 204 "unit-copper-rock", "unit-copper-deposit", "unit-copper-mine", 205 "unit-iron-deposit", "unit-iron-mine", 206 "unit-mithril-deposit", "unit-mithril-mine", 207 "unit-coal-deposit", "unit-coal-mine", 208 "unit-diamond-rock", "unit-diamond-deposit", "unit-diamond-mine", 209 "unit-emerald-rock", "unit-emerald-deposit", "unit-emerald-mine", 210 "unit-yale-cave", "unit-yale-hunting-lodge", 211 "unit-mercenary-camp", 212-- "unit-cavern-entrance", 213-- "unit-portal", 214 "unit-road", "unit-railroad", 215 "unit-carrots", "unit-cheese", "unit-wyrm-heart", "unit-potion-of-healing", "unit-elixir-of-dexterity", "unit-elixir-of-intelligence", "unit-elixir-of-strength", "unit-elixir-of-vitality", 216 "upgrade-free-workers", "upgrade-serfdom", 217 "upgrade-shield-wall", "upgrade-svinfylking", 218 "upgrade-deity-odin", "upgrade-deity-thor", "upgrade-deity-loki", "upgrade-deity-heimdall", "upgrade-deity-hel", "upgrade-deity-tyr", 219 "upgrade-deity-gathaarl", 220 "upgrade-deity-christian-god", 221 "upgrade-deity-domain-air", "upgrade-deity-domain-earth", "upgrade-deity-domain-fire", "upgrade-deity-domain-water", "upgrade-deity-domain-aether", "upgrade-deity-domain-metal", "upgrade-deity-domain-wood", "upgrade-deity-domain-ice", "upgrade-deity-domain-lightning", "upgrade-deity-domain-chaos", "upgrade-deity-domain-order", "upgrade-deity-domain-death", "upgrade-deity-domain-life", "upgrade-deity-domain-darkness", "upgrade-deity-domain-light", "upgrade-deity-domain-sun", "upgrade-deity-domain-moon", 222 "upgrade-deity-domain-courage", "upgrade-deity-domain-justice", "upgrade-deity-domain-temperance", "upgrade-deity-domain-wisdom", "upgrade-deity-domain-charity", "upgrade-deity-domain-faith", "upgrade-deity-domain-hope", "upgrade-deity-domain-love", 223 "upgrade-deity-domain-envy", "upgrade-deity-domain-gluttony", "upgrade-deity-domain-greed", "upgrade-deity-domain-lust", "upgrade-deity-domain-pride", "upgrade-deity-domain-sloth", "upgrade-deity-domain-wrath", "upgrade-deity-domain-fear", 224 "upgrade-deity-domain-archery", "upgrade-deity-domain-magic", "upgrade-deity-domain-metalworking", "upgrade-deity-domain-poetry", "upgrade-deity-domain-trickery", "upgrade-deity-domain-warfare" 225} 226 227if (OldDefineUnitType == nil) then 228 OldDefineUnitType = DefineUnitType 229end 230 231function DefineUnitType(unit_type, data) 232 local town_hall = false 233 local resource_mine = false 234 local smithy = false 235 local market = false 236 local dock = false 237 if (data.Class == "town-hall" or data.Class == "stronghold") then 238 town_hall = true 239 elseif ((data.GivesResource and data.BuildingRules == nil and data.GivesResource ~= "trade") or data.Class == "lumber-mill") then 240 resource_mine = true 241 elseif (data.Class == "smithy") then 242 smithy = true 243 elseif (data.Class == "market") then 244 market = true 245 elseif (data.Class == "dock") then 246 dock = true 247 end 248 249 if (data.Parent ~= nil) then 250 OldDefineUnitType(unit_type, {Parent = data.Parent}) 251 data.Parent = nil 252 if ((GetUnitTypeData(unit_type, "Class") == "town-hall" or GetUnitTypeData(unit_type, "Class") == "stronghold") and data.Class == nil) then 253 town_hall = true 254 elseif ( 255 (GetUnitTypeData(unit_type, "GivesResource") ~= "" and GetUnitTypeData(unit_type, "GivesResource") ~= "trade" and data.GivesResource == nil and data.BuildingRules == nil) 256 or (GetUnitTypeData(unit_type, "Class") == "lumber-mill" and data.Class == nil) 257 ) then 258 resource_mine = true 259 elseif (GetUnitTypeData(unit_type, "Class") == "smithy" and data.Class == nil) then 260 smithy = true 261 elseif (GetUnitTypeData(unit_type, "Class") == "market" and data.Class == nil) then 262 market = true 263 elseif (GetUnitTypeData(unit_type, "Class") == "dock" and data.Class == nil) then 264 dock = true 265 end 266 end 267 268 data.OnInit = InitializeUnit 269 270 if (town_hall) then 271 data.BuildingRules = { 272 "and", { 273 "ontop", { Type = "unit-settlement-site", ReplaceOnDie = true, ReplaceOnBuild = true }, 274 } 275 } 276 elseif (resource_mine) then 277 data.BuildingRules = { 278 "and", { 279 "distance", { Distance = 3, DistanceType = ">", Type = "unit-settlement-site" }, 280 "distance", { Distance = 3, DistanceType = ">", Class = "town-hall" }, 281 "distance", { Distance = 3, DistanceType = ">", Class = "stronghold" }, 282 "distance", { Distance = 3, DistanceType = ">", Class = "fortress" } 283 } 284 } 285 elseif (smithy) then 286 data.BuildingRules = { 287 "and", { 288 "distance", { Distance = 3, DistanceType = ">", Type = "unit-settlement-site" }, 289 "distance", { Distance = 3, DistanceType = ">", Class = "town-hall" }, 290 "distance", { Distance = 3, DistanceType = ">", Class = "stronghold" }, 291 "distance", { Distance = 3, DistanceType = ">", Class = "fortress" }, 292 293 "distance", { Distance = 3, DistanceType = ">", Type = "unit-gold-deposit" }, 294 "distance", { Distance = 3, DistanceType = ">", Type = "unit-gold-mine" }, 295 "distance", { Distance = 3, DistanceType = ">", Type = "unit-silver-deposit" }, 296 "distance", { Distance = 3, DistanceType = ">", Type = "unit-silver-mine" }, 297 "distance", { Distance = 3, DistanceType = ">", Type = "unit-copper-deposit" }, 298 "distance", { Distance = 3, DistanceType = ">", Type = "unit-copper-mine" }, 299 "distance", { Distance = 3, DistanceType = ">", Type = "unit-iron-deposit" }, 300 "distance", { Distance = 3, DistanceType = ">", Type = "unit-iron-mine" }, 301 "distance", { Distance = 3, DistanceType = ">", Type = "unit-mithril-deposit" }, 302 "distance", { Distance = 3, DistanceType = ">", Type = "unit-mithril-mine" }, 303 "distance", { Distance = 3, DistanceType = ">", Type = "unit-coal-deposit" }, 304 "distance", { Distance = 3, DistanceType = ">", Type = "unit-coal-mine" }, 305 "distance", { Distance = 3, DistanceType = ">", Type = "unit-diamond-deposit" }, 306 "distance", { Distance = 3, DistanceType = ">", Type = "unit-diamond-mine" }, 307 "distance", { Distance = 3, DistanceType = ">", Type = "unit-emerald-deposit" }, 308 "distance", { Distance = 3, DistanceType = ">", Type = "unit-emerald-mine" }, 309 310-- "distance", { Distance = 3, DistanceType = ">", Type = "unit-yale-cave" }, 311-- "distance", { Distance = 3, DistanceType = ">", Type = "unit-yale-hunting-lodge" }, 312-- "distance", { Distance = 3, DistanceType = ">", Type = "unit-dwarven-lumber-mill" }, 313-- "distance", { Distance = 3, DistanceType = ">", Type = "unit-germanic-carpenters-shop" }, 314-- "distance", { Distance = 3, DistanceType = ">", Type = "unit-dwarven-yale-pen" }, 315-- "distance", { Distance = 3, DistanceType = ">", Type = "unit-joruvellir-yale-pen" } 316 } 317 } 318 elseif (market) then 319 data.BuildingRules = { 320 "and", { 321 "distance", { Distance = 3, DistanceType = ">", Class = "market" } 322 } 323 } 324 elseif (dock) then 325 data.BuildingRules = { 326 "and", { 327 "distance", { Distance = 3, DistanceType = ">", Class = "dock" } 328 } 329 } 330 end 331 332 OldDefineUnitType(unit_type, data) 333end 334 335-- Load the animations for the units. 336Load("scripts/anim.lua") 337 338--============================================================================= 339-- Define unit-types. 340-- 341-- NOTE: Save can generate this table. 342-- 343DefineUnitType("unit-template-unit", { 344 Name = "Unit", 345 TileSize = {1, 1}, BoxSize = {31, 31}, -- default tile and box size 346 Animations = "animations-melee-unit-new", 347 DrawLevel = 40, 348 SelectableByRectangle = true, 349 ButtonPopup = "popup-unit" 350}) 351 352DefineUnitType("unit-template-building", { 353 Name = "Building", 354 TileSize = {2, 2}, BoxSize = {63, 63}, -- default tile and box size 355 Animations = "animations-building", 356 DrawLevel = 40, 357 SightRange = 2, 358 Building = true, 359 VisibleUnderFog = true, 360 SelectableByRectangle = true, 361 SalvageFactor = 75, 362 ButtonLevel = "build-structure-level", 363 ButtonPopup = "popup-building" 364}) 365 366DefineUnitType("unit-template-sapient-unit", { 367 Name = "Sapient Unit", 368 Parent = "unit-template-unit", 369 NeutralMinimapColor = {192, 192, 192}, 370 Strength = 10, 371 Dexterity = 10, 372 Intelligence = 10, 373 Charisma = 10, 374 Organic = true, 375 Mana = {Enable = false, Max = 0, Value = 0, Increase = 1}, 376 Traits = {"upgrade-ambitious", "upgrade-clumsy", "upgrade-cruel", "upgrade-dextrous", "upgrade-dim", "upgrade-dutiful", "upgrade-genius", "upgrade-intelligent", "upgrade-keen", "upgrade-limping", "upgrade-mighty", "upgrade-near-sighted", "upgrade-old", "upgrade-pious", "upgrade-quick", "upgrade-reckless", "upgrade-resilient", "upgrade-slow", "upgrade-strong", "upgrade-weak", "upgrade-wise"} 377}) 378 379Load("scripts/items.lua") 380Load("scripts/units_fauna.lua") 381 382DefineUnitType("unit-minecart", { 383 Name = "Minecart", 384 Parent = "unit-template-unit", 385 Class = "minecart", 386 Civilization = "neutral", 387 Description = "Minecarts are useful to gather resources from mines in greater bulk.", 388 Image = {"file", "teuton/units/minecart.png", "size", {64, 64}}, 389 Animations = "animations-minecart", Icon = "icon-teuton-minecart", 390 Costs = {"time", 60, "copper", 300, "lumber", 300}, 391 RepairHp = 4, 392 RepairCosts = {"copper", 1, "lumber", 1}, 393 Speed = 7, 394 HitPoints = 110, 395 TileSize = {1, 1}, BoxSize = {42, 42}, 396 SightRange = 4, 397 AutoRepairRange = 4, 398 MaxAttackRange = 1, 399 Priority = 55, 400 Points = 50, 401 Demand = 1, 402 SalvageFactor = 75, 403 Type = "land", 404 Coward = true, 405 RightMouseAction = "harvest", 406 Rail = true, 407 RequirementsString = "Engineering", 408 CanGatherResources = { 409 { 410 "resource-id", "gold", 411 "file-when-loaded", "teuton/units/minecart_with_gold.png", 412 "resource-capacity", 200, 413 "resource-step", 6, 414 "wait-at-resource", 12, 415 "wait-at-depot", 150 416 }, 417 { 418 "resource-id", "silver", 419 "file-when-loaded", "teuton/units/minecart_with_silver.png", 420 "resource-capacity", 200, 421 "resource-step", 6, 422 "wait-at-resource", 12, 423 "wait-at-depot", 150 424 }, 425 { 426 "resource-id", "copper", 427 "file-when-loaded", "teuton/units/minecart_with_copper.png", 428 "resource-capacity", 200, 429 "resource-step", 6, 430 "wait-at-resource", 12, 431 "wait-at-depot", 150 432 }, 433 { 434 "resource-id", "iron", 435 "file-when-loaded", "teuton/units/minecart_with_iron.png", 436 "resource-capacity", 200, 437 "resource-step", 6, 438 "wait-at-resource", 12, 439 "wait-at-depot", 150 440 }, 441 { 442 "resource-id", "mithril", 443 "file-when-loaded", "teuton/units/minecart_with_silver.png", 444 "resource-capacity", 200, 445 "resource-step", 6, 446 "wait-at-resource", 12, 447 "wait-at-depot", 150 448 }, 449 { 450 "resource-id", "coal", 451 "file-when-loaded", "teuton/units/minecart_with_coal.png", 452 "resource-capacity", 200, 453 "resource-step", 6, 454 "wait-at-resource", 12, 455 "wait-at-depot", 150 456 }, 457 { 458 "resource-id", "diamonds", 459 "file-when-loaded", "teuton/units/minecart_with_silver.png", 460 "resource-capacity", 200, 461 "resource-step", 6, 462 "wait-at-resource", 12, 463 "wait-at-depot", 150 464 }, 465 { 466 "resource-id", "emeralds", 467 "file-when-loaded", "teuton/units/minecart_with_gold.png", 468 "resource-capacity", 200, 469 "resource-step", 6, 470 "wait-at-resource", 12, 471 "wait-at-depot", 150 472 } 473 }, 474 Sounds = { 475 "selected", "gold-mine-selected", 476 "step", "step-dirt", 477 "step-dirt", "step-dirt", 478 "step-gravel", "step-gravel", 479 "step-mud", "step-mud", 480 "step-stone", "step-stone", 481 "step-grass", "step-leaves", 482 "dead", "explosion" 483 } 484} ) 485 486DefineUnitType("unit-caravan", { 487 Name = "Caravan", 488 Parent = "unit-template-unit", 489 Class = "caravan", 490 Civilization = "neutral", 491 Description = "Caravans are used by various different cultures to perform commerce.", 492 Image = {"file", "neutral/units/caravan.png", "size", {64, 64}}, 493 Animations = "animations-gnomish-caravan", Icon = "icon-caravan", 494 Costs = {"time", 250, "copper", 900, "lumber", 900}, 495 RepairHp = 4, 496 RepairCosts = {"copper", 1, "lumber", 1}, 497 Speed = 5, 498 HitPoints = 110, 499 TileSize = {1, 1}, BoxSize = {63, 63}, 500 SightRange = 4, 501 Priority = 55, 502 Points = 50, 503 Demand = 1, 504 Type = "land", 505 Coward = true, 506 RightMouseAction = "harvest", 507 MaxOnBoard = 2, 508 CanTransport = {"Building", "false", "GroundAttack", "false", "Fauna", "false", "SaveCargo", "false", "Mounted", "false"}, -- forbidding ground attack as an ugly way of making ballistas not be able to enter the transporter; and forbidding "SaveCargo" is an ugly way of making caravans not be able to enter other caravans 509 AttackFromTransporter = true, 510 SaveCargo = true, 511 Trader = true, 512 CanGatherResources = { 513 { 514 "resource-id", "trade", 515 "resource-capacity", 400, 516 "resource-step", 4, 517 "wait-at-resource", 6, 518 "wait-at-depot", 150 519 } 520 }, 521 Sounds = { 522 "selected", "click", 523 "dead", "explosion", 524 "step", "step-dirt", 525 "step-dirt", "step-dirt", 526 "step-grass", "step-leaves", 527 "step-gravel", "step-gravel", 528 "step-mud", "step-mud", 529 "step-stone", "step-stone", 530 } 531} ) 532 533DefineUnitType("unit-template-base-deposit", { 534 Name = "Deposit", 535 Parent = "unit-template-building", 536 NeutralMinimapColor = {255, 255, 0}, 537 Costs = {"time", 150}, 538 Construction = "construction-land2", 539 HitPoints = 25500, 540 RepairHp = 4, 541 RepairCosts = {"copper", 1, "lumber", 1, "stone", 1}, 542 TileSize = {3, 3}, BoxSize = {95, 95}, 543 Armor = 20, Missile = "missile-none", 544 Priority = 0, 545 Corpse = "unit-destroyed-3x3-place", 546 ExplodeWhenKilled = "missile-explosion", 547 Type = "land", 548 StartingResources = {50000}, 549 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-industrious", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-diligence", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 550 Sounds = { 551 "selected", "click", 552-- "acknowledge", "gold-mine-acknowledge", 553-- "ready", "gold-mine-ready", 554-- "help", "gold-mine-help", 555 "dead", "building-destroyed" 556 } 557} ) 558 559DefineUnitType("unit-settlement-site", { 560 Name = "Settlement Site", 561 Parent = "unit-template-building", 562 Description = "A site which is a prime spot for establishing a settlement.", 563 Image = {"file", "neutral/buildings/settlement_site.png", "size", {128, 128}}, 564 Shadow = {"file", "neutral/buildings/settlement_site_shadow.png", "size", {128, 128}}, 565 Icon = "icon-settlement-site", 566 NeutralMinimapColor = {128, 128, 0}, 567 Construction = "construction-land2", 568 HitPoints = 25500, 569 RepairHp = 4, 570 RepairCosts = {"copper", 1, "lumber", 1, "stone", 1}, 571 TileSize = {4, 4}, BoxSize = {127, 127}, 572 Armor = 20, Missile = "missile-none", 573 Priority = 0, 574 Corpse = "unit-destroyed-4x4-place", 575 ExplodeWhenKilled = "missile-explosion", 576 Type = "land", 577 Indestructible = true, 578 Sounds = { 579 "selected", "click", 580-- "acknowledge", "gold-mine-acknowledge", 581-- "ready", "gold-mine-ready", 582-- "help", "gold-mine-help", 583 "dead", "building-destroyed" 584 } 585} ) 586 587DefineUnitType("unit-template-base-mine", { 588 Name = "Mine", 589 Parent = "unit-template-building", 590 Animations = "animations-active-building", 591 NeutralMinimapColor = {255, 255, 0}, 592 Construction = "construction-land-active", 593 RepairHp = 4, 594 RepairCosts = {"copper", 1, "lumber", 1}, 595 HitPoints = 650, 596 TileSize = {3, 3}, BoxSize = {95, 95}, 597-- Armor = 20, Missile = "missile-none", 598 OwnershipInfluenceRange = 1, 599 Armor = 5, Missile = "missile-none", 600 Priority = 20, AnnoyComputerFactor = 20, 601 Points = 160, 602 Corpse = "unit-destroyed-3x3-place", 603 ExplodeWhenKilled = "missile-explosion", 604 Type = "land", 605 BuilderOutside = true, 606 CanHarvest = true, 607 MaxHarvesters = 10, 608 BurnPercent = 50, 609 BurnDamageRate = 1, 610 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-industrious", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-diligence", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 611 Sounds = { 612 "selected", "click", 613-- "acknowledge", "gold-mine-acknowledge", 614-- "ready", "gold-mine-ready", 615-- "help", "gold-mine-help", 616 "dead", "building-destroyed" 617 } 618} ) 619 620DefineUnitType("unit-template-deposit", { 621 Name = "Deposit", 622 Parent = "unit-template-base-deposit", 623 Affixes = {"upgrade-item-prefix-dwindling", "upgrade-item-prefix-replenishing", "upgrade-item-suffix-of-replenishment"}, 624 Sounds = { 625 "selected", "gold-mine-selected" 626 } 627} ) 628 629DefineUnitType("unit-template-mine", { 630 Name = "Mine", 631 Parent = "unit-template-base-mine", 632 Affixes = {"upgrade-item-prefix-dwindling", "upgrade-item-prefix-replenishing", "upgrade-item-suffix-of-replenishment"}, 633 Sounds = { 634 "selected", "gold-mine-selected" 635 } 636} ) 637 638DefineUnitType("unit-gold-deposit", { 639 Name = "Gold Deposit", 640 Parent = "unit-template-deposit", 641 Description = "Gold deposits contain deep veins of gold, which can be gainfully mined after the proper infrastructure is put into place.", 642 Image = {"file", "neutral/buildings/gold_deposit.png", "size", {96, 96}}, 643 Shadow = {"file", "neutral/buildings/gold_deposit_shadow.png", "size", {96, 96}}, 644 Icon = "icon-gold-deposit", 645 GivesResource = "gold" 646} ) 647 648DefineUnitType("unit-gold-mine", { 649 Name = "Gold Mine", 650 Parent = "unit-template-mine", 651 Class = "gold-mine", 652 Civilization = "neutral", 653 Description = "Gold is a crucial metal for most societies, as it serves both as a durable stock of value, and as a means of exchange with which a myriad of goods and services can be traded for.", 654 Image = {"file", "neutral/buildings/gold_mine.png", "size", {96, 96}}, 655 Shadow = {"file", "neutral/buildings/gold_mine_shadow.png", "size", {96, 96}}, 656 LightImage = {"file", "neutral/buildings/gold_mine_light.png"}, 657 Icon = "icon-gold-mine", 658-- Costs = {"time", 200, "copper", 700, "lumber", 450}, 659 Costs = {"time", 200, "lumber", 2050}, 660 BuildingRules = { "and", { "ontop", { Type = "unit-gold-deposit", ReplaceOnDie = true, ReplaceOnBuild = true } } }, 661 GivesResource = "gold", 662 ButtonPos = 12, 663 ButtonKey = "g", 664 ButtonHint = "Build ~!Gold Mine", 665 BuildingRulesString = "Must be built on top of a Gold Deposit", 666 Variations = { 667 { 668 "variation-id", "default", 669 "upgrade-forbidden", "upgrade-engineering" 670 }, 671 { 672 "variation-id", "rail", 673 "file", "neutral/buildings/gold_mine_rail.png", 674 "light-file", "neutral/buildings/gold_mine_rail_light.png", 675 "upgrade-required", "upgrade-engineering" 676 } 677 } 678} ) 679 680DefineUnitType("unit-silver-deposit", { 681 Name = "Silver Deposit", 682 Parent = "unit-template-deposit", 683 Description = "Silver deposits often contain deep veins of silver, which can be gainfully mined after the proper infrastructure is put into place.", 684 Image = {"file", "neutral/buildings/silver_deposit.png", "size", {96, 96}}, 685 Shadow = {"file", "neutral/buildings/silver_deposit_shadow.png", "size", {96, 96}}, 686 Icon = "icon-silver-deposit", 687 GivesResource = "silver" 688} ) 689 690DefineUnitType("unit-silver-mine", { 691 Name = "Silver Mine", 692 Parent = "unit-template-mine", 693 Class = "silver-mine", 694 Civilization = "neutral", 695 Description = "Silver is a crucial metal for most societies, as it serves both as a durable stock of value, and as a means of exchange with which a myriad of goods and services can be traded for. Although not as valuable as gold, silver is still a highly sought-after metal.", 696 Image = {"file", "neutral/buildings/silver_mine.png", "size", {96, 96}}, 697 Shadow = {"file", "neutral/buildings/silver_mine_shadow.png", "size", {96, 96}}, 698 LightImage = {"file", "neutral/buildings/silver_mine_light.png"}, 699 Icon = "icon-silver-mine", 700 Costs = {"time", 200, "lumber", 2050}, 701 BuildingRules = { "and", { "ontop", { Type = "unit-silver-deposit", ReplaceOnDie = true, ReplaceOnBuild = true } } }, 702 GivesResource = "silver", 703 ButtonPos = 11, 704 ButtonKey = "v", 705 ButtonHint = "Build Sil~!ver Mine", 706 BuildingRulesString = "Must be built on top of a Silver Deposit" 707} ) 708 709DefineUnitType("unit-copper-deposit", { 710 Name = "Copper Deposit", 711 Parent = "unit-template-deposit", 712 Description = "Copper deposits contain deep veins of copper, which can be gainfully mined after the proper infrastructure is put into place.", 713 Image = {"file", "neutral/buildings/copper_deposit.png", "size", {96, 96}}, 714 Shadow = {"file", "neutral/buildings/copper_deposit_shadow.png", "size", {96, 96}}, 715 Icon = "icon-copper-deposit", 716 GivesResource = "copper" 717} ) 718 719DefineUnitType("unit-copper-mine", { 720 Name = "Copper Mine", 721 Parent = "unit-template-mine", 722 Class = "copper-mine", 723 Civilization = "neutral", 724 Description = "More common than either gold or silver, copper has a multitude of uses. It not only serves as a stock of value and means of exchange, but also as a material for utensils and as an ingredient to the making of bronze.", 725 Image = {"file", "neutral/buildings/copper_mine.png", "size", {96, 96}}, 726 Shadow = {"file", "neutral/buildings/copper_mine_shadow.png", "size", {96, 96}}, 727 LightImage = {"file", "neutral/buildings/copper_mine_light.png"}, 728 Icon = "icon-copper-mine", 729 Costs = {"time", 200, "lumber", 2050}, 730 BuildingRules = { "and", { "ontop", { Type = "unit-copper-deposit", ReplaceOnDie = true, ReplaceOnBuild = true } } }, 731 GivesResource = "copper", 732 ButtonPos = 10, 733 ButtonKey = "c", 734 ButtonHint = "Build ~!Copper Mine", 735 BuildingRulesString = "Must be built on top of a Copper Deposit" 736} ) 737 738DefineUnitType("unit-iron-deposit", { 739 Name = "Iron Deposit", 740 Parent = "unit-template-deposit", 741 Description = "Iron deposits contain deep veins of iron, which can be gainfully mined after the proper infrastructure is put into place.", 742 Image = {"file", "neutral/buildings/iron_deposit.png", "size", {96, 96}}, 743 Shadow = {"file", "neutral/buildings/iron_deposit_shadow.png", "size", {96, 96}}, 744 Icon = "icon-iron-deposit", 745 GivesResource = "iron" 746} ) 747 748DefineUnitType("unit-iron-mine", { 749 Name = "Iron Mine", 750 Parent = "unit-template-mine", 751 Class = "iron-mine", 752 Civilization = "neutral", 753 Description = "Iron is a relatively common metal, but working it requires a substantially higher degree of knowledge of metallurgy than working metals like copper, silver or gold.", 754 Image = {"file", "neutral/buildings/iron_mine.png", "size", {96, 96}}, 755 Shadow = {"file", "neutral/buildings/iron_mine_shadow.png", "size", {96, 96}}, 756 LightImage = {"file", "neutral/buildings/iron_mine_light.png"}, 757 Icon = "icon-iron-mine", 758 Costs = {"time", 200, "lumber", 2050}, 759 BuildingRules = { "and", { "ontop", { Type = "unit-iron-deposit", ReplaceOnDie = true, ReplaceOnBuild = true } } }, 760 GivesResource = "iron", 761 BuildingRulesString = "Must be built on top of a Iron Deposit", 762 RequirementsString = "Ironworking" 763} ) 764 765DefineUnitType("unit-mithril-deposit", { 766 Name = "Mithril Deposit", 767 Parent = "unit-template-deposit", 768 Description = "Mithril deposits contain deep veins of extremely valuable mithril, which can be gainfully mined after the proper infrastructure is put into place.", 769 Image = {"file", "neutral/buildings/mithril_deposit.png", "size", {96, 96}}, 770 Shadow = {"file", "neutral/buildings/mithril_deposit_shadow.png", "size", {96, 96}}, 771 Icon = "icon-mithril-deposit", 772 GivesResource = "mithril" 773} ) 774 775DefineUnitType("unit-mithril-mine", { 776 Name = "Mithril Mine", 777 Parent = "unit-template-mine", 778 Class = "mithril-mine", 779 Civilization = "neutral", 780 Description = "Of the inhabited worlds, mithril is only found in Nidavellir, and even there it is an exceedingly rare metal. Both lighter and more resistant than iron, mithril is highly sought-after for crafting weapons and armor, though its enormous expense ensures that only very few can afford it.", 781 Image = {"file", "neutral/buildings/mithril_mine.png", "size", {96, 96}}, 782 Shadow = {"file", "neutral/buildings/mithril_mine_shadow.png", "size", {96, 96}}, 783 LightImage = {"file", "neutral/buildings/mithril_mine_light.png"}, 784 Icon = "icon-mithril-mine", 785 Costs = {"time", 200, "lumber", 2050}, 786 BuildingRules = { "and", { "ontop", { Type = "unit-mithril-deposit", ReplaceOnDie = true, ReplaceOnBuild = true } } }, 787 GivesResource = "mithril", 788 BuildingRulesString = "Must be built on top of a Mithril Deposit", 789 RequirementsString = "Ironworking" 790} ) 791 792DefineUnitType("unit-coal-deposit", { 793 Name = "Coal Deposit", 794 Parent = "unit-template-deposit", 795 Description = "Coal deposits contain deep stores of coal, which can be gainfully mined after the proper infrastructure is put into place.", 796 Image = {"file", "neutral/buildings/coal_deposit.png", "size", {96, 96}}, 797 Shadow = {"file", "neutral/buildings/coal_deposit.png", "size", {96, 96}}, 798 Icon = "icon-coal-deposit", 799 GivesResource = "coal" 800} ) 801 802DefineUnitType("unit-coal-mine", { 803 Name = "Coal Mine", 804 Parent = "unit-template-mine", 805 Class = "coal-mine", 806 Civilization = "neutral", 807 Description = "Coal is a valuable heating material.", 808 Image = {"file", "neutral/buildings/coal_mine.png", "size", {96, 96}}, 809 Shadow = {"file", "neutral/buildings/coal_mine_shadow.png", "size", {96, 96}}, 810 Icon = "icon-coal-mine", 811 Costs = {"time", 200, "lumber", 2050}, 812 BuildingRules = { "and", { "ontop", { Type = "unit-coal-deposit", ReplaceOnDie = true, ReplaceOnBuild = true } } }, 813 GivesResource = "coal", 814 BuildingRulesString = "Must be built on top of a Coal Deposit" 815} ) 816 817DefineUnitType("unit-diamond-deposit", { 818 Name = "Diamond Deposit", 819 Parent = "unit-template-deposit", 820 Description = "Diamond deposits contain deep sources of diamonds, which can be gainfully mined after the proper infrastructure is put into place.", 821 Image = {"file", "neutral/buildings/diamond_deposit.png", "size", {96, 96}}, 822 Shadow = {"file", "neutral/buildings/copper_deposit_shadow.png", "size", {96, 96}}, 823 Icon = "icon-diamond-deposit", 824 GivesResource = "diamonds" 825} ) 826 827DefineUnitType("unit-diamond-mine", { 828 Name = "Diamond Mine", 829 Parent = "unit-template-mine", 830 Class = "diamond-mine", 831 Civilization = "neutral", 832 Description = "Diamonds are highly valuable gems, so that the discovery of deposits containing them will quickly result in the construction of a mine.", 833 Image = {"file", "neutral/buildings/diamond_mine.png", "size", {96, 96}}, 834 Shadow = {"file", "neutral/buildings/copper_mine_shadow.png", "size", {96, 96}}, 835 LightImage = {"file", "neutral/buildings/copper_mine_light.png"}, 836 Icon = "icon-diamond-mine", 837 Costs = {"time", 200, "lumber", 2050}, 838 BuildingRules = { "and", { "ontop", { Type = "unit-diamond-deposit", ReplaceOnDie = true, ReplaceOnBuild = true } } }, 839 GivesResource = "diamonds", 840 BuildingRulesString = "Must be built on top of a Diamond Deposit" 841} ) 842 843DefineUnitType("unit-emerald-deposit", { 844 Name = "Emerald Deposit", 845 Parent = "unit-template-deposit", 846-- Description = "Emerald deposits contain deep sources of emeralds, which can be gainfully mined after the proper infrastructure is put into place.", 847 Image = {"file", "neutral/buildings/emerald_deposit.png", "size", {96, 96}}, 848 Shadow = {"file", "neutral/buildings/gold_deposit_shadow.png", "size", {96, 96}}, 849 Icon = "icon-emerald-deposit", 850 GivesResource = "emeralds" 851} ) 852 853DefineUnitType("unit-emerald-mine", { 854 Name = "Emerald Mine", 855 Parent = "unit-template-mine", 856 Class = "emerald-mine", 857 Civilization = "neutral", 858-- Description = "Emeralds are valuable gems, and can be mined for high profits.", 859 Image = {"file", "neutral/buildings/emerald_mine.png", "size", {96, 96}}, 860 Shadow = {"file", "neutral/buildings/gold_mine_shadow.png", "size", {96, 96}}, 861 LightImage = {"file", "neutral/buildings/gold_mine_light.png"}, 862 Icon = "icon-emerald-mine", 863 Costs = {"time", 200, "lumber", 2050}, 864 BuildingRules = { "and", { "ontop", { Type = "unit-emerald-deposit", ReplaceOnDie = true, ReplaceOnBuild = true } } }, 865 GivesResource = "emeralds", 866 BuildingRulesString = "Must be built on top of an Emerald Deposit" 867} ) 868 869DefineUnitType("unit-gold-rock", { 870 Name = "Gold Rock", 871 Image = {"file", "neutral/buildings/gold_rock_1.png", "size", {43, 43}}, 872 Shadow = {"file", "neutral/buildings/gold_rock_1_shadow.png", "size", {43, 43}}, 873 Animations = "animations-building", Icon = "icon-gold-rock", 874 NeutralMinimapColor = {255, 255, 0}, 875 Costs = {"time", 150}, 876 HitPoints = 25500, 877 DrawLevel = 40, 878 TileSize = {1, 1}, BoxSize = {31, 31}, 879 SightRange = 1, 880 Armor = 20, Missile = "missile-none", 881 Priority = 0, 882-- Corpse = "unit-destroyed-3x3-place", 883-- ExplodeWhenKilled = "missile-explosion", 884 Type = "land", 885 StartingResources = {500, 1000}, 886 NumDirections = 1, 887 Building = false, VisibleUnderFog = true, 888 GivesResource = "gold", CanHarvest = true, 889 HarvestFromOutside = true, 890 Variations = { 891 { 892 "variation-id", "1", 893 "resource-min", 501 894 }, 895 { 896 "variation-id", "2", 897 "resource-min", 501, 898 "file", "neutral/buildings/gold_rock_2.png", 899 "shadow-file", "neutral/buildings/gold_rock_2_shadow.png" 900 }, 901 { 902 "variation-id", "3", 903 "resource-min", 501, 904 "file", "neutral/buildings/gold_rock_3.png", 905 "shadow-file", "neutral/buildings/gold_rock_3_shadow.png" 906 }, 907 { 908 "variation-id", "4", 909 "resource-min", 501, 910 "file", "neutral/buildings/gold_rock_4.png", 911 "shadow-file", "neutral/buildings/gold_rock_4_shadow.png" 912 }, 913 { 914 "variation-id", "small-1", 915 "resource-max", 500, 916 "file", "neutral/buildings/gold_rock_small_1.png", 917 "shadow-file", "neutral/buildings/gold_rock_small_1_shadow.png" 918 }, 919 { 920 "variation-id", "small-2", 921 "resource-max", 500, 922 "file", "neutral/buildings/gold_rock_small_2.png", 923 "shadow-file", "neutral/buildings/gold_rock_small_2_shadow.png" 924 }, 925 { 926 "variation-id", "small-3", 927 "resource-max", 500, 928 "file", "neutral/buildings/gold_rock_small_3.png", 929 "shadow-file", "neutral/buildings/gold_rock_small_3_shadow.png" 930 }, 931 { 932 "variation-id", "small-4", 933 "resource-max", 500, 934 "file", "neutral/buildings/gold_rock_small_4.png", 935 "shadow-file", "neutral/buildings/gold_rock_small_4_shadow.png" 936 } 937 }, 938 Sounds = { 939 "selected", "metal-selected", 940-- "acknowledge", "gold-mine-acknowledge", 941-- "ready", "gold-mine-ready", 942-- "help", "gold-mine-help", 943-- "dead", "building-destroyed" 944 } 945} ) 946 947DefineUnitType("unit-silver-rock", { 948 Name = "Silver Rock", 949 Image = {"file", "neutral/buildings/silver_rock_1.png", "size", {43, 43}}, 950 Shadow = {"file", "neutral/buildings/silver_rock_1_shadow.png", "size", {43, 43}}, 951 Animations = "animations-building", Icon = "icon-silver-rock", 952 Offset = {0, -2}, 953 NeutralMinimapColor = {255, 255, 0}, 954 Costs = {"time", 150}, 955 HitPoints = 25500, 956 DrawLevel = 40, 957 TileSize = {1, 1}, BoxSize = {31, 31}, 958 SightRange = 1, 959 Armor = 20, Missile = "missile-none", 960 Priority = 0, 961-- Corpse = "unit-destroyed-3x3-place", 962 Type = "land", 963 StartingResources = {1000}, 964 NumDirections = 1, 965 Building = false, VisibleUnderFog = true, 966 GivesResource = "silver", CanHarvest = true, 967 HarvestFromOutside = true, 968 Variations = { 969 { 970 "variation-id", "1" 971 }, 972 { 973 "variation-id", "2", 974 "file", "neutral/buildings/silver_rock_2.png", 975 "shadow-file", "neutral/buildings/silver_rock_2_shadow.png" 976 }, 977 { 978 "variation-id", "3", 979 "file", "neutral/buildings/silver_rock_3.png", 980 "shadow-file", "neutral/buildings/silver_rock_3_shadow.png" 981 }, 982 { 983 "variation-id", "4", 984 "file", "neutral/buildings/silver_rock_4.png", 985 "shadow-file", "neutral/buildings/silver_rock_4_shadow.png" 986 } 987 }, 988 Sounds = { 989 "selected", "metal-selected", 990-- "acknowledge", "gold-mine-acknowledge", 991-- "ready", "gold-mine-ready", 992-- "help", "gold-mine-help", 993-- "dead", "building-destroyed" 994 } 995} ) 996 997DefineUnitType("unit-copper-rock", { 998 Name = "Copper Rock", 999 Image = {"file", "neutral/buildings/copper_rock_1.png", "size", {43, 43}}, 1000 Shadow = {"file", "neutral/buildings/copper_rock_1_shadow.png", "size", {43, 43}}, 1001 Animations = "animations-building", Icon = "icon-copper-rock", 1002 Offset = {0, -2}, 1003 NeutralMinimapColor = {255, 255, 0}, 1004 Costs = {"time", 150}, 1005 HitPoints = 25500, 1006 DrawLevel = 40, 1007 TileSize = {1, 1}, BoxSize = {31, 31}, 1008 SightRange = 1, 1009 Armor = 20, Missile = "missile-none", 1010 Priority = 0, 1011-- Corpse = "unit-destroyed-3x3-place", 1012 Type = "land", 1013 StartingResources = {1000}, 1014 NumDirections = 1, 1015 Building = false, VisibleUnderFog = true, 1016 GivesResource = "copper", CanHarvest = true, 1017 HarvestFromOutside = true, 1018 Variations = { 1019 { 1020 "variation-id", "1" 1021 }, 1022 { 1023 "variation-id", "2", 1024 "file", "neutral/buildings/copper_rock_2.png", 1025 "shadow-file", "neutral/buildings/copper_rock_2_shadow.png" 1026 }, 1027 { 1028 "variation-id", "3", 1029 "file", "neutral/buildings/copper_rock_3.png", 1030 "shadow-file", "neutral/buildings/copper_rock_3_shadow.png" 1031 }, 1032 { 1033 "variation-id", "4", 1034 "file", "neutral/buildings/copper_rock_4.png", 1035 "shadow-file", "neutral/buildings/copper_rock_4_shadow.png" 1036 } 1037 }, 1038 Sounds = { 1039 "selected", "metal-selected", 1040-- "acknowledge", "gold-mine-acknowledge", 1041-- "ready", "gold-mine-ready", 1042-- "help", "gold-mine-help", 1043-- "dead", "building-destroyed" 1044 } 1045} ) 1046 1047DefineUnitType("unit-diamond-rock", { 1048 Name = "Diamond Rock", 1049 Image = {"file", "neutral/buildings/diamond_rock_1.png", "size", {43, 43}}, 1050 Shadow = {"file", "neutral/buildings/copper_rock_1_shadow.png", "size", {43, 43}}, 1051 Animations = "animations-building", Icon = "icon-diamond-rock", 1052 Offset = {0, -2}, 1053 NeutralMinimapColor = {255, 255, 0}, 1054 Costs = {"time", 150}, 1055 HitPoints = 25500, 1056 DrawLevel = 40, 1057 TileSize = {1, 1}, BoxSize = {31, 31}, 1058 SightRange = 1, 1059 Armor = 20, Missile = "missile-none", 1060 Priority = 0, 1061-- Corpse = "unit-destroyed-3x3-place", 1062 Type = "land", 1063 StartingResources = {1000}, 1064 NumDirections = 1, 1065 Building = false, VisibleUnderFog = true, 1066 GivesResource = "diamonds", CanHarvest = true, 1067 HarvestFromOutside = true, 1068 Variations = { 1069 { 1070 "variation-id", "1" 1071 }, 1072 { 1073 "variation-id", "2", 1074 "file", "neutral/buildings/diamond_rock_2.png", 1075 "shadow-file", "neutral/buildings/copper_rock_2_shadow.png" 1076 }, 1077 { 1078 "variation-id", "3", 1079 "file", "neutral/buildings/diamond_rock_3.png", 1080 "shadow-file", "neutral/buildings/copper_rock_3_shadow.png" 1081 }, 1082 { 1083 "variation-id", "4", 1084 "file", "neutral/buildings/diamond_rock_4.png", 1085 "shadow-file", "neutral/buildings/copper_rock_4_shadow.png" 1086 } 1087 }, 1088 Sounds = { 1089 "selected", "metal-selected", 1090-- "acknowledge", "gold-mine-acknowledge", 1091-- "ready", "gold-mine-ready", 1092-- "help", "gold-mine-help", 1093-- "dead", "building-destroyed" 1094 } 1095} ) 1096 1097DefineUnitType("unit-emerald-rock", { 1098 Name = "Emerald Rock", 1099 Image = {"file", "neutral/buildings/emerald_rock_1.png", "size", {43, 43}}, 1100 Shadow = {"file", "neutral/buildings/gold_rock_1_shadow.png", "size", {43, 43}}, 1101 Animations = "animations-building", Icon = "icon-emerald-rock", 1102 Offset = {0, -2}, 1103 NeutralMinimapColor = {255, 255, 0}, 1104 Costs = {"time", 150}, 1105 HitPoints = 25500, 1106 DrawLevel = 40, 1107 TileSize = {1, 1}, BoxSize = {31, 31}, 1108 SightRange = 1, 1109 Armor = 20, Missile = "missile-none", 1110 Priority = 0, 1111-- Corpse = "unit-destroyed-3x3-place", 1112 Type = "land", 1113 StartingResources = {1000}, 1114 NumDirections = 1, 1115 Building = false, VisibleUnderFog = true, 1116 GivesResource = "emeralds", CanHarvest = true, 1117 HarvestFromOutside = true, 1118 Variations = { 1119 { 1120 "variation-id", "1" 1121 }, 1122 { 1123 "variation-id", "2", 1124 "file", "neutral/buildings/emerald_rock_2.png", 1125 "shadow-file", "neutral/buildings/gold_rock_2_shadow.png" 1126 }, 1127 { 1128 "variation-id", "3", 1129 "file", "neutral/buildings/emerald_rock_3.png", 1130 "shadow-file", "neutral/buildings/gold_rock_3_shadow.png" 1131 }, 1132 { 1133 "variation-id", "4", 1134 "file", "neutral/buildings/emerald_rock_4.png", 1135 "shadow-file", "neutral/buildings/gold_rock_4_shadow.png" 1136 } 1137 }, 1138 Sounds = { 1139 "selected", "metal-selected", 1140-- "acknowledge", "gold-mine-acknowledge", 1141-- "ready", "gold-mine-ready", 1142-- "help", "gold-mine-help", 1143-- "dead", "building-destroyed" 1144 } 1145} ) 1146 1147DefineUnitType("unit-wood-pile", { 1148 Name = "Wood Pile", 1149 Image = {"file", "neutral/buildings/wood_pile_1.png", "size", {43, 43}}, 1150 Animations = "animations-building", Icon = "icon-wood-pile", 1151 NeutralMinimapColor = {165, 42, 42}, 1152 Costs = {"time", 150}, 1153 HitPoints = 25500, 1154 DrawLevel = 40, 1155 TileSize = {1, 1}, BoxSize = {31, 31}, 1156 SightRange = 1, 1157 Armor = 20, Missile = "missile-none", 1158 Priority = 0, 1159-- Corpse = "unit-destroyed-3x3-place", 1160 Type = "land", 1161 StartingResources = {400}, 1162 NumDirections = 1, 1163 Building = false, VisibleUnderFog = true, 1164 GivesResource = "lumber", CanHarvest = true, 1165 HarvestFromOutside = true, 1166 Variations = { 1167 { 1168 "variation-id", "1" 1169 }, 1170 { 1171 "variation-id", "2", 1172 "file", "neutral/buildings/wood_pile_2.png" 1173 }, 1174 { 1175 "variation-id", "3", 1176 "file", "neutral/buildings/wood_pile_3.png" 1177 }, 1178 { 1179 "variation-id", "4", 1180 "file", "neutral/buildings/wood_pile_4.png" 1181 } 1182 }, 1183 Sounds = { 1184 "selected", "tree-selected", 1185-- "acknowledge", "gold-mine-acknowledge", 1186-- "ready", "gold-mine-ready", 1187-- "help", "gold-mine-help", 1188-- "dead", "building-destroyed" 1189 } 1190} ) 1191 1192DefineUnitType("unit-stone-pile", { 1193 Name = "Stone Pile", 1194 Image = {"file", "neutral/buildings/stone_pile.png", "size", {43, 43}}, 1195 Shadow = {"file", "neutral/buildings/stone_pile_shadow.png", "size", {43, 43}}, 1196 Animations = "animations-decoration", Icon = "icon-stone-pile", 1197 NeutralMinimapColor = {92, 92, 92}, 1198 Costs = {"time", 150}, 1199 HitPoints = 25500, 1200 DrawLevel = 40, 1201 TileSize = {1, 1}, BoxSize = {31, 31}, 1202 SightRange = 1, 1203 Armor = 20, Missile = "missile-none", 1204 Priority = 0, 1205-- Corpse = "unit-destroyed-3x3-place", 1206 Type = "land", 1207-- StartingResources = {200, 400}, 1208 StartingResources = {400}, 1209 NumDirections = 1, 1210 Building = false, VisibleUnderFog = true, 1211 GivesResource = "stone", CanHarvest = true, 1212 HarvestFromOutside = true, 1213 Variations = { 1214 { 1215 "variation-id", "1", 1216 "resource-min", 201 1217 }, 1218 { 1219 "variation-id", "2", 1220 "resource-min", 201 1221 }, 1222 { 1223 "variation-id", "3", 1224 "resource-min", 201 1225 }, 1226 { 1227 "variation-id", "4", 1228 "resource-min", 201 1229 }, 1230 { 1231 "variation-id", "small-1", 1232 "resource-max", 200 1233 }, 1234 { 1235 "variation-id", "small-2", 1236 "resource-max", 200 1237 }, 1238 { 1239 "variation-id", "small-3", 1240 "resource-max", 200 1241 }, 1242 { 1243 "variation-id", "small-4", 1244 "resource-max", 200 1245 } 1246 }, 1247 Sounds = { 1248 "selected", "click", 1249-- "acknowledge", "gold-mine-acknowledge", 1250-- "ready", "gold-mine-ready", 1251-- "help", "gold-mine-help", 1252-- "dead", "building-destroyed" 1253 } 1254} ) 1255 1256DefineUnitType("unit-template-lair", { 1257 Name = "Lair", 1258 Parent = "unit-template-base-deposit", 1259 Inexhaustible = true, 1260 HitPoints = 800 1261} ) 1262 1263DefineUnitType("unit-template-hunting-lodge", { 1264 Name = "Hunting Lodge", 1265 Parent = "unit-template-base-mine", 1266 Inexhaustible = true, 1267 MaxHarvesters = 3 1268} ) 1269 1270DefineUnitType("unit-yale-cave", { 1271 Name = "Yale Cave", 1272 Parent = "unit-template-lair", 1273 Description = "Yales shelter in the caves and under the cliffs of the rocky world of Nidavellir.", 1274 Image = {"file", "neutral/buildings/yale_cave.png", "size", {96, 96}}, 1275 Shadow = {"file", "neutral/buildings/yale_cave_shadow.png", "size", {96, 96}}, 1276 Icon = "icon-yale-cave", 1277 GivesResource = "leather", 1278 SpawnUnits = {"unit-yale"}, 1279 Sounds = { 1280 "selected", "yale-pen-selected" 1281 } 1282} ) 1283 1284DefineUnitType("unit-yale-hunting-lodge", { 1285 Name = "Yale Hunting Lodge", 1286 Parent = "unit-template-hunting-lodge", 1287 Class = "yale-hunting-lodge", 1288 Civilization = "neutral", 1289 Description = "Before the development of farming, the dwarves of Nidavellir hunted and foraged to survive. Yales were one of the principal animals hunted by them, providing food for nourishment and leather for clothing.", 1290 Image = {"file", "neutral/buildings/yale_hunting_lodge.png", "size", {96, 96}}, 1291 Shadow = {"file", "neutral/buildings/yale_hunting_lodge_shadow.png", "size", {96, 96}}, 1292 Icon = "icon-yale-hunting-lodge", 1293 Costs = {"time", 200, "lumber", 2050}, 1294 Supply = 6, 1295 BuildingRules = { "and", { "ontop", { Type = "unit-yale-cave", ReplaceOnDie = true, ReplaceOnBuild = true } } }, 1296 GivesResource = "leather", 1297 BuildingRulesString = "Must be built on top of a Yale Cave", 1298 Variations = { 1299 { 1300 "variation-id", "yale-hunting-lodge", 1301 "upgrade-forbidden", "upgrade-dwarven-civilization" 1302 }, 1303 { 1304 "variation-id", "dwarven-yale-hunting-lodge", 1305 "file", "dwarf/buildings/yale_hunting_lodge.png", 1306 "icon", "icon-dwarven-yale-hunting-lodge", 1307 "upgrade-required", "upgrade-dwarven-civilization", 1308 "terrain-forbidden", "snow", 1309 "forbidden-season", "winter" 1310 }, 1311 { 1312 "variation-id", "dwarven-yale-hunting-lodge-snow-winter", 1313 "file", "dwarf/buildings/yale_hunting_lodge_snow.png", 1314 "icon", "icon-dwarven-yale-hunting-lodge", 1315 "upgrade-required", "upgrade-dwarven-civilization", 1316 "terrain", "dirt", 1317 "terrain", "dry-mud", 1318 "terrain", "grass", 1319 "terrain", "snow", 1320 "season", "winter" 1321 }, 1322 { 1323 "variation-id", "dwarven-yale-hunting-lodge-snow", 1324 "file", "dwarf/buildings/yale_hunting_lodge_snow.png", 1325 "icon", "icon-dwarven-yale-hunting-lodge", 1326 "upgrade-required", "upgrade-dwarven-civilization", 1327 "terrain", "snow" 1328 } 1329 }, 1330 Sounds = { 1331 "selected", "yale-pen-selected" 1332 } 1333} ) 1334 1335DefineUnitType("unit-tree-stump", { 1336 Name = "Tree Stump", 1337 Image = {"file", "neutral/buildings/tree_stump.png", "size", {72, 72}}, 1338 NeutralMinimapColor = {128, 128, 0}, 1339 Animations = "animations-tree-stump", Icon = "icon-tree-stump", 1340 HitPoints = 20, 1341 DrawLevel = 30, 1342 TileSize = {2, 2}, BoxSize = {63, 63}, 1343 SightRange = 1, 1344 Armor = 2, Missile = "missile-none", 1345 Type = "land", 1346 CanTargetLand = true, CanTargetSea = true, CanTargetAir = true, 1347 NumDirections = 1, 1348 BoardSize = 100, -- to prevent this unit from being loaded into transporters 1349 VisibleUnderFog = true, 1350 MaxOnBoard = 1, 1351 CanTransport = {"Organic", "only", "Mounted", "false"}, 1352 SaveCargo = true, 1353 StartingResources = {200}, 1354 GivesResource = "lumber", CanHarvest = true, 1355 HarvestFromOutside = true, 1356 Building = true, 1357 RightMouseAction = "rally-point", 1358 Variations = { 1359 { 1360 "variation-id", "1" 1361 }, 1362 { 1363 "variation-id", "2", 1364 "file", "neutral/buildings/tree_stump_2.png" 1365 }, 1366 { 1367 "variation-id", "3", 1368 "file", "neutral/buildings/tree_stump_3.png" 1369 }, 1370 { 1371 "variation-id", "4", 1372 "file", "neutral/buildings/tree_stump_4.png" 1373 }, 1374 { 1375 "variation-id", "5", 1376 "file", "neutral/buildings/tree_stump_5.png" 1377 } 1378 }, 1379 Sounds = { 1380 "selected", "tree-selected", 1381-- "acknowledge", "dwarven-sentry-tower-acknowledge", 1382-- "ready", "dwarven-sentry-tower-ready", 1383-- "help", "basic-dwarf-voices-help", 1384 "dead", "building-destroyed" 1385 } 1386} ) 1387 1388DefineUnitType("unit-hole", { 1389 Name = "Hole", 1390 Image = {"file", "tilesets/cave/neutral/buildings/hole.png", "size", {64, 64}}, 1391 NeutralMinimapColor = {128, 128, 0}, 1392 Animations = "animations-tree-stump", Icon = "icon-hole", 1393 HitPoints = 50, 1394 DrawLevel = 30, 1395 TileSize = {2, 2}, BoxSize = {63, 63}, 1396 SightRange = 1, 1397 Armor = 5, Missile = "missile-none", 1398 Type = "land", 1399 CanTargetLand = true, CanTargetSea = true, CanTargetAir = true, 1400 NumDirections = 1, 1401 BoardSize = 100, -- to prevent this unit from being loaded into transporters 1402 VisibleUnderFog = true, 1403 MaxOnBoard = 1, 1404 CanTransport = {"Organic", "only", "Mounted", "false"}, 1405 SaveCargo = true, 1406 Sounds = { 1407 "selected", "click", 1408-- "acknowledge", "dwarven-sentry-tower-acknowledge", 1409-- "ready", "dwarven-sentry-tower-ready", 1410-- "help", "basic-dwarf-voices-help", 1411 "dead", "building-destroyed" 1412 } 1413} ) 1414 1415DefineUnitType("unit-cavern-entrance", { 1416 Name = "Cavern Entrance", 1417 Image = {"file", "neutral/buildings/cavern_entrance.png", "size", {96, 96}}, 1418 Shadow = {"file", "neutral/buildings/cavern_entrance_shadow.png", "size", {96, 96}}, 1419 Animations = "animations-building", Icon = "icon-cavern-entrance", 1420 Description = "Cavern entrances connect different surface levels.", 1421 NeutralMinimapColor = {128, 128, 0}, 1422 Costs = {"time", 150}, 1423 HitPoints = 25500, 1424 DrawLevel = 40, 1425 TileSize = {3, 3}, BoxSize = {95, 95}, 1426 SightRange = 1, 1427 Armor = 20, Missile = "missile-none", 1428 Priority = 0, 1429 Type = "land", 1430 NumDirections = 1, 1431 BoardSize = 100, -- to prevent this unit from being loaded into transporters 1432 VisibleUnderFog = true, 1433 Indestructible = true, 1434 Building = true, 1435 Variations = { 1436 { 1437 "variation-id", "gray" 1438 }, 1439 { 1440 "variation-id", "brown", 1441 "file", "neutral/buildings/cavern_entrance_brown.png", 1442 "icon", "icon-cavern-entrance-brown" 1443 } 1444 }, 1445 Sounds = { 1446 "selected", "click" 1447 } 1448} ) 1449 1450DefineUnitType("unit-portal", { 1451 Name = "Portal", 1452 Image = {"file", "neutral/buildings/portal_frame.png", "size", {96, 96}}, 1453 LightImage = {"file", "neutral/buildings/portal.png"}, 1454 Animations = "animations-portal", Icon = "icon-portal", 1455 Description = "Portals establish a link between different worlds or planes, though they are invisible to all but those who have attuned themselves to that which is magical.", 1456 NeutralMinimapColor = {128, 128, 0}, 1457 Costs = {"time", 150}, 1458 HitPoints = 0, 1459 DrawLevel = 10, 1460 TileSize = {3, 3}, BoxSize = {95, 95}, 1461 SightRange = 1, 1462 Armor = 20, Missile = "missile-none", 1463 Priority = 0, 1464 Type = "land", 1465 NumDirections = 1, 1466 BoardSize = 100, -- to prevent this unit from being loaded into transporters 1467-- VisibleUnderFog = true, 1468 Indestructible = true, 1469 Ethereal = true, 1470 NonSolid = true, 1471 Sounds = { 1472 "selected", "click" 1473 } 1474} ) 1475 1476DefineUnitType("unit-water-portal", { 1477 Name = "Portal", 1478 Image = {"file", "neutral/buildings/portal_frame.png", "size", {96, 96}}, 1479 LightImage = {"file", "neutral/buildings/portal.png"}, 1480 Animations = "animations-portal", Icon = "icon-portal", 1481 NeutralMinimapColor = {128, 128, 0}, 1482 Costs = {"time", 150}, 1483 HitPoints = 0, 1484 DrawLevel = 10, 1485 TileSize = {3, 3}, BoxSize = {95, 95}, 1486 SightRange = 1, 1487 Armor = 20, Missile = "missile-none", 1488 Priority = 0, 1489 Type = "naval", 1490 NumDirections = 1, 1491 BoardSize = 100, -- to prevent this unit from being loaded into transporters 1492-- VisibleUnderFog = true, 1493 Indestructible = true, 1494 Ethereal = true, 1495 NonSolid = true, 1496 Sounds = { 1497 "selected", "click" 1498 } 1499} ) 1500 1501DefineUnitType("unit-mushroom", { 1502 Name = "Mushroom", 1503 Image = {"file", "neutral/decorations/mushroom.png", "size", {32, 32}}, 1504 Animations = "animations-mushroom-patch", Icon = "icon-mushroom", 1505 HitPoints = 0, 1506 DrawLevel = 5, 1507 TileSize = {1, 1}, BoxSize = {31, 31}, 1508 SightRange = 0, 1509 Missile = "missile-none", 1510 Priority = 0, 1511 Type = "land", 1512 IsNotSelectable = true, 1513 Decoration = true, 1514 NumDirections = 1, 1515 Indestructible = true, 1516 VisibleUnderFog = true, 1517 Diminutive = true, 1518 Variations = { 1519 { 1520 "variation-id", "red" 1521 }, 1522 { 1523 "variation-id", "orange" 1524 }, 1525 { 1526 "variation-id", "green" 1527 }, 1528 { 1529 "variation-id", "yellow" 1530 } 1531 }, 1532 Sounds = {} 1533}) 1534 1535DefineUnitType("unit-mushroom-patch", { 1536 Name = "Mushroom Patch", 1537 Image = {"file", "neutral/decorations/mushrooms.png", "size", {32, 32}}, 1538 Animations = "animations-mushroom-patch", Icon = "icon-mushroom", 1539 HitPoints = 0, 1540 DrawLevel = 5, 1541 TileSize = {1, 1}, BoxSize = {31, 31}, 1542 SightRange = 0, 1543 Missile = "missile-none", 1544 Priority = 0, 1545 Type = "land", 1546 IsNotSelectable = true, 1547 Decoration = true, 1548 NumDirections = 1, 1549 Indestructible = true, 1550 VisibleUnderFog = true, 1551 Diminutive = true, 1552 Variations = { 1553 { 1554 "variation-id", "red" 1555 }, 1556 { 1557 "variation-id", "orange" 1558 }, 1559 { 1560 "variation-id", "green" 1561 }, 1562 { 1563 "variation-id", "yellow" 1564 } 1565 }, 1566 Sounds = {} 1567}) 1568 1569DefineUnitType("unit-flowers", { 1570 Name = "Flowers", 1571 Image = {"file", "neutral/decorations/flowers.png", "size", {32, 32}}, 1572 Animations = "animations-building", Icon = "icon-flowers", 1573 HitPoints = 0, 1574 DrawLevel = 5, 1575 TileSize = {1, 1}, BoxSize = {31, 31}, 1576 SightRange = 0, 1577 Missile = "missile-none", 1578 Priority = 0, 1579 Type = "land", 1580 IsNotSelectable = true, 1581 Decoration = true, 1582 NumDirections = 1, 1583 Indestructible = true, 1584 VisibleUnderFog = true, 1585 Diminutive = true, 1586 Vegetable = true, 1587 Variations = { 1588 { 1589 "variation-id", "forest", 1590 "terrain", "grass", 1591 "terrain", "dirt", 1592 "terrain", "snow" 1593 }, 1594 { 1595 "variation-id", "swamp", 1596 "file", "neutral/decorations/flowers_swamp_1.png", 1597 "terrain", "dry-mud", 1598 "terrain", "mud", 1599 "terrain", "cave-floor", 1600 "terrain", "rockbound-cave-floor" 1601 }, 1602 { 1603 "variation-id", "swamp", 1604 "file", "neutral/decorations/flowers_swamp_2.png", 1605 "terrain", "dry-mud", 1606 "terrain", "mud", 1607 "terrain", "cave-floor", 1608 "terrain", "rockbound-cave-floor" 1609 }, 1610 { 1611 "variation-id", "swamp", 1612 "file", "neutral/decorations/flowers_swamp_3.png", 1613 "terrain", "dry-mud", 1614 "terrain", "mud", 1615 "terrain", "cave-floor", 1616 "terrain", "rockbound-cave-floor" 1617 } 1618 }, 1619 Sounds = {} 1620} ) 1621 1622DefineUnitType("unit-large-flower", { 1623 Name = "Large Flower", 1624 Image = {"file", "neutral/decorations/large_flower_1.png", "size", {32, 32}}, 1625 Animations = "animations-building", Icon = "icon-large-flower", 1626 HitPoints = 0, 1627 DrawLevel = 5, 1628 TileSize = {1, 1}, BoxSize = {31, 31}, 1629 SightRange = 0, 1630 Missile = "missile-none", 1631 Priority = 0, 1632 Type = "land", 1633 IsNotSelectable = true, 1634 Decoration = true, 1635 NumDirections = 1, 1636 Indestructible = true, 1637 VisibleUnderFog = true, 1638 Diminutive = true, 1639 Vegetable = true, 1640 Variations = { 1641 { 1642 "variation-id", "forest", 1643 "terrain", "grass", 1644 "terrain", "dirt", 1645 "terrain", "snow" 1646 }, 1647 { 1648 "variation-id", "forest", 1649 "file", "neutral/decorations/large_flower_2.png", 1650 "terrain", "grass", 1651 "terrain", "dirt", 1652 "terrain", "snow" 1653 }, 1654 { 1655 "variation-id", "forest", 1656 "file", "neutral/decorations/large_flower_3.png", 1657 "terrain", "grass", 1658 "terrain", "dirt", 1659 "terrain", "snow" 1660 }, 1661 { 1662 "variation-id", "swamp", 1663 "file", "neutral/decorations/large_flower_swamp_1.png", 1664 "terrain", "dry-mud", 1665 "terrain", "mud", 1666 "terrain", "cave-floor", 1667 "terrain", "rockbound-cave-floor" 1668 }, 1669 { 1670 "variation-id", "swamp", 1671 "file", "neutral/decorations/large_flower_swamp_2.png", 1672 "terrain", "dry-mud", 1673 "terrain", "mud", 1674 "terrain", "cave-floor", 1675 "terrain", "rockbound-cave-floor" 1676 }, 1677 { 1678 "variation-id", "swamp", 1679 "file", "neutral/decorations/large_flower_swamp_3.png", 1680 "terrain", "dry-mud", 1681 "terrain", "mud", 1682 "terrain", "cave-floor", 1683 "terrain", "rockbound-cave-floor" 1684 }, 1685 { 1686 "variation-id", "swamp", 1687 "file", "neutral/decorations/large_flower_swamp_4.png", 1688 "terrain", "dry-mud", 1689 "terrain", "mud", 1690 "terrain", "cave-floor", 1691 "terrain", "rockbound-cave-floor" 1692 }, 1693 { 1694 "variation-id", "swamp", 1695 "file", "neutral/decorations/large_flower_swamp_5.png", 1696 "terrain", "dry-mud", 1697 "terrain", "mud", 1698 "terrain", "cave-floor", 1699 "terrain", "rockbound-cave-floor" 1700 }, 1701 { 1702 "variation-id", "swamp", 1703 "file", "neutral/decorations/large_flower_swamp_6.png", 1704 "terrain", "dry-mud", 1705 "terrain", "mud", 1706 "terrain", "cave-floor", 1707 "terrain", "rockbound-cave-floor" 1708 }, 1709 { 1710 "variation-id", "swamp", 1711 "file", "neutral/decorations/large_flower_swamp_7.png", 1712 "terrain", "dry-mud", 1713 "terrain", "mud", 1714 "terrain", "cave-floor", 1715 "terrain", "rockbound-cave-floor" 1716 }, 1717 { 1718 "variation-id", "swamp", 1719 "file", "neutral/decorations/large_flower_swamp_8.png", 1720 "terrain", "dry-mud", 1721 "terrain", "mud", 1722 "terrain", "cave-floor", 1723 "terrain", "rockbound-cave-floor" 1724 }, 1725 { 1726 "variation-id", "swamp", 1727 "file", "neutral/decorations/large_flower_swamp_9.png", 1728 "terrain", "dry-mud", 1729 "terrain", "mud", 1730 "terrain", "cave-floor", 1731 "terrain", "rockbound-cave-floor" 1732 }, 1733 { 1734 "variation-id", "swamp", 1735 "file", "neutral/decorations/large_flower_swamp_10.png", 1736 "terrain", "dry-mud", 1737 "terrain", "mud", 1738 "terrain", "cave-floor", 1739 "terrain", "rockbound-cave-floor" 1740 }, 1741 { 1742 "variation-id", "swamp", 1743 "file", "neutral/decorations/large_flower_swamp_11.png", 1744 "terrain", "dry-mud", 1745 "terrain", "mud", 1746 "terrain", "cave-floor", 1747 "terrain", "rockbound-cave-floor" 1748 }, 1749 { 1750 "variation-id", "swamp", 1751 "file", "neutral/decorations/large_flower_swamp_12.png", 1752 "terrain", "dry-mud", 1753 "terrain", "mud", 1754 "terrain", "cave-floor", 1755 "terrain", "rockbound-cave-floor" 1756 } 1757 }, 1758 Sounds = {} 1759} ) 1760 1761DefineUnitType("unit-fern", { Name = "Fern", 1762 Image = {"file", "neutral/decorations/fern.png", "size", {48, 48}}, 1763 Animations = "animations-building", Icon = "icon-fern", 1764 HitPoints = 0, 1765 DrawLevel = 5, 1766 TileSize = {1, 1}, BoxSize = {31, 31}, 1767 SightRange = 0, 1768 Missile = "missile-none", 1769 Priority = 0, 1770 Type = "land", 1771 IsNotSelectable = true, 1772 Decoration = true, 1773 NumDirections = 1, 1774 Indestructible = true, 1775 VisibleUnderFog = true, 1776 Diminutive = true, 1777 Vegetable = true, 1778 Variations = { 1779 { 1780 "variation-id", "forest", 1781 "terrain", "grass", 1782 "terrain", "dirt", 1783 "terrain", "snow" 1784 }, 1785 { 1786 "variation-id", "swamp", 1787 "file", "neutral/decorations/fern_swamp_1.png", 1788 "terrain", "dry-mud", 1789 "terrain", "mud", 1790 "terrain", "cave-floor", 1791 "terrain", "rockbound-cave-floor" 1792 }, 1793 { 1794 "variation-id", "swamp", 1795 "file", "neutral/decorations/fern_swamp_2.png", 1796 "terrain", "dry-mud", 1797 "terrain", "mud", 1798 "terrain", "cave-floor", 1799 "terrain", "rockbound-cave-floor" 1800 }, 1801 { 1802 "variation-id", "swamp", 1803 "file", "neutral/decorations/fern_swamp_3.png", 1804 "terrain", "dry-mud", 1805 "terrain", "mud", 1806 "terrain", "cave-floor", 1807 "terrain", "rockbound-cave-floor" 1808 }, 1809 { 1810 "variation-id", "swamp", 1811 "file", "neutral/decorations/fern_swamp_4.png", 1812 "terrain", "dry-mud", 1813 "terrain", "mud", 1814 "terrain", "cave-floor", 1815 "terrain", "rockbound-cave-floor" 1816 } 1817 }, 1818 Sounds = {} 1819} ) 1820 1821DefineUnitType("unit-twigs", { 1822 Name = "Twigs", 1823 Image = {"file", "neutral/decorations/twigs.png", "size", {32, 32}}, 1824 Animations = "animations-decoration", Icon = "icon-twigs", 1825 HitPoints = 0, 1826 DrawLevel = 5, 1827 TileSize = {1, 1}, BoxSize = {31, 31}, 1828 SightRange = 0, 1829 Missile = "missile-none", 1830 Priority = 0, 1831 Type = "land", 1832 IsNotSelectable = true, 1833 Decoration = true, 1834 NumDirections = 1, 1835 Indestructible = true, 1836 VisibleUnderFog = true, 1837 Diminutive = true, 1838 Variations = { 1839 { 1840 "variation-id", "1" 1841 }, 1842 { 1843 "variation-id", "2" 1844 }, 1845 { 1846 "variation-id", "3" 1847 }, 1848 { 1849 "variation-id", "4" 1850 }, 1851 { 1852 "variation-id", "5" 1853 }, 1854 { 1855 "variation-id", "6" 1856 }, 1857 { 1858 "variation-id", "7" 1859 }, 1860 { 1861 "variation-id", "8" 1862 }, 1863 { 1864 "variation-id", "9" 1865 }, 1866 { 1867 "variation-id", "10" 1868 }, 1869 { 1870 "variation-id", "11" 1871 }, 1872 { 1873 "variation-id", "12" 1874 }, 1875 { 1876 "variation-id", "13" 1877 }, 1878 { 1879 "variation-id", "14" 1880 }, 1881 { 1882 "variation-id", "15" 1883 }, 1884 { 1885 "variation-id", "16" 1886 }, 1887 { 1888 "variation-id", "17" 1889 }, 1890 { 1891 "variation-id", "18" 1892 }, 1893 { 1894 "variation-id", "19" 1895 }, 1896 { 1897 "variation-id", "20" 1898 }, 1899 { 1900 "variation-id", "21" 1901 }, 1902 { 1903 "variation-id", "22" 1904 }, 1905 { 1906 "variation-id", "23" 1907 }, 1908 { 1909 "variation-id", "24" 1910 }, 1911 { 1912 "variation-id", "25" 1913 } 1914 }, 1915 Sounds = {} } 1916) 1917 1918DefineUnitType("unit-log", { 1919 Name = "Log", 1920 Image = {"file", "neutral/decorations/log.png", "size", {56, 56}}, 1921 Animations = "animations-decoration-old", Icon = "icon-log", 1922 NeutralMinimapColor = {165, 42, 42}, 1923 HitPoints = 20, 1924 DrawLevel = 40, 1925 TileSize = {1, 1}, BoxSize = {31, 31}, 1926 SightRange = 0, 1927 Armor = 2, Missile = "missile-none", 1928 Priority = 0, 1929 Type = "land", 1930 NumDirections = 1, 1931 VisibleUnderFog = true, 1932 StartingResources = {400}, 1933 GivesResource = "lumber", CanHarvest = true, 1934 HarvestFromOutside = true, 1935 Sounds = { 1936 "selected", "tree-selected" 1937 } 1938}) 1939 1940DefineUnitType("unit-bones", { Name = "Bones", 1941 Image = {"file", "neutral/decorations/bones.png", "size", {32, 32}}, 1942 Animations = "animations-decoration", Icon = "icon-bones", 1943 HitPoints = 0, 1944 DrawLevel = 5, 1945 TileSize = {1, 1}, BoxSize = {31, 31}, 1946 SightRange = 0, 1947 Missile = "missile-none", 1948 Priority = 0, 1949 Type = "land", 1950 IsNotSelectable = true, 1951 Decoration = true, 1952 NumDirections = 1, 1953 Indestructible = true, 1954 VisibleUnderFog = true, 1955 Diminutive = true, 1956 Variations = { 1957 { 1958 "variation-id", "1" 1959 }, 1960 { 1961 "variation-id", "2" 1962 }, 1963 { 1964 "variation-id", "3" 1965 }, 1966 { 1967 "variation-id", "4" 1968 } 1969 }, 1970 Sounds = {} } 1971) 1972 1973DefineUnitType("unit-wyrm-skeleton", { 1974 Name = "Wyrm Skeleton", 1975 Image = {"file", "neutral/decorations/wyrm_skeleton.png", "size", {128, 32}}, 1976 Animations = "animations-building", Icon = "icon-wyrm-skeleton", 1977 HitPoints = 0, 1978 DrawLevel = 5, 1979 TileSize = {4, 1}, BoxSize = {127, 31}, 1980 SightRange = 0, 1981 Missile = "missile-none", 1982 Priority = 0, 1983 Type = "land", 1984 IsNotSelectable = true, 1985 Decoration = true, 1986 NumDirections = 1, 1987 Indestructible = true, 1988 VisibleUnderFog = true, 1989 Variations = { 1990 { 1991 "variation-id", "non-horned" 1992 }, 1993 { 1994 "variation-id", "horned", 1995 "file", "neutral/decorations/wyrm_skeleton_horned.png" 1996 } 1997 }, 1998 Sounds = {} } 1999) 2000 2001DefineUnitType("unit-small-rocks", { Name = "Small Rocks", 2002 Image = {"file", "neutral/decorations/small_rocks.png", "size", {32, 32}}, 2003 Animations = "animations-decoration", Icon = "icon-small-rocks", 2004 HitPoints = 0, 2005 DrawLevel = 5, 2006 TileSize = {1, 1}, BoxSize = {31, 31}, 2007 SightRange = 0, 2008 Missile = "missile-none", 2009 Priority = 0, 2010 Type = "land", 2011 IsNotSelectable = true, 2012 Decoration = true, 2013 NumDirections = 1, 2014 Indestructible = true, 2015 VisibleUnderFog = true, 2016 Diminutive = true, 2017 Gravel = true, -- makes them play the gravel step sound when stepped upon 2018 Variations = { 2019 { 2020 "variation-id", "1" 2021 }, 2022 { 2023 "variation-id", "2" 2024 }, 2025 { 2026 "variation-id", "3" 2027 }, 2028 { 2029 "variation-id", "4" 2030 }, 2031 { 2032 "variation-id", "5" 2033 }, 2034 { 2035 "variation-id", "6" 2036 } 2037 }, 2038 Sounds = {} } 2039) 2040 2041DefineUnitType("unit-stalagmites", { 2042 Name = "Stalagmites", 2043 Image = {"file", "neutral/decorations/stalagmites.png", "size", {32, 32}}, 2044 Animations = "animations-decoration", Icon = "icon-stalagmites", 2045 HitPoints = 0, 2046 DrawLevel = 5, 2047 TileSize = {1, 1}, BoxSize = {31, 31}, 2048 SightRange = 0, 2049 Missile = "missile-none", 2050 Priority = 0, 2051 Type = "land", 2052 IsNotSelectable = true, 2053 Decoration = true, 2054 NumDirections = 1, 2055 Indestructible = true, 2056 VisibleUnderFog = true, 2057 Diminutive = true, 2058 Variations = { 2059 { 2060 "variation-id", "1" 2061 }, 2062 { 2063 "variation-id", "2" 2064 }, 2065 { 2066 "variation-id", "3" 2067 }, 2068 { 2069 "variation-id", "4" 2070 } 2071 }, 2072 Sounds = {} } 2073) 2074 2075function VolcanicCraterSpit(unit) -- this is called every second 2076 OrderUnit(GetUnitVariable(unit, "Player"), GetUnitVariable(unit, "Ident"), {GetUnitVariable(unit, "PosX"), GetUnitVariable(unit, "PosY")}, GetUnitVariable(unit, "MapLayer"), nil, nil, "stop") 2077 if (GetCurrentQuest() ~= "the-wyrm") then 2078 if (SyncRand(10) == 0) then -- one chance in thirty to happen (that is, this is going to happen on average once every half minute) 2079 if (SyncRand(2) == 0) then 2080 local target_x = GetUnitVariable(unit,"PosX") + SyncRand(GetUnitVariable(unit,"AttackRange") + GetUnitTypeData(GetUnitVariable(unit, "Ident"), "TileWidth") + GetUnitVariable(unit,"AttackRange")) - GetUnitVariable(unit,"AttackRange") 2081 local target_y = GetUnitVariable(unit,"PosY") + SyncRand(GetUnitVariable(unit,"AttackRange") + GetUnitTypeData(GetUnitVariable(unit, "Ident"), "TileHeight") + GetUnitVariable(unit,"AttackRange")) - GetUnitVariable(unit,"AttackRange") 2082 OrderUnit(GetUnitVariable(unit, "Player"), GetUnitVariable(unit, "Ident"), {GetUnitVariable(unit, "PosX"), GetUnitVariable(unit, "PosY")}, GetUnitVariable(unit, "MapLayer"), {target_x, target_y}, GetUnitVariable(unit, "MapLayer"), "attack-ground") 2083 else 2084 if (GetNumUnitsAt(PlayerNumNeutral, "unit-miasma", {0, 0}, {512, 512}, GetUnitVariable(unit, "MapLayer")) < GetNumUnitsAt(PlayerNumNeutral, "unit-volcanic-crater", {0, 0}, {512, 512}, GetUnitVariable(unit, "MapLayer"))) then 2085 CreateUnit("unit-miasma", PlayerNumNeutral, {GetUnitVariable(unit, "PosX"), GetUnitVariable(unit, "PosY")}, GetUnitVariable(unit, "MapLayer")) 2086 end 2087 end 2088 end 2089 end 2090end 2091 2092DefineUnitType("unit-volcanic-crater", { 2093 Name = "Volcanic Crater", 2094 Image = {"file", "neutral/decorations/volcanic_crater.png", "size", {64, 64}}, 2095 Animations = "animations-volcanic-crater", Icon = "icon-volcanic-crater", 2096 HitPoints = 0, 2097 DrawLevel = 30, 2098 TileSize = {2, 2}, BoxSize = {63, 63}, 2099 SightRange = 0, 2100 FireDamage = 80, Missile = "missile-flaming-catapult-rock", 2101 Priority = 0, 2102 Type = "land", 2103 MaxAttackRange = 2, 2104 GroundAttack = true, 2105 CanAttack = true, 2106 CanTargetLand = true, CanTargetSea = true, 2107 IsNotSelectable = true, 2108 Decoration = true, 2109 NumDirections = 1, 2110 Indestructible = true, 2111 VisibleUnderFog = true, 2112 Accuracy = 0, 2113 OnEachSecond = VolcanicCraterSpit, 2114 Sounds = {} } 2115) 2116 2117DefineUnitType("unit-glyph", { 2118 Name = "Glyph", 2119 Image = {"file", "neutral/buildings/glyph.png", "size", {32, 32}}, 2120 NeutralMinimapColor = {128, 128, 0}, 2121 Animations = "animations-decoration", Icon = "icon-glyph", 2122 HitPoints = 0, 2123 DrawLevel = 4, 2124 TileSize = {1, 1}, BoxSize = {31, 31}, 2125 SightRange = 0, 2126 Missile = "missile-none", 2127 Priority = 0, 2128 Type = "land", 2129 NonSolid = true, 2130 NumDirections = 1, 2131 Indestructible = true, 2132 BoardSize = 100, -- to prevent this unit from being loaded into transporters 2133 VisibleUnderFog = true, 2134 Variations = { 2135 { 2136 "variation-id", "1" 2137 }, 2138 { 2139 "variation-id", "2" 2140 }, 2141 { 2142 "variation-id", "3" 2143 }, 2144 { 2145 "variation-id", "4" 2146 }, 2147 { 2148 "variation-id", "5" 2149 }, 2150 { 2151 "variation-id", "6" 2152 }, 2153 { 2154 "variation-id", "7" 2155 }, 2156 { 2157 "variation-id", "8" 2158 }, 2159 { 2160 "variation-id", "9" 2161 }, 2162 { 2163 "variation-id", "10" 2164 }, 2165 { 2166 "variation-id", "11" 2167 }, 2168 { 2169 "variation-id", "12" 2170 }, 2171 { 2172 "variation-id", "13" 2173 }, 2174 { 2175 "variation-id", "14" 2176 }, 2177 { 2178 "variation-id", "15" 2179 }, 2180 { 2181 "variation-id", "16" 2182 }, 2183 { 2184 "variation-id", "17" 2185 }, 2186 { 2187 "variation-id", "18" 2188 }, 2189 { 2190 "variation-id", "19" 2191 }, 2192 { 2193 "variation-id", "20" 2194 }, 2195 { 2196 "variation-id", "21" 2197 }, 2198 { 2199 "variation-id", "22" 2200 }, 2201 { 2202 "variation-id", "23" 2203 }, 2204 { 2205 "variation-id", "24" 2206 } 2207 }, 2208 Sounds = { 2209 "selected", "click", 2210 "used", "magic-holy", 2211-- "acknowledge", "gold-mine-acknowledge", 2212-- "ready", "gold-mine-ready", 2213-- "help", "gold-mine-help", 2214 "dead", "building-destroyed" 2215 } 2216}) 2217 2218DefineUnitType("unit-stairs", { 2219 Name = "Stairs", 2220 Image = {"file", "neutral/buildings/stairs.png", "size", {32, 32}}, 2221 NeutralMinimapColor = {128, 128, 0}, 2222 Animations = "animations-decoration", Icon = "icon-stairs", 2223 HitPoints = 0, 2224 DrawLevel = 5, 2225 TileSize = {1, 1}, BoxSize = {31, 31}, 2226 SightRange = 0, 2227 Missile = "missile-none", 2228 Priority = 0, 2229 Type = "land", 2230 IsNotSelectable = true, 2231 Decoration = true, 2232 NumDirections = 1, 2233 Indestructible = true, 2234 VisibleUnderFog = true, 2235 NonSolid = true, 2236 Variations = { 2237 { 2238 "variation-id", "1" 2239 }, 2240 { 2241 "variation-id", "2" 2242 } 2243 }, 2244 Sounds = {} } 2245) 2246 2247DefineUnitType("unit-door", { 2248 Name = "Door", 2249 Image = {"file", "tilesets/dungeon/neutral/decorations/door_left.png", "size", {32, 32}}, 2250 Animations = "animations-door", Icon = "icon-door", 2251 NeutralMinimapColor = {128, 128, 0}, 2252 HitPoints = 10, 2253 DrawLevel = 30, 2254 TileSize = {1, 1}, BoxSize = {31, 31}, 2255 SightRange = 1, 2256 Armor = 5, Missile = "missile-none", 2257 Priority = 0, 2258 Type = "land", 2259 NumDirections = 1, 2260 BoardSize = 100, -- to prevent this unit from being loaded into transporters 2261 VisibleUnderFog = true, 2262 Obstacle = true, 2263 AirUnpassable = true, 2264 Variations = { 2265 { 2266 "variation-id", "left" 2267 }, 2268 { 2269 "variation-id", "right", 2270 "file", "tilesets/dungeon/neutral/decorations/door_right.png" 2271 } 2272 }, 2273 Sounds = { 2274 "selected", "click", 2275 "dead", "building-destroyed" 2276 } 2277}) 2278 2279DefineUnitType("unit-shelf", { 2280 Name = "Shelf", 2281 Image = {"file", "neutral/decorations/shelf.png", "size", {32, 32}}, 2282 Animations = "animations-decoration", Icon = "icon-shelf", 2283 HitPoints = 0, 2284 DrawLevel = 5, 2285 TileSize = {1, 1}, BoxSize = {31, 31}, 2286 SightRange = 0, 2287 Missile = "missile-none", 2288 Priority = 0, 2289 Type = "land", 2290 IsNotSelectable = true, 2291 Decoration = true, 2292 NumDirections = 1, 2293 Indestructible = true, 2294 VisibleUnderFog = true, 2295 NonSolid = true, 2296 Variations = { 2297 { 2298 "variation-id", "1" 2299 }, 2300 { 2301 "variation-id", "2" 2302 }, 2303 { 2304 "variation-id", "3" 2305 }, 2306 { 2307 "variation-id", "4" 2308 }, 2309 { 2310 "variation-id", "5" 2311 } 2312 }, 2313 Sounds = {} } 2314) 2315 2316DefineUnitType("unit-outer-wall-decoration", { Name = "Outer Wall Decoration", 2317 Image = {"file", "neutral/decorations/outer_wall_decoration.png", "size", {32, 32}}, 2318 Animations = "animations-decoration", Icon = "icon-outer-wall-decoration", 2319 HitPoints = 0, 2320 DrawLevel = 5, 2321 TileSize = {1, 1}, BoxSize = {31, 31}, 2322 SightRange = 0, 2323 Missile = "missile-none", 2324 Priority = 0, 2325 Type = "land", 2326 IsNotSelectable = true, 2327 Decoration = true, 2328 NumDirections = 1, 2329 Indestructible = true, 2330 VisibleUnderFog = true, 2331 NonSolid = true, 2332 Variations = { 2333 { 2334 "variation-id", "1" 2335 }, 2336 { 2337 "variation-id", "2" 2338 }, 2339 { 2340 "variation-id", "3" 2341 } 2342 }, 2343 Sounds = {} } 2344) 2345 2346DefineUnitType("unit-inner-wall-decoration", { Name = "Inner Wall Decoration", 2347 Image = {"file", "neutral/decorations/inner_wall_decoration.png", "size", {32, 32}}, 2348 Animations = "animations-decoration", Icon = "icon-inner-wall-decoration", 2349 HitPoints = 0, 2350 DrawLevel = 5, 2351 TileSize = {1, 1}, BoxSize = {31, 31}, 2352 SightRange = 0, 2353 Missile = "missile-none", 2354 Priority = 0, 2355 Type = "land", 2356 IsNotSelectable = true, 2357 Decoration = true, 2358 NumDirections = 1, 2359 Indestructible = true, 2360 VisibleUnderFog = true, 2361 NonSolid = true, 2362 Variations = { 2363 { 2364 "variation-id", "1" 2365 }, 2366 { 2367 "variation-id", "2" 2368 }, 2369 { 2370 "variation-id", "3" 2371 } 2372 }, 2373 Sounds = {} } 2374) 2375 2376DefineUnitType("unit-floor-decoration", { Name = "Floor Decoration", 2377 Image = {"file", "neutral/decorations/floor_decoration.png", "size", {32, 32}}, 2378 Animations = "animations-decoration", Icon = "icon-floor-decoration", 2379 HitPoints = 0, 2380 DrawLevel = 5, 2381 TileSize = {1, 1}, BoxSize = {31, 31}, 2382 SightRange = 0, 2383 Missile = "missile-none", 2384 Priority = 0, 2385 Type = "land", 2386 IsNotSelectable = true, 2387 Decoration = true, 2388 NumDirections = 1, 2389 Indestructible = true, 2390 VisibleUnderFog = true, 2391 Diminutive = true, 2392 Variations = { 2393 { 2394 "variation-id", "1" 2395 }, 2396 { 2397 "variation-id", "2" 2398 }, 2399 { 2400 "variation-id", "3" 2401 } 2402 }, 2403 Sounds = {} } 2404) 2405 2406DefineUnitType("unit-dwarven-dead-body", { 2407 Name = "Dead Body", 2408 Image = {"file", "neutral/units/dwarven_corpse.png", "size", {72, 72}}, 2409 Animations = "animations-dead-body", Icon = "icon-dwarven-miner", 2410 HitPoints = 255, 2411 DrawLevel = 30, 2412 TileSize = {1, 1}, BoxSize = {31, 31}, 2413 SightRange = 1, 2414 Missile = "missile-none", 2415 Priority = 0, 2416 Type = "land", 2417 Vanishes = true, 2418 Detritus = true, 2419 Sounds = {} 2420} ) 2421 2422DefineUnitType("unit-gnomish-dead-body", { 2423 Name = "Dead Body", 2424 Image = {"file", "neutral/units/gnomish_goblin_and_kobold_corpses.png", "size", {72, 72}}, 2425 Animations = "animations-gnomish-dead-body", Icon = "icon-dwarven-miner", 2426 HitPoints = 255, 2427 DrawLevel = 30, 2428 TileSize = {1, 1}, BoxSize = {31, 31}, 2429 SightRange = 1, 2430 Missile = "missile-none", 2431 Priority = 0, 2432 Type = "land", 2433 Vanishes = true, 2434 Detritus = true, 2435 Sounds = {} 2436} ) 2437 2438DefineUnitType("unit-goblin-dead-body", { 2439 Name = "Dead Body", 2440 Image = {"file", "neutral/units/gnomish_goblin_and_kobold_corpses.png", "size", {72, 72}}, 2441 Animations = "animations-goblin-dead-body", Icon = "icon-dwarven-miner", 2442 HitPoints = 255, 2443 DrawLevel = 30, 2444 TileSize = {1, 1}, BoxSize = {31, 31}, 2445 SightRange = 1, 2446 Missile = "missile-none", 2447 Priority = 0, 2448 Type = "land", 2449 Vanishes = true, 2450 Detritus = true, 2451 Sounds = {} 2452} ) 2453 2454DefineUnitType("unit-human-dead-body", { 2455 Name = "Dead Body", 2456 Image = {"file", "neutral/units/human_corpse.png", "size", {72, 72}}, 2457 Animations = "animations-dead-body", Icon = "icon-dwarven-miner", 2458 HitPoints = 255, 2459 DrawLevel = 30, 2460 TileSize = {1, 1}, BoxSize = {31, 31}, 2461 SightRange = 1, 2462 Missile = "missile-none", 2463 Priority = 0, 2464 Type = "land", 2465 Vanishes = true, 2466 Detritus = true, 2467 Sounds = {} 2468} ) 2469 2470DefineUnitType("unit-kobold-dead-body", { 2471 Name = "Dead Body", 2472 Image = {"file", "neutral/units/gnomish_goblin_and_kobold_corpses.png", "size", {72, 72}}, 2473 Animations = "animations-kobold-dead-body", Icon = "icon-dwarven-miner", 2474 HitPoints = 255, 2475 DrawLevel = 30, 2476 TileSize = {1, 1}, BoxSize = {31, 31}, 2477 SightRange = 1, 2478 Missile = "missile-none", 2479 Priority = 0, 2480 Type = "land", 2481 Vanishes = true, 2482 Detritus = true, 2483 Sounds = {} 2484} ) 2485 2486DefineUnitType("unit-troll-dead-body", { 2487 Name = "Dead Body", 2488 Image = {"file", "troll/units/corpse.png", "size", {72, 72}}, 2489 Animations = "animations-dead-body", Icon = "icon-dwarven-miner", 2490 HitPoints = 255, 2491 DrawLevel = 30, 2492 TileSize = {1, 1}, BoxSize = {31, 31}, 2493 SightRange = 1, 2494 Missile = "missile-none", 2495 Priority = 0, 2496 Type = "land", 2497 Vanishes = true, 2498 Detritus = true, 2499 Sounds = {} 2500} ) 2501 2502--DefineUnitType("unit-dead-sea-body", { Name = "Dead Body", 2503-- Image = {"file", "neutral/units/corpses.png", "size", {72, 72}}, 2504-- Animations = "animations-dead-sea-body", Icon = "icon-dwarven-miner", 2505-- HitPoints = 255, 2506-- DrawLevel = 30, 2507-- TileSize = {2, 2}, BoxSize = {31, 31}, 2508-- SightRange = 1, 2509-- Missile = "missile-none", 2510-- Priority = 0, 2511-- Type = "naval", 2512-- Vanishes = true, 2513-- Sounds = {} } ) 2514 2515DefineUnitType("unit-raft", { 2516 Name = "Raft", 2517 Image = {"file", "neutral/units/raft.png", "size", {72, 72}}, 2518 Animations = "animations-raft", Icon = "icon-raft", 2519 NeutralMinimapColor = {128, 128, 0}, 2520 HitPoints = 15, 2521 DrawLevel = 30, 2522 TileSize = {1, 1}, BoxSize = {42, 42}, 2523 SightRange = 1, 2524 Missile = "missile-none", 2525 Priority = 0, 2526 Type = "naval", 2527 Bridge = true, 2528 VisibleUnderFog = true, 2529 Sounds = { 2530 "selected", "click", 2531 "dead", "ship-destroyed" 2532 } 2533} ) 2534 2535DefineUnitType("unit-scepter-of-fire", { 2536 Name = "Scepter of Fire", 2537 Image = {"file", "neutral/items/scepter.png", "size", {32, 32}}, 2538 Animations = "animations-item", Icon = "icon-scepter", 2539 NeutralMinimapColor = {255, 255, 0}, 2540 HitPoints = 1, 2541 DrawLevel = 30, 2542 TileSize = {1, 1}, BoxSize = {31, 31}, 2543 SightRange = 1, 2544 Missile = "missile-none", 2545 Priority = 0, 2546 Type = "land", 2547 NumDirections = 1, 2548 Item = true, 2549 Sounds = { 2550 "selected", "click", 2551 "used", "gold-coins" 2552 } 2553} ) 2554 2555DefineUnitType("unit-gold-coins", { 2556 Name = "Gold Coins", 2557 Image = {"file", "neutral/items/gold_coins.png", "size", {12, 13}}, 2558 Animations = "animations-item", Icon = "icon-gold-coins", 2559 NeutralMinimapColor = {255, 255, 0}, 2560 HitPoints = 1, 2561 DrawLevel = 30, 2562 TileSize = {1, 1}, BoxSize = {31, 31}, 2563 SightRange = 1, 2564 Missile = "missile-none", 2565 Priority = 0, 2566 Type = "land", 2567 NumDirections = 1, 2568 PowerUp = true, 2569 GivesResource = "gold", 2570 StartingResources = {5}, 2571 Sounds = { 2572 "selected", "click", 2573 "used", "gold-coins" 2574 } 2575} ) 2576 2577DefineUnitType("unit-gold-sack", { 2578 Name = "Gold Sack", 2579 Image = {"file", "neutral/items/gold_sack.png", "size", {16, 14}}, 2580 Animations = "animations-item", Icon = "icon-gold-sack", 2581 NeutralMinimapColor = {255, 255, 0}, 2582 HitPoints = 1, 2583 DrawLevel = 30, 2584 TileSize = {1, 1}, BoxSize = {31, 31}, 2585 SightRange = 1, 2586 Missile = "missile-none", 2587 Priority = 0, 2588 Type = "land", 2589-- GivesResource = "gold", CanHarvest = true, 2590 NumDirections = 1, 2591 PowerUp = true, 2592 GivesResource = "gold", 2593 StartingResources = {100}, 2594 Sounds = { 2595 "selected", "click", 2596 "used", "gold-coins" 2597 } 2598} ) 2599 2600DefineUnitType("unit-gold-chest", { 2601 Name = "Chest", 2602 Image = {"file", "neutral/items/chest.png", "size", {32, 32}}, 2603 Animations = "animations-gold-chest", Icon = "icon-chest", 2604 NeutralMinimapColor = {255, 255, 0}, 2605 HitPoints = 100, 2606 DrawLevel = 30, 2607 TileSize = {1, 1}, BoxSize = {31, 31}, 2608 SightRange = 1, 2609 Armor = 5, Missile = "missile-none", 2610 Priority = 0, 2611 Type = "land", 2612 NumDirections = 1, 2613 Sounds = { 2614 "selected", "click", 2615 "dead", "building-destroyed"} } ) 2616 2617DefineUnitType("unit-gold-and-gems-chest", { 2618 Name = "Chest", 2619 Image = {"file", "neutral/items/chest.png", "size", {32, 32}}, 2620 Animations = "animations-gold-and-gems-chest", Icon = "icon-chest", 2621 NeutralMinimapColor = {255, 255, 0}, 2622 HitPoints = 100, 2623 DrawLevel = 30, 2624 TileSize = {1, 1}, BoxSize = {31, 31}, 2625 SightRange = 1, 2626 Armor = 5, Missile = "missile-none", 2627 Priority = 0, 2628 Type = "land", 2629 NumDirections = 1, 2630 Sounds = { 2631 "selected", "click", 2632 "dead", "building-destroyed"} } ) 2633 2634DefineUnitType("unit-alchemy-bench", { 2635 Name = "Alchemy Bench", 2636 Image = {"file", "neutral/items/alchemy_bench.png", "size", {32, 32}}, 2637 Animations = "animations-alchemy-bench", Icon = "icon-alchemy-bench", 2638 NeutralMinimapColor = {128, 128, 0}, 2639 HitPoints = 5, 2640 DrawLevel = 30, 2641 TileSize = {1, 1}, BoxSize = {31, 31}, 2642 SightRange = 1, 2643 Armor = 2, Missile = "missile-none", 2644 Priority = 0, 2645 Type = "land", 2646 NumDirections = 1, 2647 ExplodeWhenKilled = "missile-explosion", 2648 DeathExplosion = DeathExplosion, 2649 Obstacle = true, 2650 VisibleUnderFog = true, 2651 Sounds = { 2652 "selected", "click", 2653 "dead", "building-destroyed" 2654 } 2655} ) 2656 2657DefineUnitType("unit-table", { 2658 Name = "Table", 2659 Image = {"file", "neutral/decorations/table.png", "size", {32, 32}}, 2660 Animations = "animations-table", Icon = "icon-table", 2661 NeutralMinimapColor = {128, 128, 0}, 2662 HitPoints = 5, 2663 DrawLevel = 30, 2664 TileSize = {1, 1}, BoxSize = {31, 31}, 2665 SightRange = 1, 2666 Armor = 2, Missile = "missile-none", 2667 Priority = 0, 2668 Type = "land", 2669 NumDirections = 1, 2670 Obstacle = true, 2671 VisibleUnderFog = true, 2672 Variations = { 2673 { 2674 "variation-id", "1" 2675 }, 2676 { 2677 "variation-id", "2" 2678 }, 2679 { 2680 "variation-id", "3" 2681 }, 2682 { 2683 "variation-id", "4" 2684 }, 2685 { 2686 "variation-id", "5" 2687 }, 2688 { 2689 "variation-id", "6" 2690 }, 2691 { 2692 "variation-id", "7" 2693 }, 2694 { 2695 "variation-id", "8" 2696 }, 2697 { 2698 "variation-id", "9" 2699 }, 2700 { 2701 "variation-id", "10" 2702 }, 2703 { 2704 "variation-id", "11" 2705 }, 2706 { 2707 "variation-id", "12" 2708 }, 2709 { 2710 "variation-id", "13" 2711 }, 2712 { 2713 "variation-id", "14" 2714 }, 2715 { 2716 "variation-id", "15" 2717 }, 2718 { 2719 "variation-id", "16" 2720 }, 2721 { 2722 "variation-id", "17" 2723 }, 2724 { 2725 "variation-id", "18" 2726 }, 2727 { 2728 "variation-id", "19" 2729 }, 2730 { 2731 "variation-id", "20" 2732 }, 2733 { 2734 "variation-id", "21" 2735 }, 2736 { 2737 "variation-id", "22" 2738 }, 2739 { 2740 "variation-id", "23" 2741 }, 2742 { 2743 "variation-id", "24" 2744 }, 2745 { 2746 "variation-id", "25" 2747 }, 2748 { 2749 "variation-id", "26" 2750 }, 2751 { 2752 "variation-id", "27" 2753 }, 2754 { 2755 "variation-id", "28" 2756 }, 2757 { 2758 "variation-id", "29" 2759 } 2760 }, 2761 Sounds = { 2762 "selected", "click", 2763 "dead", "building-destroyed" 2764 } 2765} ) 2766 2767DefineUnitType("unit-chair", { 2768 Name = "Chair", 2769 Image = {"file", "neutral/decorations/chair.png", "size", {32, 32}}, 2770 Animations = "animations-chair", Icon = "icon-furniture", 2771 NeutralMinimapColor = {128, 128, 0}, 2772 HitPoints = 3, 2773 DrawLevel = 30, 2774 TileSize = {1, 1}, BoxSize = {31, 31}, 2775 SightRange = 1, 2776 Armor = 2, Missile = "missile-none", 2777 Priority = 0, 2778 Type = "land", 2779 NumDirections = 1, 2780 Obstacle = true, 2781 VisibleUnderFog = true, 2782 Variations = { 2783 { 2784 "variation-id", "1" 2785 }, 2786 { 2787 "variation-id", "2" 2788 }, 2789 { 2790 "variation-id", "3" 2791 }, 2792 { 2793 "variation-id", "4" 2794 } 2795 }, 2796 Sounds = { 2797 "selected", "click", 2798 "dead", "building-destroyed" 2799 } 2800} ) 2801 2802DefineUnitType("unit-bed", { 2803 Name = "Bed", 2804 Image = {"file", "neutral/decorations/bed.png", "size", {32, 32}}, 2805 Animations = "animations-bed", Icon = "icon-bed", 2806 NeutralMinimapColor = {128, 128, 0}, 2807 HitPoints = 5, 2808 DrawLevel = 30, 2809 TileSize = {1, 1}, BoxSize = {31, 31}, 2810 SightRange = 1, 2811 Armor = 2, Missile = "missile-none", 2812 Priority = 0, 2813 Type = "land", 2814 NumDirections = 1, 2815 Obstacle = true, 2816 VisibleUnderFog = true, 2817 Variations = { 2818 { 2819 "variation-id", "1" 2820 }, 2821 { 2822 "variation-id", "2" 2823 } 2824 }, 2825 Sounds = { 2826 "selected", "click", 2827 "dead", "building-destroyed" 2828 } 2829} ) 2830 2831DefineUnitType("unit-potion-of-decay", { 2832 Name = "Potion of Decay", 2833 Image = {"file", "neutral/items/potion_blue.png", "size", {16, 16}}, 2834 Animations = "animations-potion", Icon = "icon-blue-potion", 2835 NeutralMinimapColor = {255, 255, 0}, 2836 HitPoints = 1, 2837 DrawLevel = 30, 2838 TileSize = {1, 1}, BoxSize = {31, 31}, 2839 SightRange = 1, 2840 Missile = "missile-none", 2841 Priority = 0, 2842 Type = "land", 2843 NumDirections = 1, 2844 PowerUp = true, 2845 HitPointHealing = -15, 2846 Sounds = { 2847 "selected", "click", 2848 "used", "potion" 2849 } 2850} ) 2851 2852DefineUnitType("unit-potion-of-slowness", { 2853 Name = "Potion of Slowness", 2854 Image = {"file", "neutral/items/potion_purple.png", "size", {16, 16}}, 2855 Animations = "animations-potion", Icon = "icon-purple-potion", 2856 NeutralMinimapColor = {255, 255, 0}, 2857 HitPoints = 1, 2858 DrawLevel = 30, 2859 TileSize = {1, 1}, BoxSize = {31, 31}, 2860 SightRange = 1, 2861 Missile = "missile-none", 2862 Priority = 0, 2863 Type = "land", 2864 NumDirections = 1, 2865 PowerUp = true, 2866 Slows = true, 2867 Sounds = { 2868 "selected", "click", 2869 "used", "potion" 2870 } 2871} ) 2872 2873DefineUnitType("unit-barrel", { 2874 Name = "Barrel", 2875 Image = {"file", "neutral/items/barrel.png", "size", {32, 32}}, 2876 Animations = "animations-barrel", Icon = "icon-barrel", 2877 NeutralMinimapColor = {128, 128, 0}, 2878 HitPoints = 5, 2879 DrawLevel = 30, 2880 TileSize = {1, 1}, BoxSize = {31, 31}, 2881 SightRange = 1, 2882 Armor = 2, Missile = "missile-none", 2883 Priority = 0, 2884 Type = "land", 2885 NumDirections = 1, 2886 Drops = {"unit-potion-of-healing", "unit-potion-of-decay", "unit-potion-of-slowness"}, 2887 VisibleUnderFog = true, 2888 Obstacle = true, 2889 Variations = { 2890 { 2891 "variation-id", "1" 2892 }, 2893 { 2894 "variation-id", "2", 2895 "file", "neutral/items/barrel_2.png" 2896 } 2897 }, 2898 Sounds = { 2899 "selected", "click", 2900 "dead", "building-destroyed" 2901 } 2902} ) 2903 2904DefineUnitType("unit-explosive-barrel", { 2905 Name = "Explosive Barrel", 2906 Image = {"file", "neutral/items/explosive_barrel.png", "size", {32, 32}}, 2907 Animations = "animations-barrel", Icon = "icon-barrel", 2908 NeutralMinimapColor = {128, 128, 0}, 2909 HitPoints = 5, 2910 DrawLevel = 30, 2911 TileSize = {1, 1}, BoxSize = {31, 31}, 2912 SightRange = 1, 2913 Armor = 2, Missile = "missile-none", 2914 Priority = 0, 2915 Type = "land", 2916 NumDirections = 1, 2917 VisibleUnderFog = true, 2918 Obstacle = true, 2919 ExplodeWhenKilled = "missile-explosion", 2920 DeathExplosion = DeathExplosion, 2921 Sounds = { 2922 "selected", "click", 2923 "dead", "building-destroyed" 2924 } 2925} ) 2926 2927DefineUnitType("unit-gryphon-feather", { 2928 Name = "Gryphon Feather", 2929 Image = {"file", "neutral/items/gryphon_feather.png", "size", {28, 26}}, 2930 Animations = "animations-item", Icon = "icon-gryphon-feather", 2931 NeutralMinimapColor = {255, 255, 0}, 2932 HitPoints = 1, 2933 DrawLevel = 30, 2934 TileSize = {1, 1}, BoxSize = {31, 31}, 2935 SightRange = 1, 2936 Missile = "missile-none", 2937 Priority = 0, 2938 Type = "land", 2939 NumDirections = 1, 2940 Item = true, 2941 Sounds = {} 2942} ) 2943 2944DefineUnitType("unit-caltrops", { 2945 Name = "Caltrops", 2946 Image = {"file", "neutral/items/caltrops.png", "size", {32, 32}}, 2947 Animations = "animations-decoration", Icon = "icon-caltrops", 2948 NeutralMinimapColor = {255, 255, 0}, 2949 HitPoints = 10, 2950 DrawLevel = 30, 2951 TileSize = {1, 1}, BoxSize = {31, 31}, 2952 SightRange = 1, 2953 PiercingDamage = 10, Missile = "missile-none", 2954 Priority = 0, 2955 Type = "land", 2956 NumDirections = 1, 2957 Trap = true, 2958 PierceDamage = true, 2959 Variations = { 2960 { 2961 "variation-id", "1" 2962 }, 2963 { 2964 "variation-id", "2" 2965 }, 2966 { 2967 "variation-id", "3" 2968 }, 2969 { 2970 "variation-id", "4" 2971 }, 2972 { 2973 "variation-id", "5" 2974 }, 2975 { 2976 "variation-id", "6" 2977 } 2978 }, 2979 Sounds = { 2980 "selected", "click" 2981 } 2982} ) 2983 2984DefineUnitType("unit-trap", { 2985 Name = "Trap", 2986 Image = {"file", "neutral/items/trap.png", "size", {32, 32}}, 2987 Animations = "animations-trap", Icon = "icon-trap", 2988 NeutralMinimapColor = {255, 255, 0}, 2989 HitPoints = 15, 2990 DrawLevel = 30, 2991 TileSize = {1, 1}, BoxSize = {31, 31}, 2992 SightRange = 1, 2993 PiercingDamage = 15, Missile = "missile-none", 2994 Priority = 0, 2995 Type = "land", 2996 NumDirections = 1, 2997 Trap = true, 2998 PierceDamage = true, 2999 Sounds = { 3000 "selected", "click", 3001 "hit", "axe-attack" 3002 } 3003} ) 3004 3005DefineUnitType("unit-roaming-fog", { 3006 Name = "Roaming Fog", 3007 Image = {"file", "neutral/decorations/roaming_fog.png", "size", {498, 277}}, 3008 Animations = "animations-roaming-fog", Icon = "icon-roaming-fog", 3009 NeutralMinimapColor = {192, 192, 192}, 3010 Speed = 3, 3011 HitPoints = 1, 3012 DrawLevel = 45, 3013 TileSize = {15, 8}, BoxSize = {497, 276}, 3014 SightRange = 1, 3015 Missile = "missile-none", 3016 MaxAttackRange = 1, 3017 Priority = 37, 3018 Points = 1, 3019 Demand = 1, 3020 Type = "fly", 3021 IsNotSelectable = true, 3022 RightMouseAction = "move", 3023 RandomMovementProbability = 100, 3024 NumDirections = 1, 3025 Diminutive = true, 3026 Transparency = 50, 3027 Decoration = true, 3028 Indestructible = true, 3029 VisibleUnderFog = false, 3030 Sounds = { 3031 "selected", "click", 3032-- "acknowledge", "bat-selected", 3033-- "ready", "bat-selected", 3034-- "help", "critter-help", 3035-- "dead", "rat-dead" 3036 } 3037} ) 3038 3039DefineUnitType("unit-roaming-fog-small", { 3040 Name = "Roaming Fog", 3041 Image = {"file", "neutral/decorations/roaming_fog_small.png", "size", {256, 171}}, 3042 Animations = "animations-roaming-fog", Icon = "icon-roaming-fog", 3043 NeutralMinimapColor = {192, 192, 192}, 3044 Speed = 3, 3045 HitPoints = 1, 3046 DrawLevel = 45, 3047 TileSize = {8, 5}, BoxSize = {255, 169}, 3048 SightRange = 1, 3049 Missile = "missile-none", 3050 MaxAttackRange = 1, 3051 Priority = 37, 3052 Points = 1, 3053 Demand = 1, 3054 Type = "fly", 3055 IsNotSelectable = true, 3056 RightMouseAction = "move", 3057 RandomMovementProbability = 100, 3058 NumDirections = 1, 3059 Diminutive = true, 3060 Transparency = 50, 3061 Decoration = true, 3062 Indestructible = true, 3063 VisibleUnderFog = false, 3064 Sounds = { 3065 "selected", "click", 3066-- "acknowledge", "bat-selected", 3067-- "ready", "bat-selected", 3068-- "help", "critter-help", 3069-- "dead", "rat-dead" 3070 } 3071} ) 3072 3073DefineUnitType("unit-miasma", { 3074 Name = "Miasma", 3075 Image = {"file", "neutral/decorations/miasma.png", "size", {128, 128}}, 3076 Animations = "animations-roaming-fog", Icon = "icon-miasma", 3077 NeutralMinimapColor = {192, 192, 192}, 3078 Speed = 3, 3079 HitPoints = 30, -- miasma lives for 30 seconds 3080 DrawLevel = 45, 3081 TileSize = {4, 4}, BoxSize = {127, 127}, 3082 SightRange = 1, 3083 Missile = "missile-none", 3084 MaxAttackRange = 1, 3085 Priority = 37, 3086 Points = 1, 3087 Demand = 1, 3088 Type = "fly", 3089 IsNotSelectable = true, 3090 RightMouseAction = "move", 3091 RandomMovementProbability = 100, 3092 NumDirections = 1, 3093 Diminutive = true, 3094 Transparency = 50, 3095 Decoration = true, 3096 Indestructible = true, 3097 VisibleUnderFog = false, 3098 RegenerationRate = -1, 3099 Sounds = { 3100 "selected", "click", 3101-- "acknowledge", "bat-selected", 3102-- "ready", "bat-selected", 3103-- "help", "critter-help", 3104-- "dead", "rat-dead" 3105 } 3106} ) 3107 3108--DefineUnitType("unit-destroyed-1x1-place", { Name = "Destroyed 1x1 Place", 3109-- Image = {"size", {32, 32}}, 3110-- Animations = "animations-destroyed-place", Icon = "icon-dwarven-miner", 3111-- HitPoints = 255, 3112-- DrawLevel = 10, 3113-- TileSize = {1, 1}, BoxSize = {31, 31}, 3114-- SightRange = 2, 3115-- Missile = "missile-none", 3116-- Priority = 0, 3117-- Type = "land", 3118-- Building = true, VisibleUnderFog = true, 3119-- Vanishes = true, 3120-- Sounds = {} } ) 3121 3122DefineUnitType("unit-destroyed-2x2-place", { 3123 Name = "Destroyed 2x2 Place", 3124 Image = {"file", "neutral/buildings/destroyed_site.png", "size", {64, 64}}, 3125 Animations = "animations-destroyed-place", Icon = "icon-dwarven-miner", 3126 HitPoints = 255, 3127 DrawLevel = 10, 3128 TileSize = {2, 2}, BoxSize = {63, 63}, 3129 SightRange = 1, 3130 Missile = "missile-none", 3131 Priority = 0, 3132 Type = "land", 3133 Building = true, VisibleUnderFog = true, 3134 Vanishes = true, 3135 Sounds = {} 3136}) 3137 3138DefineUnitType("unit-destroyed-3x3-place", { 3139 Name = "Destroyed 3x3 Place", 3140 Image = {"file", "neutral/buildings/destroyed_site.png", "size", {64, 64}}, 3141 Animations = "animations-destroyed-place", Icon = "icon-dwarven-miner", 3142 HitPoints = 255, 3143 DrawLevel = 10, 3144 TileSize = {3, 3}, BoxSize = {95, 95}, 3145 SightRange = 1, 3146 Missile = "missile-none", 3147 Priority = 0, 3148 Type = "land", 3149 Building = true, VisibleUnderFog = true, 3150 Vanishes = true, 3151 Sounds = {} 3152}) 3153 3154--DefineUnitType("unit-destroyed-3x3-place-water", { Name = "Destroyed 3x3 Place Water", 3155-- Image = {"size", {64, 64}}, 3156-- Animations = "animations-destroyed-place-water", Icon = "icon-dwarven-miner", 3157-- HitPoints = 255, 3158-- DrawLevel = 10, 3159-- TileSize = {3, 3}, BoxSize = {95, 95}, 3160-- SightRange = 0, 3161-- Missile = "missile-none", 3162-- Priority = 0, 3163-- Type = "naval", 3164-- Building = true, VisibleUnderFog = true, 3165-- Vanishes = true, 3166-- Sounds = {} } ) 3167 3168DefineUnitType("unit-destroyed-4x4-place", { 3169 Name = "Destroyed 4x4 Place", 3170 Image = {"file", "neutral/buildings/destroyed_site.png", "size", {64, 64}}, 3171 Animations = "animations-destroyed-place", Icon = "icon-dwarven-miner", 3172 HitPoints = 255, 3173 DrawLevel = 10, 3174 TileSize = {4, 4}, BoxSize = {127, 127}, 3175 SightRange = 1, 3176 Missile = "missile-none", 3177 Priority = 0, 3178 Type = "land", 3179 Building = true, VisibleUnderFog = true, 3180 Vanishes = true, 3181 Sounds = {} 3182}) 3183 3184DefineUnitType("unit-revealer", { 3185 Name = "Revealer", 3186 Animations = "animations-building", Icon = "icon-eagle-eye", 3187 HitPoints = 1, 3188 TileSize = {1, 1}, BoxSize = {1, 1}, 3189 SightRange = 12, 3190 Missile = "missile-none", 3191 Priority = 0, 3192 DecayRate = 1, 3193 Type = "fly", 3194 VisibleUnderFog = true, 3195 NonSolid = true, 3196 Revealer = true, 3197 DetectCloak = true, 3198 HiddenInEditor = true, 3199 Sounds = {} 3200} ) 3201 3202DefineUnitType("unit-ethereal-revealer", { 3203 Name = "Ethereal Revealer", 3204 Animations = "animations-building", Icon = "icon-eagle-eye", 3205 HitPoints = 1, 3206 TileSize = {1, 1}, BoxSize = {1, 1}, 3207 SightRange = 12, 3208 Missile = "missile-none", 3209 Priority = 0, 3210 DecayRate = 1, 3211 Type = "fly", 3212 VisibleUnderFog = true, 3213 NonSolid = true, 3214 Revealer = true, 3215 DetectCloak = true, 3216 HiddenInEditor = true, 3217 EtherealVision = 1, 3218 Sounds = {} 3219} ) 3220 3221-- Template Units 3222 3223DefineUnitType("unit-template-worker", { 3224 Name = "Worker", 3225 Parent = "unit-template-sapient-unit", 3226 Class = "worker", 3227 Costs = {"time", 45, "copper", 400}, 3228 Speed = 10, 3229 HitPoints = 30, 3230 TileSize = {1, 1}, BoxSize = {31, 31}, 3231 SightRange = 4, 3232 AutoRepairRange = 4, 3233 BasicDamage = 5, Missile = "missile-none", 3234 MaxAttackRange = 1, 3235 Accuracy = 8, 3236 Evasion = 9, 3237 Priority = 50, 3238 Points = 30, 3239 Demand = 1, 3240 Gender = "male", 3241 Type = "land", 3242 RightMouseAction = "harvest", 3243 CanAttack = true, RepairRange = 1, 3244 CanTargetLand = true, 3245 Coward = true, 3246 Flesh = true, 3247 ButtonPos = 1, 3248 ButtonKey = "w", 3249 ButtonHint = "Train ~!Worker", 3250 AiDrops = {"unit-christmas-hat"}, 3251 CanGatherResources = { 3252 { 3253 "resource-id", "gold", 3254 "resource-capacity", 100, 3255 "resource-step", 4, 3256 "wait-at-resource", 12, 3257 "wait-at-depot", 150 3258 }, 3259 { 3260 "resource-id", "silver", 3261 "resource-capacity", 100, 3262 "resource-step", 4, 3263 "wait-at-resource", 12, 3264 "wait-at-depot", 150 3265 }, 3266 { 3267 "resource-id", "copper", 3268 "resource-capacity", 100, 3269 "resource-step", 4, 3270 "wait-at-resource", 12, 3271 "wait-at-depot", 150 3272 }, 3273 { 3274 "resource-id", "iron", 3275 "resource-capacity", 100, 3276 "resource-step", 4, 3277 "wait-at-resource", 12, 3278 "wait-at-depot", 150 3279 }, 3280 { 3281 "resource-id", "mithril", 3282 "resource-capacity", 100, 3283 "resource-step", 4, 3284 "wait-at-resource", 12, 3285 "wait-at-depot", 150 3286 }, 3287 { 3288 "resource-id", "lumber", 3289 "resource-capacity", 100, 3290 "resource-step", 4, 3291 "wait-at-resource", 12, 3292 "wait-at-depot", 150 3293 }, 3294 { 3295 "resource-id", "stone", 3296 "resource-capacity", 100, 3297 "resource-step", 4, 3298 "wait-at-resource", 12, 3299 "wait-at-depot", 150 3300 }, 3301 { 3302 "resource-id", "limestone", 3303 "resource-capacity", 100, 3304 "resource-step", 4, 3305 "wait-at-resource", 12, 3306 "wait-at-depot", 150 3307 }, 3308 { 3309 "resource-id", "coal", 3310 "resource-capacity", 100, 3311 "resource-step", 4, 3312 "wait-at-resource", 12, 3313 "wait-at-depot", 150 3314 }, 3315 { 3316 "resource-id", "jewelry", 3317 "resource-capacity", 100, 3318 "resource-step", 4, 3319 "wait-at-resource", 12, 3320 "wait-at-depot", 150 3321 }, 3322 { 3323 "resource-id", "furniture", 3324 "resource-capacity", 100, 3325 "resource-step", 4, 3326 "wait-at-resource", 12, 3327 "wait-at-depot", 150 3328 }, 3329 { 3330 "resource-id", "leather", 3331 "resource-capacity", 100, 3332 "resource-step", 4, 3333 "wait-at-resource", 12, 3334 "wait-at-depot", 150 3335 }, 3336 { 3337 "resource-id", "diamonds", 3338 "resource-capacity", 100, 3339 "resource-step", 4, 3340 "wait-at-resource", 12, 3341 "wait-at-depot", 150 3342 }, 3343 { 3344 "resource-id", "emeralds", 3345 "resource-capacity", 100, 3346 "resource-step", 4, 3347 "wait-at-resource", 12, 3348 "wait-at-depot", 150 3349 } 3350 }, 3351 Sounds = { 3352 "step", "step-dirt", 3353 "step-dirt", "step-dirt", 3354 "step-gravel", "step-gravel", 3355 "step-mud", "step-mud", 3356 "step-stone", "step-stone", 3357 "step-grass", "step-leaves" 3358 } 3359} ) 3360 3361DefineUnitType("unit-template-skilled-miner", { 3362 Name = "Skilled Miner", 3363 Parent = "unit-template-worker", 3364 Class = "skilled-miner", 3365 Costs = {"copper", 600}, 3366 HitPoints = 40, 3367 BasicDamage = 6, 3368 Accuracy = 9, 3369 Points = 45, 3370 Level = 2, 3371 CopperGatheringBonus = 2, 3372 SilverGatheringBonus = 2, 3373 GoldGatheringBonus = 2, 3374 IronGatheringBonus = 2, 3375 MithrilGatheringBonus = 2, 3376 CoalGatheringBonus = 2, 3377 GemsGatheringBonus = 2 3378} ) 3379 3380DefineUnitType("unit-template-expert-miner", { 3381 Name = "Expert Miner", 3382 Parent = "unit-template-skilled-miner", 3383 Class = "expert-miner", 3384 Costs = {"copper", 900}, 3385 HitPoints = 50, 3386 BasicDamage = 7, 3387 Accuracy = 10, 3388 Points = 60, 3389 Level = 3, 3390 Inventory = true, 3391 CopperGatheringBonus = 4, 3392 SilverGatheringBonus = 4, 3393 GoldGatheringBonus = 4, 3394 IronGatheringBonus = 4, 3395 MithrilGatheringBonus = 4, 3396 CoalGatheringBonus = 4, 3397 GemsGatheringBonus = 4 3398} ) 3399 3400DefineUnitType("unit-template-journeyman-smith", { 3401 Name = "Journeyman Smith", 3402 Parent = "unit-template-worker", 3403 Class = "journeyman-smith", 3404 Costs = {"copper", 600}, 3405 HitPoints = 55, 3406 BasicDamage = 9, 3407 Armor = 2, 3408 Accuracy = 10, 3409 Evasion = 10, 3410 Points = 55, 3411 Level = 2, 3412 JewelryGatheringBonus = 2, 3413 Coward = false 3414} ) 3415 3416DefineUnitType("unit-template-master-smith", { 3417 Name = "Master Smith", 3418 Parent = "unit-template-journeyman-smith", 3419 Class = "master-smith", 3420 Costs = {"copper", 900}, 3421 HitPoints = 65, 3422 BasicDamage = 10, 3423 Points = 70, 3424 Level = 3, 3425 Inventory = true, 3426 JewelryGatheringBonus = 4 3427} ) 3428 3429DefineUnitType("unit-template-grandmaster-smith", { 3430 Name = "Grandmaster Smith", 3431 Parent = "unit-template-master-smith", 3432 Class = "master-smith", 3433 Costs = {"copper", 1350}, 3434 HitPoints = 75, 3435 BasicDamage = 12, 3436 Points = 85, 3437 Level = 4, 3438 JewelryGatheringBonus = 6 3439} ) 3440 3441DefineUnitType("unit-template-militia", { 3442 Name = "Militia", 3443 Parent = "unit-template-sapient-unit", 3444 Class = "militia", 3445 Speed = 10, 3446 HitPoints = 30, 3447 TileSize = {1, 1}, BoxSize = {31, 31}, 3448 SightRange = 4, 3449 Armor = 1, BasicDamage = 6, Missile = "missile-none", 3450 MaxAttackRange = 1, 3451 Accuracy = 10, 3452 Evasion = 10, 3453 Priority = 50, 3454 Points = 30, 3455 Demand = 1, 3456 Gender = "male", 3457 Type = "land", 3458 RightMouseAction = "attack", 3459 CanAttack = true, 3460 CanTargetLand = true, 3461 Flesh = true, 3462 AiDrops = {"unit-christmas-hat"}, 3463 Sounds = { 3464 "step", "step-dirt", 3465 "step-dirt", "step-dirt", 3466 "step-grass", "step-leaves", 3467 "step-gravel", "step-gravel", 3468 "step-mud", "step-mud", 3469 "step-stone", "step-stone" 3470 } 3471} ) 3472 3473DefineUnitType("unit-template-merchant", { 3474 Name = "Merchant", 3475 Parent = "unit-template-sapient-unit", 3476 Class = "merchant", 3477 Strength = 10, 3478 Dexterity = 11, 3479 Intelligence = 12, 3480 Charisma = 12, 3481 Speed = 10, 3482 HitPoints = 45, 3483 TileSize = {1, 1}, BoxSize = {31, 31}, 3484 SightRange = 4, 3485 BasicDamage = 6, Missile = "missile-none", 3486 MaxAttackRange = 1, 3487 Accuracy = 10, 3488 Evasion = 12, 3489 Priority = 50, 3490 Points = 75, 3491 Demand = 1, 3492 Gender = "male", 3493 Type = "land", 3494 RightMouseAction = "harvest", 3495 CanAttack = true, 3496 CanTargetLand = true, 3497 Coward = true, 3498 Flesh = true, 3499 ButtonPos = 1, 3500 ButtonKey = "m", 3501 ButtonHint = "Train ~!Merchant", 3502 Trader = true, 3503 AiDrops = {"unit-christmas-hat"}, 3504 CanGatherResources = { 3505 { 3506 "resource-id", "trade", 3507 "resource-capacity", 100, 3508 "resource-step", 4, 3509 "wait-at-resource", 6, 3510 "wait-at-depot", 150 3511 } 3512 }, 3513 Sounds = { 3514 "step", "step-dirt", 3515 "step-dirt", "step-dirt", 3516 "step-gravel", "step-gravel", 3517 "step-mud", "step-mud", 3518 "step-stone", "step-stone", 3519 "step-grass", "step-leaves" 3520 } 3521} ) 3522 3523DefineUnitType("unit-template-heroic-merchant", { 3524 Name = "Heroic Merchant", 3525 Parent = "unit-template-merchant", 3526 Class = "heroic-merchant", 3527 Costs = {"time", 120, "copper", 1200}, 3528 Strength = 10, 3529 Dexterity = 12, 3530 Intelligence = 13, 3531 Charisma = 14, 3532 HitPoints = 60, 3533 BasicDamage = 7, 3534 Evasion = 14, 3535 Points = 90, 3536 Level = 3, 3537 LeadershipAura = 1, 3538 Inventory = true, 3539 CanGatherResources = { 3540 { 3541 "resource-id", "trade", 3542 "resource-step", 8 3543 } 3544 } 3545} ) 3546 3547DefineUnitType("unit-template-infantry", { 3548 Name = "Infantry", 3549 Parent = "unit-template-sapient-unit", 3550 Class = "infantry", 3551 Costs = {"time", 60, "copper", 600}, 3552 Strength = 11, 3553 Speed = 10, 3554 HitPoints = 60, 3555 TileSize = {1, 1}, BoxSize = {31, 31}, 3556 SightRange = 4, 3557 Armor = 2, BasicDamage = 9, Missile = "missile-none", 3558 MaxAttackRange = 1, 3559 Accuracy = 10, 3560 Evasion = 10, 3561 Priority = 60, 3562 Points = 50, 3563 Demand = 1, 3564 Gender = "male", 3565 Type = "land", 3566 RightMouseAction = "attack", 3567 CanAttack = true, 3568 CanTargetLand = true, 3569 Flesh = true, 3570 CanCastSpell = {"spell-stun"}, 3571 AutoCastActive = {"spell-stun"}, 3572 ButtonPos = 1, 3573 AiDrops = {"unit-christmas-hat"}, 3574 Sounds = { 3575 "step", "step-dirt", 3576 "step-dirt", "step-dirt", 3577 "step-gravel", "step-gravel", 3578 "step-mud", "step-mud", 3579 "step-stone", "step-stone", 3580 "step-grass", "step-leaves" 3581 } 3582} ) 3583 3584DefineUnitType("unit-template-veteran-infantry", { 3585 Name = "Veteran Infantry", 3586 Parent = "unit-template-infantry", 3587 Class = "veteran-infantry", 3588 Costs = {"time", 90, "copper", 900}, 3589 Strength = 12, 3590 Dexterity = 12, 3591 Intelligence = 11, 3592 Charisma = 11, 3593 HitPoints = 75, 3594 BasicDamage = 10, 3595 Points = 75, 3596 Level = 2, 3597 Type = "land", 3598 RightMouseAction = "attack", 3599 CanAttack = true, 3600 CanTargetLand = true, 3601 AiDrops = {"unit-horn", "unit-amulet", "unit-ring"} 3602}) 3603 3604DefineUnitType("unit-template-heroic-infantry", { 3605 Name = "Heroic Infantry", 3606 Parent = "unit-template-veteran-infantry", 3607 Class = "heroic-infantry", 3608 Costs = {"time", 120, "copper", 1200}, 3609 Strength = 13, 3610 Dexterity = 12, 3611 Intelligence = 12, 3612 Charisma = 12, 3613 HitPoints = 90, 3614 BasicDamage = 12, 3615 Points = 100, 3616 Level = 3, 3617 Type = "land", 3618 RightMouseAction = "attack", 3619 Inventory = true, 3620 Mana = {Enable = true, Max = 225, Value = 225, Increase = 1}, 3621 AiDrops = {"unit-crown"} 3622}) 3623 3624DefineUnitType("unit-template-spearman", { 3625 Name = "Spearman", 3626 Parent = "unit-template-infantry", 3627 Class = "spearman", 3628 Costs = {"time", 50, "copper", 400, "lumber", 100}, 3629 BasicDamage = 5, -- reduced damage, since it is cheaper, and because it has a bonus against mounted units 3630 BonusAgainstMounted = 100, 3631 Armor = 1, 3632 WeaponClasses = {"spear"}, 3633 PierceDamage = true, 3634 CanCastSpell = {"spell-puncture"}, 3635 AutoCastActive = {"spell-puncture"}, 3636 ButtonPos = 2, 3637 Sounds = { 3638 "hit", "spear-attack", 3639 "miss", "spear-miss" 3640 } 3641}) 3642 3643DefineUnitType("unit-template-veteran-spearman", { 3644 Name = "Veteran Spearman", 3645 Parent = "unit-template-spearman", 3646 Class = "veteran-spearman", 3647 Costs = {"time", 75, "copper", 600, "lumber", 150}, 3648 Strength = 12, 3649 Dexterity = 12, 3650 Intelligence = 11, 3651 Charisma = 11, 3652 HitPoints = 75, 3653 BasicDamage = 6, 3654 Points = 75, 3655 Level = 2, 3656 AiDrops = {"unit-horn", "unit-amulet", "unit-ring"} 3657}) 3658 3659DefineUnitType("unit-template-heroic-spearman", { 3660 Name = "Heroic Spearman", 3661 Parent = "unit-template-veteran-spearman", 3662 Class = "heroic-spearman", 3663 Costs = {"time", 100, "copper", 800, "lumber", 200}, 3664 Strength = 13, 3665 Dexterity = 12, 3666 Intelligence = 12, 3667 Charisma = 12, 3668 HitPoints = 90, 3669 BasicDamage = 7, 3670 Points = 100, 3671 Level = 3, 3672 Inventory = true, 3673 Mana = {Enable = true, Max = 225, Value = 225, Increase = 1}, 3674 AiDrops = {"unit-crown"} 3675}) 3676 3677DefineUnitType("unit-template-archer", { 3678 Name = "Shooter", 3679 Parent = "unit-template-sapient-unit", 3680 Class = "shooter", 3681 Costs = {"time", 70, "copper", 500, "lumber", 150}, 3682 Dexterity = 11, 3683 Speed = 10, 3684 HitPoints = 40, 3685 TileSize = {1, 1}, BoxSize = {31, 31}, 3686 SightRange = 6, 3687 BasicDamage = 9, 3688 Missile = "missile-arrow", 3689 FireMissile = "missile-flaming-arrow", 3690 MaxAttackRange = 5, 3691 Accuracy = 10, 3692 Evasion = 10, 3693 Priority = 55, 3694 Points = 60, 3695 Demand = 1, 3696 Gender = "male", 3697 Type = "land", 3698 RightMouseAction = "attack", 3699 CanAttack = true, 3700 CanTargetLand = true, CanTargetSea = true, CanTargetAir = true, 3701 Flesh = true, 3702 AttackFromTransporter = true, 3703 ButtonPos = 3, 3704 RequirementsString = "Lumber Mill", 3705 AiDrops = {"unit-christmas-hat"}, 3706 Sounds = { 3707 "step", "step-dirt", 3708 "step-dirt", "step-dirt", 3709 "step-gravel", "step-gravel", 3710 "step-mud", "step-mud", 3711 "step-stone", "step-stone", 3712 "step-grass", "step-leaves" 3713 } 3714} ) 3715 3716DefineUnitType("unit-template-veteran-shooter", { 3717 Name = "Veteran Shooter", 3718 Parent = "unit-template-archer", 3719 Class = "veteran-shooter", 3720 Costs = {"time", 105, "copper", 750, "lumber", 225}, 3721 Strength = 11, 3722 Dexterity = 12, 3723 Intelligence = 11, 3724 Charisma = 11, 3725 HitPoints = 50, 3726 BasicDamage = 10, 3727 Accuracy = 11, 3728 Points = 90, 3729 Level = 2, 3730 AiDrops = {"unit-horn", "unit-amulet", "unit-ring"} 3731} ) 3732 3733DefineUnitType("unit-template-heroic-shooter", { 3734 Name = "Heroic Shooter", 3735 Parent = "unit-template-veteran-shooter", 3736 Class = "heroic-shooter", 3737 Costs = {"time", 140, "copper", 1000, "lumber", 300}, 3738 Strength = 12, 3739 Dexterity = 13, 3740 Intelligence = 12, 3741 Charisma = 12, 3742 HitPoints = 60, 3743 BasicDamage = 11, 3744 Accuracy = 12, 3745 Points = 120, 3746 Level = 3, 3747 Mana = {Enable = true, Max = 225, Value = 225, Increase = 1}, 3748 Inventory = true, 3749 CanCastSpell = {"spell-precise-shot"}, 3750 AutoCastActive = {"spell-precise-shot"}, 3751 AiDrops = {"unit-crown"} 3752} ) 3753 3754DefineUnitType("unit-template-gunpowder-infantry", { 3755 Name = "Gunpowder Infantry", 3756 Parent = "unit-template-archer", 3757 Class = "gunpowder-infantry", 3758 Costs = {"time", 70, "copper", 800, "lumber", 0}, 3759 BasicDamage = 18, 3760 Missile = "missile-bullet", 3761 FireMissile = "missile-bullet", 3762 MaxAttackRange = 4, 3763 Accuracy = 7, 3764 Priority = 55, 3765 Points = 95, 3766 PierceDamage = true, 3767 WeaponClasses = {"gun"}, 3768 Mana = {Enable = true, Max = 75, Value = 75, Increase = 1}, 3769 CanCastSpell = {"spell-precise-shot"}, 3770 AutoCastActive = {"spell-precise-shot"}, 3771 Gender = "male", 3772 RequirementsString = "Smithy and Gunpowder" 3773} ) 3774 3775DefineUnitType("unit-template-thief", { 3776 Name = "Thief", 3777 Parent = "unit-template-sapient-unit", 3778 Class = "thief", 3779 Costs = {"time", 45, "copper", 400}, 3780 Dexterity = 11, 3781 Intelligence = 11, 3782 Charisma = 11, 3783 Speed = 10, 3784 HitPoints = 40, 3785 TileSize = {1, 1}, BoxSize = {31, 31}, 3786 SightRange = 4, 3787 BasicDamage = 6, Missile = "missile-none", 3788 MaxAttackRange = 1, 3789 Backstab = 100, 3790 Accuracy = 12, 3791 Evasion = 12, 3792 Mugging = 50, 3793 Priority = 50, 3794 Points = 30, 3795 Demand = 1, 3796 Gender = "male", 3797 Type = "land", 3798 RightMouseAction = "attack", 3799 CanAttack = true, 3800 CanTargetLand = true, 3801 Flesh = true, 3802 HiddenOwnership = true, 3803 CanCastSpell = {"spell-puncture"}, 3804 AutoCastActive = {"spell-puncture"}, 3805 AiDrops = {"unit-christmas-hat"}, 3806 Sounds = { 3807 "step", "step-dirt", 3808 "step-dirt", "step-dirt", 3809 "step-gravel", "step-gravel", 3810 "step-mud", "step-mud", 3811 "step-stone", "step-stone", 3812 "step-grass", "step-leaves" 3813 } 3814} ) 3815 3816DefineUnitType("unit-template-cavalry", { 3817 Name = "Cavalry", 3818 Parent = "unit-template-sapient-unit", 3819 Class = "cavalry", 3820 Costs = {"time", 90, "copper", 900}, 3821 Strength = 12, 3822 Dexterity = 11, 3823 Intelligence = 11, 3824 Charisma = 11, 3825 Speed = 13, 3826 HitPoints = 75, 3827 TileSize = {1, 1}, BoxSize = {42, 42}, 3828 SightRange = 4, 3829 Armor = 2, BasicDamage = 10, Missile = "missile-none", 3830 MaxAttackRange = 1, 3831 Accuracy = 10, 3832 Evasion = 9, 3833 ChargeBonus = 5, 3834 Priority = 63, 3835 Points = 75, 3836 Demand = 2, 3837 Gender = "male", 3838 Level = 2, 3839 Type = "land", 3840 RightMouseAction = "attack", 3841 CanAttack = true, 3842 CanTargetLand = true, 3843 Mounted = true, 3844 Flesh = true, 3845 Mana = {Enable = true, Max = 150, Value = 150, Increase = 1}, 3846 ButtonPos = 4, 3847 AiDrops = {"unit-christmas-hat", "unit-horn", "unit-amulet", "unit-ring"}, 3848 Sounds = { 3849 "step", "step-dirt", 3850 "step-dirt", "step-dirt", 3851 "step-gravel", "step-gravel", 3852 "step-mud", "step-mud", 3853 "step-stone", "step-stone", 3854 "step-grass", "step-leaves" 3855 } 3856} ) 3857 3858DefineUnitType("unit-template-heroic-cavalry", { 3859 Name = "Heroic Cavalry", 3860 Parent = "unit-template-cavalry", 3861 Class = "heroic-cavalry", 3862 Costs = {"time", 120, "copper", 1200}, 3863 Strength = 13, 3864 Dexterity = 12, 3865 Intelligence = 12, 3866 Charisma = 12, 3867 HitPoints = 90, 3868 BasicDamage = 12, 3869 Points = 100, 3870 Level = 3, 3871 Inventory = true, 3872 Mana = {Enable = true, Max = 225, Value = 225, Increase = 1}, 3873 CanCastSpell = {"spell-stun"}, 3874 AutoCastActive = {"spell-stun"}, 3875 AiDrops = {"unit-crown"} 3876} ) 3877 3878DefineUnitType("unit-template-desert-cavalry", { 3879 Name = "Desert Cavalry", 3880 Parent = "unit-template-cavalry", 3881 Class = "desert-cavalry", 3882 Speed = 12, 3883 DehydrationImmunity = 1 3884} ) 3885 3886DefineUnitType("unit-template-heroic-desert-cavalry", { 3887 Name = "Heroic Desert Cavalry", 3888 Parent = "unit-template-heroic-cavalry", 3889 Class = "heroic-desert-cavalry", 3890 Costs = {"time", 120, "copper", 1200}, 3891 Speed = 12, 3892 DehydrationImmunity = 1 3893} ) 3894 3895DefineUnitType("unit-template-spear-cavalry", { 3896 Name = "Spear Cavalry", 3897 Parent = "unit-template-sapient-unit", 3898 Class = "spear-cavalry", 3899 Costs = {"time", 90, "copper", 900}, 3900 Strength = 12, 3901 Dexterity = 11, 3902 Intelligence = 11, 3903 Charisma = 11, 3904 Speed = 13, 3905 HitPoints = 75, 3906 TileSize = {1, 1}, BoxSize = {42, 42}, 3907 SightRange = 4, 3908 Armor = 2, BasicDamage = 8, Missile = "missile-none", 3909 MaxAttackRange = 1, 3910 Accuracy = 10, 3911 Evasion = 9, 3912 ChargeBonus = 10, 3913 Priority = 63, 3914 Points = 75, 3915 Demand = 2, 3916 Gender = "male", 3917 Level = 2, 3918 Type = "land", 3919 RightMouseAction = "attack", 3920 CanAttack = true, 3921 CanTargetLand = true, 3922 Mounted = true, 3923 Flesh = true, 3924 Mana = {Enable = true, Max = 150, Value = 150, Increase = 1}, 3925 ButtonPos = 4, 3926 AiDrops = {"unit-christmas-hat", "unit-horn", "unit-amulet", "unit-ring"}, 3927 Sounds = { 3928 "step", "step-dirt", 3929 "step-dirt", "step-dirt", 3930 "step-gravel", "step-gravel", 3931 "step-mud", "step-mud", 3932 "step-stone", "step-stone", 3933 "step-grass", "step-leaves" 3934 } 3935} ) 3936 3937DefineUnitType("unit-template-heroic-spear-cavalry", { 3938 Name = "Heroic Spear Cavalry", 3939 Parent = "unit-template-spear-cavalry", 3940 Class = "heroic-spear-cavalry", 3941 Costs = {"time", 120, "copper", 1200}, 3942 Strength = 13, 3943 Dexterity = 12, 3944 Intelligence = 12, 3945 Charisma = 12, 3946 HitPoints = 90, 3947 BasicDamage = 10, 3948 Points = 100, 3949 Level = 3, 3950 Inventory = true, 3951 Mana = {Enable = true, Max = 225, Value = 225, Increase = 1}, 3952 CanCastSpell = {"spell-stun"}, 3953 AutoCastActive = {"spell-stun"}, 3954 AiDrops = {"unit-crown"} 3955} ) 3956 3957DefineUnitType("unit-template-priest", { 3958 Name = "Priest", 3959 Parent = "unit-template-sapient-unit", 3960 Class = "priest", 3961 Costs = {"time", 80, "copper", 700}, 3962 Intelligence = 12, 3963 Charisma = 12, 3964 Speed = 8, 3965 HitPoints = 40, 3966 TileSize = {1, 1}, BoxSize = {31, 31}, 3967 SightRange = 9, 3968 BasicDamage = 6, Missile = "missile-none", 3969 MaxAttackRange = 1, 3970 Accuracy = 8, 3971 Evasion = 8, 3972 Priority = 70, 3973 Points = 60, 3974 Demand = 1, 3975 Gender = "male", 3976 Type = "land", 3977 RightMouseAction = "attack", 3978 Coward = true, 3979 CanAttack = true, 3980 CanTargetLand = true, 3981 Flesh = true, 3982 Mana = {Enable = true, Max = 190, Value = 190, Increase = 1}, 3983 ButtonPos = 1, 3984 RequirementsString = "Any Deity or Religion", 3985 AiDrops = {"unit-christmas-hat", "unit-crown", "unit-amulet", "unit-ring", "unit-scroll", "unit-book"}, 3986 DropSpells = {"spell-detachment", "spell-forgetfulness", "spell-retraining"}, 3987 Sounds = { 3988 "step", "step-dirt", 3989 "step-dirt", "step-dirt", 3990 "step-gravel", "step-gravel", 3991 "step-mud", "step-mud", 3992 "step-stone", "step-stone", 3993 "step-grass", "step-leaves" 3994 } 3995} ) 3996 3997DefineUnitType("unit-template-veteran-priest", { 3998 Name = "Veteran Priest", 3999 Parent = "unit-template-priest", 4000 Class = "veteran-priest", 4001 Costs = {"time", 120, "copper", 1050}, 4002 Intelligence = 13, 4003 Charisma = 13, 4004 HitPoints = 50, 4005 Points = 90, 4006 Level = 2, 4007 Mana = {Enable = true, Max = 380, Value = 380, Increase = 1} 4008} ) 4009 4010DefineUnitType("unit-template-high-priest", { 4011 Name = "High Priest", 4012 Parent = "unit-template-veteran-priest", 4013 Class = "high-priest", 4014 Costs = {"time", 160, "copper", 1400}, 4015 Intelligence = 14, 4016 Charisma = 14, 4017 HitPoints = 60, 4018 Points = 120, 4019 Level = 3, 4020 Mana = {Enable = true, Max = 570, Value = 570, Increase = 1} 4021} ) 4022 4023DefineUnitType("unit-template-flying-rider", { 4024 Name = "Flying Rider", 4025 Parent = "unit-template-sapient-unit", 4026 Class = "flying-rider", 4027 Costs = {"time", 250, "copper", 1750, "lumber", 750}, 4028 Strength = 12, 4029 Dexterity = 13, 4030 Intelligence = 12, 4031 Charisma = 12, 4032 Speed = 14, 4033 HitPoints = 100, 4034 DrawLevel = 60, 4035 TileSize = {2, 2}, BoxSize = {63, 63}, 4036 SightRange = 6, 4037 BasicDamage = 12, Missile = "missile-arrow", 4038 MaxAttackRange = 5, 4039 Accuracy = 10, 4040 Evasion = 10, 4041 Priority = 65, 4042 Points = 100, 4043 Level = 3, 4044 Demand = 2, 4045 Mana = {Enable = true, Max = 225, Value = 225, Increase = 1}, 4046 Gender = "male", 4047 Type = "fly", 4048 RightMouseAction = "attack", 4049 CanAttack = true, 4050 CanTargetLand = true, CanTargetSea = true, CanTargetAir = true, 4051 DetectCloak = true, 4052 Flesh = true, 4053 Mounted = true, 4054 Inventory = true, 4055 CanCastSpell = {"spell-precise-shot"}, 4056 AutoCastActive = {"spell-precise-shot"}, 4057 ButtonPos = 6, 4058 AiDrops = {"unit-christmas-hat", "unit-horn", "unit-crown", "unit-amulet", "unit-ring"}, 4059 Sounds = { 4060 } 4061} ) 4062 4063DefineUnitType("unit-template-siege-engine", { 4064 Name = "Siege Engine", 4065 Parent = "unit-template-unit", 4066 Class = "siege-engine", 4067 Costs = {"time", 250, "copper", 900, "lumber", 900}, 4068 RepairHp = 4, 4069 RepairCosts = {"copper", 1, "lumber", 1}, 4070 Speed = 5, 4071 HitPoints = 110, 4072 TileSize = {1, 1}, BoxSize = {63, 63}, 4073 SightRange = 9, 4074-- BasicDamage = 75, 4075 BasicDamage = 60, 4076 Missile = "missile-catapult-sandstone-rock", 4077 FireMissile = "missile-flaming-catapult-rock", 4078 MinAttackRange = 2, MaxAttackRange = 8, 4079 Accuracy = 8, 4080 Evasion = 2, 4081 Priority = 70, 4082 Points = 100, 4083 Demand = 2, 4084 ExplodeWhenKilled = "missile-explosion", 4085 Type = "land", 4086 RightMouseAction = "attack", 4087 GroundAttack = true, 4088 CanAttack = true, 4089 CanTargetLand = true, CanTargetSea = true, 4090 NoFriendlyFire = true, -- don't attack a target if friendly units would get hurt too 4091 ButtonPos = 5, 4092 RequirementsString = "Lumber Mill, Smithy and Engineering", 4093 Sounds = { 4094 "selected", "click", 4095 "step", "step-dirt", 4096 "step-dirt", "step-dirt", 4097 "step-gravel", "step-gravel", 4098 "step-mud", "step-mud", 4099 "step-stone", "step-stone", 4100 "step-grass", "step-leaves" 4101 } 4102}) 4103 4104DefineUnitType("unit-template-catapult", { 4105 Name = "Catapult", 4106 Parent = "unit-template-siege-engine", 4107 Accuracy = 7, 4108 Missile = "missile-catapult-sandstone-rock", 4109 FireMissile = "missile-flaming-catapult-rock", 4110 BonusAgainstBuildings = 25 4111}) 4112 4113DefineUnitType("unit-template-ballista", { 4114 Name = "Ballista", 4115 Parent = "unit-template-siege-engine" 4116}) 4117 4118DefineUnitType("unit-template-ship", { 4119 Name = "Ship", 4120 Parent = "unit-template-unit", 4121 RepairHp = 4, 4122 RepairCosts = {"copper", 1, "lumber", 1}, 4123-- Corpse = "unit-dead-sea-body", 4124 Type = "naval", 4125 Sounds = { 4126 "selected", "ship-selected", 4127 "ready", "ship-selected", 4128 "acknowledge", "ship-move", 4129 "dead", "ship-destroyed" 4130 } 4131}) 4132 4133DefineUnitType("unit-template-transport-ship", { 4134 Name = "Transport", 4135 Parent = "unit-template-ship", 4136 Class = "transport-ship", 4137 Animations = "animations-transport-ship", 4138 Costs = {"time", 70, "copper", 600, "lumber", 2100}, 4139 Speed = 8, 4140 HitPoints = 150, 4141 MaxOnBoard = 3, 4142 TileSize = {2, 2}, BoxSize = {63, 63}, 4143 SightRange = 4, 4144 Armor = 5, 4145 Missile = "missile-none", 4146 MaxAttackRange = 1, 4147 GarrisonedRangeBonus = 1, 4148 Evasion = 5, 4149 Priority = 70, AnnoyComputerFactor = 15, 4150 Points = 40, 4151 Demand = 2, 4152 CanTargetLand = true, CanTargetSea = true, CanTargetAir = true, 4153 RightMouseAction = "harvest", 4154 CanTransport = {"LandUnit", "only"}, 4155 SideAttack = true, 4156 CanDock = true, 4157 AttackFromTransporter = true, 4158 Trader = true, 4159 ButtonPos = 1, 4160 ButtonKey = "t", 4161 ButtonHint = "Build ~!Transport", 4162 RequirementsString = "Lumber Mill", 4163 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-slowness", "upgrade-item-suffix-of-speed", "upgrade-item-suffix-of-swiftness", "upgrade-item-suffix-of-vulnerability"}, 4164 CanGatherResources = { 4165 { 4166 "resource-id", "trade", 4167 "resource-capacity", 600, 4168 "resource-step", 4, 4169 "wait-at-resource", 6, 4170 "wait-at-depot", 150 4171 } 4172 } 4173}) 4174 4175DefineUnitType("unit-template-siege-warship", { 4176 Name = "Siege Warship", 4177 Parent = "unit-template-ship", 4178 Class = "siege-warship", 4179 Animations = "animations-siege-warship", 4180 Costs = {"time", 90, "copper", 700, "lumber", 3150}, 4181 Speed = 8, 4182 HitPoints = 100, 4183 TileSize = {2, 2}, BoxSize = {63, 63}, 4184 SightRange = 8, 4185 Armor = 10, 4186 BasicDamage = 35, 4187 Missile = "missile-catapult-sandstone-rock", 4188 FireMissile = "missile-flaming-catapult-rock", 4189 MaxAttackRange = 4, 4190 Accuracy = 8, 4191 Evasion = 5, 4192 Priority = 65, AnnoyComputerFactor = 20, 4193 Points = 130, 4194 Demand = 2, 4195 CanTargetLand = true, CanTargetSea = true, CanTargetAir = true, 4196 RightMouseAction = "attack", 4197 SideAttack = true, 4198 CanAttack = true, 4199 CanDock = true, 4200 GroundAttack = true, 4201 NoFriendlyFire = true, -- don't attack a target if friendly units would get hurt too 4202 RequirementsString = "Lumber Mill, Smithy and Engineering", 4203 Sounds = { 4204 "fire-missile", "catapult-attack" 4205 } 4206}) 4207 4208DefineUnitType("unit-template-town-hall", { 4209 Name = "Town Hall", 4210 Parent = "unit-template-building", 4211 Class = "town-hall", 4212 Costs = {"time", 255, "copper", 1200, "lumber", 2400}, 4213 RepairHp = 4, 4214 RepairCosts = {"copper", 1, "lumber", 1}, 4215 Construction = "construction-town-hall", 4216 HitPoints = 1000, -- 1200 with masonry 4217 TileSize = {4, 4}, BoxSize = {127, 127}, 4218 SightRange = 6, 4219 OwnershipInfluenceRange = 5, 4220 Armor = 5, Missile = "missile-none", 4221 Priority = 35, AnnoyComputerFactor = 45, 4222 Points = 200, 4223 Supply = 5, 4224 Corpse = "unit-destroyed-4x4-place", 4225 ExplodeWhenKilled = "missile-explosion", 4226 Type = "land", 4227 TownHall = true, 4228 MetalImprove = true, LumberImprove = true, StoneImprove = true, 4229 BuilderOutside = true, 4230 RecruitHeroes = true, 4231 IncreasesLuxuryDemand = true, 4232 CanStore = {"copper", "silver", "gold", "iron", "mithril", "lumber", "stone", "limestone", "coal", "jewelry", "furniture", "leather", "diamonds", "emeralds"}, 4233 Drops = {"unit-wood-pile"}, 4234 RightMouseAction = "rally-point", 4235 BurnPercent = 50, 4236 BurnDamageRate = 1, 4237 ButtonPos = 1, 4238 ButtonKey = "h", 4239 ButtonHint = "Build Town ~!Hall", 4240 ResourceDemand = {"jewelry", 5, "furniture", 5, "leather", 5}, 4241 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-industrious", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-diligence", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 4242 AiDrops = {"unit-hammer", "unit-mining-pick", "unit-christmas-hat", "unit-crown", "unit-amulet", "unit-ring", "unit-scroll", "unit-book"}, -- worker-related items, as well as those we would expect a center of administration to have 4243 DropSpells = {"spell-detachment", "spell-forgetfulness", "spell-retraining"}, 4244 BuildingRulesString = "Must be built on a Settlement Site", 4245 Sounds = { 4246 "selected", "town-hall-selected", 4247-- "acknowledge", "town-hall-acknowledge", 4248 "ready", "town-hall-ready", 4249-- "help", "basic-dwarf-voices-help", 4250 "dead", "building-destroyed" 4251 } 4252} ) 4253 4254DefineUnitType("unit-template-stronghold", { 4255 Name = "Stronghold", 4256 Parent = "unit-template-town-hall", 4257 Class = "stronghold", 4258 Animations = "animations-stronghold", 4259 Costs = {"time", 200, "copper", 2000, "lumber", 2100, "stone", 1500}, 4260 RepairCosts = {"copper", 1, "lumber", 1, "stone", 1}, 4261 HitPoints = 1167, -- 1400 with masonry 4262 SightRange = 9, 4263 OwnershipInfluenceRange = 8, 4264 BasicDamage = 9, 4265 MaxAttackRange = 6, 4266 GarrisonedRangeBonus = 1, 4267 Accuracy = 10, 4268 Missile = "missile-arrow", 4269 FireMissile = "missile-flaming-arrow", 4270 Priority = 37, AnnoyComputerFactor = 40, 4271 Points = 600, 4272 MaxOnBoard = 3, 4273 CanTransport = {"LandUnit", "only", "Organic", "only", "Fauna", "false"}, 4274 CanAttack = true, 4275 CanTargetLand = true, CanTargetSea = true, CanTargetAir = true, 4276 AttackFromTransporter = true, 4277 SaveCargo = true, 4278 PierceDamage = true, 4279 ButtonLevelForTransporter = "garrison-level", 4280 Drops = {"unit-stone-pile"}, 4281 AiDrops = {}, -- worker-related items, as well as those we would expect a center of administration to have; and military ones, since this is a stronghold 4282 Affixes = {"upgrade-item-suffix-of-the-colossus"}, 4283 RequirementsString = "Barracks and Masonry", 4284 Sounds = { 4285 "selected", "fortress-selected", 4286-- "acknowledge", "town-hall-acknowledge", 4287 "ready", "fortress-ready", 4288-- "help", "basic-dwarf-voices-help", 4289 "fire-missile", "bow" 4290 } 4291} ) 4292 4293DefineUnitType("unit-template-farm", { 4294 Name = "Farm", 4295 Parent = "unit-template-building", 4296 Class = "farm", 4297 Costs = {"time", 100, "copper", 500, "lumber", 750}, 4298 RepairHp = 4, 4299 RepairCosts = {"copper", 1, "lumber", 1}, 4300 Construction = "construction-land", 4301 HitPoints = 334, -- 400 with masonry 4302 TileSize = {2, 2}, BoxSize = {63, 63}, 4303 OwnershipInfluenceRange = 2, 4304 Armor = 5, Missile = "missile-none", 4305 Priority = 20, AnnoyComputerFactor = 45, 4306 Points = 100, 4307 Supply = 4, 4308-- HydratingAura = 1, 4309 Corpse = "unit-destroyed-2x2-place", 4310 ExplodeWhenKilled = "missile-explosion", 4311 Drops = {"unit-cheese", "unit-carrots", "unit-wood-pile"}, 4312 Type = "land", 4313 BuilderOutside = true, 4314 IncreasesLuxuryDemand = true, 4315 BurnPercent = 50, 4316 BurnDamageRate = 1, 4317 ButtonPos = 2, 4318 ButtonKey = "f", 4319 ButtonHint = "Build ~!Farm", 4320 ResourceDemand = {"furniture", 1, "leather", 1}, 4321 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 4322 Sounds = { 4323 "selected", "farm-selected", 4324-- "acknowledge", "farm-acknowledge", 4325 "ready", "farm-ready", 4326-- "help", "basic-dwarf-voices-help", 4327 "dead", "building-destroyed" 4328 } 4329} ) 4330 4331DefineUnitType("unit-template-barracks", { 4332 Name = "Barracks", 4333 Parent = "unit-template-building", 4334 Class = "barracks", 4335 Costs = {"time", 200, "copper", 700, "lumber", 1350}, 4336 RepairHp = 4, 4337 RepairCosts = {"copper", 1, "lumber", 1}, 4338 Construction = "construction-land", 4339 HitPoints = 667, -- 800 with masonry 4340 TileSize = {3, 3}, BoxSize = {95, 95}, 4341 OwnershipInfluenceRange = 2, 4342 Armor = 5, Missile = "missile-none", 4343 Priority = 30, AnnoyComputerFactor = 35, 4344 Points = 160, 4345 Corpse = "unit-destroyed-3x3-place", 4346 ExplodeWhenKilled = "missile-explosion", 4347 Type = "land", 4348 BuilderOutside = true, 4349 IncreasesLuxuryDemand = true, 4350 GarrisonTraining = true, 4351 Drops = {"unit-wood-pile"}, 4352 RightMouseAction = "rally-point", 4353 CostModifier = 25, 4354 BurnPercent = 50, 4355 BurnDamageRate = 1, 4356 ButtonPos = 3, 4357 ButtonKey = "b", 4358 ButtonHint = "Build ~!Barracks", 4359 ResourceDemand = {"furniture", 3, "leather", 3}, 4360 AiDrops = {"unit-club"}, 4361 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-industrious", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-diligence", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 4362 Sounds = { 4363 "selected", "barracks-selected", 4364-- "acknowledge", "barracks-acknowledge", 4365 "ready", "barracks-ready", 4366-- "help", "basic-dwarf-voices-help", 4367 "dead", "building-destroyed" 4368 } 4369} ) 4370 4371DefineUnitType("unit-template-lumber-mill", { 4372 Name = "Lumber Mill", 4373 Parent = "unit-template-building", 4374 Class = "lumber-mill", 4375 Costs = {"time", 150, "copper", 600, "lumber", 1350}, 4376 RepairHp = 4, 4377 RepairCosts = {"copper", 1, "lumber", 1}, 4378 ImproveProduction = {"lumber", 25}, 4379 Construction = "construction-land", 4380 HitPoints = 500, -- 600 with masonry 4381 TileSize = {3, 3}, BoxSize = {95, 95}, 4382 OwnershipInfluenceRange = 2, 4383 Armor = 5, Missile = "missile-none", 4384 Priority = 25, AnnoyComputerFactor = 15, 4385 Points = 150, 4386 Corpse = "unit-destroyed-3x3-place", 4387 ExplodeWhenKilled = "missile-explosion", 4388 Type = "land", 4389 LumberImprove = true, 4390 CanStore = {"lumber"}, 4391 BuilderOutside = true, 4392 CanHarvest = true, -- cannot produce a resource inherently, but can produce furniture through a button 4393 Inexhaustible = true, 4394 IncreasesLuxuryDemand = true, 4395 MaxHarvesters = 5, 4396 Drops = {"unit-wood-pile"}, 4397 CostModifier = 25, 4398 BurnPercent = 50, 4399 BurnDamageRate = 1, 4400 ButtonPos = 4, 4401 ButtonKey = "l", 4402 ButtonHint = "Build ~!Lumber Mill", 4403 ResourceDemand = {"jewelry", 1, "furniture", 3, "leather", 3}, 4404 BuildingRulesString = "Cannot be built close to town halls", 4405 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-industrious", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-diligence", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 4406 Sounds = { 4407 "selected", "lumber-mill-selected", 4408-- "acknowledge", "dwarven-lumber-mill-acknowledge", 4409 "ready", "storehouse-ready", 4410-- "help", "basic-dwarf-voices-help", 4411 "dead", "building-destroyed" 4412 } 4413} ) 4414 4415DefineUnitType("unit-template-smithy", { 4416 Name = "Smithy", 4417 Parent = "unit-template-building", 4418 Class = "smithy", 4419-- Costs = {"time", 200, "copper", 800, "lumber", 450, "oil", 100}, 4420 Costs = {"time", 200, "copper", 800, "lumber", 1650}, 4421 RepairHp = 4, 4422 RepairCosts = {"copper", 1, "lumber", 1}, 4423 Construction = "construction-land-active", 4424 Animations = "animations-active-building", 4425 HitPoints = 646, -- 775 with masonry 4426 TileSize = {3, 3}, BoxSize = {95, 95}, 4427 OwnershipInfluenceRange = 2, 4428 Armor = 5, Missile = "missile-none", 4429 Priority = 15, AnnoyComputerFactor = 20, 4430 Points = 170, 4431 Corpse = "unit-destroyed-3x3-place", 4432 ExplodeWhenKilled = "missile-explosion", 4433 Type = "land", 4434 BuilderOutside = true, 4435 MetalImprove = true, 4436 CanHarvest = true, -- cannot produce a resource inherently, but can produce jewelry through a button 4437 Inexhaustible = true, 4438 IncreasesLuxuryDemand = true, 4439 MaxHarvesters = 5, 4440 CanStore = {"copper", "silver", "gold", "iron", "mithril", "coal", "diamonds", "emeralds"}, 4441 Drops = {"unit-wood-pile"}, 4442 CostModifier = 25, 4443 BurnPercent = 50, 4444 BurnDamageRate = 1, 4445 ButtonPos = 5, 4446 ButtonKey = "s", 4447 ButtonHint = "Build ~!Smithy", 4448 AiDrops = {"unit-hammer", "unit-mining-pick", "unit-club", "unit-crown", "unit-amulet", "unit-ring"}, 4449 ResourceDemand = {"jewelry", 1, "furniture", 3, "leather", 3}, 4450 BuildingRulesString = "Cannot be built close to town halls or mines", 4451 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-industrious", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-diligence", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 4452 Sounds = { 4453 "selected", "smithy-selected", 4454-- "acknowledge", "dwarven-lumber-mill-acknowledge", 4455 "ready", "smithy-ready", 4456-- "help", "basic-dwarf-voices-help", 4457 "dead", "building-destroyed" 4458 } 4459} ) 4460 4461DefineUnitType("unit-template-masons-shop", { 4462 Name = "Mason's Shop", 4463 Parent = "unit-template-building", 4464 Class = "masons-shop", 4465 Costs = {"time", 150, "copper", 600, "lumber", 1350}, 4466 RepairHp = 4, 4467 RepairCosts = {"copper", 1, "lumber", 1}, 4468 ImproveProduction = {"stone", 25}, 4469 Construction = "construction-land", 4470 HitPoints = 500, -- 600 with masonry 4471 TileSize = {3, 3}, BoxSize = {95, 95}, 4472 OwnershipInfluenceRange = 2, 4473 Armor = 5, Missile = "missile-none", 4474 Priority = 25, AnnoyComputerFactor = 15, 4475 Points = 150, 4476 Corpse = "unit-destroyed-3x3-place", 4477 ExplodeWhenKilled = "missile-explosion", 4478 Type = "land", 4479 StoneImprove = true, 4480 CanStore = {"stone"}, 4481 BuilderOutside = true, 4482 IncreasesLuxuryDemand = true, 4483 MaxHarvesters = 5, 4484 Drops = {"unit-wood-pile", "unit-stone-pile"}, 4485 CostModifier = 25, 4486 BurnPercent = 50, 4487 BurnDamageRate = 1, 4488 ResourceDemand = {"jewelry", 1, "furniture", 3, "leather", 3}, 4489 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-industrious", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-diligence", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 4490 Sounds = { 4491 "selected", "storehouse-selected", 4492-- "acknowledge", "dwarven-lumber-mill-acknowledge", 4493 "ready", "storehouse-ready", 4494-- "help", "basic-dwarf-voices-help", 4495 "dead", "building-destroyed" 4496 } 4497} ) 4498 4499DefineUnitType("unit-template-stables", { 4500 Name = "Stables", 4501 Parent = "unit-template-building", 4502 Class = "stables", 4503 Costs = {"time", 150, "copper", 1000, "lumber", 900}, 4504 RepairHp = 4, 4505 RepairCosts = {"copper", 1, "lumber", 1}, 4506 Construction = "construction-land", 4507 HitPoints = 417, -- 500 with masonry 4508 TileSize = {3, 3}, BoxSize = {95, 95}, 4509 OwnershipInfluenceRange = 2, 4510 Armor = 5, Missile = "missile-none", 4511 Priority = 15, AnnoyComputerFactor = 15, 4512 Points = 210, 4513 Corpse = "unit-destroyed-3x3-place", 4514 ExplodeWhenKilled = "missile-explosion", 4515 Type = "land", 4516 BuilderOutside = true, 4517 IncreasesLuxuryDemand = true, 4518 Drops = {"unit-wood-pile"}, 4519 CostModifier = 25, 4520 BurnPercent = 50, 4521 BurnDamageRate = 1, 4522 ButtonPos = 6, 4523 ButtonKey = "e", 4524 ButtonHint = "Build Stabl~!es", 4525 ResourceDemand = {"furniture", 1, "leather", 3}, 4526 RequirementsString = "Lumber Mill", 4527 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-industrious", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-diligence", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 4528 Sounds = { 4529 "selected", "stables-selected", 4530-- "acknowledge", "dwarven-lumber-mill-acknowledge", 4531 "ready", "stables-ready", 4532-- "help", "basic-dwarf-voices-help", 4533 "dead", "building-destroyed" 4534 } 4535} ) 4536 4537DefineUnitType("unit-template-temple", { 4538 Name = "Temple", 4539 Parent = "unit-template-building", 4540 Class = "temple", 4541 Costs = {"time", 175, "copper", 900, "lumber", 1500}, 4542 RepairHp = 4, 4543 RepairCosts = {"copper", 1, "lumber", 1}, 4544 Construction = "construction-land", 4545 HitPoints = 584, -- 700 with masonry 4546 TileSize = {3, 3}, BoxSize = {95, 95}, 4547 SightRange = 3, 4548 OwnershipInfluenceRange = 2, 4549 Armor = 5, Missile = "missile-none", 4550 Priority = 15, AnnoyComputerFactor = 35, 4551 Points = 240, 4552 Corpse = "unit-destroyed-3x3-place", 4553 ExplodeWhenKilled = "missile-explosion", 4554 Type = "land", 4555 BuilderOutside = true, 4556 IncreasesLuxuryDemand = true, 4557 RightMouseAction = "rally-point", 4558 Drops = {"unit-wood-pile"}, 4559 CostModifier = 25, 4560 BurnPercent = 50, 4561 BurnDamageRate = 1, 4562 RegenerationAura = 1, 4563 ButtonPos = 7, 4564 ButtonKey = "p", 4565 ButtonHint = "Build Tem~!ple", 4566 UnitStock = {"unit-potion-of-healing", 6}, 4567 ResourceDemand = {"jewelry", 4, "furniture", 4, "leather", 4}, 4568 RequirementsString = "Lumber Mill", 4569 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-industrious", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-diligence", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 4570 AiDrops = {"unit-crown", "unit-amulet", "unit-ring", "unit-scroll", "unit-book", "unit-potion-of-healing", "unit-elixir-of-dexterity", "unit-elixir-of-intelligence", "unit-elixir-of-strength", "unit-elixir-of-vitality"}, 4571 DropSpells = {"spell-detachment", "spell-forgetfulness", "spell-retraining"}, 4572 Sounds = { 4573 "selected", "temple-selected", 4574-- "acknowledge", "dwarven-lumber-mill-acknowledge", 4575 "ready", "temple-ready", 4576-- "help", "basic-dwarf-voices-help", 4577 "dead", "building-destroyed" 4578 } 4579} ) 4580 4581DefineUnitType("unit-template-university", { 4582 Name = "University", 4583 Parent = "unit-template-building", 4584 Class = "university", 4585 Costs = {"time", 175, "copper", 900, "lumber", 1500}, 4586 RepairHp = 4, 4587 RepairCosts = {"copper", 1, "lumber", 1}, 4588 Construction = "construction-land", 4589 HitPoints = 584, -- 700 with masonry 4590 TileSize = {3, 3}, BoxSize = {95, 95}, 4591 OwnershipInfluenceRange = 2, 4592 Armor = 5, Missile = "missile-none", 4593 Priority = 15, AnnoyComputerFactor = 35, 4594 Points = 240, 4595 Corpse = "unit-destroyed-3x3-place", 4596 ExplodeWhenKilled = "missile-explosion", 4597 Type = "land", 4598 BuilderOutside = true, 4599 IncreasesLuxuryDemand = true, 4600 RightMouseAction = "rally-point", 4601 Drops = {"unit-wood-pile"}, 4602 CostModifier = 25, 4603 BurnPercent = 50, 4604 BurnDamageRate = 1, 4605 ResourceDemand = {"jewelry", 4, "furniture", 4, "leather", 4}, 4606 RequirementsString = "Lumber Mill", 4607 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-industrious", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-diligence", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 4608 AiDrops = {"unit-amulet", "unit-ring", "unit-scroll", "unit-book", "unit-potion-of-healing", "unit-elixir-of-dexterity", "unit-elixir-of-intelligence", "unit-elixir-of-strength", "unit-elixir-of-vitality"}, 4609 DropSpells = {"spell-detachment", "spell-forgetfulness", "spell-retraining"}, 4610 Sounds = { 4611 "selected", "temple-selected", 4612-- "acknowledge", "dwarven-lumber-mill-acknowledge", 4613 "ready", "temple-ready", 4614-- "help", "basic-dwarf-voices-help", 4615 "dead", "building-destroyed" 4616 } 4617} ) 4618 4619DefineUnitType("unit-template-watch-tower", { 4620 Name = "Watch Tower", 4621 Parent = "unit-template-building", 4622 Class = "watch-tower", 4623 Costs = {"time", 60, "copper", 550, "lumber", 300, "stone", 300}, 4624 RepairHp = 4, 4625 RepairCosts = {"copper", 1, "lumber", 1, "stone", 1}, 4626 Construction = "construction-land", 4627 HitPoints = 167, -- 200 with masonry 4628 TileSize = {2, 2}, BoxSize = {63, 63}, 4629 SightRange = 9, 4630 OwnershipInfluenceRange = 4, 4631 Armor = 5, Missile = "missile-none", 4632 Priority = 55, AnnoyComputerFactor = 50, 4633 Points = 95, 4634 Corpse = "unit-destroyed-2x2-place", 4635 ExplodeWhenKilled = "missile-explosion", 4636 Type = "land", 4637 CanTargetLand = true, CanTargetSea = true, CanTargetAir = true, 4638 DetectCloak = true, 4639 MaxOnBoard = 1, 4640 CanTransport = {"LandUnit", "only", "Organic", "only", "Fauna", "false"}, 4641 AttackFromTransporter = true, 4642 SaveCargo = true, 4643 BuilderOutside = true, 4644 Drops = {"unit-wood-pile", "unit-stone-pile"}, 4645-- RightMouseAction = "attack", 4646 BurnPercent = 50, 4647 BurnDamageRate = 1, 4648 ButtonPos = 8, 4649 ButtonKey = "t", 4650 ButtonHint = "Build Watch ~!Tower", 4651 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-the-colossus", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 4652 Sounds = { 4653 "selected", "tower-selected", 4654-- "acknowledge", "dwarven-sentry-tower-acknowledge", 4655 "ready", "tower-ready", 4656-- "help", "basic-dwarf-voices-help", 4657 "dead", "building-destroyed" 4658 } 4659} ) 4660 4661DefineUnitType("unit-template-guard-tower", { 4662 Name = "Guard Tower", 4663 Parent = "unit-template-building", 4664 Class = "guard-tower", 4665 Animations = "animations-guard-tower", 4666 Costs = {"time", 140, "copper", 500, "lumber", 225, "stone", 225}, 4667 RepairHp = 4, 4668 RepairCosts = {"copper", 1, "lumber", 1, "stone", 1}, 4669 Construction = "construction-land", 4670 HitPoints = 217, -- 260 with masonry 4671 TileSize = {2, 2}, BoxSize = {63, 63}, 4672 SightRange = 9, 4673 OwnershipInfluenceRange = 4, 4674 Armor = 5, 4675 BasicDamage = 9, 4676 MaxAttackRange = 6, 4677 Accuracy = 10, 4678 GarrisonedRangeBonus = 1, 4679 Missile = "missile-arrow", 4680 FireMissile = "missile-flaming-arrow", 4681 Priority = 50, AnnoyComputerFactor = 60, 4682 Points = 200, 4683 Corpse = "unit-destroyed-2x2-place", 4684 ExplodeWhenKilled = "missile-explosion", 4685 Type = "land", 4686 CanAttack = true, 4687 CanTargetLand = true, CanTargetSea = true, CanTargetAir = true, 4688 DetectCloak = true, 4689 MaxOnBoard = 1, 4690 CanTransport = {"LandUnit", "only", "Organic", "only", "Fauna", "false"}, 4691 AttackFromTransporter = true, 4692 SaveCargo = true, 4693 PierceDamage = true, 4694 Drops = {"unit-wood-pile", "unit-stone-pile"}, 4695 BurnPercent = 50, 4696 BurnDamageRate = 1, 4697 RequirementsString = "Lumber Mill and Masonry", 4698 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-the-colossus", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 4699 Sounds = { 4700 "selected", "tower-selected", 4701-- "acknowledge", "dwarven-sentry-tower-acknowledge", 4702 "ready", "tower-ready", 4703-- "help", "basic-dwarf-voices-help", 4704 "dead", "building-destroyed", 4705 "fire-missile", "bow" 4706 } 4707} ) 4708 4709DefineUnitType("unit-template-heavy-tower", { 4710 Name = "Heavy Tower", 4711 Parent = "unit-template-building", 4712 Class = "heavy-tower", 4713 Animations = "animations-heavy-tower", 4714 Costs = {"time", 190, "copper", 1000, "lumber", 450, "stone", 450}, 4715 RepairHp = 4, 4716 RepairCosts = {"copper", 1, "lumber", 1, "stone", 1}, 4717 Construction = "construction-land", 4718 HitPoints = 267, -- 320 with masonry 4719 TileSize = {2, 2}, BoxSize = {63, 63}, 4720 SightRange = 9, 4721 OwnershipInfluenceRange = 4, 4722 Armor = 5, 4723 BasicDamage = 40, 4724 MinAttackRange = 2, MaxAttackRange = 7, 4725 Accuracy = 8, 4726 Missile = "missile-catapult-sandstone-rock", 4727 FireMissile = "missile-flaming-catapult-rock", 4728 Priority = 60, AnnoyComputerFactor = 70, 4729 Points = 250, 4730 Corpse = "unit-destroyed-2x2-place", 4731 ExplodeWhenKilled = "missile-explosion", 4732 Type = "land", 4733 CanAttack = true, 4734 CanTargetLand = true, CanTargetSea = true, 4735 DetectCloak = true, 4736 Drops = {"unit-wood-pile", "unit-stone-pile"}, 4737 BurnPercent = 50, 4738 BurnDamageRate = 1, 4739 RequirementsString = "Lumber Mill, Smithy, Engineering and Masonry", 4740 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-the-colossus", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 4741 Sounds = { 4742 "selected", "tower-selected", 4743-- "acknowledge", "dwarven-sentry-tower-acknowledge", 4744 "ready", "tower-ready", 4745-- "help", "basic-dwarf-voices-help", 4746 "dead", "building-destroyed", 4747 "fire-missile", "catapult-attack" 4748 } 4749} ) 4750 4751DefineUnitType("unit-template-cannon-tower", { 4752 Name = "Cannon Tower", 4753 Parent = "unit-template-heavy-tower", 4754 Class = "cannon-tower", 4755 BasicDamage = 65, 4756 Accuracy = 9, 4757 Missile = "missile-cannon-ball", 4758 FireMissile = "missile-cannon-ball", 4759 Points = 300, 4760 BluntDamage = true, 4761 RequirementsString = "Lumber Mill, Smithy, Masonry, Engineering and Gunpowder", 4762 Sounds = { 4763 "fire-missile", "dragonstick" 4764 } 4765} ) 4766 4767DefineUnitType("unit-template-market", { 4768 Name = "Market", 4769 Parent = "unit-template-building", 4770 Class = "market", 4771 Costs = {"time", 200, "copper", 800, "lumber", 1350}, 4772 RepairHp = 4, 4773 RepairCosts = {"copper", 1, "lumber", 1}, 4774 Construction = "construction-land", 4775 HitPoints = 917, -- 1100 with masonry 4776 TileSize = {3, 3}, BoxSize = {95, 95}, 4777 OwnershipInfluenceRange = 2, 4778 Armor = 5, Missile = "missile-none", 4779 Priority = 30, AnnoyComputerFactor = 20, 4780 Points = 170, 4781 Corpse = "unit-destroyed-3x3-place", 4782 ExplodeWhenKilled = "missile-explosion", 4783 Type = "land", 4784 BuilderOutside = true, 4785 Market = true, 4786 IncreasesLuxuryDemand = true, 4787 GivesResource = "trade", 4788 CanStore = {"trade"}, 4789 CanHarvest = true, 4790 Inexhaustible = true, 4791 StartingResources = {1000}, 4792 Drops = {"unit-wood-pile"}, 4793 RightMouseAction = "rally-point", 4794 CostModifier = 25, 4795 BurnPercent = 50, 4796 BurnDamageRate = 1, 4797 TradeCost = 30, 4798 ResourceDemand = {"jewelry", 3, "furniture", 3, "leather", 3}, 4799 RequirementsString = "Lumber Mill", 4800 BuildingRulesString = "Cannot be built close to other markets", 4801 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-industrious", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-diligence", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 4802 SoldUnits = {"unit-hammer", "unit-mining-pick", "unit-club", "unit-short-spear", "unit-long-spear", "unit-pike", "unit-hand-cannon", "unit-horn", "unit-christmas-hat", "unit-crown", "unit-amulet", "unit-ring", "unit-scroll", "unit-book", "unit-cheese", "unit-carrots", "unit-potion-of-healing", "unit-elixir-of-dexterity", "unit-elixir-of-intelligence", "unit-elixir-of-strength", "unit-elixir-of-vitality"}, 4803 AiDrops = {"unit-christmas-hat", "unit-crown", "unit-amulet", "unit-ring"}, 4804 DropSpells = {"spell-detachment", "spell-forgetfulness", "spell-retraining"}, 4805 Sounds = { 4806 "selected", "market-selected", 4807-- "acknowledge", "dwarven-lumber-mill-acknowledge", 4808 "ready", "market-ready", 4809-- "help", "basic-dwarf-voices-help", 4810 "dead", "building-destroyed" 4811 } 4812} ) 4813 4814DefineUnitType("unit-template-dock", { 4815 Name = "Dock", 4816 Parent = "unit-template-building", 4817 Class = "dock", 4818 Costs = {"time", 200, "copper", 800, "lumber", 1350}, 4819 RepairHp = 4, 4820 RepairCosts = {"copper", 1, "lumber", 1}, 4821 Construction = "construction-dock", 4822 HitPoints = 917, -- 1100 with masonry 4823 TileSize = {3, 3}, BoxSize = {95, 95}, 4824 OwnershipInfluenceRange = 2, 4825 Armor = 5, Missile = "missile-none", 4826 Priority = 30, AnnoyComputerFactor = 20, 4827 Points = 170, 4828-- Corpse = "unit-destroyed-3x3-place", 4829 ExplodeWhenKilled = "missile-explosion", 4830 Type = "land", 4831 BuilderOutside = true, 4832 ShoreBuilding = true, 4833 GivesResource = "trade", 4834 CanStore = {"trade", "oil"}, 4835 CanHarvest = true, 4836 Inexhaustible = true, 4837 IncreasesLuxuryDemand = true, 4838 StartingResources = {1000}, 4839-- Drops = {"unit-wood-pile"}, 4840 RightMouseAction = "rally-point", 4841 CostModifier = 25, 4842 BurnPercent = 50, 4843 BurnDamageRate = 1, 4844 ButtonPos = 9, 4845 ButtonKey = "d", 4846 ButtonHint = "Build ~!Dock", 4847 ResourceDemand = {"jewelry", 3, "furniture", 3, "leather", 3}, 4848 RequirementsString = "Lumber Mill", 4849 BuildingRulesString = "Cannot be built close to other docks", 4850 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-industrious", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-diligence", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 4851 Sounds = { 4852 "selected", "dock-selected", 4853-- "acknowledge", "dwarven-lumber-mill-acknowledge", 4854 "ready", "dock-ready", 4855-- "help", "basic-dwarf-voices-help", 4856 "dead", "building-destroyed" 4857 } 4858} ) 4859 4860DefineUnitType("unit-template-palisade", { 4861 Name = "Palisade", 4862 Class = "palisade", 4863 Animations = "animations-building", 4864 Costs = {"time", 30, "copper", 20, "lumber", 30}, 4865 Construction = "construction-land-1x1", 4866 RepairHp = 4, 4867 RepairCosts = {"copper", 1, "lumber", 1}, 4868 HitPoints = 100, 4869 DrawLevel = 39, 4870 TileSize = {1, 1}, BoxSize = {31, 31}, 4871 SightRange = 1, 4872 Armor = 5, Missile = "missile-none", 4873 Priority = 0, AnnoyComputerFactor = 45, 4874 Points = 1, 4875-- Corpse = "unit-destroyed-1x1-place", 4876 ExplodeWhenKilled = "missile-explosion", 4877 Type = "land", 4878 Building = true, VisibleUnderFog = true, Wall = true, 4879 BuilderOutside = true, 4880 HiddenInEditor = true, 4881 Sounds = { 4882 "dead", "building-destroyed" 4883 } 4884} ) 4885 4886DefineUnitType("unit-template-wall", { 4887 Name = "Wall", 4888 Class = "wall", 4889 Animations = "animations-building", 4890 Costs = {"time", 30, "copper", 40, "stone", 60}, 4891 Construction = "construction-land-1x1", 4892 RepairHp = 4, 4893 RepairCosts = {"copper", 1, "stone", 1}, 4894 HitPoints = 200, 4895 DrawLevel = 39, 4896 TileSize = {1, 1}, BoxSize = {31, 31}, 4897 SightRange = 1, 4898 Armor = 20, Missile = "missile-none", 4899 Priority = 0, AnnoyComputerFactor = 45, 4900 Points = 1, 4901-- Corpse = "unit-destroyed-1x1-place", 4902 ExplodeWhenKilled = "missile-explosion", 4903 Type = "land", 4904 Building = true, VisibleUnderFog = true, Wall = true, 4905 BuilderOutside = true, 4906 HiddenInEditor = true, 4907 RequirementsString = "Masonry", 4908 Sounds = { 4909 "dead", "building-destroyed" 4910 } 4911} ) 4912 4913-- Load the different civilizations 4914Load("scripts/civilizations/celt/units.lua") 4915Load("scripts/civilizations/dwarf/units.lua") 4916Load("scripts/civilizations/elf/units.lua") 4917Load("scripts/civilizations/ettin/units.lua") 4918Load("scripts/civilizations/frankish/units.lua") 4919Load("scripts/civilizations/germanic/units.lua") 4920Load("scripts/civilizations/gnome/units.lua") 4921Load("scripts/civilizations/goblin/units.lua") 4922Load("scripts/civilizations/goth/units.lua") 4923Load("scripts/civilizations/kobold/units.lua") 4924Load("scripts/civilizations/suebi/units.lua") 4925Load("scripts/civilizations/teuton/units.lua") 4926Load("scripts/civilizations/norse/units.lua") 4927Load("scripts/civilizations/latin/units.lua") 4928Load("scripts/civilizations/slav/units.lua") 4929 4930-- Other civilizations' units 4931 4932DefineUnitType("unit-orc-spearthrower", { 4933 Name = "Spearthrower", 4934 Parent = "unit-template-archer", 4935 Civilization = "orc", 4936-- Description = "Amongst orcs, throwing spears are often regarded as a cowardly weapon; but even orcs, especially youths and those of slight build, are pragmatic enough to use them in spite of this. Orcish spearthrowers are seldom well equipped, and have no semblance of training. Even as poorly handled as they are, their weapons can still be quite deadly, and the wielders thereof rarely march alone.", 4937 Image = {"file", "dwarf/units/dwarven_scout.png", "size", {72, 72}}, 4938 Animations = "animations-weapon-thrower", Icon = "icon-orc-spearthrower", 4939 Missile = "missile-javelin", 4940 WeaponClasses = {"javelin"}, 4941 PierceDamage = true, 4942-- Corpse = "unit-dwarven-dead-body", 4943 HiddenInEditor = true, 4944 Sounds = { 4945 "selected", "basic-dwarf-voices-selected-group", 4946 "acknowledge", "basic-dwarf-voices-acknowledge", 4947 "ready", "dwarven-scout-ready", 4948-- "help", "basic-dwarf-voices-help", 4949 "dead", "basic-dwarf-voices-dead" 4950 } 4951} ) 4952 4953DefineUnitType("unit-orc-sea-orc", { 4954 Name = "Sea Orc", 4955 Parent = "unit-template-unit", 4956 Class = "marine-infantry", 4957 Civilization = "orc", 4958-- Description = "While often viewed as inferior to their land-loving counterparts, sea orcs represent a great leap for all orcs as they have adapted to aquatic environments. These orcs use their ships to raid the coasts of the Eelhome Sea. With their curved swords they are competent warriors, although their poor fighting skills on land do represent a strategic weakness.", 4959-- Image = {"file", "dwarf/units/dwarven_axefighter.png", "size", {72, 72}}, 4960 Animations = "animations-dwarven-axefighter", Icon = "icon-orc-sea-orc", 4961 Costs = {"time", 60, "copper", 600}, 4962 Speed = 10, 4963 HitPoints = 60, 4964 TileSize = {1, 1}, BoxSize = {31, 31}, 4965 SightRange = 4, 4966 Armor = 2, BasicDamage = 9, Missile = "missile-none", 4967 MaxAttackRange = 1, 4968 Priority = 60, 4969 Points = 50, 4970 Demand = 1, 4971-- Corpse = "unit-dwarven-dead-body", 4972 Type = "land", 4973 RightMouseAction = "attack", 4974 CanAttack = true, 4975 CanTargetLand = true, 4976 WeaponClasses = {"sword", "thrusting-sword"}, 4977 HackDamage = true, 4978 HiddenInEditor = true, 4979 Sounds = { 4980 "hit", "sword-attack", 4981 "miss", "attack-miss" 4982 } 4983} ) 4984 4985DefineUnitType("unit-orc-shaman", { 4986 Name = "Shaman", 4987 Parent = "unit-template-unit", 4988 Class = "priest", 4989 Civilization = "orc", 4990-- Description = "Orc shamans are the guardians of orcish magic. Respected among orcish tribes, they form the Orcish Council, which makes important decisions for the whole orcish community and arbitrates the many conflicts that arise between tribes of this argumentative race.", 4991-- Image = {"file", "dwarf/units/dwarven_axefighter.png", "size", {72, 72}}, 4992 Animations = "animations-dwarven-axefighter", Icon = "icon-orc-shaman", 4993 Costs = {"time", 60, "copper", 600}, 4994 Speed = 10, 4995 HitPoints = 60, 4996 TileSize = {1, 1}, BoxSize = {31, 31}, 4997 SightRange = 4, 4998 Armor = 2, BasicDamage = 9, Missile = "missile-none", 4999 MaxAttackRange = 1, 5000 Priority = 60, 5001 Points = 50, 5002 Demand = 1, 5003-- Corpse = "unit-dwarven-dead-body", 5004 Type = "land", 5005 RightMouseAction = "attack", 5006 CanAttack = true, 5007 CanTargetLand = true, 5008 BluntDamage = true, 5009 HiddenInEditor = true 5010} ) 5011 5012DefineUnitType("unit-water-elemental", { 5013 Name = "Water Elemental", 5014 Parent = "unit-template-unit", 5015-- Description = "These creatures inhabit the primordial water plane of Nun. Although in many respects they act like a living being, they seem to be nearly entirely made out of water, putting in doubt just what they really are.", 5016-- Image = {"file", "dwarf/units/dwarven_axefighter.png", "size", {72, 72}}, 5017 Animations = "animations-dwarven-axefighter", Icon = "icon-water-elemental", 5018 Costs = {"time", 70, "copper", 500, "lumber", 150}, 5019 Speed = 8, 5020 HitPoints = 60, 5021 TileSize = {1, 1}, BoxSize = {36, 36}, 5022 SightRange = 3, 5023 BasicDamage = 12, Missile = "missile-none", 5024 MaxAttackRange = 3, 5025 Priority = 63, 5026 Points = 100, 5027 Demand = 1, 5028 Type = "land", 5029 RightMouseAction = "attack", 5030 CanAttack = true, 5031 CanTargetLand = true, CanTargetSea = true, CanTargetAir = true, 5032 HiddenInEditor = true, 5033 Sounds = { 5034 "dead", "squishy-hit", 5035 "hit", "squishy-attack", 5036 "miss", "squishy-miss" 5037 } 5038} ) 5039 5040DefineUnitType("unit-long-swordsman", { 5041 Name = "Long Swordsman", 5042 Parent = "unit-template-unit", 5043 Image = {"file", "neutral/units/long_swordsman.png", "size", {72, 72}}, 5044 Animations = "animations-static-npc", Icon = "icon-long-swordsman", 5045 Costs = {"time", 60, "copper", 600}, 5046 Speed = 10, 5047 HitPoints = 60, 5048 TileSize = {1, 1}, BoxSize = {31, 31}, 5049 SightRange = 4, 5050 Armor = 2, BasicDamage = 9, Missile = "missile-none", 5051 MaxAttackRange = 1, 5052 Priority = 60, 5053 Points = 50, 5054 Demand = 1, 5055 Corpse = "unit-human-dead-body", 5056 Type = "land", 5057-- RightMouseAction = "attack", 5058 CanAttack = false, -- since it doesn't have attack animations as of now 5059-- CanTargetLand = true, 5060 Indestructible = true, -- because it doesn't have death animations 5061 WeaponClasses = {"sword"}, 5062 HackDamage = true, 5063 NumDirections = 1, 5064 HiddenInEditor = true, 5065 Sounds = { 5066 "selected", "click", 5067 "dead", "basic-human-voices-dead" 5068 } 5069} ) 5070 5071-- define the mercenary camp after the rest because it refers to unit types of the civilizations 5072DefineUnitType("unit-mercenary-camp", { 5073 Name = "Mercenary Camp", 5074 Parent = "unit-template-building", 5075 Civilization = "neutral", 5076 Class = "mercenary-camp", 5077 Description = "This camp houses a number of mercenary groups, who offer their talents for hire.", 5078 Image = {"file", "neutral/buildings/mercenary_camp.png", "size", {96, 99}}, 5079 Shadow = {"file", "neutral/buildings/mercenary_camp_shadow.png", "size", {96, 99}}, 5080 NeutralMinimapColor = {192, 192, 192}, 5081 Animations = "animations-mercenary-camp", Icon = "icon-mercenary-camp", 5082 Costs = {"time", 200, "copper", 700, "lumber", 1350}, 5083 RepairHp = 4, 5084 RepairCosts = {"copper", 1, "lumber", 1}, 5085 Construction = "construction-land", 5086 HitPoints = 800, 5087 TileSize = {3, 3}, BoxSize = {95, 95}, 5088 Armor = 20, Missile = "missile-none", 5089 Priority = 30, AnnoyComputerFactor = 35, 5090 Corpse = "unit-destroyed-3x3-place", 5091 ExplodeWhenKilled = "missile-explosion", 5092 Type = "land", 5093 Drops = {"unit-wood-pile"}, 5094 RightMouseAction = "rally-point", 5095 BurnPercent = 50, 5096 BurnDamageRate = 1, 5097 RecruitHeroes = true, 5098 UnitStock = { 5099 "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, 5100 "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, 5101 "unit-kobold-footpad", 4, 5102 "unit-ettin", 1, 5103 "unit-latin-legionary", 4, "unit-latin-javelineer", 3, 5104 "unit-norse-swordsman", 4, 5105 "unit-slavic-swordsman", 4, 5106 "unit-troll-warrior", 2 5107 }, 5108 Affixes = {"upgrade-item-prefix-frail", "upgrade-item-prefix-impregnable", "upgrade-item-prefix-sturdy", "upgrade-item-prefix-vulnerable", "upgrade-item-suffix-of-frailty", "upgrade-item-suffix-of-vulnerability"}, 5109 Sounds = { 5110 "selected", "click", 5111-- "acknowledge", "barracks-acknowledge", 5112-- "ready", "barracks-ready", 5113-- "help", "basic-dwarf-voices-help", 5114 "dead", "building-destroyed" 5115 } 5116} ) 5117 5118 5119DefineUnitType("unit-dungeon-wall", { 5120 Name = "Dungeon Wall", 5121 TerrainType = "dungeon-wall", 5122 Image = {"file", "neutral/buildings/glyph.png", "size", {32, 32}}, 5123 Animations = "animations-building", Icon = "icon-english-lumber-mill", 5124 Costs = {"time", 30, "copper", 40, "stone", 60}, 5125 Construction = "construction-land-1x1", 5126 RepairHp = 4, 5127 RepairCosts = {"copper", 1, "lumber", 1, "stone", 1}, 5128 HitPoints = 200, 5129 DrawLevel = 39, 5130 TileSize = {1, 1}, BoxSize = {31, 31}, 5131 SightRange = 1, 5132 Armor = 20, Missile = "missile-none", 5133 Priority = 0, AnnoyComputerFactor = 45, 5134 Points = 1, 5135-- Corpse = "unit-destroyed-1x1-place", 5136 ExplodeWhenKilled = "missile-explosion", 5137 Type = "land", 5138 Indestructible = true, Building = true, VisibleUnderFog = true, Wall = true, 5139 BuilderOutside = true, 5140 HiddenInEditor = true, 5141 Sounds = { 5142 "dead", "building-destroyed" 5143 } 5144} ) 5145 5146DefineUnitType("unit-road", { 5147 Name = "Road", 5148 Civilization = "neutral", 5149 Class = "road", 5150 Description = "The construction of roads allows trade caravans - and armies - to more efficiently move from one point to another.", 5151 TerrainType = "road", 5152 Image = {"file", "neutral/buildings/road.png", "size", {32, 32}}, 5153 Shadow = {"file", "neutral/buildings/road_shadow.png", "size", {32, 32}}, 5154 Animations = "animations-building", Icon = "icon-road", 5155 Costs = {"time", 30, "copper", 20, "lumber", 15, "stone", 15}, 5156 Construction = "construction-land-1x1", 5157 RepairHp = 4, 5158 RepairCosts = {"copper", 1, "lumber", 1, "stone", 1}, 5159 HitPoints = 40, 5160 DrawLevel = 39, 5161 TileSize = {1, 1}, BoxSize = {31, 31}, 5162 SightRange = 1, 5163 Armor = 20, Missile = "missile-none", 5164 SpeedBonus = 1, 5165 Priority = 0, AnnoyComputerFactor = 45, 5166 Points = 1, 5167-- Corpse = "unit-destroyed-1x1-place", 5168 ExplodeWhenKilled = "missile-explosion", 5169 Type = "land", 5170 Building = true, VisibleUnderFog = true, 5171 BuilderOutside = true, 5172 HiddenInEditor = true, 5173 RequirementsString = "Masonry", 5174 Sounds = { 5175 "dead", "building-destroyed" 5176 } 5177} ) 5178 5179DefineUnitType("unit-railroad", { 5180 Name = "Railroad", 5181 Civilization = "neutral", 5182 Class = "railroad", 5183 Description = "Railways allow the usage of certain vehicles - such as minecarts.\n\nNote: Railroads grant their speed bonus to all land units, not just rail units.", 5184 TerrainType = "railroad", 5185 Image = {"file", "neutral/buildings/railroad.png", "size", {32, 32}}, 5186 Shadow = {"file", "neutral/buildings/railroad_shadow.png", "size", {32, 32}}, 5187 Animations = "animations-building", Icon = "icon-railroad", 5188 Costs = {"time", 30, "copper", 350, "lumber", 150}, 5189 Construction = "construction-land-1x1", 5190 RepairHp = 4, 5191 RepairCosts = {"copper", 1, "lumber", 1}, 5192 HitPoints = 40, 5193 DrawLevel = 39, 5194 TileSize = {1, 1}, BoxSize = {31, 31}, 5195 SightRange = 1, 5196 Armor = 20, Missile = "missile-none", 5197 SpeedBonus = 1, 5198 Priority = 0, AnnoyComputerFactor = 45, 5199 Points = 1, 5200-- Corpse = "unit-destroyed-1x1-place", 5201 ExplodeWhenKilled = "missile-explosion", 5202 Type = "land", 5203 Building = true, VisibleUnderFog = true, 5204 BuilderOutside = true, 5205 HiddenInEditor = true, 5206 RequirementsString = "Engineering", 5207 Sounds = { 5208 "dead", "building-destroyed" 5209 } 5210} ) 5211 5212SetSettlementSiteUnit("unit-settlement-site")