1 /* DooM2D: Midnight on the Firing Line
2 * coded by Ketmar // Invisible Vector <ketmar@ketmar.no-ip.org>
3 * Understanding is not required. Only obedience.
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 module monsterBarrel is "monster" "Barrel";
24 // setup actor animations
25 public void initializeAnim () {
27 animClearFrames("monster", "Barrel", "sleep");
29 animAddFrame("monster", "Barrel", "sleep", ACTOR_DIR_LEFT, "monsters/barrel/graphics/shared/bar1a0.vga");
31 animAddFrame("monster", "Barrel", "sleep", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/shared/bar1a0.vga");
33 animClearFrames("monster", "Barrel", "go");
35 animAddFrame("monster", "Barrel", "go", ACTOR_DIR_LEFT, "monsters/barrel/graphics/shared/bar1a0.vga");
37 animAddFrame("monster", "Barrel", "go", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/shared/bar1a0.vga");
39 animClearFrames("monster", "Barrel", "pain");
41 animAddFrame("monster", "Barrel", "pain", ACTOR_DIR_LEFT, "monsters/barrel/graphics/shared/bar1a0.vga");
43 animAddFrame("monster", "Barrel", "pain", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/shared/bar1a0.vga");
45 animClearFrames("monster", "Barrel", "wait");
47 animAddFrame("monster", "Barrel", "wait", ACTOR_DIR_LEFT, "monsters/barrel/graphics/shared/bar1a0.vga");
49 animAddFrame("monster", "Barrel", "wait", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/shared/bar1a0.vga");
51 animClearFrames("monster", "Barrel", "attack");
53 animAddFrame("monster", "Barrel", "attack", ACTOR_DIR_LEFT, "monsters/barrel/graphics/shared/bar1a0.vga");
55 animAddFrame("monster", "Barrel", "attack", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/shared/bar1a0.vga");
57 animClearFrames("monster", "Barrel", "die");
59 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpa0.vga");
60 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpa0.vga");
61 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpa0.vga");
62 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpb0.vga");
63 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpb0.vga");
64 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpb0.vga");
65 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpc0.vga");
66 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpc0.vga");
67 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpc0.vga");
68 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpd0.vga");
69 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpd0.vga");
70 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpd0.vga");
71 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpe0.vga");
72 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpe0.vga");
73 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_LEFT, "monsters/barrel/graphics/die/bexpe0.vga");
75 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpa0.vga");
76 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpa0.vga");
77 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpa0.vga");
78 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpb0.vga");
79 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpb0.vga");
80 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpb0.vga");
81 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpc0.vga");
82 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpc0.vga");
83 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpc0.vga");
84 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpd0.vga");
85 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpd0.vga");
86 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpd0.vga");
87 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpe0.vga");
88 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpe0.vga");
89 animAddFrame("monster", "Barrel", "die", ACTOR_DIR_RIGHT, "monsters/barrel/graphics/die/bexpe0.vga");
91 animClearFrames("monster", "Barrel", "slop");
95 animClearFrames("monster", "Barrel", "dead");
99 animClearFrames("monster", "Barrel", "mess");
105 // change actor animation
106 public void setAnim (Actor me, string state) {
109 case "sleep": me.animname = "sleep"; me.animstr = "A"; break;
110 case "go": me.animname = "go"; me.animstr = "A"; break;
111 case "pain": me.animname = "pain"; me.animstr = "A"; break;
112 case "wait": me.animname = "wait"; me.animstr = "A"; break;
113 case "attack": me.animname = "attack"; me.animstr = "A"; break;
114 case "die": me.animname = "die"; me.animstr = "CCCDDDEEEFFFGGG"; break;
115 case "slop": me.animname = "slop"; me.animstr = ""; break;
116 case "dead": me.animname = "dead"; me.animstr = ""; break;
117 case "mess": me.animname = "mess"; me.animstr = ""; break;
118 case "run": me.animname = "go"; me.animstr = "A"; break;
119 case "climb": me.animname = "go"; me.animstr = "A"; break;
120 case "runout": me.animname = "go"; me.animstr = "A"; break;
121 case "shoot": me.animname = "attack"; me.animstr = "A"; break;
122 case "revive": me.animname = "revive"; me.animstr = "GGGFFFEEEDDDCCC"; break;
123 default: me.animname = "sleep"; me.animstr = "A"; break;
125 me.actorSetAnimation(state);
129 // setup actor properties
130 public void initialize (Actor me) {
131 // `classname` and `classtype` will be set by the engine
132 //me.classname = "Barrel";
133 //me.classtype = "monster";
136 me.hitpoints = me.life = 20;
148 public void think (Actor me) {