Find
You are looking at a magical flame
A unique enchantment.
Created by
thorn
, last updated 25 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;
var $weapon to $actor's slot3;
case $cnt do doinit,dodamage,dodamage,dodamage,alldone;
##doinit:
say 'msg',"[$weapon] casts [$actor] towards [$tohit]!";
say 'msg',"[$tohit] is engulfed in flames!";
set $actor's counter to 1;
set $actor's host to $tohit;
set $actor's hosthow to 'around';
##dodamage:
var $hlth to $tohit's health;
take 2 from $hlth;
if $hlth < 0 then zeroit;
set $tohit's health to $hlth;
$t = $target;
$target = $tohit;
$verb = (singed,baked,burned,broiled,charred,cooked,roasted,scorched,seared,smoldering,toasted);
say 'burn',"[$tohit] is singed 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 $verb to death.";
set $actor's counter to 4;
##alldone:
say 'msg',"[$actor] fizzles out";
set $actor's loc to $weapon;
unhost $actor;
set $actor's host to 0;
set $actor's hosthow to '';
set $actor's counter to 0;
relook $loc;
switch $actor off;