Debian Codegraph @

units/rtank/unit-rtank.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-rtank.lua - Define the rocket tank 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-rtank", {
30 Still = {"frame 0", "wait 1", },
31 Move = {"unbreakable begin", "frame 0", "move 2", "wait 1",
32 "frame 0", "move 2", "wait 1", "frame 0", "move 2", "wait 1",
33 "frame 0", "move 2", "wait 1", "frame 0", "move 2", "wait 1",
34 "frame 0", "move 2", "wait 1", "frame 0", "move 2", "wait 1",
35 "frame 0", "move 2", "wait 1", "frame 0", "move 2", "wait 1",
36 "frame 0", "move 2", "wait 1", "frame 0", "move 2", "wait 1",
37 "frame 0", "move 2", "wait 1", "frame 0", "move 2", "wait 1",
38 "frame 0", "move 2", "wait 1", "frame 0", "move 2", "wait 1",
39 "frame 0", "move 2", "unbreakable end", "wait 1", },
40 Attack = {"unbreakable begin", "frame 0", "wait 4",
41 "frame 5", "sound bazoo-attack", "attack", "wait 1",
42 "frame 0", "wait 2",
43 "frame 5", "attack", "wait 1",
44 "frame 0", "wait 59", "unbreakable end", "wait 1", },
45 Death = {"unbreakable begin", "frame 10", "wait 5", "frame 15", "wait 5", "frame 20", "unbreakable end", "wait 20", },
46 })
47
48 DefineIcon({
49 Name = "icon-rtank",
50 Size = {46, 38},
51 Frame = 0,
52 File = "units/rtank/ico_rtank.png"})
53
54 MakeSound("rtank-ready", GetCurrentLuaPath().."/rtank.ready.wav")
55 MakeSound("rtank-help", GetCurrentLuaPath().."/rtank.underattack.wav")
56
57 DefineUnitType("unit-rtank", {
58 Name = "Rocket Tank",
59 Image = {"file", "units/rtank/unit_rtank.png", "size", {96, 96}},
60 Shadow = {"file", "units/rtank/unit_rtank_s.png", "size", {96, 96}},
61 Animations = "animations-rtank",
62 Icon = "icon-rtank",
63 EnergyValue = 6000,
64 MagmaValue = 3000,
65 RepairHp = 1,
66 HitPoints = 50,
67 DrawLevel = 25,
68 TileSize = {1, 1},
69 BoxSize = {64, 64},
70 SightRange = 7,
71 Armor = 20,
72 BasicDamage = 5,
73 PiercingDamage = 30,
74 Missile = "missile-bazoo",
75 Priority = 20,
76 AnnoyComputerFactor = 65,
77 Points = 15,
78 ExplodeWhenKilled = "missile-64x64-explosion",
79 Type = "land",
80 ComputerReactionRange = 10,
81 PersonReactionRange = 10,
82 RightMouseAction = "attack",
83 SelectableByRectangle = true,
84 CanAttack = true,
85 CanTargetLand = true,
86 CanTargetAir = true,
87 CanTargetSea = true,
88 NumDirections = 8,
89 MaxAttackRange = 6,
90 Sounds = {
91 "selected", "grenadier-selected",
92 "acknowledge", "grenadier-acknowledge",
93 "ready", "rtank-ready",
94 "help", "rtank-help"
95 }
96 })
97
98 DefineAllow("unit-rtank", AllowAll)
99
100 DefineButton({
101 Pos = 5, Level = 0, Icon = "icon-rtank", Action = "train-unit",
102 Value = "unit-rtank", Hint = "BUILD ~!ROCKET TANK",
103 ForUnit = {"unit-vfac"}})
104
105 DefineCommonButtons({"unit-rtank"})
106
107
108