finished adding content from CLIVAN; not tested yet
[k8-i-v-a-n.git] / src / game / nonhumans / nonhumanoid_thunderbird.cpp
blob358b8fb70dc48e5fd6cdc0db885583cf02743bb7
1 #ifdef HEADER_PHASE
2 CHARACTER(thunderbird, nonhumanoid)
4 protected:
5 virtual cchar *FirstPersonBiteVerb () const;
6 virtual cchar *FirstPersonCriticalBiteVerb () const;
7 virtual cchar *ThirdPersonBiteVerb () const;
8 virtual cchar *ThirdPersonCriticalBiteVerb () const;
9 virtual int GetSpecialBodyPartFlags (int) const;
10 virtual truth SpecialBiteEffect (character *, v2, int, int, truth);
14 #else
17 cchar *thunderbird::FirstPersonBiteVerb () const { return "peck"; }
18 cchar *thunderbird::FirstPersonCriticalBiteVerb () const { return "critically peck"; }
19 cchar *thunderbird::ThirdPersonBiteVerb () const { return "pecks"; }
20 cchar *thunderbird::ThirdPersonCriticalBiteVerb () const { return "critically pecks"; }
21 int thunderbird::GetSpecialBodyPartFlags (int) const { return ST_LIGHTNING; }
24 truth thunderbird::SpecialBiteEffect (character *Enemy, v2 HitPos, int BodyPartIndex, int Direction, truth BlockedByArmour) {
25 if (Enemy->IsEnabled() && (RAND()&1)) {
26 if (Enemy->CanBeSeenByPlayer() && IsPlayer()) {
27 ADD_MESSAGE("Your beak emits a thunderous peal directed at %s.", Enemy->CHAR_DESCRIPTION(DEFINITE));
28 } else if (Enemy->IsPlayer() || Enemy->CanBeSeenByPlayer() || CanBeSeenByPlayer()) {
29 ADD_MESSAGE("Thunder is emitted from the beak of %s and the sound waves hit %s.", CHAR_DESCRIPTION(DEFINITE), Enemy->CHAR_DESCRIPTION(DEFINITE));
31 Enemy->ReceiveBodyPartDamage(this, 2+(RAND()&3), SOUND, BodyPartIndex, Direction);
32 Enemy->CheckDeath(CONST_S("killed by the thunderous attack of ") + GetName(INDEFINITE), this);
33 return true;
35 return false;
39 #endif