| 1 |
-- ____ _ __ |
| 2 |
-- / __ )____ _____ | | / /___ ___________ |
| 3 |
-- / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/ |
| 4 |
-- / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ ) |
| 5 |
-- /_____/\____/____/ |__/|__/\__,_/_/ /____/ |
| 6 |
-- |
| 7 |
-- A futuristic real-time strategy game. |
| 8 |
-- This file is part of Bos Wars. |
| 9 |
-- |
| 10 |
-- engineer.lua - Define the engineer unit. |
| 11 |
-- |
| 12 |
-- (c) Copyright 2001 - 2007 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-engineer", |
| 31 |
Size = {46, 38}, |
| 32 |
Frame = 0, |
| 33 |
File = GetCurrentLuaPath().."/ico_engineer.png"}) |
| 34 |
|
| 35 |
DefineAnimations("animations-engineer", { |
| 36 |
Still = {"frame 0", "wait 1", }, |
| 37 |
Move = {"unbreakable begin", "frame 5", "move 2", "wait 2", |
| 38 |
"frame 5", "move 2", "wait 2", "frame 5", "move 2", "wait 2", |
| 39 |
"frame 5", "move 2", "wait 2", "frame 10", "move 2", "wait 2", |
| 40 |
"frame 10", "move 2", "wait 2", "frame 10", "move 2", "wait 2", |
| 41 |
"frame 10", "move 2", "wait 2", "frame 15", "move 2", "wait 2", |
| 42 |
"frame 15", "move 2", "wait 2", "frame 15", "move 2", "wait 2", |
| 43 |
"frame 15", "move 2", "wait 2", "frame 20", "move 2", "wait 2", |
| 44 |
"frame 20", "move 2", "wait 2", "frame 20", "move 2", "wait 2", |
| 45 |
"frame 20", "move 2", "unbreakable end", "frame 0", "wait 2", }, |
| 46 |
Repair = {"unbreakable begin", "frame 25", "wait 8", "frame 30", "wait 2", |
| 47 |
"frame 35", "wait 2", "frame 40", "sound engineer-repair", "wait 8", |
| 48 |
"frame 35", "wait 3", "frame 30", "wait 2", "unbreakable end", "wait 1", }, |
| 49 |
Harvest = {"frame 25", "wait 8", "frame 30", "wait 2", |
| 50 |
"frame 35", "wait 2", "frame 40", "sound engineer-harvest", "wait 8", |
| 51 |
"frame 35", "wait 3", "frame 30", "wait 3", }, |
| 52 |
Death = {"unbreakable begin", "frame 45", "wait 5", "frame 50", "wait 5", |
| 53 |
"frame 55", "wait 5", "frame 50", "unbreakable end", "wait 5", }, |
| 54 |
}) |
| 55 |
|
| 56 |
MakeSound("engineer-selected", GetCurrentLuaPath().."/engineer_select.wav") |
| 57 |
MakeSound("engineer-acknowledge", GetCurrentLuaPath().."/engineer_action.wav") |
| 58 |
MakeSound("engineer-ready", GetCurrentLuaPath().."/engineer.ready.wav") |
| 59 |
MakeSound("engineer-help", GetCurrentLuaPath().."/engineer.underattack.wav") |
| 60 |
MakeSound("engineer-die", GetCurrentLuaPath().."/engineer_die.wav") |
| 61 |
MakeSound("engineer-repair", GetCurrentLuaPath().."/engineer_attack.wav") |
| 62 |
MakeSound("engineer-harvest", GetCurrentLuaPath().."/engineer_attack.wav") |
| 63 |
|
| 64 |
DefineUnitType("unit-engineer", { |
| 65 |
Name = "Engineer", |
| 66 |
Image = {"file", GetCurrentLuaPath().."/unit_engineer.png", "size", {56, 56}}, |
| 67 |
Shadow = {"file", GetCurrentLuaPath().."/unit_engineer_s.png", "size", {56, 56}}, |
| 68 |
Animations = "animations-engineer", |
| 69 |
Icon = "icon-engineer", |
| 70 |
Flip = true, |
| 71 |
EnergyValue = 1600, |
| 72 |
MagmaValue = 800, |
| 73 |
MaxEnergyUtilizationRate = 40, |
| 74 |
MaxMagmaUtilizationRate = 20, |
| 75 |
HitPoints = 30, |
| 76 |
DrawLevel = 25, |
| 77 |
TileSize = {1, 1}, |
| 78 |
BoxSize = {17, 28}, |
| 79 |
SightRange = 5, |
| 80 |
ComputerReactionRange = 6, |
| 81 |
PersonReactionRange = 4, |
| 82 |
Armor = 1, |
| 83 |
BasicDamage = 0, |
| 84 |
PiercingDamage = 0, |
| 85 |
Missile = "missile-none", |
| 86 |
MaxAttackRange = 1, |
| 87 |
Priority = 50, |
| 88 |
Points = 30, |
| 89 |
Corpse = "unit-dead-body2", |
| 90 |
Type = "land", |
| 91 |
RightMouseAction = "harvest", |
| 92 |
RepairRange = 1, |
| 93 |
AutoRepairRange = 5, |
| 94 |
CanTargetLand = true, |
| 95 |
Coward = true, |
| 96 |
Harvester = true, |
| 97 |
Organic = true, |
| 98 |
SelectableByRectangle = true, |
| 99 |
Sounds = { |
| 100 |
"selected", "engineer-selected", |
| 101 |
"acknowledge", "engineer-acknowledge", |
| 102 |
"ready", "engineer-ready", |
| 103 |
"help", "engineer-help", |
| 104 |
"dead", "engineer-die"} |
| 105 |
}) |
| 106 |
DefineHumanCorpse("engineer", {56, 56}, true) |
| 107 |
|
| 108 |
DefineAllow("unit-engineer", AllowAll) |