Spell Functions for Mocha
- integer spl.level;
- Returns the level of the spell spl.
- string spl.name;
- Returns the name of the spell spl.
- integer spl.number;
- Returns the damage type of the spell spl.
- spell make_spell (integer level, string name);
- Returns a spell of the specified level and name.
- special cast (person pc, spell spl, entity vict, string arg);
- Casts the spell spl on the entity vict at the level
specified by the spell. If pc is not none, the pc
is used as the caster (for naming purposes only). Extra arguments (e.g.,
for the command spell) are passed in arg. Returns ignored
if the spell could not be cast, fatal when the spell kills the
victim, and handled otherwise.
- special cast_by_pc (person pc, spell spl, entity vict, string arg);
- Makes the pc cast the spell spl on the entity vict
at the level of the pc and provided that the pc has adequate
spell points remaining. Extra arguments (e.g., for the command spell) are
passed in arg. Returns ignored if the spell could not be
cast, fatal when the spell kills the victim, and handled
otherwise.
- special cast_fake (person pc, spell spl);
- Goes through the motions of casting a spell, but does not
actually cast the spell. The pc loses spell points for the
spell and must make the usual skill roll for success. Returns
handled if the spell succeeds, or ignored if the spell
failed.
- integer point_cost (person pc, spell spl);
- Returns the cost in mana for the person to cast the specified spell.
Return to Mocha's Main Page