| 1 |
-- ____ _ __ |
| 2 |
-- / __ )____ _____ | | / /___ ___________ |
| 3 |
-- / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/ |
| 4 |
-- / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ ) |
| 5 |
-- /_____/\____/____/ |__/|__/\__,_/_/ /____/ |
| 6 |
-- |
| 7 |
-- A futuristic real-time strategy game. |
| 8 |
-- This file is part of Bos Wars. |
| 9 |
-- |
| 10 |
-- unit-aircraftfactory.lua - Define the aircraft factory |
| 11 |
-- |
| 12 |
-- (c) Copyright 2001 - 2012 by Loïs Taulelle, Francois Beerten, Lutz Sammer and Crestez Leonard |
| 13 |
-- |
| 14 |
-- This program is free software; you can redistribute it and/or modify |
| 15 |
-- it under the terms of the GNU General Public License as published by |
| 16 |
-- the Free Software Foundation; either version 2 of the License, or |
| 17 |
-- (at your option) any later version. |
| 18 |
-- |
| 19 |
-- This program is distributed in the hope that it will be useful, |
| 20 |
-- but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 |
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 |
-- GNU General Public License for more details. |
| 23 |
-- |
| 24 |
-- You should have received a copy of the GNU General Public License |
| 25 |
-- along with this program; if not, write to the Free Software |
| 26 |
-- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 27 |
-- |
| 28 |
-- $Id: unit-developmentyard.lua 8920 2007-06-23 21:28:48Z jim4 $ |
| 29 |
|
| 30 |
DefineIcon({ |
| 31 |
Name = "icon-dev", |
| 32 |
Size = {46, 38}, |
| 33 |
Frame = 0, |
| 34 |
File = GetCurrentLuaPath() .. "/aircraftfactory_i.png"}) |
| 35 |
|
| 36 |
DefineConstruction("construction-aircraftfactory", { |
| 37 |
Constructions = { |
| 38 |
{Percent = 0, File = "main", Frame = 0}, |
| 39 |
{Percent = 11, File = "main", Frame = 1}, |
| 40 |
{Percent = 22, File = "main", Frame = 2}, |
| 41 |
{Percent = 33, File = "main", Frame = 3}, |
| 42 |
{Percent = 44, File = "main", Frame = 4}, |
| 43 |
{Percent = 55, File = "main", Frame = 5}, |
| 44 |
{Percent = 66, File = "main", Frame = 6}, |
| 45 |
{Percent = 77, File = "main", Frame = 7}, |
| 46 |
{Percent = 88, File = "main", Frame = 8} |
| 47 |
} |
| 48 |
}) |
| 49 |
DefineAnimations("animations-aircraftfactory", { |
| 50 |
Still = {"frame 10", "wait 60", "frame 11", "wait 60", "frame 12", "wait 60", |
| 51 |
"frame 13", "wait 60", "frame 14", "wait 60" }, |
| 52 |
Train = {"frame 15", "wait 3", "frame 16", "wait 3", "frame 17", "wait 3", |
| 53 |
"frame 18", "wait 30", } |
| 54 |
}) |
| 55 |
|
| 56 |
-- TODO make new sounds for aircraftfactory |
| 57 |
MakeSound("aircraftfactory-selected", GetCurrentLuaPath().."/aircraftfactory.select.wav") |
| 58 |
--MakeSound("aircraftfactory-dead", GetCurrentLuaPath().."/sfx_fort.die.wav") |
| 59 |
MakeSound("aircraftfactory-ready", GetCurrentLuaPath().."/aircraftfactory.completed.wav") |
| 60 |
MakeSound("aircraftfactory-help", GetCurrentLuaPath().."/aircraftfactory.underattack.wav") |
| 61 |
|
| 62 |
DefineUnitType("unit-aircraftfactory", { |
| 63 |
Name = "Aircraft Factory", |
| 64 |
Image = {"file", GetCurrentLuaPath() .. "/aircraftfactory.png", "size", {256, 256}}, |
| 65 |
Shadow = {"file", GetCurrentLuaPath().."/aircraftfactory_s.png", "size", {256, 256}}, |
| 66 |
Animations = "animations-aircraftfactory", |
| 67 |
Icon = "icon-dev", |
| 68 |
EnergyValue = 12000, |
| 69 |
MagmaValue = 6000, |
| 70 |
RepairHp = 4, |
| 71 |
Construction = "construction-aircraftfactory", |
| 72 |
HitPoints = 500, |
| 73 |
DrawLevel = 25, |
| 74 |
TileSize = {7, 6}, |
| 75 |
BoxSize = {224, 196}, |
| 76 |
SightRange = 4, |
| 77 |
Armor = 30, |
| 78 |
BasicDamage = 0, |
| 79 |
PiercingDamage = 0, |
| 80 |
Missile = "missile-none", |
| 81 |
Priority = 35, |
| 82 |
AnnoyComputerFactor = 45, |
| 83 |
Points = 200, |
| 84 |
ExplodeWhenKilled = "missile-288x288-explosion", |
| 85 |
Corpse = "build-dead-aircraftfactory", |
| 86 |
Type = "land", |
| 87 |
VisibleUnderFog = true, |
| 88 |
Building = true, |
| 89 |
MaxEnergyUtilizationRate = 60, |
| 90 |
MaxMagmaUtilizationRate = 30, |
| 91 |
CanHarvestFrom = true, |
| 92 |
Sounds = { |
| 93 |
"selected", "aircraftfactory-selected", |
| 94 |
-- "dead", "aircraftfactory-dead", |
| 95 |
"ready", "aircraftfactory-ready", |
| 96 |
"help", "aircraftfactory-help"} |
| 97 |
}) |
| 98 |
|
| 99 |
DefineAnimations("animations-dead-aircraftfactory", { |
| 100 |
Death = {"unbreakable begin", "wait 1", "frame 0", "wait 2000", |
| 101 |
"frame 1", "wait 200", "frame 2", "wait 200", "frame 2", "wait 1", |
| 102 |
"unbreakable end", "wait 1", }, |
| 103 |
}) |
| 104 |
DefineUnitType("build-dead-aircraftfactory", { |
| 105 |
Name = "aircraftfactoryCrater", |
| 106 |
Image = {"file", GetCurrentLuaPath().."/aircraftfactory_c.png", "size", {256, 256}}, |
| 107 |
Animations = "animations-dead-aircraftfactory", |
| 108 |
Icon = "icon-cancel", |
| 109 |
HitPoints = 999, |
| 110 |
DrawLevel = 10, |
| 111 |
TileSize = {7, 6}, |
| 112 |
BoxSize = {220, 192}, |
| 113 |
SightRange = 1, |
| 114 |
BasicDamage = 0, |
| 115 |
PiercingDamage = 0, |
| 116 |
Missile = "missile-none", |
| 117 |
Priority = 0, |
| 118 |
Type = "land", |
| 119 |
Building = true, |
| 120 |
Vanishes = true, |
| 121 |
Sounds = {} |
| 122 |
}) |
| 123 |
|
| 124 |
DefineAllow("unit-aircraftfactory", AllowAll) |
| 125 |
|
| 126 |
DefineButton({ |
| 127 |
Pos = 7, Level = 2, Icon = "icon-dev_b", Action = "build", |
| 128 |
Value = "unit-aircraftfactory", Hint = "BUILD ~!AIRCRAFT FACTORY", |
| 129 |
ForUnit = {"unit-engineer"}}) |
| 130 |
|