Find
You are looking at a material called iceenchant
Created by
thorn
, last updated 09 Feb 2007
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',"[$weapon] casts [$actor] at [$tohit]!";
say 'msg',"[$tohit] is covered in ice!";
multiset $actor to "counter=1,pose='freezing',host='$tohit',hosthow='around'";
relook $loc;
##dodamage:
$hlth = $tohit's health;
take 1 from $hlth;
if $hlth < 0 then zeroit;
set $tohit's health to $hlth;
$verb = (shivers,feels a little frostbitten,feels frigid);
$obj = (coating of ice,ice covering,frozen glaze);
multivar $t=$target,$target=$tohit;
say 'freeze',"[$tohit] $verb from 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 frozen to death.";
set $actor's counter to 4;
##alldone:
say 'msg',"[$actor] thaws out";
unhost $actor;
$charge = $actor's health;
take 1 from $charge;
if $charge > 0 then continue else gone;
multiset $actor to "host=0,hosthow='',pose='hidden',counter=0,health='$charge',loc='$weapon'";
relook $loc;
switch $actor off;
##gone:
$weapon = 0;