code/__DEFINES/magic.dm ![code/__DEFINES/magic.dm0](git.png)
SCHOOL_UNSET | Unset / default / "not actually magic" school. |
---|---|
SCHOOL_HOLY | Holy school (chaplain magic) |
SCHOOL_PSYCHIC | Psychic school. Not true magic, but psychic spells only benefit themselves. |
SCHOOL_MIME | Mime... school? Mime magic. It counts |
SCHOOL_RESTORATION | Restoration school, which is mostly healing stuff |
SCHOOL_EVOCATION | Evocation school, usually involves killing or destroy stuff, usually out of thin air |
SCHOOL_TRANSMUTATION | School of transforming stuff into other stuff |
SCHOOL_TRANSLOCATION | School of transolcation, usually movement spells |
SCHOOL_CONJURATION | Conjuration spells summon items / mobs / etc somehow |
SCHOOL_NECROMANCY | Necromancy spells, usually involves soul / evil / bad stuff |
SCHOOL_FORBIDDEN | Other forbidden magics, such as heretic spells |
SCHOOL_SANGUINE | Blood magic, involves vampirism, draining blood, etc. |
INVOCATION_NONE | Allows being able to cast the spell without saying or doing anything. |
INVOCATION_SHOUT | Forces the wizard to shout the invocation to cast the spell. |
INVOCATION_WHISPER | Forces the wizard to whisper the invocation to cast the spell. |
INVOCATION_EMOTE | Forces the wizard to emote to cast the spell. |
SPELL_REQUIRES_WIZARD_GARB | Whether the spell requires wizard clothes to cast. |
SPELL_REQUIRES_HUMAN | Whether the spell can only be cast by humans (mob type, not species). SPELL_REQUIRES_WIZARD_GARB comes with this flag implied, as carbons and below can't wear clothes. |
SPELL_CASTABLE_AS_BRAIN | Whether the spell can be cast by mobs who are brains / mmis. When applying, bear in mind most spells will not function for brains out of the box. |
SPELL_REQUIRES_NO_ANTIMAGIC | Whether the spell can be cast while the user has antimagic on them that corresponds to the spell's own antimagic flags. |
SPELL_REQUIRES_STATION | Whether the spell requires being on the station z-level to be cast. |
SPELL_REQUIRES_MIND | Whether the spell must be cast by someone with a mind datum. |
SPELL_REQUIRES_MIME_VOW | Whether the spell requires the caster have a mime vow (mindless mobs will succeed this check regardless). |
SPELL_CASTABLE_WITHOUT_INVOCATION | Whether the spell can be cast, even if the caster is unable to speak the invocation (effectively making the invocation flavor, instead of required). |
TELEPORT_SPELL_SKIP_SPACE | Whether the teleport spell skips over space turfs |
TELEPORT_SPELL_SKIP_DENSE | Whether the teleport spell skips over dense turfs |
TELEPORT_SPELL_SKIP_BLOCKED | Whether the teleport spell skips over blocked turfs |
MAGIC_RESISTANCE | Default magic resistance that blocks normal magic (wizard, spells, magical staff projectiles) |
MAGIC_RESISTANCE_MIND | Tinfoil hat magic resistance that blocks mental magic (telepathy / mind links, mind curses, abductors) |
MAGIC_RESISTANCE_HOLY | Holy magic resistance that blocks unholy magic (revenant, vampire, voice of god) |
is_jaunting | Checks if our mob is jaunting actively (within a phased mob object) Used in jaunting spells specifically to determine whether they should be entering or exiting jaunt |
Define Details
INVOCATION_EMOTE ![code/__DEFINES/magic.dm 42](git.png)
Forces the wizard to emote to cast the spell.
INVOCATION_NONE ![code/__DEFINES/magic.dm 36](git.png)
Allows being able to cast the spell without saying or doing anything.
INVOCATION_SHOUT ![code/__DEFINES/magic.dm 38](git.png)
Forces the wizard to shout the invocation to cast the spell.
INVOCATION_WHISPER ![code/__DEFINES/magic.dm 40](git.png)
Forces the wizard to whisper the invocation to cast the spell.
MAGIC_RESISTANCE ![code/__DEFINES/magic.dm 87](git.png)
Default magic resistance that blocks normal magic (wizard, spells, magical staff projectiles)
MAGIC_RESISTANCE_HOLY ![code/__DEFINES/magic.dm 91](git.png)
Holy magic resistance that blocks unholy magic (revenant, vampire, voice of god)
MAGIC_RESISTANCE_MIND ![code/__DEFINES/magic.dm 89](git.png)
Tinfoil hat magic resistance that blocks mental magic (telepathy / mind links, mind curses, abductors)
SCHOOL_CONJURATION ![code/__DEFINES/magic.dm 24](git.png)
Conjuration spells summon items / mobs / etc somehow
SCHOOL_EVOCATION ![code/__DEFINES/magic.dm 18](git.png)
Evocation school, usually involves killing or destroy stuff, usually out of thin air
SCHOOL_FORBIDDEN ![code/__DEFINES/magic.dm 30](git.png)
Other forbidden magics, such as heretic spells
SCHOOL_HOLY ![code/__DEFINES/magic.dm 8](git.png)
Holy school (chaplain magic)
SCHOOL_MIME ![code/__DEFINES/magic.dm 12](git.png)
Mime... school? Mime magic. It counts
SCHOOL_NECROMANCY ![code/__DEFINES/magic.dm 28](git.png)
Necromancy spells, usually involves soul / evil / bad stuff
SCHOOL_PSYCHIC ![code/__DEFINES/magic.dm 10](git.png)
Psychic school. Not true magic, but psychic spells only benefit themselves.
SCHOOL_RESTORATION ![code/__DEFINES/magic.dm 14](git.png)
Restoration school, which is mostly healing stuff
SCHOOL_SANGUINE ![code/__DEFINES/magic.dm 32](git.png)
Blood magic, involves vampirism, draining blood, etc.
SCHOOL_TRANSLOCATION ![code/__DEFINES/magic.dm 22](git.png)
School of transolcation, usually movement spells
SCHOOL_TRANSMUTATION ![code/__DEFINES/magic.dm 20](git.png)
School of transforming stuff into other stuff
SCHOOL_UNSET ![code/__DEFINES/magic.dm 4](git.png)
Unset / default / "not actually magic" school.
SPELL_CASTABLE_AS_BRAIN ![code/__DEFINES/magic.dm 52](git.png)
Whether the spell can be cast by mobs who are brains / mmis. When applying, bear in mind most spells will not function for brains out of the box.
SPELL_CASTABLE_WITHOUT_INVOCATION ![code/__DEFINES/magic.dm 64](git.png)
Whether the spell can be cast, even if the caster is unable to speak the invocation (effectively making the invocation flavor, instead of required).
SPELL_REQUIRES_HUMAN ![code/__DEFINES/magic.dm 49](git.png)
Whether the spell can only be cast by humans (mob type, not species). SPELL_REQUIRES_WIZARD_GARB comes with this flag implied, as carbons and below can't wear clothes.
SPELL_REQUIRES_MIME_VOW ![code/__DEFINES/magic.dm 61](git.png)
Whether the spell requires the caster have a mime vow (mindless mobs will succeed this check regardless).
SPELL_REQUIRES_MIND ![code/__DEFINES/magic.dm 59](git.png)
Whether the spell must be cast by someone with a mind datum.
SPELL_REQUIRES_NO_ANTIMAGIC ![code/__DEFINES/magic.dm 55](git.png)
Whether the spell can be cast while the user has antimagic on them that corresponds to the spell's own antimagic flags.
SPELL_REQUIRES_STATION ![code/__DEFINES/magic.dm 57](git.png)
Whether the spell requires being on the station z-level to be cast.
SPELL_REQUIRES_WIZARD_GARB ![code/__DEFINES/magic.dm 46](git.png)
Whether the spell requires wizard clothes to cast.
TELEPORT_SPELL_SKIP_BLOCKED ![code/__DEFINES/magic.dm 83](git.png)
Whether the teleport spell skips over blocked turfs
TELEPORT_SPELL_SKIP_DENSE ![code/__DEFINES/magic.dm 81](git.png)
Whether the teleport spell skips over dense turfs
TELEPORT_SPELL_SKIP_SPACE ![code/__DEFINES/magic.dm 79](git.png)
Whether the teleport spell skips over space turfs
is_jaunting ![code/__DEFINES/magic.dm 107](git.png)
Checks if our mob is jaunting actively (within a phased mob object) Used in jaunting spells specifically to determine whether they should be entering or exiting jaunt
If you want to use this in non-jaunt related code, it is preferable to instead check for trait TRAIT_MAGICALLY_PHASED instead of using this as it encompasses more states in which a mob may be "incorporeal from magic"