Heal Spell #88

Parent #49Owner #10Flags read, writeSource MurpgCore-0.4/MurpgCore-0.4.db

1 verbs · 16 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
invokethis none thisrwxd#8832

Properties

PropertyDefinerFlagsOwnerValue
endurance_cost#49rw#1060
focus_cost#49rw#1040
description#1rw#10<clear>
aliases#1rw#10<clear>
home#1rw#10<clear>
short_desc#1rw#10<clear>
core#1rw#10<clear>
handedness#1rw#10<clear>
base_enc#1rw#10<clear>
base_weight#1rw#10<clear>
capacity#1rw#10<clear>
max_fit#1rw#10<clear>
pprep#1rw#10<clear>
gprep#1rw#10<clear>
generic_name#1rw#10<clear>
age#1rw#10<clear>

Ancestry

Ancestors (nearest first): #49 Spell Class#1 Root Class

Children: none

Source

invoke

Spec this none thisFlags rwxdOwner #10Definer #88

Referenced by

none

Source

1"heal:invoke()";
2{caster, target} = args;
3if (!valid(target))
4target = caster;
5endif
6if (caster.current_spell != 0)
7return {0, "You are currently casting a spell already!"};
8elseif (!target:is_a($animate))
9return {0, "You can only cast this spell at an animate."};
10else
11caster:sees(3, {"You wave your hands in a circular motion, and white light shoots from the palms of your hands."});
12viewers = caster.location:get_animates();
13viewers = setremove(viewers, caster);
14for each in (viewers)
15each:sees(3, {((((caster:known_to(each)[2] + " waves ") + #0.(caster.gender)[5]) + " hands in a circular motion, and white light shoots from the palms of ") + #0.(caster.gender)[5]) + " hands.%w"});
16endfor
17fork cur_spell ($combat.round_length)
18"calculate and deal target healing";
19targ_heal = ((random(6) + random(6)) + random(6)) + random(6);
20caster:sees(3, {((("%WYou heal " + target:known_to(caster)[2]) + " with your Heal spell (") + tostr(targ_heal)) + ")!%w"});
21target:sees(3, {((((("%W" + caster:known_to(target)[2]) + " heals you with ") + #0.(caster.gender)[5]) + " Heal spell (") + tostr(targ_heal)) + ").%w"});
22viewers = caster.location:get_animates();
23viewers = setremove(viewers, target);
24viewers = setremove(viewers, caster);
25for each in (viewers)
26each:sees(3, {((((("%W" + caster:known_to(each)[2]) + " heals ") + target:known_to(each)[2]) + " with ") + #0.(caster.gender)[5]) + " Heal spell!%w"});
27endfor
28target:raise_hp(targ_heal);
29caster.current_spell = 0;
30endfork
31caster.current_spell = cur_spell;
32endif