Debian Codegraph @

units/buggy/unit-buggy.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-buggy.lua - Define the buggy unit.
11 --
12 -- (c) Copyright 2004-2005 by gorm.
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-dead_buggy", {
30 Death = {"unbreakable begin", "frame 30", "wait 50",
31 "frame 35", "sound grenade-impact", "wait 1", "frame 40", "wait 1",
32 "frame 45", "wait 1", "frame 50", "wait 1", "frame 55", "wait 1",
33 "frame 60", "wait 1","frame 65", "wait 2",
34 "unbreakable end", "wait 1", },
35 })
36
37 DefineAnimations("animations-buggy", {
38 Still = {"frame 0", "wait 1", },
39 Move = {"unbreakable begin", "frame 0", "move 2", "wait 1",
40 "frame 0", "move 2", "wait 1", "frame 0", "move 2", "wait 1",
41 "frame 0", "move 2", "wait 1", "frame 5", "move 2", "wait 1",
42 "frame 5", "move 2", "wait 1", "frame 10", "move 2", "wait 1",
43 "frame 10", "move 2", "wait 1", "frame 0", "move 2", "wait 1",
44 "frame 0", "move 2", "wait 1", "frame 0", "move 2", "wait 1",
45 "frame 0", "move 2", "wait 1", "frame 15", "move 2", "wait 1",
46 "frame 15", "move 2", "wait 1", "frame 20", "move 2", "wait 1",
47 "frame 20", "move 2", "unbreakable end", "wait 1", },
48 Attack = {"unbreakable begin", "frame 0", "wait 10",
49 "frame 25", "sound assault-attack", "attack", "wait 1",
50 "frame 0", "unbreakable end", "wait 1", },
51 Death = {"unbreakable begin", "frame 30", "unbreakable end", "wait 1", },
52 })
53
54 DefineIcon({
55 Name = "icon-buggy",
56 Size = {46, 38},
57 Frame = 0,
58 File = "units/buggy/ico_buggy.png"})
59
60 MakeSound("buggy-selected", "units/buggy/buggy_select.wav")
61 MakeSound("buggy-acknowledge", "units/buggy/buggy_action.wav")
62 MakeSound("buggy-ready", "units/buggy/buggy_ready.wav")
63 MakeSound("buggy-help", "units/buggy/buggy_attacked.wav")
64 MakeSound("buggy-die", "units/buggy/buggy_die.wav")
65
66 DefineUnitType("buggy_destroyed", {
67 Name = "DestroyedBuggy",
68 Image = {"file", "units/buggy/unit_buggy.png", "size", {64, 64}},
69 Shadow = {"file", "units/buggy/unit_buggy_s.png", "size", {64, 64}},
70 Animations = "animations-dead_buggy",
71 Icon = "icon-cancel",
72 HitPoints = 999,
73 DrawLevel = 10,
74 TileSize = {1, 1},
75 BoxSize = {62, 62},
76 SightRange = 2,
77 BasicDamage = 0,
78 PiercingDamage = 0,
79 Missile = "missile-none",
80 Priority = 0,
81 Type = "land",
82 Vanishes = true,
83 Sounds = {
84 "dead", "grenade-impact",
85 }
86 })
87
88 DefineUnitType("unit-buggy", {
89 Name = "Buggy",
90 Image = {"file", "units/buggy/unit_buggy.png", "size", {64, 64}},
91 Shadow = {"file", "units/buggy/unit_buggy_s.png", "size", {64, 64}},
92 Animations = "animations-buggy",
93 Icon = "icon-buggy",
94 EnergyValue = 2000,
95 MagmaValue = 500,
96 RepairHp = 1,
97 HitPoints = 40,
98 DrawLevel = 25,
99 TileSize = {1, 1},
100 BoxSize = {62, 62},
101 SightRange = 7,
102 ComputerReactionRange = 7,
103 PersonReactionRange = 7,
104 Armor = 3,
105 BasicDamage = 5,
106 PiercingDamage = 0,
107 Missile = "missile-none",
108 Priority = 20,
109 AnnoyComputerFactor = 45,
110 Points = 100,
111 ExplodeWhenKilled = "missile-64x64-explosion",
112 Corpse = "buggy_destroyed",
113 Type = "land",
114 MaxAttackRange = 6,
115 CanAttack = true,
116 CanTargetLand = true,
117 RightMouseAction = "attack",
118 SelectableByRectangle = true,
119 VisibleUnderFog = true,
120 Sounds = {
121 "selected", "buggy-selected",
122 "acknowledge", "buggy-acknowledge",
123 "ready", "buggy-ready",
124 "help", "buggy-help",
125 "dead", "buggy-die"}
126 })
127
128 DefineAllow("unit-buggy", AllowAll)
129
130 DefineButton({
131 Pos = 3, Level = 0, Icon = "icon-buggy", Action = "train-unit",
132 Value = "unit-buggy", Hint = "BUILD ~!BUGGY",
133 ForUnit = {"unit-vfac"}})
134