| 1 |
-- ____ _ __ |
| 2 |
-- / __ )____ _____ | | / /___ ___________ |
| 3 |
-- / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/ |
| 4 |
-- / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ ) |
| 5 |
-- /_____/\____/____/ |__/|__/\__,_/_/ /____/ |
| 6 |
-- |
| 7 |
-- A futuristic real-time strategy game. |
| 8 |
-- This file is part of Bos Wars. |
| 9 |
-- |
| 10 |
-- unit-bazoo.lua - Define the bazoo |
| 11 |
-- |
| 12 |
-- (c) Copyright 2001 - 2010 by 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 |
|
| 29 |
DefineIcon({ |
| 30 |
Name = "icon-bazoo", |
| 31 |
Size = {46, 38}, |
| 32 |
Frame = 0, |
| 33 |
File = GetCurrentLuaPath().."/ico_bazoo.png"}) |
| 34 |
|
| 35 |
DefineAnimations("animations-bazoo", { |
| 36 |
Still = {"frame 0", "wait 1", }, |
| 37 |
Move = {"unbreakable begin", "frame 5", "move 2", "wait 2", |
| 38 |
"frame 5", "move 2", "wait 1", "frame 5", "move 2", "wait 2", |
| 39 |
"frame 5", "move 2", "wait 1", "frame 10", "move 2", "wait 2", |
| 40 |
"frame 10", "move 2", "wait 1", "frame 10", "move 2", "wait 2", |
| 41 |
"frame 10", "move 2", "wait 1", "frame 15", "move 2", "wait 2", |
| 42 |
"frame 15", "move 2", "wait 1", "frame 15", "move 2", "wait 2", |
| 43 |
"frame 15", "move 2", "wait 1", "frame 20", "move 2", "wait 2", |
| 44 |
"frame 20", "move 2", "wait 1", "frame 20", "move 2", "wait 2", |
| 45 |
"frame 20", "move 2", "wait 1", "frame 20", "unbreakable end", "wait 1", }, |
| 46 |
Attack = {"unbreakable begin", "frame 25", "wait 2", |
| 47 |
"frame 30", "sound bazoo-attack", "attack", "wait 2", |
| 48 |
"frame 35", "sound bazoo-attack", "wait 2", "frame 0", "wait 150", |
| 49 |
"frame 0", "unbreakable end", "wait 1", }, |
| 50 |
Death = {"unbreakable begin", "frame 40", "wait 2", "frame 45", "wait 2", |
| 51 |
"frame 50", "wait 2", "frame 55", "unbreakable end", "wait 2", }, |
| 52 |
}) |
| 53 |
|
| 54 |
MakeSound("bazoo-selected", GetCurrentLuaPath().."/bazoo_select.wav") |
| 55 |
MakeSound("bazoo-acknowledge", GetCurrentLuaPath().."/bazoo_action.wav") |
| 56 |
MakeSound("bazoo-ready", GetCurrentLuaPath().."/bazoo.ready.wav") |
| 57 |
MakeSound("bazoo-help", GetCurrentLuaPath().."/bazoo.underattack.wav") |
| 58 |
MakeSound("bazoo-die", GetCurrentLuaPath().."/bazoo_die.wav") |
| 59 |
MakeSound("bazoo-attack", GetCurrentLuaPath().."/bazoo_attack.wav") |
| 60 |
|
| 61 |
DefineUnitType("unit-bazoo", { |
| 62 |
Name = "Bazoo", |
| 63 |
Image = {"file", GetCurrentLuaPath().."/unit_bazoo.png", "size", {64, 64}}, |
| 64 |
Shadow = {"file", GetCurrentLuaPath().."/unit_bazoo_s.png", "size", {64, 64}}, |
| 65 |
Animations = "animations-bazoo", |
| 66 |
Icon = "icon-bazoo", |
| 67 |
Flip = true, |
| 68 |
EnergyValue = 1500, |
| 69 |
MagmaValue = 1000, |
| 70 |
HitPoints = 50, |
| 71 |
DrawLevel = 25, |
| 72 |
TileSize = {1, 1}, |
| 73 |
BoxSize = {17, 28}, |
| 74 |
SightRange = 7, |
| 75 |
ComputerReactionRange = 6, |
| 76 |
PersonReactionRange = 6, |
| 77 |
Armor = 2, |
| 78 |
BasicDamage = 5, |
| 79 |
PiercingDamage = 15, |
| 80 |
Missile = "missile-bazoo", |
| 81 |
MaxAttackRange = 6, |
| 82 |
Priority = 60, |
| 83 |
Points = 50, |
| 84 |
Corpse = "unit-dead-body4", |
| 85 |
Type = "land", |
| 86 |
RightMouseAction = "attack", |
| 87 |
CanAttack = true, |
| 88 |
CanTargetLand = true, |
| 89 |
CanTargetAir = true, |
| 90 |
CanTargetSea = true, |
| 91 |
Organic = true, |
| 92 |
SelectableByRectangle = true, |
| 93 |
Sounds = { |
| 94 |
"selected", "bazoo-selected", |
| 95 |
"acknowledge", "bazoo-acknowledge", |
| 96 |
"ready", "bazoo-ready", |
| 97 |
"help", "bazoo-help", |
| 98 |
"dead", "bazoo-die"} |
| 99 |
}) |
| 100 |
DefineHumanCorpse("bazoo", nil, true) |
| 101 |
|
| 102 |
DefineAllow("unit-bazoo", AllowAll) |