| 1 |
-- ____ _ __ |
| 2 |
-- / __ )____ _____ | | / /___ ___________ |
| 3 |
-- / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/ |
| 4 |
-- / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ ) |
| 5 |
-- /_____/\____/____/ |__/|__/\__,_/_/ /____/ |
| 6 |
-- |
| 7 |
-- A futuristic real-time strategy game. |
| 8 |
-- This file is part of Bos Wars. |
| 9 |
-- |
| 10 |
-- unit-heli.lua - Define the heli unit. |
| 11 |
-- |
| 12 |
-- (c) Copyright 2008 by Francois Beerten. |
| 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 |
|
| 29 |
DefineAnimations("animations-heli", { |
| 30 |
Still = {"unbreakable begin", "frame 0", "wait 1", "frame 5", "wait 1", |
| 31 |
"frame 10", "wait 1", "unbreakable end", "wait 1"}, |
| 32 |
Move = {"unbreakable begin", "frame 0", "move 2", "wait 1", |
| 33 |
"frame 5", "move 2", "wait 1", "frame 10", "move 2", "wait 1", |
| 34 |
"frame 0", "move 2", "wait 1", "frame 5", "move 2", "wait 1", |
| 35 |
"frame 10", "move 2", "wait 1", "frame 0", "move 2", "wait 1", |
| 36 |
"frame 5", "move 2", "wait 1", "frame 10", "move 2", "wait 1", |
| 37 |
"frame 0", "move 2", "wait 1", "frame 5", "move 2", "wait 1", |
| 38 |
"frame 10", "move 2", "wait 1", "frame 0", "move 2", "wait 1", |
| 39 |
"frame 5", "move 2", "wait 1", "frame 10", "move 2", "wait 1", |
| 40 |
"frame 0", "move 2", "wait 1", "frame 5", "unbreakable end", "wait 1",}, |
| 41 |
Attack = {"unbreakable begin", "frame 25", "wait 1", |
| 42 |
"frame 20", "sound assault-attack", "attack", "wait 2", |
| 43 |
"frame 15", "wait 1", |
| 44 |
"frame 10", "wait 1", "frame 5", "wait 1", "frame 0", "wait 1", |
| 45 |
"frame 10", "wait 1", "frame 5", "wait 1", "frame 0", "wait 1", |
| 46 |
"frame 10", "wait 1", "frame 5", "wait 1", "frame 0", "wait 1", |
| 47 |
"unbreakable end", "wait 1", }, |
| 48 |
Death = {"unbreakable begin", "frame 30", "wait 4", "frame 35", |
| 49 |
"wait 4", "frame 40", "wait 4", |
| 50 |
"frame 45", "wait 6", "unbreakable end", "wait 2", }, |
| 51 |
}) |
| 52 |
|
| 53 |
DefineIcon({ |
| 54 |
Name = "icon-heli", |
| 55 |
Size = {46, 38}, |
| 56 |
Frame = 0, |
| 57 |
File = "units/heli/ico_heli.png"}) |
| 58 |
|
| 59 |
DefineUnitType("unit-heli", { |
| 60 |
Name = "Heli", |
| 61 |
Image = {"file", "units/heli/unit_heli.png", "size", {128,128}}, |
| 62 |
Shadow = {"file", "units/heli/unit_heli_s.png", "size", {128, 128}, "offset", {5,128}}, |
| 63 |
Animations = "animations-heli", |
| 64 |
Icon = "icon-heli", |
| 65 |
EnergyValue = 5500, |
| 66 |
MagmaValue = 2000, |
| 67 |
HitPoints = 40, |
| 68 |
DrawLevel = 125, |
| 69 |
TileSize = {1, 1}, |
| 70 |
BoxSize = {64, 64}, |
| 71 |
SightRange = 7, |
| 72 |
Armor = 10, |
| 73 |
BasicDamage = 5, |
| 74 |
PiercingDamage = 2, |
| 75 |
Missile = "missile-none", |
| 76 |
Priority = 20, |
| 77 |
AnnoyComputerFactor = 65, |
| 78 |
Points = 15, |
| 79 |
ExplodeWhenKilled = "missile-64x64-explosion", |
| 80 |
Type = "fly", |
| 81 |
ComputerReactionRange = 10, |
| 82 |
PersonReactionRange = 10, |
| 83 |
RightMouseAction = "attack", |
| 84 |
SelectableByRectangle = true, |
| 85 |
CanAttack = true, |
| 86 |
CanTargetLand = true, |
| 87 |
CanTargetAir = true, |
| 88 |
NumDirections = 8, |
| 89 |
MaxAttackRange = 7, |
| 90 |
}) |
| 91 |
|
| 92 |
DefineAllow("unit-heli", AllowAll) |
| 93 |
|
| 94 |
DefineButton({ |
| 95 |
Pos = 4, Level = 0, Icon = "icon-heli", Action = "train-unit", |
| 96 |
Value = "unit-heli", Hint = "BUILD ~!HELI", |
| 97 |
ForUnit = {"unit-aircraftfactory"}}) |
| 98 |
|
| 99 |
DefineCommonButtons({"unit-heli"}) |
| 100 |
|
| 101 |
|
| 102 |
|