Yogstation 13 - Modules - TypesVar Details - Proc Details

/datum/component/anti_magic

This provides different types of magic resistance on an object

Vars

alert_caster_on_equipWhether we should, on equipping, alert the caster that this item can block any of their spells This changes between true and false on equip and drop, don't set it outright to something
antimagic_flagsA bitflag with the types of magic resistance on the object
chargesThe amount of times the object can protect the user from magic Set to INFINITY to have, well, infinite charges.
drain_antimagicThe callback invoked when we have been drained a antimagic charge
expirationThe callback invoked when twe have been depleted of all charges
inventory_flagsThe inventory slot the object must be located at in order to activate

Procs

InitializeAdds magic resistances to an object
restrict_casting_magiccannot cast magic with the same type of antimagic present

Var Details

alert_caster_on_equip

Whether we should, on equipping, alert the caster that this item can block any of their spells This changes between true and false on equip and drop, don't set it outright to something

antimagic_flags

A bitflag with the types of magic resistance on the object

charges

The amount of times the object can protect the user from magic Set to INFINITY to have, well, infinite charges.

drain_antimagic

The callback invoked when we have been drained a antimagic charge

expiration

The callback invoked when twe have been depleted of all 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 bitflags: (see code/__DEFINES/magic.dm)

restrict_casting_magic

cannot cast magic with the same type of antimagic present