anti_magic

This provides different types of magic resistance on an object
Vars | |
antimagic_flags | A bitflag with the types of magic resistance on the object |
---|---|
casting_restriction_alert | If we have already sent a notification message to the mob picking up an antimagic item |
charges | The amount of times the object can protect the user from magic |
drain_antimagic | The proc that is triggered when an object has been drained a antimagic charge |
expiration | The proc that is triggered when the object is depleted of charges |
inventory_flags | The inventory slot the object must be located at in order to activate |
Procs | |
Initialize | Adds magic resistances to an object |
restrict_casting_magic | cannot cast magic with the same type of antimagic present |
Var Details
antimagic_flags

A bitflag with the types of magic resistance on the object
casting_restriction_alert

If we have already sent a notification message to the mob picking up an antimagic item
charges

The amount of times the object can protect the user from magic
drain_antimagic

The proc that is triggered when an object has been drained a antimagic charge
expiration

The proc that is triggered when the object is depleted of charges
inventory_flags

The inventory slot the object must be located at in order to activate
Proc Details
Initialize
Adds magic resistances to an object
Magic resistance will prevent magic from affecting the user if it has the correct resistance against the type of magic being used
args:
- antimagic_flags (optional) A bitflag with the types of magic resistance on the object
- charges (optional) The amount of times the object can protect the user from magic
- inventory_flags (optional) The inventory slot the object must be located at in order to activate
- drain_antimagic (optional) The proc that is triggered when an object has been drained a antimagic charge
- expiration (optional) The proc that is triggered when the object is depleted of charges
antimagic bitflags: (see code/__DEFINES/magic.dm)
- MAGIC_RESISTANCE - Default magic resistance that blocks normal magic (wizard, spells, staffs)
- MAGIC_RESISTANCE_MIND - Tinfoil hat magic resistance that blocks mental magic (telepathy, abductors, jelly people)
- MAGIC_RESISTANCE_HOLY - Holy magic resistance that blocks unholy magic (revenant, cult, vampire, voice of god)
restrict_casting_magic
cannot cast magic with the same type of antimagic present