Find
You are looking at a healing spell
Created by
thorn
, last updated 26 Jul 2012
Code
##tickloc:runsub ticked;
##ticked:
var $cnt to $actor's counter;
var $fromhit to $actor's slot1;
var $tohit to $actor's slot2;
case $cnt do doinit,doheal,doheal,doheal,alldone;
##doinit:
say 'msg',"[$fromhit] calls forth [$actor] for [$tohit]!";
set $actor's counter to 1;
set $actor's pose to 'hovering';
set $actor's host to $tohit;
set $actor's hosthow to 'around';
relook $loc;
##doheal:
var $hlth to $tohit's health;
add 1 to $hlth;
if $hlth > $tohit's healthmax then maxit;
set $tohit's health to $hlth;
$wounds = (wounds,cuts,scratches,scrapes,bruises,lacerations);
$slightly = (slightly,lightly,marginally,somewhat,faintly,a bit,a little,scantly,mildly,moderately,kind of);
$seem = (seem,are,look,appear);
$verb = (healed,better,lessened,closed);
$t = $target;
$target = $tohit;
say 'heal',"[$tohit]'s $wounds $seem $slightly $verb.";
$target = $t;
add 1 to $cnt;
set $actor's counter to $cnt;
if $hlth < $tohit's healthmax then continue else sayhealed;
##maxit:
$hlth = $tohit's healthmax;
##sayhealed:
say 'msg',"[$tohit] is completely healed.";
set $actor's counter to 4;
##alldone:
say 'msg',"[$actor] fades away.";
set $actor's code to '';
set $actor's loc to $0;
unhost $actor;
set $actor's host to 0;
set $actor's hosthow to '';
set $actor's counter to 0;
clear $actor,all;
relook $loc;
switch $actor off;
##difficultdata:
$dcommand = 'cast';
$dlevel = 1;
$dreq = 1;
$dskill = 'mysticism';
$dskillcap = 10;
$dskilltip = 69372;
set $actor's mana to 1;
##failcast:
"[$init_obj]'s attempt fizzles.";