vht/vhtzs/monsters.zsc

50 lines
1.3 KiB
Plaintext
Raw Normal View History

class VhtEttin : Ettin replaces Ettin {
default {
AttackSound "";
}
states {
Melee:
ETTN EF 6 a_faceTarget;
ETTN G 8 a_customMeleeAttack(random[EttinAttack](1, 8) * 2, "EttinAttack", "FighterPunchMiss");
goto See;
}
}
class VhtCentaur : Centaur replaces Centaur {
default {
AttackSound "";
}
void vhtSetReflectiveInvulnerable() {
bInvulnerable = true;
if(vht_monster_centaur != 0)
bReflective = true;
}
void vhtUnsetReflectiveInvulnerable() {
bInvulnerable = false;
if(vht_monster_centaur != 0)
bReflective = false;
}
override int damageMobj(Actor inflictor, Actor source, int damage, Name mod, int flags, double hitAngle) {
if(vht_monster_centaur == 2 && bInvulnerable) {
double angleToSrc = inflictor ? angleTo(inflictor) - angle : hitAngle;
if(angleToSrc < -90 || angleToSrc > 90) {
flags |= DMG_FOILINVUL;
}
}
return super.damageMobj(inflictor, source, damage, mod, flags, angle);
}
states {
Pain:
CENT G 6 a_pain;
CENT G 6 vhtSetReflectiveInvulnerable;
CENT EEE 15 a_centaurDefend;
CENT E 1 vhtUnsetReflectiveInvulnerable;
goto See;
Melee:
CENT H 5 a_faceTarget;
CENT I 4 a_faceTarget;
CENT J 7 a_customMeleeAttack(random[CentaurAttack](3, 9), "CentaurAttack", "FighterHammerMiss");
goto See;
}
}