-
Notifications
You must be signed in to change notification settings - Fork 522
/
alienspectres.zs
331 lines (305 loc) · 6.17 KB
/
alienspectres.zs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
// Alien Spectre 1 -----------------------------------------------------------
class AlienSpectre1 : SpectralMonster
{
Default
{
Health 1000;
Painchance 250;
Speed 12;
Radius 64;
Height 64;
FloatSpeed 5;
Mass 1000;
MinMissileChance 150;
RenderStyle "Translucent";
Alpha 0.666;
SeeSound "alienspectre/sight";
AttackSound "alienspectre/blade";
PainSound "alienspectre/pain";
DeathSound "alienspectre/death";
ActiveSound "alienspectre/active";
Obituary "$OB_ALIENSPECTRE";
+NOGRAVITY
+FLOAT
+SHADOW
+NOTDMATCH
+DONTMORPH
+NOBLOCKMONST
+INCOMBAT
+LOOKALLAROUND
+NOICEDEATH
}
States
{
Spawn:
ALN1 A 10 A_Look;
ALN1 B 10 A_SentinelBob;
Loop;
See:
ALN1 AB 4 Bright A_Chase;
ALN1 C 4 Bright A_SentinelBob;
ALN1 DEF 4 Bright A_Chase;
ALN1 G 4 Bright A_SentinelBob;
ALN1 HIJ 4 Bright A_Chase;
ALN1 K 4 Bright A_SentinelBob;
Loop;
Melee:
ALN1 J 4 Bright A_FaceTarget;
ALN1 I 4 Bright A_CustomMeleeAttack((random[SpectreMelee](0,255)&9)*5);
ALN1 H 4 Bright;
Goto See;
Missile:
ALN1 J 4 Bright A_FaceTarget;
ALN1 I 4 Bright A_SpotLightning;
ALN1 H 4 Bright;
Goto See+10;
Pain:
ALN1 J 2 A_Pain;
Goto See+6;
Death:
AL1P A 6 Bright A_SpectreChunkSmall;
AL1P B 6 Bright A_Scream;
AL1P C 6 Bright A_SpectreChunkSmall;
AL1P DE 6 Bright;
AL1P F 6 Bright A_SpectreChunkSmall;
AL1P G 6 Bright;
AL1P H 6 Bright A_SpectreChunkSmall;
AL1P IJK 6 Bright;
AL1P LM 5 Bright;
AL1P N 5 Bright A_SpectreChunkLarge;
AL1P OPQ 5 Bright;
AL1P R 5 Bright A_AlienSpectreDeath;
Stop;
}
//============================================================================
void A_AlienSpectreDeath ()
{
PlayerPawn player = null;
int log = 0;
A_NoBlocking(); // [RH] Need this for Sigil rewarding
if (!CheckBossDeath ())
{
return;
}
for (int i = 0; i < MAXPLAYERS; ++i)
{
if (playeringame[i] && players[i].health > 0)
{
player = players[i].mo;
break;
}
}
if (player == null)
{
return;
}
class<Actor> cls = GetClass();
if (cls == "AlienSpectre1")
{
Floor_LowerToLowest(999, 8);
log = 95;
}
else if (cls == "AlienSpectre2")
{
Console.MidPrint(null, "$TXT_KILLED_BISHOP");
log = 74;
player.GiveInventoryType ("QuestItem21");
}
else if (cls == "AlienSpectre3")
{
Console.MidPrint(null, "$TXT_KILLED_ORACLE");
// If there are any Oracles still alive, kill them.
ThinkerIterator it = ThinkerIterator.Create("Oracle");
Actor oracle;
while ( (oracle = Actor(it.Next())) != null)
{
if (oracle.health > 0)
{
oracle.health = 0;
oracle.Die (self, self);
}
}
player.GiveInventoryType ("QuestItem23");
if (player.FindInventory ("QuestItem21"))
{ // If the Bishop is dead, set quest item 22
player.GiveInventoryType ("QuestItem22");
}
if (player.FindInventory ("QuestItem24") == null)
{ // Macil is calling us back...
log = 87;
}
else
{ // You wield the power of the complete Sigil.
log = 85;
}
Door_Open(222, 64);
}
else if (cls == "AlienSpectre4")
{
Console.MidPrint(null, "$TXT_KILLED_MACIL");
player.GiveInventoryType ("QuestItem24");
if (player.FindInventory ("QuestItem25") == null)
{ // Richter has taken over. Macil is a snake.
log = 79;
}
else
{ // Back to the factory for another Sigil!
log = 106;
}
}
else if (cls == "AlienSpectre5")
{
Console.MidPrint(null, "$TXT_KILLED_LOREMASTER");
player.GiveInventoryType ("QuestItem26");
if (!multiplayer)
{
player.GiveInventoryType ("UpgradeStamina");
player.GiveInventoryType ("UpgradeAccuracy");
}
Sigil sigl = Sigil(player.FindInventory("Sigil"));
if (sigl != null && sigl.health == 5)
{ // You wield the power of the complete Sigil.
log = 85;
}
else
{ // Another Sigil piece. Woohoo!
log = 83;
}
Floor_LowerToLowest(666, 8);
}
if (log > 0)
{
String voc = "svox/voc" .. log;
A_PlaySound(voc, CHAN_VOICE, 1, false, ATTN_NONE);
player.player.SetLogNumber (log);
}
}
}
// Alien Spectre 2 -----------------------------------------------------------
class AlienSpectre2 : AlienSpectre1
{
Default
{
Health 1200;
Painchance 50;
Radius 24;
DropItem "Sigil2";
}
States
{
Missile:
ALN1 F 4 A_FaceTarget;
ALN1 I 4 A_SpawnProjectile("SpectralLightningH3", 32, 0);
ALN1 E 4;
Goto See+10;
}
}
// Alien Spectre 3 ----------------------------------------------------------
// This is the Oracle's personal spectre, so it's a little different.
class AlienSpectre3 : AlienSpectre1
{
Default
{
Health 1500;
Painchance 50;
Radius 24;
+SPAWNCEILING
DropItem "Sigil3";
DamageFactor "SpectralLow", 0;
}
States
{
Spawn:
ALN1 ABCDEFGHIJK 5;
Loop;
See:
ALN1 AB 5 A_Chase;
ALN1 C 5 A_SentinelBob;
ALN1 DEF 5 A_Chase;
ALN1 G 5 A_SentinelBob;
ALN1 HIJ 5 A_Chase;
ALN1 K 5 A_SentinelBob;
Loop;
Melee:
ALN1 J 4 A_FaceTarget;
ALN1 I 4 A_CustomMeleeAttack((random[SpectreMelee](0,255)&9)*5);
ALN1 C 4;
Goto See+2;
Missile:
ALN1 F 4 A_FaceTarget;
ALN1 I 4 A_Spectre3Attack;
ALN1 E 4;
Goto See+10;
Pain:
ALN1 J 2 A_Pain;
Goto See+6;
}
}
// Alien Spectre 4 -----------------------------------------------------------
class AlienSpectre4 : AlienSpectre1
{
Default
{
Health 1700;
Painchance 50;
Radius 24;
DropItem "Sigil4";
}
States
{
Missile:
ALN1 F 4 A_FaceTarget;
ALN1 I 4 A_SpawnProjectile("SpectralLightningBigV2", 32, 0);
ALN1 E 4;
Goto See+10;
}
}
// Alien Spectre 5 -----------------------------------------------------------
class AlienSpectre5 : AlienSpectre1
{
Default
{
Health 2000;
Painchance 50;
Radius 24;
DropItem "Sigil5";
}
States
{
Missile:
ALN1 F 4 A_FaceTarget;
ALN1 I 4 A_SpawnProjectile("SpectralLightningBigBall2", 32, 0);
ALN1 E 4;
Goto See+10;
}
}
// Small Alien Chunk --------------------------------------------------------
class AlienChunkSmall : Actor
{
Default
{
+NOBLOCKMAP
+NOCLIP
}
States
{
Spawn:
NODE ABCDEFG 6 Bright;
Stop;
}
}
// Large Alien Chunk --------------------------------------------------------
class AlienChunkLarge : Actor
{
Default
{
+NOBLOCKMAP
+NOCLIP
}
States
{
Spawn:
MTHD ABCDEFGHIJK 5 Bright;
Stop;
}
}