/* -*- LPC -*- */
/*
* $Locker: $
* $Id: troll_race.c,v 1.1 1998/01/06 04:31:13 ceres Exp $
* $Log: troll_race.c,v $
* Revision 1.1 1998/01/06 04:31:13 ceres
* Initial revision
*
*/
object person;
void setup_shadow( object thing ) {
shadow( thing, 1 );
person = thing;
} /* setup_shadow() */
void destruct_shadow( object thing ) {
if ( thing == this_object() )
destruct( this_object() );
else
thing->destruct_shadow( thing );
} /* destruct_shadow() */
varargs int query_ac( string type, int damage, string zone ) {
int amount;
object attacker, weapon;
amount = (int)person->query_ac( type, damage, zone );
if ( ( type != "pierce" ) && ( type != "sharp" ) )
return amount;
if ( ( type == "pierce" ) && ( zone == "neck" ) )
return amount;
attacker = (object)this_object()->query_attacker();
if ( attacker ) {
weapon = (object)attacker->query_weapon();
if ( weapon && ( weapon != attacker ) )
weapon->adjust_cond( -(int)weapon->query_cond() / 20 );
}
return amount * 2;
} /* query_ac() */