|
TModLoader v1.4.4.9
TModLoader source code documentation
|
|
static |
An NPC will automatically become immune (F:Terraria.NPC.buffImmune) to the indexed buff type if it is already immune to any buff in the corresponding List.
For NPCs with F:Terraria.ID.NPCID.Sets.ImmuneToAllBuffs or F:Terraria.ID.NPCID.Sets.ImmuneToRegularBuffs set to true, the reverse of that logic is used to automatically set the NPC as vulnerable: The NPC will automatically become vulnerable to the indexed buff type if it is specifically vulnerable to all of the buffs in the corresponding List.
This set helps standardize several buff immunity inheritance rules that are effectively present in Terraria while providing modders the ability to do the same. For example, all NPC with immunity to F:Terraria.ID.BuffID.OnFire are also immune to F:Terraria.ID.BuffID.OnFire3 (aka, "On Fire!" and "Hellfire").
Modders can use this set to create buffs that act as variants of existing buffs, and should inherit the immunity value of those existing buffs. NPC from Terraria and other mods will automatically have these immunity rules applied, regardless of mod load order.
Definition at line 102 of file BuffID.cs.
Referenced by Terraria.ID.BuffID.Sets.Sets(), Terraria.NPC.BecomeImmuneTo(), and Terraria.NPC.SetDefaults().