SYNOPSIS
mapping P_MAGIC_PROTECTION "MagicProtection"
mapping Set(P_MAGIC_PROTECTION, mapping value)
mapping Query(P_MAGIC_PROTECTION)
or
mapping SetMagicProtection(mapping value)
mapping QueryMagicProtection()
Accessible via:
string AddMagicProtection (int type, string message)
mapping ForbidAllMagic( [ string message ] )
string QueryIsMagicForbidden (int type)
DESCRIPTION
The property describes which type of magic are forbidden in the room.
The magic types are integers, defined in /sys/magic.h. For each type,
an message has to be stored which will be printed upon attempt of such
magic.
All the data is stored in a mapping, indexed by the magic types, with
the message strings as entries.
The access to the property is easened by these lfuns:
string AddMagicProtection (int type, string message)
Add a protection against magic <type> with <message> as the string
to be printed. The string is also the return value.
mapping ForbidAllMagic( [ string message ] )
Forbid all types of magic. If <message> is given, it is the string
printed upon attempt, else a default string is used.
The lfun modifies P_MAGIC_PROTECTION and returns the new mapping
as result.
string QueryIsMagicForbidden (int type)
Check if magic <type> is forbidden. If yes, it returns the message
string, if no, it returns 0.
EXAMPLE
AddMagicProtection(ST_FIRE, "The walls absorb the energy.\n");
AVAILABILITY
Include: <properties.h>
<magic.h>: magic types
Availability: /std/room(/restrictions) and descendants.
SEE ALSO
room(S), magic(C), magic(P)