Find
You are looking at a sunbeam
Created by
omenofdoom
, last updated 25 Jul 2012
Code
##tickloc:runsub ticked;
##ticked:
$cnt = $actor's counter;
$fromhit = $actor's slot1;
$tohit = $actor's slot2;
$weapon = $actor's slot3;
case $cnt do doinit,dodamage,dodamage,dodamage,alldone;
##doinit:
say 'msg',"An inner light begins to shine from a crystal at [$actor]'s tip";
say 'msg',"[$actor] blasts from [$weapon] and strikes [$tohit]!";
say 'msg',"[$tohit] is engulfed in a bright light!";
multiset $actor to "counter=1,host='$tohit',hosthow='at'";
##dodamage:
$hlth = $tohit's health;
take 3 from $hlth;
if $hlth < 0 then zeroit;
set $tohit's health to $hlth;
$t = $target;
$target = $tohit;
say 'burn',"[$tohit] is scorched by [$actor]!";
$target = $t;
add 1 to $cnt;
set $actor's counter to $cnt;
if $hlth < 1 then saydead;
##zeroit:
$hlth = 0;
##saydead:
say 'msg',"[$tohit] is burned to a pile of ashes.";
set $actor's counter to 4;
##alldone:
say 'msg',"[$actor] fizzles out";
unhost $actor;
$charge = $actor's health;
if $charge > 0 then continue else gone;
multiset $actor to "host=0,hosthow='',counter=0,health='$charge',loc='$weapon'";
relook $loc;
switch $actor off;
##gone:
$weapon = 96348;