You are looking at an omenlich note

if target of xxxxtouch then goahead;

##xtickloc:
runsub checkstuff;

##checkstuff:
$lichsoul = 43107;
$lhlthm = $lichsoul's healthmax;
$lhlth = $lichsoul's health;
$shlth = $actor's health;
$shlthm = $actor's healthmax;
if $shlth > 0 then regensap else shattersap;

##goahead:
$lichsoul = 43107;
$mat = $lichsoul's material;
swap $mat add "_undead_";
swap $mat add "_lich_";
set $lichsoul's material to $mat;

##regensap:
if $shlth < $shlthm then doregen else nope;

##doregen:
add 3 to $shlth;
set $actor's health to $shlth;

##shattersap:
print "A piercing shriek splits as the cloud of darkness around [$actor] seems to collapse in on itself."
print "[$actor] explodes into thousands of shards, and tendrils of darkness seem tear at you as they disappate into the air."
$matl = $lichsoul's material;
swap $matl take "_undead_";
swap $matl take "_lich_";
set $lichsoul's material to $matl;