TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ SetMaxDamage()

void Terraria.NPC.HitModifiers.SetMaxDamage ( int limit)
inline

Sets an inclusive upper bound on the final damage of the hit.
Can be set by multiple mods, in which case the lowest limit will be used.
Cannot be set to less than 1.

Definition at line 217 of file NPC.cs.

218 {
219 _damageLimit = Math.Min(_damageLimit, Math.Max(limit, 1));
220 }

References Terraria.NPC.HitModifiers._damageLimit.