tModLoader v2024.05
A mod to make and play Terraria mods
ImmunityCooldownID Class Reference

Enumerates the different immunity cooldown options for damage affecting a player. Most damage uses General and applies immunity via Player.immune. Other damage immunity cooldowns are tracked in Player.hurtCooldowns indexed by these values.Correct usage of ImmunityCooldownID in ModLoader.ModProjectile.CooldownSlot, ModLoader.ModNPC.CanHitPlayer(Terraria.Player, ref int), and Player.Hurt(DataStructures.PlayerDeathReason, int, int, bool, bool, int, bool, float, float, float) are essential for correctly applying damage to the player. More...

Static Public Attributes

const int Bosses = 1
 Bosses like Moon Lord and Empress of Light (and their minions and projectiles)Prevents cheesing by taking repeated low damage from another source
 
const int DD2OgreKnockback = 2
 
const int General = -1
 Default, no special slot, just Player.immuneTime
 
const int Lava = 4
 Damage from lava
 
const int TileContactDamage = 0
 Contacting with tiles that deals damage, such as spikes and cactus in don't starve world
 
const int WrongBugNet = 3
 Trying to catch lava critters with regular bug net
 

Detailed Description

Enumerates the different immunity cooldown options for damage affecting a player. Most damage uses General and applies immunity via Player.immune. Other damage immunity cooldowns are tracked in Player.hurtCooldowns indexed by these values.

Correct usage of ImmunityCooldownID in ModLoader.ModProjectile.CooldownSlot, ModLoader.ModNPC.CanHitPlayer(Terraria.Player, ref int), and Player.Hurt(DataStructures.PlayerDeathReason, int, int, bool, bool, int, bool, float, float, float) are essential for correctly applying damage to the player.