2 CHARACTER(firefox
, canine
)
5 virtual truth
SpecialBiteEffect (character
*, v2
, int, int, truth
);
6 virtual int GetSpecialBodyPartFlags (int) const;
13 int firefox::GetSpecialBodyPartFlags (int) const { return ST_FLAMES
; }
16 truth
firefox::SpecialBiteEffect (character
* Enemy
, v2 HitPos
, int BodyPartIndex
, int Direction
, truth BlockedByArmour
) {
17 if (Enemy
->IsEnabled() && (RAND()&1)) {
18 if (Enemy
->CanBeSeenByPlayer() && IsPlayer()) {
19 ADD_MESSAGE("Your bite burns %s.", Enemy
->CHAR_DESCRIPTION(DEFINITE
));
20 } else if (Enemy
->IsPlayer() || Enemy
->CanBeSeenByPlayer() || CanBeSeenByPlayer()) {
21 ADD_MESSAGE("The bite of %s burns %s.", CHAR_DESCRIPTION(DEFINITE
), Enemy
->CHAR_DESCRIPTION(DEFINITE
));
23 Enemy
->ReceiveBodyPartDamage(this, 2+(RAND()&3), FIRE
, BodyPartIndex
, Direction
);
24 Enemy
->CheckDeath(CONST_S("killed by the firey bite of ") + GetName(INDEFINITE
), this);
32 truth firefox::Bite (character *Enemy, v2 HitPos, int BodyPartIndex, int Direction, truth BlockedByArmour) {
33 truth BaseSuccess = nonhumanoid::Bite(Enemy, HitPos, BodyPartIndex, Direction, BlockedByArmour);
35 if (Enemy->IsEnabled() && (RAND()&1)) {
36 if (Enemy->CanBeSeenByPlayer() && IsPlayer()) {
37 ADD_MESSAGE("Your bite burns %s.", Enemy->CHAR_DESCRIPTION(DEFINITE));
38 } else if (Enemy->IsPlayer() || Enemy->CanBeSeenByPlayer() || CanBeSeenByPlayer()) {
39 ADD_MESSAGE("The bite of %s burns %s.", CHAR_DESCRIPTION(DEFINITE), Enemy->CHAR_DESCRIPTION(DEFINITE));
41 return Enemy->ReceiveBodyPartDamage(this, 2 + (RAND() & 3), FIRE, BodyPartIndex, Direction) || BaseSuccess;