Find
You are looking at a fire spell
This engulfs the target in flames, causing a bit of damage over time.
Requires: 2 sorcery, 2 mana
cast fire spell at it
Created by
thorn
, last updated 25 Jun 2009
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,dodamage,dodamage,dodamage,alldone;
##doinit:
say 'msg',"[$fromhit] casts [$actor] at [$tohit]!";
say 'msg',"[$tohit] is engulfed in flames!";
set $actor's counter to 1;
set $actor's pose to 'burning';
set $actor's host to $tohit;
set $actor's hosthow to 'around';
relook $loc;
##dodamage:
var $hlth to $tohit's health;
take 1 from $hlth;
if $hlth < 0 then zeroit;
set $tohit's health to $hlth;
$verb = (is burned,is singed,is cooked,is immolated,is baked,roasts,smolders,is scorched,toasts,is charred);
$obj = (flames,blaze,heat,fire);
$t = $target;
$target = $tohit;
say 'burn',"[$tohit] $verb by the $obj.";
$target = $t;
add 1 to $cnt;
set $actor's counter to $cnt;
if $hlth > 0 then continue else saydead;
##zeroit:
$hlth = 0;
##saydead:
say 'msg',"[$tohit] is burned to death.";
set $actor's counter to 4;
##alldone:
say 'msg',"[$actor] burns out";
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 = 2;
$dskill = 'sorcery';
$dskillcap = 10;
$dskilltip = 69431;
##failcast:
"[$init_obj]'s attempt fizzles.";