| 1 |
-- ____ _ __ |
| 2 |
-- / __ )____ _____ | | / /___ ___________ |
| 3 |
-- / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/ |
| 4 |
-- / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ ) |
| 5 |
-- /_____/\____/____/ |__/|__/\__,_/_/ /____/ |
| 6 |
-- |
| 7 |
-- A futuristic real-time strategy game. |
| 8 |
-- This file is part of Bos Wars. |
| 9 |
-- |
| 10 |
-- unit-tree.lua - Define the tree unit. |
| 11 |
-- |
| 12 |
-- (c) Copyright 2005-2007 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-tree", { |
| 30 |
Still = {"frame 0", "random-wait 255 5000", "frame 1", "wait 6", |
| 31 |
"frame 2", "wait 6", "frame 3", "wait 6", "frame 2", "wait 6", |
| 32 |
"frame 1", "wait 6", }, |
| 33 |
Death = {"unbreakable begin", "frame 0", "unbreakable end", "wait 10", }, |
| 34 |
}) |
| 35 |
|
| 36 |
DefineIcon({ |
| 37 |
Name = "icon-tree", |
| 38 |
Size = {46, 38}, |
| 39 |
Frame = 0, |
| 40 |
File = "units/tree/tree01_i.png"}) |
| 41 |
|
| 42 |
DefineConstruction("construction-tree", { |
| 43 |
Constructions = { |
| 44 |
{Percent = 0, File = "main", Frame = 0}, |
| 45 |
} |
| 46 |
}) |
| 47 |
|
| 48 |
DefineUnitType("unit-tree", { |
| 49 |
Name = "Tree", |
| 50 |
Image = {"file", "units/tree/tree01.png", "size", {105, 105}}, |
| 51 |
Offset = {16, -24}, |
| 52 |
Shadow = {"file", "units/tree/tree01_s.png", "size", {105, 105}}, |
| 53 |
Animations = "animations-tree", |
| 54 |
Icon = "icon-tree", |
| 55 |
Construction = "construction-tree", |
| 56 |
EnergyValue = 5000, |
| 57 |
HitPoints = 50, |
| 58 |
DrawLevel = 25, |
| 59 |
TileSize = {1, 1}, |
| 60 |
BoxSize = {32, 32}, |
| 61 |
NeutralMinimapColor = {73, 159, 9}, |
| 62 |
SightRange = 1, |
| 63 |
Armor = 0, |
| 64 |
BasicDamage = 0, |
| 65 |
PiercingDamage = 0, |
| 66 |
Missile = "missile-none", |
| 67 |
Priority = 0, |
| 68 |
AnnoyComputerFactor = 0, |
| 69 |
Points = 10, |
| 70 |
ExplodeWhenKilled = "missile-64x64-explosion", |
| 71 |
Corpse = "unit-destroyed-1x1-place", |
| 72 |
Type = "land", |
| 73 |
Building = true, |
| 74 |
VisibleUnderFog = true, |
| 75 |
NumDirections = 1, |
| 76 |
CanHarvestFrom = true, |
| 77 |
Neutral = true, |
| 78 |
Sounds = {} |
| 79 |
}) |
| 80 |
|
| 81 |
DefineAllow("unit-tree", AllowAll) |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|