basic_healing.c

skylib_mudos_v1/mudlib/std/effects/rituals/basic_healing.c · 780 B

From the archive skylib_mudos_v1.tar.gz

Download the archive   « Back to the archive contents

/*
 * Basic Healing Effect by Sandoz, 26 May 2001
 */

#include <deity.h>

inherit BASIC_RITUAL;

/** @ignore yes */
void do_healing( object target, object caster, int amount ) {
    if( !target || !caster || amount < 1 )
        return;

    target->adjust_hp( amount, caster, TO, "heal");

    if( creatorp(caster) )
        tell_object( caster, "Amount healed : "+amount+"\n");

} /* do_healing() */

/** @ignore yes */
int ritual_check_target( object caster, object target ) {
   if( target->query_hp() < target->query_max_hp() )
       return 1;

   if( target == caster )
       tell_object( caster, "You are already in great shape.\n" );
   else
       tell_object( caster, target->the_short()+" is already in great shape.\n");

   return 0;

} /* ritual_check_target() */

Site Stats

Snippets: 1791
Codebases: 571