quake2ts 0.0.221 → 0.0.222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/client/dist/browser/index.global.js +13 -13
- package/packages/client/dist/browser/index.global.js.map +1 -1
- package/packages/game/dist/browser/index.global.js +2 -2
- package/packages/game/dist/browser/index.global.js.map +1 -1
- package/packages/game/dist/cjs/index.cjs +294 -137
- package/packages/game/dist/cjs/index.cjs.map +1 -1
- package/packages/game/dist/esm/index.js +294 -137
- package/packages/game/dist/esm/index.js.map +1 -1
- package/packages/game/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/game/dist/types/entities/monsters/gunner.d.ts.map +1 -1
|
@@ -8262,33 +8262,68 @@ function monster_ai_move9(self, dist, context) {
|
|
|
8262
8262
|
ai_move(self, dist);
|
|
8263
8263
|
}
|
|
8264
8264
|
var stand_move8;
|
|
8265
|
+
var fidget_move2;
|
|
8265
8266
|
var walk_move7;
|
|
8266
8267
|
var run_move7;
|
|
8268
|
+
var runandshoot_move;
|
|
8267
8269
|
var attack_chain_move;
|
|
8268
8270
|
var attack_grenade_move;
|
|
8269
|
-
var
|
|
8271
|
+
var fire_chain_move;
|
|
8272
|
+
var endfire_chain_move;
|
|
8273
|
+
var pain1_move4;
|
|
8274
|
+
var pain2_move4;
|
|
8275
|
+
var pain3_move3;
|
|
8270
8276
|
var death_move6;
|
|
8277
|
+
var duck_move3;
|
|
8278
|
+
function gunner_idlesound(self, context) {
|
|
8279
|
+
context.engine.sound?.(self, 0, "gunner/gunidle1.wav", 1, 1, 0);
|
|
8280
|
+
}
|
|
8271
8281
|
function gunner_stand(self) {
|
|
8272
8282
|
self.monsterinfo.current_move = stand_move8;
|
|
8273
8283
|
}
|
|
8284
|
+
function gunner_fidget(self) {
|
|
8285
|
+
if (self.monsterinfo.aiflags & 1 /* StandGround */) {
|
|
8286
|
+
return;
|
|
8287
|
+
}
|
|
8288
|
+
if (Math.random() <= 0.05) {
|
|
8289
|
+
self.monsterinfo.current_move = fidget_move2;
|
|
8290
|
+
}
|
|
8291
|
+
}
|
|
8274
8292
|
function gunner_walk(self) {
|
|
8275
8293
|
self.monsterinfo.current_move = walk_move7;
|
|
8276
8294
|
}
|
|
8277
8295
|
function gunner_run(self) {
|
|
8278
|
-
if (self.
|
|
8279
|
-
self.monsterinfo.current_move = run_move7;
|
|
8280
|
-
} else {
|
|
8296
|
+
if (self.monsterinfo.aiflags & 1 /* StandGround */) {
|
|
8281
8297
|
self.monsterinfo.current_move = stand_move8;
|
|
8298
|
+
} else {
|
|
8299
|
+
self.monsterinfo.current_move = run_move7;
|
|
8282
8300
|
}
|
|
8283
8301
|
}
|
|
8284
|
-
function gunner_attack(self) {
|
|
8302
|
+
function gunner_attack(self, context) {
|
|
8285
8303
|
if (Math.random() > 0.5) {
|
|
8286
8304
|
self.monsterinfo.current_move = attack_chain_move;
|
|
8287
8305
|
} else {
|
|
8288
8306
|
self.monsterinfo.current_move = attack_grenade_move;
|
|
8289
8307
|
}
|
|
8290
8308
|
}
|
|
8309
|
+
function gunner_opengun(self, context) {
|
|
8310
|
+
context.engine.sound?.(self, 0, "gunner/gunatck1.wav", 1, 1, 0);
|
|
8311
|
+
}
|
|
8291
8312
|
function gunner_fire_chain(self, context) {
|
|
8313
|
+
self.monsterinfo.current_move = fire_chain_move;
|
|
8314
|
+
}
|
|
8315
|
+
function gunner_refire_chain(self, context) {
|
|
8316
|
+
if (self.enemy && self.enemy.health > 0) {
|
|
8317
|
+
if (visible(self, self.enemy, context.trace)) {
|
|
8318
|
+
if (Math.random() <= 0.5) {
|
|
8319
|
+
self.monsterinfo.current_move = fire_chain_move;
|
|
8320
|
+
return;
|
|
8321
|
+
}
|
|
8322
|
+
}
|
|
8323
|
+
}
|
|
8324
|
+
self.monsterinfo.current_move = endfire_chain_move;
|
|
8325
|
+
}
|
|
8326
|
+
function gunner_fire_bullet_logic(self, context) {
|
|
8292
8327
|
if (!self.enemy) return;
|
|
8293
8328
|
const start = {
|
|
8294
8329
|
x: self.origin.x,
|
|
@@ -8296,10 +8331,10 @@ function gunner_fire_chain(self, context) {
|
|
|
8296
8331
|
z: self.origin.z + self.viewheight - 8
|
|
8297
8332
|
};
|
|
8298
8333
|
const forward = normalizeVec3(subtractVec3(self.enemy.origin, start));
|
|
8299
|
-
const damage =
|
|
8300
|
-
const kick =
|
|
8334
|
+
const damage = 3;
|
|
8335
|
+
const kick = 4;
|
|
8301
8336
|
context.engine.sound?.(self, 0, "gunner/gunatck2.wav", 1, 1, 0);
|
|
8302
|
-
monster_fire_bullet(self, start, forward, damage, kick,
|
|
8337
|
+
monster_fire_bullet(self, start, forward, damage, kick, 300, 500, 0, context, 5 /* CHAINGUN */);
|
|
8303
8338
|
}
|
|
8304
8339
|
function gunner_fire_grenade(self, context) {
|
|
8305
8340
|
if (!self.enemy) return;
|
|
@@ -8315,93 +8350,218 @@ function gunner_fire_grenade(self, context) {
|
|
|
8315
8350
|
createGrenade(context, self, start, forward, damage, speed);
|
|
8316
8351
|
}
|
|
8317
8352
|
function gunner_pain(self, context) {
|
|
8353
|
+
if (self.health < self.max_health / 2) {
|
|
8354
|
+
}
|
|
8355
|
+
if (self.pain_debounce_time && context.timeSeconds < self.pain_debounce_time) return;
|
|
8356
|
+
self.pain_debounce_time = context.timeSeconds + 3;
|
|
8318
8357
|
if (Math.random() < 0.5) {
|
|
8319
8358
|
context.engine.sound?.(self, 0, "gunner/gunpain1.wav", 1, 1, 0);
|
|
8320
8359
|
} else {
|
|
8321
8360
|
context.engine.sound?.(self, 0, "gunner/gunpain2.wav", 1, 1, 0);
|
|
8322
8361
|
}
|
|
8323
|
-
|
|
8362
|
+
const r = Math.random();
|
|
8363
|
+
if (r < 0.33) {
|
|
8364
|
+
self.monsterinfo.current_move = pain3_move3;
|
|
8365
|
+
} else if (r < 0.66) {
|
|
8366
|
+
self.monsterinfo.current_move = pain2_move4;
|
|
8367
|
+
} else {
|
|
8368
|
+
self.monsterinfo.current_move = pain1_move4;
|
|
8369
|
+
}
|
|
8324
8370
|
}
|
|
8325
8371
|
function gunner_die(self, context) {
|
|
8326
8372
|
context.engine.sound?.(self, 0, "gunner/death1.wav", 1, 1, 0);
|
|
8327
8373
|
self.monsterinfo.current_move = death_move6;
|
|
8328
8374
|
}
|
|
8329
|
-
|
|
8375
|
+
function gunner_duck_down(self, context) {
|
|
8376
|
+
if (self.monsterinfo.aiflags & 2048 /* Ducked */) return;
|
|
8377
|
+
self.monsterinfo.aiflags |= 2048 /* Ducked */;
|
|
8378
|
+
if (Math.random() > 0.5) {
|
|
8379
|
+
gunner_fire_grenade(self, context);
|
|
8380
|
+
}
|
|
8381
|
+
self.maxs = { ...self.maxs, z: self.maxs.z - 32 };
|
|
8382
|
+
self.takedamage = true;
|
|
8383
|
+
self.monsterinfo.pausetime = context.timeSeconds + 1;
|
|
8384
|
+
}
|
|
8385
|
+
function gunner_duck_hold(self, context) {
|
|
8386
|
+
if (context.timeSeconds >= self.monsterinfo.pausetime) {
|
|
8387
|
+
self.monsterinfo.aiflags &= ~128 /* HoldFrame */;
|
|
8388
|
+
} else {
|
|
8389
|
+
self.monsterinfo.aiflags |= 128 /* HoldFrame */;
|
|
8390
|
+
}
|
|
8391
|
+
}
|
|
8392
|
+
function gunner_duck_up(self, context) {
|
|
8393
|
+
self.monsterinfo.aiflags &= ~2048 /* Ducked */;
|
|
8394
|
+
self.maxs = { ...self.maxs, z: self.maxs.z + 32 };
|
|
8395
|
+
self.takedamage = true;
|
|
8396
|
+
}
|
|
8397
|
+
function gunner_dodge(self, attacker, eta, context) {
|
|
8398
|
+
if (Math.random() > 0.25) return;
|
|
8399
|
+
if (!self.enemy) self.enemy = attacker;
|
|
8400
|
+
self.monsterinfo.current_move = duck_move3;
|
|
8401
|
+
}
|
|
8402
|
+
var stand_frames8 = Array.from({ length: 30 }, (_, i) => ({
|
|
8330
8403
|
ai: monster_ai_stand9,
|
|
8331
|
-
dist: 0
|
|
8404
|
+
dist: 0,
|
|
8405
|
+
think: i === 29 ? gunner_fidget : null
|
|
8332
8406
|
}));
|
|
8333
8407
|
stand_move8 = {
|
|
8334
8408
|
firstframe: 0,
|
|
8335
8409
|
lastframe: 29,
|
|
8336
8410
|
frames: stand_frames8,
|
|
8411
|
+
endfunc: null
|
|
8412
|
+
};
|
|
8413
|
+
var fidget_frames2 = Array.from({ length: 40 }, (_, i) => ({
|
|
8414
|
+
ai: monster_ai_stand9,
|
|
8415
|
+
dist: 0,
|
|
8416
|
+
think: i === 7 ? gunner_idlesound : null
|
|
8417
|
+
}));
|
|
8418
|
+
fidget_move2 = {
|
|
8419
|
+
firstframe: 30,
|
|
8420
|
+
lastframe: 69,
|
|
8421
|
+
frames: fidget_frames2,
|
|
8337
8422
|
endfunc: gunner_stand
|
|
8338
8423
|
};
|
|
8339
|
-
var
|
|
8424
|
+
var walk_dists = [0, 3, 4, 5, 7, 2, 6, 4, 2, 7, 5, 7, 4];
|
|
8425
|
+
var walk_frames7 = walk_dists.map((d) => ({
|
|
8340
8426
|
ai: monster_ai_walk9,
|
|
8341
|
-
dist:
|
|
8427
|
+
dist: d
|
|
8342
8428
|
}));
|
|
8343
8429
|
walk_move7 = {
|
|
8344
|
-
firstframe:
|
|
8345
|
-
lastframe:
|
|
8430
|
+
firstframe: 76,
|
|
8431
|
+
lastframe: 88,
|
|
8346
8432
|
frames: walk_frames7,
|
|
8347
|
-
endfunc:
|
|
8433
|
+
endfunc: null
|
|
8348
8434
|
};
|
|
8349
|
-
var
|
|
8435
|
+
var run_dists = [26, 9, 9, 9, 15, 10, 13, 6];
|
|
8436
|
+
var run_frames6 = run_dists.map((d) => ({
|
|
8350
8437
|
ai: monster_ai_run8,
|
|
8351
|
-
dist:
|
|
8438
|
+
dist: d
|
|
8352
8439
|
}));
|
|
8353
8440
|
run_move7 = {
|
|
8354
|
-
firstframe:
|
|
8355
|
-
lastframe:
|
|
8441
|
+
firstframe: 94,
|
|
8442
|
+
lastframe: 101,
|
|
8356
8443
|
frames: run_frames6,
|
|
8444
|
+
endfunc: null
|
|
8445
|
+
};
|
|
8446
|
+
var runshoot_dists = [32, 15, 10, 18, 8, 20];
|
|
8447
|
+
var runshoot_frames = runshoot_dists.map((d) => ({
|
|
8448
|
+
ai: monster_ai_run8,
|
|
8449
|
+
dist: d
|
|
8450
|
+
}));
|
|
8451
|
+
runandshoot_move = {
|
|
8452
|
+
firstframe: 102,
|
|
8453
|
+
lastframe: 107,
|
|
8454
|
+
frames: runshoot_frames,
|
|
8455
|
+
endfunc: null
|
|
8456
|
+
};
|
|
8457
|
+
var attack_grenade_frames = Array.from({ length: 21 }, (_, i) => ({
|
|
8458
|
+
ai: monster_ai_charge9,
|
|
8459
|
+
dist: 0,
|
|
8460
|
+
think: [4, 7, 10, 13].includes(i) ? gunner_fire_grenade : null
|
|
8461
|
+
}));
|
|
8462
|
+
attack_grenade_move = {
|
|
8463
|
+
firstframe: 108,
|
|
8464
|
+
lastframe: 128,
|
|
8465
|
+
frames: attack_grenade_frames,
|
|
8357
8466
|
endfunc: gunner_run
|
|
8358
8467
|
};
|
|
8359
|
-
var attack_chain_frames = Array.from({ length:
|
|
8468
|
+
var attack_chain_frames = Array.from({ length: 7 }, (_, i) => ({
|
|
8360
8469
|
ai: monster_ai_charge9,
|
|
8361
8470
|
dist: 0,
|
|
8362
|
-
think: i
|
|
8471
|
+
think: i === 0 ? gunner_opengun : null
|
|
8363
8472
|
}));
|
|
8364
8473
|
attack_chain_move = {
|
|
8365
|
-
firstframe:
|
|
8366
|
-
lastframe:
|
|
8474
|
+
firstframe: 137,
|
|
8475
|
+
lastframe: 143,
|
|
8367
8476
|
frames: attack_chain_frames,
|
|
8368
|
-
endfunc:
|
|
8477
|
+
endfunc: gunner_fire_chain
|
|
8369
8478
|
};
|
|
8370
|
-
var
|
|
8479
|
+
var fire_chain_frames = Array.from({ length: 8 }, () => ({
|
|
8371
8480
|
ai: monster_ai_charge9,
|
|
8372
8481
|
dist: 0,
|
|
8373
|
-
think:
|
|
8482
|
+
think: gunner_fire_bullet_logic
|
|
8374
8483
|
}));
|
|
8375
|
-
|
|
8376
|
-
firstframe:
|
|
8377
|
-
lastframe:
|
|
8378
|
-
frames:
|
|
8484
|
+
fire_chain_move = {
|
|
8485
|
+
firstframe: 144,
|
|
8486
|
+
lastframe: 151,
|
|
8487
|
+
frames: fire_chain_frames,
|
|
8488
|
+
endfunc: gunner_refire_chain
|
|
8489
|
+
};
|
|
8490
|
+
var endfire_chain_frames = Array.from({ length: 7 }, () => ({
|
|
8491
|
+
ai: monster_ai_charge9,
|
|
8492
|
+
dist: 0
|
|
8493
|
+
}));
|
|
8494
|
+
endfire_chain_move = {
|
|
8495
|
+
firstframe: 152,
|
|
8496
|
+
lastframe: 158,
|
|
8497
|
+
frames: endfire_chain_frames,
|
|
8379
8498
|
endfunc: gunner_run
|
|
8380
8499
|
};
|
|
8381
|
-
var
|
|
8500
|
+
var pain1_dists = [2, 0, -5, 3, -1, 0, 0, 0, 0, 1, 1, 2, 1, 0, -2, -2, 0, 0];
|
|
8501
|
+
var pain1_frames4 = pain1_dists.map((d) => ({
|
|
8382
8502
|
ai: monster_ai_move9,
|
|
8383
|
-
dist:
|
|
8503
|
+
dist: d
|
|
8384
8504
|
}));
|
|
8385
|
-
|
|
8386
|
-
firstframe:
|
|
8387
|
-
lastframe:
|
|
8388
|
-
frames:
|
|
8505
|
+
pain1_move4 = {
|
|
8506
|
+
firstframe: 159,
|
|
8507
|
+
lastframe: 176,
|
|
8508
|
+
frames: pain1_frames4,
|
|
8389
8509
|
endfunc: gunner_run
|
|
8390
8510
|
};
|
|
8391
|
-
var
|
|
8511
|
+
var pain2_dists = [-2, 11, 6, 2, -1, -7, -2, -7];
|
|
8512
|
+
var pain2_frames4 = pain2_dists.map((d) => ({
|
|
8392
8513
|
ai: monster_ai_move9,
|
|
8393
|
-
dist:
|
|
8514
|
+
dist: d
|
|
8515
|
+
}));
|
|
8516
|
+
pain2_move4 = {
|
|
8517
|
+
firstframe: 177,
|
|
8518
|
+
lastframe: 184,
|
|
8519
|
+
frames: pain2_frames4,
|
|
8520
|
+
endfunc: gunner_run
|
|
8521
|
+
};
|
|
8522
|
+
var pain3_dists = [-3, 1, 1, 0, 1];
|
|
8523
|
+
var pain3_frames3 = pain3_dists.map((d) => ({
|
|
8524
|
+
ai: monster_ai_move9,
|
|
8525
|
+
dist: d
|
|
8526
|
+
}));
|
|
8527
|
+
pain3_move3 = {
|
|
8528
|
+
firstframe: 185,
|
|
8529
|
+
lastframe: 189,
|
|
8530
|
+
frames: pain3_frames3,
|
|
8531
|
+
endfunc: gunner_run
|
|
8532
|
+
};
|
|
8533
|
+
var death_dists = [0, 0, 0, -7, -3, -5, 8, 6, 0, 0, 0];
|
|
8534
|
+
var death_frames6 = death_dists.map((d) => ({
|
|
8535
|
+
ai: monster_ai_move9,
|
|
8536
|
+
dist: d
|
|
8394
8537
|
}));
|
|
8395
8538
|
function gunner_dead(self) {
|
|
8396
8539
|
self.monsterinfo.nextframe = death_move6.lastframe;
|
|
8397
8540
|
self.nextthink = -1;
|
|
8541
|
+
self.solid = 0 /* Not */;
|
|
8398
8542
|
}
|
|
8399
8543
|
death_move6 = {
|
|
8400
|
-
firstframe:
|
|
8401
|
-
lastframe:
|
|
8544
|
+
firstframe: 190,
|
|
8545
|
+
lastframe: 200,
|
|
8402
8546
|
frames: death_frames6,
|
|
8403
8547
|
endfunc: gunner_dead
|
|
8404
8548
|
};
|
|
8549
|
+
var duck_frames3 = [
|
|
8550
|
+
{ ai: monster_ai_move9, dist: 1, think: gunner_duck_down },
|
|
8551
|
+
{ ai: monster_ai_move9, dist: 1 },
|
|
8552
|
+
{ ai: monster_ai_move9, dist: 1, think: gunner_duck_hold },
|
|
8553
|
+
{ ai: monster_ai_move9, dist: 0 },
|
|
8554
|
+
{ ai: monster_ai_move9, dist: -1 },
|
|
8555
|
+
{ ai: monster_ai_move9, dist: -1 },
|
|
8556
|
+
{ ai: monster_ai_move9, dist: 0, think: gunner_duck_up },
|
|
8557
|
+
{ ai: monster_ai_move9, dist: -1 }
|
|
8558
|
+
];
|
|
8559
|
+
duck_move3 = {
|
|
8560
|
+
firstframe: 201,
|
|
8561
|
+
lastframe: 208,
|
|
8562
|
+
frames: duck_frames3,
|
|
8563
|
+
endfunc: gunner_run
|
|
8564
|
+
};
|
|
8405
8565
|
function SP_monster_gunner(self, context) {
|
|
8406
8566
|
self.model = "models/monsters/gunner/tris.md2";
|
|
8407
8567
|
self.mins = { x: -16, y: -16, z: -24 };
|
|
@@ -8413,11 +8573,7 @@ function SP_monster_gunner(self, context) {
|
|
|
8413
8573
|
self.mass = 200;
|
|
8414
8574
|
self.takedamage = true;
|
|
8415
8575
|
self.pain = (self2, other, kick, damage) => {
|
|
8416
|
-
|
|
8417
|
-
gunner_pain(self2, context.entities);
|
|
8418
|
-
} else if (Math.random() < 0.2) {
|
|
8419
|
-
gunner_pain(self2, context.entities);
|
|
8420
|
-
}
|
|
8576
|
+
gunner_pain(self2, context.entities);
|
|
8421
8577
|
};
|
|
8422
8578
|
self.die = (self2, inflictor, attacker, damage, point) => {
|
|
8423
8579
|
self2.deadflag = 2 /* Dead */;
|
|
@@ -8434,6 +8590,7 @@ function SP_monster_gunner(self, context) {
|
|
|
8434
8590
|
self.monsterinfo.walk = gunner_walk;
|
|
8435
8591
|
self.monsterinfo.run = gunner_run;
|
|
8436
8592
|
self.monsterinfo.attack = gunner_attack;
|
|
8593
|
+
self.monsterinfo.dodge = (self2, attacker, eta) => gunner_dodge(self2, attacker, eta, context.entities);
|
|
8437
8594
|
self.monsterinfo.sight = (self2, other) => {
|
|
8438
8595
|
context.entities.sound?.(self2, 0, "gunner/sight1.wav", 1, 1, 0);
|
|
8439
8596
|
};
|
|
@@ -8466,7 +8623,7 @@ var stand_move9;
|
|
|
8466
8623
|
var walk_move8;
|
|
8467
8624
|
var run_move8;
|
|
8468
8625
|
var attack_move4;
|
|
8469
|
-
var
|
|
8626
|
+
var pain_move4;
|
|
8470
8627
|
var death_move7;
|
|
8471
8628
|
function hover_stand(self) {
|
|
8472
8629
|
self.monsterinfo.current_move = stand_move9;
|
|
@@ -8542,14 +8699,14 @@ attack_move4 = {
|
|
|
8542
8699
|
frames: attack_frames4,
|
|
8543
8700
|
endfunc: hover_run
|
|
8544
8701
|
};
|
|
8545
|
-
var
|
|
8702
|
+
var pain_frames4 = Array.from({ length: 6 }, () => ({
|
|
8546
8703
|
ai: monster_ai_move10,
|
|
8547
8704
|
dist: 0
|
|
8548
8705
|
}));
|
|
8549
|
-
|
|
8706
|
+
pain_move4 = {
|
|
8550
8707
|
firstframe: 66,
|
|
8551
8708
|
lastframe: 71,
|
|
8552
|
-
frames:
|
|
8709
|
+
frames: pain_frames4,
|
|
8553
8710
|
endfunc: hover_run
|
|
8554
8711
|
};
|
|
8555
8712
|
var death_frames7 = Array.from({ length: 10 }, () => ({
|
|
@@ -8577,7 +8734,7 @@ function SP_monster_hover(self, context) {
|
|
|
8577
8734
|
self.viewheight = 18;
|
|
8578
8735
|
self.pain = (self2, other, kick, damage) => {
|
|
8579
8736
|
if (self2.health < self2.max_health / 2) {
|
|
8580
|
-
self2.monsterinfo.current_move =
|
|
8737
|
+
self2.monsterinfo.current_move = pain_move4;
|
|
8581
8738
|
}
|
|
8582
8739
|
};
|
|
8583
8740
|
self.die = (self2, inflictor, attacker, damage, point) => {
|
|
@@ -8623,7 +8780,7 @@ var stand_move10;
|
|
|
8623
8780
|
var walk_move9;
|
|
8624
8781
|
var run_move9;
|
|
8625
8782
|
var attack_move5;
|
|
8626
|
-
var
|
|
8783
|
+
var pain_move5;
|
|
8627
8784
|
var death_move8;
|
|
8628
8785
|
function icarus_stand(self) {
|
|
8629
8786
|
self.monsterinfo.current_move = stand_move10;
|
|
@@ -8699,14 +8856,14 @@ attack_move5 = {
|
|
|
8699
8856
|
frames: attack_frames5,
|
|
8700
8857
|
endfunc: icarus_run
|
|
8701
8858
|
};
|
|
8702
|
-
var
|
|
8859
|
+
var pain_frames5 = Array.from({ length: 6 }, () => ({
|
|
8703
8860
|
ai: monster_ai_move11,
|
|
8704
8861
|
dist: 0
|
|
8705
8862
|
}));
|
|
8706
|
-
|
|
8863
|
+
pain_move5 = {
|
|
8707
8864
|
firstframe: 66,
|
|
8708
8865
|
lastframe: 71,
|
|
8709
|
-
frames:
|
|
8866
|
+
frames: pain_frames5,
|
|
8710
8867
|
endfunc: icarus_run
|
|
8711
8868
|
};
|
|
8712
8869
|
var death_frames8 = Array.from({ length: 10 }, () => ({
|
|
@@ -8734,7 +8891,7 @@ function SP_monster_icarus(self, context) {
|
|
|
8734
8891
|
self.viewheight = 18;
|
|
8735
8892
|
self.pain = (self2, other, kick, damage) => {
|
|
8736
8893
|
if (self2.health < self2.max_health / 2) {
|
|
8737
|
-
self2.monsterinfo.current_move =
|
|
8894
|
+
self2.monsterinfo.current_move = pain_move5;
|
|
8738
8895
|
}
|
|
8739
8896
|
};
|
|
8740
8897
|
self.die = (self2, inflictor, attacker, damage, point) => {
|
|
@@ -8780,9 +8937,9 @@ var stand_move11;
|
|
|
8780
8937
|
var walk_move10;
|
|
8781
8938
|
var run_move10;
|
|
8782
8939
|
var attack_move6;
|
|
8783
|
-
var
|
|
8940
|
+
var pain_move6;
|
|
8784
8941
|
var death_move9;
|
|
8785
|
-
var
|
|
8942
|
+
var duck_move4;
|
|
8786
8943
|
function infantry_stand(self) {
|
|
8787
8944
|
self.monsterinfo.current_move = stand_move11;
|
|
8788
8945
|
}
|
|
@@ -8822,7 +8979,7 @@ function infantry_die(self) {
|
|
|
8822
8979
|
self.monsterinfo.current_move = death_move9;
|
|
8823
8980
|
}
|
|
8824
8981
|
function infantry_duck(self) {
|
|
8825
|
-
self.monsterinfo.current_move =
|
|
8982
|
+
self.monsterinfo.current_move = duck_move4;
|
|
8826
8983
|
}
|
|
8827
8984
|
var stand_frames11 = Array.from({ length: 22 }, () => ({
|
|
8828
8985
|
ai: monster_ai_stand12,
|
|
@@ -8865,14 +9022,14 @@ attack_move6 = {
|
|
|
8865
9022
|
frames: attack_frames6,
|
|
8866
9023
|
endfunc: infantry_run
|
|
8867
9024
|
};
|
|
8868
|
-
var
|
|
9025
|
+
var pain_frames6 = Array.from({ length: 10 }, () => ({
|
|
8869
9026
|
ai: monster_ai_move12,
|
|
8870
9027
|
dist: 0
|
|
8871
9028
|
}));
|
|
8872
|
-
|
|
9029
|
+
pain_move6 = {
|
|
8873
9030
|
firstframe: 60,
|
|
8874
9031
|
lastframe: 69,
|
|
8875
|
-
frames:
|
|
9032
|
+
frames: pain_frames6,
|
|
8876
9033
|
endfunc: infantry_run
|
|
8877
9034
|
};
|
|
8878
9035
|
var death_frames9 = Array.from({ length: 20 }, () => ({
|
|
@@ -8889,19 +9046,19 @@ death_move9 = {
|
|
|
8889
9046
|
frames: death_frames9,
|
|
8890
9047
|
endfunc: infantry_dead
|
|
8891
9048
|
};
|
|
8892
|
-
var
|
|
9049
|
+
var duck_frames4 = Array.from({ length: 5 }, () => ({
|
|
8893
9050
|
ai: monster_ai_move12,
|
|
8894
9051
|
dist: 0
|
|
8895
9052
|
}));
|
|
8896
|
-
|
|
9053
|
+
duck_move4 = {
|
|
8897
9054
|
firstframe: 90,
|
|
8898
9055
|
lastframe: 94,
|
|
8899
|
-
frames:
|
|
9056
|
+
frames: duck_frames4,
|
|
8900
9057
|
endfunc: infantry_run
|
|
8901
9058
|
};
|
|
8902
9059
|
function infantry_dodge(self, context) {
|
|
8903
9060
|
if (!self.enemy) return false;
|
|
8904
|
-
if (self.monsterinfo.current_move ===
|
|
9061
|
+
if (self.monsterinfo.current_move === duck_move4 || self.monsterinfo.current_move === death_move9 || self.monsterinfo.current_move === pain_move6) {
|
|
8905
9062
|
return false;
|
|
8906
9063
|
}
|
|
8907
9064
|
if (Math.random() > 0.3) return false;
|
|
@@ -8933,7 +9090,7 @@ function SP_monster_infantry(self, context) {
|
|
|
8933
9090
|
self.takedamage = true;
|
|
8934
9091
|
self.pain = (self2, other, kick, damage) => {
|
|
8935
9092
|
if (self2.health < self2.max_health / 2) {
|
|
8936
|
-
self2.monsterinfo.current_move =
|
|
9093
|
+
self2.monsterinfo.current_move = pain_move6;
|
|
8937
9094
|
}
|
|
8938
9095
|
};
|
|
8939
9096
|
self.die = (self2, inflictor, attacker, damage, point) => {
|
|
@@ -8985,9 +9142,9 @@ var run_move11;
|
|
|
8985
9142
|
var attack1_move3;
|
|
8986
9143
|
var attack1_end_move;
|
|
8987
9144
|
var attack2_move2;
|
|
8988
|
-
var
|
|
8989
|
-
var
|
|
8990
|
-
var
|
|
9145
|
+
var pain1_move5;
|
|
9146
|
+
var pain2_move5;
|
|
9147
|
+
var pain3_move4;
|
|
8991
9148
|
var death_move10;
|
|
8992
9149
|
function jorg_stand(self) {
|
|
8993
9150
|
self.monsterinfo.current_move = stand_move12;
|
|
@@ -9064,14 +9221,14 @@ function jorg_pain(self, other, kick, damage, context) {
|
|
|
9064
9221
|
self.pain_finished_time = self.timestamp + 3;
|
|
9065
9222
|
if (damage <= 50) {
|
|
9066
9223
|
context.engine.sound?.(self, 0, "boss3/bs3pain1.wav", 1, 1, 0);
|
|
9067
|
-
self.monsterinfo.current_move =
|
|
9224
|
+
self.monsterinfo.current_move = pain1_move5;
|
|
9068
9225
|
} else if (damage <= 100) {
|
|
9069
9226
|
context.engine.sound?.(self, 0, "boss3/bs3pain2.wav", 1, 1, 0);
|
|
9070
|
-
self.monsterinfo.current_move =
|
|
9227
|
+
self.monsterinfo.current_move = pain2_move5;
|
|
9071
9228
|
} else {
|
|
9072
9229
|
if (Math.random() <= 0.3) {
|
|
9073
9230
|
context.engine.sound?.(self, 0, "boss3/bs3pain3.wav", 1, 1, 0);
|
|
9074
|
-
self.monsterinfo.current_move =
|
|
9231
|
+
self.monsterinfo.current_move = pain3_move4;
|
|
9075
9232
|
}
|
|
9076
9233
|
}
|
|
9077
9234
|
}
|
|
@@ -9110,12 +9267,12 @@ var attack2_frames2 = Array.from({ length: 13 }, (_, i) => ({
|
|
|
9110
9267
|
think: i === 6 ? jorg_fire_bfg : null
|
|
9111
9268
|
}));
|
|
9112
9269
|
attack2_move2 = { firstframe: 83, lastframe: 95, frames: attack2_frames2, endfunc: jorg_run };
|
|
9113
|
-
var
|
|
9114
|
-
|
|
9115
|
-
var
|
|
9116
|
-
|
|
9117
|
-
var
|
|
9118
|
-
|
|
9270
|
+
var pain1_frames5 = Array.from({ length: 3 }, () => ({ ai: monster_ai_move13, dist: 0 }));
|
|
9271
|
+
pain1_move5 = { firstframe: 96, lastframe: 98, frames: pain1_frames5, endfunc: jorg_run };
|
|
9272
|
+
var pain2_frames5 = Array.from({ length: 3 }, () => ({ ai: monster_ai_move13, dist: 0 }));
|
|
9273
|
+
pain2_move5 = { firstframe: 99, lastframe: 101, frames: pain2_frames5, endfunc: jorg_run };
|
|
9274
|
+
var pain3_frames4 = Array.from({ length: 25 }, () => ({ ai: monster_ai_move13, dist: 0 }));
|
|
9275
|
+
pain3_move4 = { firstframe: 102, lastframe: 126, frames: pain3_frames4, endfunc: jorg_run };
|
|
9119
9276
|
var death_frames10 = Array.from({ length: 50 }, (_, i) => ({
|
|
9120
9277
|
ai: monster_ai_move13,
|
|
9121
9278
|
dist: 0,
|
|
@@ -9408,7 +9565,7 @@ var run_move13;
|
|
|
9408
9565
|
var attack_hyper_move;
|
|
9409
9566
|
var attack_cable_move;
|
|
9410
9567
|
var spawn_move;
|
|
9411
|
-
var
|
|
9568
|
+
var pain_move7;
|
|
9412
9569
|
var death_move12;
|
|
9413
9570
|
function medic_stand(self) {
|
|
9414
9571
|
self.monsterinfo.current_move = stand_move14;
|
|
@@ -9665,14 +9822,14 @@ attack_cable_move = {
|
|
|
9665
9822
|
frames: attack_cable_frames,
|
|
9666
9823
|
endfunc: medic_run
|
|
9667
9824
|
};
|
|
9668
|
-
var
|
|
9825
|
+
var pain_frames7 = Array.from({ length: 6 }, () => ({
|
|
9669
9826
|
ai: monster_ai_move15,
|
|
9670
9827
|
dist: 0
|
|
9671
9828
|
}));
|
|
9672
|
-
|
|
9829
|
+
pain_move7 = {
|
|
9673
9830
|
firstframe: 116,
|
|
9674
9831
|
lastframe: 121,
|
|
9675
|
-
frames:
|
|
9832
|
+
frames: pain_frames7,
|
|
9676
9833
|
endfunc: medic_run
|
|
9677
9834
|
};
|
|
9678
9835
|
var spawn_frames = Array.from({ length: 23 }, (_, i) => ({
|
|
@@ -9710,7 +9867,7 @@ function SP_monster_medic(self, context) {
|
|
|
9710
9867
|
self.takedamage = true;
|
|
9711
9868
|
self.pain = (self2, other, kick, damage) => {
|
|
9712
9869
|
if (self2.health < self2.max_health / 2) {
|
|
9713
|
-
self2.monsterinfo.current_move =
|
|
9870
|
+
self2.monsterinfo.current_move = pain_move7;
|
|
9714
9871
|
if (Math.random() < 0.5) {
|
|
9715
9872
|
const sound = self2.classname === "monster_medic_commander" ? "medic/medpain2.wav" : "medic/medpain1.wav";
|
|
9716
9873
|
context.entities.sound?.(self2, 0, sound, 1, 1, 0);
|
|
@@ -9772,9 +9929,9 @@ var stand_move15;
|
|
|
9772
9929
|
var walk_move14;
|
|
9773
9930
|
var run_move14;
|
|
9774
9931
|
var attack_move7;
|
|
9775
|
-
var
|
|
9776
|
-
var
|
|
9777
|
-
var
|
|
9932
|
+
var pain1_move6;
|
|
9933
|
+
var pain2_move6;
|
|
9934
|
+
var pain3_move5;
|
|
9778
9935
|
var death_move13;
|
|
9779
9936
|
var jump_move;
|
|
9780
9937
|
function mutant_step(self) {
|
|
@@ -9881,13 +10038,13 @@ function mutant_pain_func(self, other, kick, damage, context) {
|
|
|
9881
10038
|
self.pain_finished_time = self.timestamp + 3;
|
|
9882
10039
|
if (random6() < 0.5) {
|
|
9883
10040
|
context.engine.sound?.(self, 0, "mutant/mutpain1.wav", 1, 1, 0);
|
|
9884
|
-
self.monsterinfo.current_move =
|
|
10041
|
+
self.monsterinfo.current_move = pain1_move6;
|
|
9885
10042
|
} else if (random6() < 0.5) {
|
|
9886
10043
|
context.engine.sound?.(self, 0, "mutant/mutpain2.wav", 1, 1, 0);
|
|
9887
|
-
self.monsterinfo.current_move =
|
|
10044
|
+
self.monsterinfo.current_move = pain2_move6;
|
|
9888
10045
|
} else {
|
|
9889
10046
|
context.engine.sound?.(self, 0, "mutant/mutpain3.wav", 1, 1, 0);
|
|
9890
|
-
self.monsterinfo.current_move =
|
|
10047
|
+
self.monsterinfo.current_move = pain3_move5;
|
|
9891
10048
|
}
|
|
9892
10049
|
}
|
|
9893
10050
|
function mutant_die(self) {
|
|
@@ -10035,32 +10192,32 @@ jump_move.frames[3].ai = (self, dist, context) => {
|
|
|
10035
10192
|
}
|
|
10036
10193
|
}
|
|
10037
10194
|
};
|
|
10038
|
-
var
|
|
10195
|
+
var pain1_frames6 = [
|
|
10039
10196
|
{ ai: monster_ai_move16, dist: 4 },
|
|
10040
10197
|
{ ai: monster_ai_move16, dist: -3 },
|
|
10041
10198
|
{ ai: monster_ai_move16, dist: -8 },
|
|
10042
10199
|
{ ai: monster_ai_move16, dist: 2 },
|
|
10043
10200
|
{ ai: monster_ai_move16, dist: 5 }
|
|
10044
10201
|
];
|
|
10045
|
-
|
|
10202
|
+
pain1_move6 = {
|
|
10046
10203
|
firstframe: 78,
|
|
10047
10204
|
lastframe: 82,
|
|
10048
|
-
frames:
|
|
10205
|
+
frames: pain1_frames6,
|
|
10049
10206
|
endfunc: mutant_run
|
|
10050
10207
|
};
|
|
10051
|
-
var
|
|
10208
|
+
var pain2_frames6 = [
|
|
10052
10209
|
{ ai: monster_ai_move16, dist: -24 },
|
|
10053
10210
|
{ ai: monster_ai_move16, dist: 11 },
|
|
10054
10211
|
{ ai: monster_ai_move16, dist: 5 },
|
|
10055
10212
|
{ ai: monster_ai_move16, dist: -2 }
|
|
10056
10213
|
];
|
|
10057
|
-
|
|
10214
|
+
pain2_move6 = {
|
|
10058
10215
|
firstframe: 83,
|
|
10059
10216
|
lastframe: 86,
|
|
10060
|
-
frames:
|
|
10217
|
+
frames: pain2_frames6,
|
|
10061
10218
|
endfunc: mutant_run
|
|
10062
10219
|
};
|
|
10063
|
-
var
|
|
10220
|
+
var pain3_frames5 = [
|
|
10064
10221
|
{ ai: monster_ai_move16, dist: 11 },
|
|
10065
10222
|
{ ai: monster_ai_move16, dist: 0 },
|
|
10066
10223
|
{ ai: monster_ai_move16, dist: -2 },
|
|
@@ -10068,10 +10225,10 @@ var pain3_frames4 = [
|
|
|
10068
10225
|
{ ai: monster_ai_move16, dist: 0 },
|
|
10069
10226
|
{ ai: monster_ai_move16, dist: 0 }
|
|
10070
10227
|
];
|
|
10071
|
-
|
|
10228
|
+
pain3_move5 = {
|
|
10072
10229
|
firstframe: 87,
|
|
10073
10230
|
lastframe: 92,
|
|
10074
|
-
frames:
|
|
10231
|
+
frames: pain3_frames5,
|
|
10075
10232
|
endfunc: mutant_run
|
|
10076
10233
|
};
|
|
10077
10234
|
var death_frames13 = [
|
|
@@ -10158,12 +10315,12 @@ var stand_move16;
|
|
|
10158
10315
|
var walk_move15;
|
|
10159
10316
|
var run_move15;
|
|
10160
10317
|
var drain_move;
|
|
10161
|
-
var
|
|
10318
|
+
var pain_move8;
|
|
10162
10319
|
var death_move14;
|
|
10163
10320
|
var start_run_move;
|
|
10164
10321
|
var start_walk_move;
|
|
10165
10322
|
var start_fidget_move;
|
|
10166
|
-
var
|
|
10323
|
+
var fidget_move3;
|
|
10167
10324
|
var end_fidget_move;
|
|
10168
10325
|
function parasite_launch(self, context) {
|
|
10169
10326
|
context.engine.sound?.(self, 0, "parasite/paratck1.wav", 1, 1, 0);
|
|
@@ -10180,11 +10337,11 @@ function parasite_scratch(self, context) {
|
|
|
10180
10337
|
context.engine.sound?.(self, 0, "parasite/paridle2.wav", 1, 2, 0);
|
|
10181
10338
|
}
|
|
10182
10339
|
function parasite_do_fidget(self) {
|
|
10183
|
-
self.monsterinfo.current_move =
|
|
10340
|
+
self.monsterinfo.current_move = fidget_move3;
|
|
10184
10341
|
}
|
|
10185
10342
|
function parasite_refidget(self) {
|
|
10186
10343
|
if (random7() <= 0.8) {
|
|
10187
|
-
self.monsterinfo.current_move =
|
|
10344
|
+
self.monsterinfo.current_move = fidget_move3;
|
|
10188
10345
|
} else {
|
|
10189
10346
|
self.monsterinfo.current_move = end_fidget_move;
|
|
10190
10347
|
}
|
|
@@ -10301,7 +10458,7 @@ function parasite_pain_func(self, other, kick, damage, context) {
|
|
|
10301
10458
|
} else {
|
|
10302
10459
|
context.engine.sound?.(self, 0, "parasite/parpain2.wav", 1, 1, 0);
|
|
10303
10460
|
}
|
|
10304
|
-
self.monsterinfo.current_move =
|
|
10461
|
+
self.monsterinfo.current_move = pain_move8;
|
|
10305
10462
|
}
|
|
10306
10463
|
function parasite_die(self) {
|
|
10307
10464
|
self.monsterinfo.current_move = death_move14;
|
|
@@ -10349,7 +10506,7 @@ start_fidget_move = {
|
|
|
10349
10506
|
frames: start_fidget_frames,
|
|
10350
10507
|
endfunc: parasite_do_fidget
|
|
10351
10508
|
};
|
|
10352
|
-
var
|
|
10509
|
+
var fidget_frames3 = [
|
|
10353
10510
|
{ ai: monster_ai_stand17, dist: 0, think: parasite_scratch },
|
|
10354
10511
|
{ ai: monster_ai_stand17, dist: 0 },
|
|
10355
10512
|
{ ai: monster_ai_stand17, dist: 0 },
|
|
@@ -10357,10 +10514,10 @@ var fidget_frames2 = [
|
|
|
10357
10514
|
{ ai: monster_ai_stand17, dist: 0 },
|
|
10358
10515
|
{ ai: monster_ai_stand17, dist: 0 }
|
|
10359
10516
|
];
|
|
10360
|
-
|
|
10517
|
+
fidget_move3 = {
|
|
10361
10518
|
firstframe: 104,
|
|
10362
10519
|
lastframe: 109,
|
|
10363
|
-
frames:
|
|
10520
|
+
frames: fidget_frames3,
|
|
10364
10521
|
endfunc: parasite_refidget
|
|
10365
10522
|
};
|
|
10366
10523
|
var end_fidget_frames = [
|
|
@@ -10429,7 +10586,7 @@ walk_move15 = {
|
|
|
10429
10586
|
frames: walk_frames15,
|
|
10430
10587
|
endfunc: parasite_walk
|
|
10431
10588
|
};
|
|
10432
|
-
var
|
|
10589
|
+
var pain_frames8 = [
|
|
10433
10590
|
{ ai: monster_ai_move17, dist: 0 },
|
|
10434
10591
|
{ ai: monster_ai_move17, dist: 0 },
|
|
10435
10592
|
{ ai: monster_ai_move17, dist: 0 },
|
|
@@ -10442,10 +10599,10 @@ var pain_frames9 = [
|
|
|
10442
10599
|
{ ai: monster_ai_move17, dist: -7 },
|
|
10443
10600
|
{ ai: monster_ai_move17, dist: 0 }
|
|
10444
10601
|
];
|
|
10445
|
-
|
|
10602
|
+
pain_move8 = {
|
|
10446
10603
|
firstframe: 57,
|
|
10447
10604
|
lastframe: 67,
|
|
10448
|
-
frames:
|
|
10605
|
+
frames: pain_frames8,
|
|
10449
10606
|
endfunc: parasite_start_run
|
|
10450
10607
|
};
|
|
10451
10608
|
var drain_frames = [
|
|
@@ -10557,7 +10714,7 @@ var walk_move16;
|
|
|
10557
10714
|
var run_move16;
|
|
10558
10715
|
var attack_move8;
|
|
10559
10716
|
var attack_move_mg;
|
|
10560
|
-
var
|
|
10717
|
+
var pain_move9;
|
|
10561
10718
|
var death_move15;
|
|
10562
10719
|
function soldier_stand(self) {
|
|
10563
10720
|
self.monsterinfo.current_move = stand_move17;
|
|
@@ -10748,14 +10905,14 @@ attack_move_mg = {
|
|
|
10748
10905
|
frames: attack_frames_mg,
|
|
10749
10906
|
endfunc: soldier_run
|
|
10750
10907
|
};
|
|
10751
|
-
var
|
|
10908
|
+
var pain_frames9 = Array.from({ length: 6 }, () => ({
|
|
10752
10909
|
ai: monster_ai_move18,
|
|
10753
10910
|
dist: 0
|
|
10754
10911
|
}));
|
|
10755
|
-
|
|
10912
|
+
pain_move9 = {
|
|
10756
10913
|
firstframe: 100,
|
|
10757
10914
|
lastframe: 105,
|
|
10758
|
-
frames:
|
|
10915
|
+
frames: pain_frames9,
|
|
10759
10916
|
endfunc: soldier_run
|
|
10760
10917
|
};
|
|
10761
10918
|
var death_frames15 = Array.from({ length: 10 }, () => ({
|
|
@@ -10799,7 +10956,7 @@ function SP_monster_soldier(self, context) {
|
|
|
10799
10956
|
}
|
|
10800
10957
|
self.pain = (self2, other, kick, damage) => {
|
|
10801
10958
|
if (self2.health < self2.max_health / 2) {
|
|
10802
|
-
self2.monsterinfo.current_move =
|
|
10959
|
+
self2.monsterinfo.current_move = pain_move9;
|
|
10803
10960
|
}
|
|
10804
10961
|
if (Math.random() < 0.5) {
|
|
10805
10962
|
context.entities.sound?.(self2, 0, "soldier/pain1.wav", 1, 1, 0);
|
|
@@ -10897,9 +11054,9 @@ var attack_rocket_move2;
|
|
|
10897
11054
|
var attack_grenade_move2;
|
|
10898
11055
|
var attack_chain_move2;
|
|
10899
11056
|
var attack_chain_end_move;
|
|
10900
|
-
var
|
|
10901
|
-
var
|
|
10902
|
-
var
|
|
11057
|
+
var pain1_move7;
|
|
11058
|
+
var pain2_move7;
|
|
11059
|
+
var pain3_move6;
|
|
10903
11060
|
var death_move16;
|
|
10904
11061
|
function supertank_stand(self) {
|
|
10905
11062
|
self.monsterinfo.current_move = stand_move18;
|
|
@@ -11001,12 +11158,12 @@ run_move17 = {
|
|
|
11001
11158
|
frames: run_frames16,
|
|
11002
11159
|
endfunc: supertank_run
|
|
11003
11160
|
};
|
|
11004
|
-
var
|
|
11005
|
-
|
|
11006
|
-
var
|
|
11007
|
-
|
|
11008
|
-
var
|
|
11009
|
-
|
|
11161
|
+
var pain3_frames6 = Array.from({ length: 4 }, () => ({ ai: monster_ai_move19, dist: 0 }));
|
|
11162
|
+
pain3_move6 = { firstframe: 78, lastframe: 81, frames: pain3_frames6, endfunc: supertank_run };
|
|
11163
|
+
var pain2_frames7 = Array.from({ length: 4 }, () => ({ ai: monster_ai_move19, dist: 0 }));
|
|
11164
|
+
pain2_move7 = { firstframe: 82, lastframe: 85, frames: pain2_frames7, endfunc: supertank_run };
|
|
11165
|
+
var pain1_frames7 = Array.from({ length: 4 }, () => ({ ai: monster_ai_move19, dist: 0 }));
|
|
11166
|
+
pain1_move7 = { firstframe: 86, lastframe: 89, frames: pain1_frames7, endfunc: supertank_run };
|
|
11010
11167
|
var death_frames16 = Array.from({ length: 24 }, () => ({ ai: monster_ai_move19, dist: 0 }));
|
|
11011
11168
|
death_move16 = { firstframe: 90, lastframe: 113, frames: death_frames16, endfunc: supertank_dead };
|
|
11012
11169
|
var attack_grenade_frames2 = Array.from({ length: 6 }, (_, i) => ({
|
|
@@ -11053,13 +11210,13 @@ function SP_monster_supertank(self, context) {
|
|
|
11053
11210
|
if (self2.monsterinfo.current_move === attack_rocket_move2 && (self2.monsterinfo.nextframe || 0) < attack_rocket_move2.firstframe + 14) return;
|
|
11054
11211
|
if (damage <= 10) {
|
|
11055
11212
|
context.entities.sound?.(self2, 0, "boss1/b1pain1.wav", 1, 1, 0);
|
|
11056
|
-
self2.monsterinfo.current_move =
|
|
11213
|
+
self2.monsterinfo.current_move = pain1_move7;
|
|
11057
11214
|
} else if (damage <= 25) {
|
|
11058
11215
|
context.entities.sound?.(self2, 0, "boss1/b1pain3.wav", 1, 1, 0);
|
|
11059
|
-
self2.monsterinfo.current_move =
|
|
11216
|
+
self2.monsterinfo.current_move = pain3_move6;
|
|
11060
11217
|
} else {
|
|
11061
11218
|
context.entities.sound?.(self2, 0, "boss1/b1pain2.wav", 1, 1, 0);
|
|
11062
|
-
self2.monsterinfo.current_move =
|
|
11219
|
+
self2.monsterinfo.current_move = pain2_move7;
|
|
11063
11220
|
}
|
|
11064
11221
|
};
|
|
11065
11222
|
self.die = (self2, inflictor, attacker, damage, point) => {
|
|
@@ -11146,7 +11303,7 @@ var run_move18;
|
|
|
11146
11303
|
var attack_blaster_move;
|
|
11147
11304
|
var attack_machinegun_move;
|
|
11148
11305
|
var attack_rocket_move3;
|
|
11149
|
-
var
|
|
11306
|
+
var pain_move10;
|
|
11150
11307
|
var death_move17;
|
|
11151
11308
|
function tank_stand(self) {
|
|
11152
11309
|
self.monsterinfo.current_move = stand_move19;
|
|
@@ -11384,14 +11541,14 @@ attack_rocket_move3 = {
|
|
|
11384
11541
|
frames: attack_rocket_frames3,
|
|
11385
11542
|
endfunc: tank_refire_rocket
|
|
11386
11543
|
};
|
|
11387
|
-
var
|
|
11544
|
+
var pain_frames10 = Array.from({ length: 6 }, () => ({
|
|
11388
11545
|
ai: monster_ai_move20,
|
|
11389
11546
|
dist: 0
|
|
11390
11547
|
}));
|
|
11391
|
-
|
|
11548
|
+
pain_move10 = {
|
|
11392
11549
|
firstframe: 116,
|
|
11393
11550
|
lastframe: 121,
|
|
11394
|
-
frames:
|
|
11551
|
+
frames: pain_frames10,
|
|
11395
11552
|
endfunc: tank_run
|
|
11396
11553
|
};
|
|
11397
11554
|
var death_frames17 = Array.from({ length: 16 }, () => ({
|
|
@@ -11425,7 +11582,7 @@ function SP_monster_tank(self, context) {
|
|
|
11425
11582
|
}
|
|
11426
11583
|
self2.pain_finished_time = self2.timestamp + 3;
|
|
11427
11584
|
if (damage <= 10 && Math.random() < 0.5) return;
|
|
11428
|
-
self2.monsterinfo.current_move =
|
|
11585
|
+
self2.monsterinfo.current_move = pain_move10;
|
|
11429
11586
|
};
|
|
11430
11587
|
self.die = (self2, inflictor, attacker, damage, point) => {
|
|
11431
11588
|
self2.deadflag = 2 /* Dead */;
|
|
@@ -11478,7 +11635,7 @@ function monster_ai_charge21(self, dist, context) {
|
|
|
11478
11635
|
var stand_move20;
|
|
11479
11636
|
var run_move19;
|
|
11480
11637
|
var attack_move9;
|
|
11481
|
-
var
|
|
11638
|
+
var pain_move11;
|
|
11482
11639
|
var death_move18;
|
|
11483
11640
|
function turret_stand(self) {
|
|
11484
11641
|
self.monsterinfo.current_move = stand_move20;
|
|
@@ -11541,14 +11698,14 @@ attack_move9 = {
|
|
|
11541
11698
|
frames: attack_frames9,
|
|
11542
11699
|
endfunc: turret_run
|
|
11543
11700
|
};
|
|
11544
|
-
var
|
|
11701
|
+
var pain_frames11 = Array.from({ length: 2 }, () => ({
|
|
11545
11702
|
ai: monster_ai_run20,
|
|
11546
11703
|
dist: 0
|
|
11547
11704
|
}));
|
|
11548
|
-
|
|
11705
|
+
pain_move11 = {
|
|
11549
11706
|
firstframe: 9,
|
|
11550
11707
|
lastframe: 10,
|
|
11551
|
-
frames:
|
|
11708
|
+
frames: pain_frames11,
|
|
11552
11709
|
endfunc: turret_run
|
|
11553
11710
|
};
|
|
11554
11711
|
var death_frames18 = Array.from({ length: 4 }, () => ({
|
|
@@ -11584,7 +11741,7 @@ function SP_monster_turret(self, context) {
|
|
|
11584
11741
|
if (context.entities.timeSeconds < self2.pain_debounce_time) return;
|
|
11585
11742
|
self2.pain_debounce_time = context.entities.timeSeconds + 3;
|
|
11586
11743
|
context.entities.sound?.(self2, 0, "turret/pain.wav", 1, 1, 0);
|
|
11587
|
-
self2.monsterinfo.current_move =
|
|
11744
|
+
self2.monsterinfo.current_move = pain_move11;
|
|
11588
11745
|
};
|
|
11589
11746
|
self.die = (self2, inflictor, attacker, damage, point) => {
|
|
11590
11747
|
self2.takedamage = false;
|