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 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] causes [$actor] on [$tohit]!";
set $actor's counter to 1;
set $actor's host to $tohit;
set $actor's hosthow to 'on';
relook $loc;
##dodamage:
var $hlth to $tohit's health;
take 1 from $hlth;
if $hlth < 0 then zeroit;
set $tohit's health to $hlth;
$t = $target;
$target = $tohit;
say 'bleed',"[$actor] on [$tohit] is bleeding!";
$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;
set $actor's host to 0;
set $actor's hosthow to '';
set $actor's counter to 0;
relook $loc;
switch $actor off;