Find
You are looking at a critical cut
A weapon receives this special hit when it has been improved to 40 points. It causes severe bleeding for a few rounds.
Created by
thorn
, last updated 19 Dec 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] causes [$actor] on [$tohit]!";
clear $actor,all;
update $actor = "counter=1,host='$tohit',hosthow='on'";
relook $loc;
##dodamage:
$hlth = $tohit's health;
take 2 from $hlth;
if $hlth < 0 then zeroit;
set $tohit's health to $hlth;
$t = $target;
$target = $tohit;
say 'bleed',"[$actor] on [$tohit] is bleeding profusely!";
$target = $t;
add 1 to $cnt;
set $actor's counter to $cnt;
if $hlth < 1 then saydead;
##zeroit:
$hlth = 0;
##saydead:
say 'msg',"[$tohit] dies from loss of blood";
set $actor's counter to 4;
##alldone:
say 'msg',"[$actor] on [$tohit] stops bleeding.";
set $actor's loc to $weapon;
unhost $actor;
clear $actor,all;
update $actor = "host=0,hosthow='',counter=0";
relook $loc;
switch $actor off;