Debian Codegraph @

units/plants/unit-plant.lua

raw
1 -- ____ _ __
2 -- / __ )____ _____ | | / /___ ___________
3 -- / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
4 -- / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
5 -- /_____/\____/____/ |__/|__/\__,_/_/ /____/
6 --
7 -- A futuristic real-time strategy game.
8 -- This file is part of Bos Wars.
9 --
10 -- unit-plant.lua - Define the plant units.
11 --
12 -- (c) Copyright 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 -- $Id: unit-tree.lua 8780 2007-04-27 20:53:31Z feb $
29
30 DefineAnimations("animations-static", {
31 Still = {"frame 0", "wait 1", },
32 Death = {"unbreakable begin", "frame 0", "unbreakable end", "wait 1", },
33 })
34
35
36 DefineConstruction("construction-static", {
37 Constructions = {
38 {Percent = 0, File = "main", Frame = 0},
39 }
40 })
41
42 function DefinePlantType(internalname, name, image_size,
43 tilesize, offsets)
44 DefineIcon({
45 Name = "icon-"..internalname,
46 Size = {46, 38},
47 Frame = 0,
48 File = "units/plants/"..internalname.."_icon.png"})
49 DefineUnitType("unit-"..internalname, {
50 Name = name,
51 Image = {"file", "units/plants/"..internalname..".png", "size", image_size},
52 Offset = offsets,
53 Shadow = {"file", "units/plants/"..internalname.."_shadow.png", "size", image_size},
54 Animations = "animations-static",
55 Icon = "icon-"..internalname,
56 Construction = "construction-static",
57 EnergyValue = 3000,
58 HitPoints = 50,
59 DrawLevel = 25,
60 TileSize = tilesize,
61 BoxSize = {32*tilesize[1], 32*tilesize[2]},
62 NeutralMinimapColor = {73, 159, 9},
63 SightRange = 1,
64 Armor = 0,
65 BasicDamage = 0,
66 PiercingDamage = 0,
67 Missile = "missile-none",
68 Priority = 0,
69 AnnoyComputerFactor = 0,
70 Points = 10,
71 ExplodeWhenKilled = "missile-64x64-explosion",
72 Type = "land",
73 Building = true,
74 VisibleUnderFog = true,
75 NumDirections = 1,
76 CanHarvestFrom = true,
77 Sounds = {},
78 Neutral = true
79 })
80 DefineAllow("unit-"..internalname, AllowAll)
81 end
82
83 DefinePlantType("pitcher",
84 "Pitcher",
85 {128, 128},
86 {3, 3},
87 {0, -16})
88 DefinePlantType("rafflesia",
89 "Rafflesia",
90 {128, 128},
91 {3, 2},
92 {0, -26})
93
94
95
96
97
98
99