troll_race.c

skylib_fluffos_v3/mudlib/std/shadows/other/troll_race.c · 1.1 KB

From the archive skylib_fluffos_v3.zip

Download the archive   « Back to the archive contents

/*  -*- LPC -*-  */
/*
 * $Locker:  $
 * $Id: troll_race.c,v 1.1 1998/01/06 04:42:56 ceres Exp $
 * $Log: troll_race.c,v $
 * Revision 1.1  1998/01/06 04:42:56  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() / 5 );
   }
   return damage;
} /* query_ac() */   

Site Stats

Snippets: 1791
Codebases: 571