| 1 |
-- ____ _ __ |
| 2 |
-- / __ )____ _____ | | / /___ ___________ |
| 3 |
-- / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/ |
| 4 |
-- / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ ) |
| 5 |
-- /_____/\____/____/ |__/|__/\__,_/_/ /____/ |
| 6 |
-- |
| 7 |
-- A futuristic real-time strategy game. |
| 8 |
-- This file is part of Bos Wars. |
| 9 |
-- |
| 10 |
-- unit-nukeplant.lua - Define the nukeplant |
| 11 |
-- |
| 12 |
-- (c) Copyright 2001 - 2007 by François 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-nukeplant.lua 287 2005-11-24 21:55:35Z feb $ |
| 29 |
|
| 30 |
DefineIcon({ |
| 31 |
Name = "icon-nukepowerplant", |
| 32 |
Size = {46, 38}, |
| 33 |
Frame = 0, |
| 34 |
File = GetCurrentLuaPath().."/nukeplant_i.png"}) |
| 35 |
|
| 36 |
DefineConstruction("construction-nukepowerplant", { |
| 37 |
Constructions = { |
| 38 |
{Percent = 0, File = "main", Frame = 0}, |
| 39 |
{Percent = 10, File = "main", Frame = 1}, |
| 40 |
{Percent = 20, File = "main", Frame = 2}, |
| 41 |
{Percent = 30, File = "main", Frame = 3}, |
| 42 |
{Percent = 40, File = "main", Frame = 4}, |
| 43 |
{Percent = 50, File = "main", Frame = 5}, |
| 44 |
{Percent = 60, File = "main", Frame = 6}, |
| 45 |
{Percent = 70, File = "main", Frame = 7}, |
| 46 |
{Percent = 80, File = "main", Frame = 8}, |
| 47 |
{Percent = 90, File = "main", Frame = 9} |
| 48 |
} |
| 49 |
}) |
| 50 |
|
| 51 |
DefineAnimations("animations-nukepowerplant", { |
| 52 |
Still = {"frame 10", "wait 20", "frame 11", "wait 20", "frame 12", "wait 20", |
| 53 |
"frame 13", "wait 20", "frame 14", "wait 20", "wait 20", }, |
| 54 |
}) |
| 55 |
|
| 56 |
MakeSound("nuke-selected", GetCurrentLuaPath().."/sfx_pplnt.select.wav") |
| 57 |
MakeSound("nuke-ready", GetCurrentLuaPath().."/power.plant.completed.wav") |
| 58 |
MakeSound("nuke-help", GetCurrentLuaPath().."/power.plant.underattack.wav") |
| 59 |
MakeSound("nuke-dead", GetCurrentLuaPath().."/sfx_pplnt.die.wav") |
| 60 |
|
| 61 |
DefineUnitType("unit-nukepowerplant", { |
| 62 |
Name = "Nuclear Power Plant", |
| 63 |
Image = {"file", GetCurrentLuaPath().."/nukeplant.png", "size", {256, 256}}, |
| 64 |
Shadow = {"file", GetCurrentLuaPath().."/nukeplant_s.png", "size", {256, 256}}, |
| 65 |
Animations = "animations-nukepowerplant", |
| 66 |
Icon = "icon-nukepowerplant", |
| 67 |
EnergyValue = 1600, |
| 68 |
MagmaValue = 270, |
| 69 |
EnergyProductionRate = 46, |
| 70 |
RepairHp = 2, |
| 71 |
Construction = "construction-nukepowerplant", |
| 72 |
HitPoints = 350, |
| 73 |
DrawLevel = 25, |
| 74 |
TileSize = {7, 5}, |
| 75 |
BoxSize = {224, 160}, |
| 76 |
SightRange = 3, |
| 77 |
Armor = 15, |
| 78 |
BasicDamage = 0, |
| 79 |
PiercingDamage = 0, |
| 80 |
Missile = "missile-none", |
| 81 |
Priority = 50, |
| 82 |
AnnoyComputerFactor = 55, |
| 83 |
Points = 200, |
| 84 |
DeathExplosion = nuclearExplosion, |
| 85 |
Corpse = "build-dead-nukepowerplant", |
| 86 |
Type = "land", |
| 87 |
Building = true, |
| 88 |
VisibleUnderFog = true, |
| 89 |
CanHarvestFrom = true, |
| 90 |
Sounds = { |
| 91 |
"selected", "nuke-selected", |
| 92 |
"ready", "nuke-ready", |
| 93 |
"help", "nuke-help", |
| 94 |
"dead", "nuke-dead"} |
| 95 |
}) |
| 96 |
|
| 97 |
DefineAnimations("animations-dead-nukepowerplant", { |
| 98 |
Death = {"unbreakable begin", "wait 1", "frame 0", "wait 2000", |
| 99 |
"frame 1", "wait 200", "frame 2", "wait 200", "frame 2", "wait 1", |
| 100 |
"unbreakable end", "wait 1", }, |
| 101 |
}) |
| 102 |
|
| 103 |
DefineUnitType("build-dead-nukepowerplant", { |
| 104 |
Name = "NuclearplantCrater", |
| 105 |
Image = {"file", GetCurrentLuaPath().."/nukeplant_c.png", "size", {256, 256}}, |
| 106 |
Animations = "animations-dead-nukepowerplant", |
| 107 |
Icon = "icon-cancel", |
| 108 |
HitPoints = 999, |
| 109 |
DrawLevel = 10, |
| 110 |
TileSize = {7, 5}, |
| 111 |
BoxSize = {224, 160}, |
| 112 |
SightRange = 1, |
| 113 |
BasicDamage = 0, |
| 114 |
PiercingDamage = 0, |
| 115 |
Missile = "missile-none", |
| 116 |
Priority = 0, |
| 117 |
Type = "land", |
| 118 |
Building = true, |
| 119 |
Vanishes = true |
| 120 |
}) |
| 121 |
|
| 122 |
|
| 123 |
DefineAllow("unit-nukepowerplant", AllowAll) |
| 124 |
|
| 125 |
DefineButton({ |
| 126 |
Pos = 7, Level = 1, Icon = "icon-nukepowerplant", Action = "build", |
| 127 |
Value = "unit-nukepowerplant", |
| 128 |
Hint = "BUILD ~!Nuclear Power Plant", |
| 129 |
ForUnit = {"unit-engineer"}}) |