Find
You are looking at an amulet of magic negation
Created by
omenofdoom
, last updated 01 Jul 2009
Code
if reacting to freeze then checkwhat;
if reacting to burn then checkwhat;
if reacting to shock then checkwhat
##checkwhat:
if $init_obj's material like '_spell_' then checktarg else end;
##checktarg:
$hoster = $actor's host;
if $init_obj's host = $hoster then checkmana else end;
##checkmana:
$mana = $init_obj's mana;
$imana = $hoster's mana;
add 3 to $mana;
if $mana > $imana then cant else negateit;
##cant:
sayto $hoster,"(You don't have enough mana to negate this spell!)";
print "[$actor] flickers, but nothing happens";
##negateit:
take $mana from $imana;
set $hoster's mana = $imana;
print "[$actor] flickers, then begins to glow";
$what = (plumes,streams,blasts,gusts,bursts);
$how = (spinning,streaking,smoking,wobbling);
print "[$init_obj] speeds toward [$hoster], then diverges, $what of magical energy $how away harmlessly";
unhost $init_obj;
set $init_obj's host to '';
set $init_obj's hosthow to '';
set $init_obj's counter to 0;
relook $loc;