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

◆ SourceDamage

int Terraria.Player.HurtInfo.SourceDamage
getset

The amount of damage 'dealt' to the player, before incoming damage multipliers, armor, damage reduction.
Use this to trigger effects which scale based on how 'hard' the player was hit rather than how much life was lost.
Cannot be set to less than 1.

Using this instead of P:Terraria.Player.HurtInfo.Damage can prevent diminishing returns damage mitigation, when adding beneficial effects like retaliatory damage.

Definition at line 862 of file Player.cs.

863 {
864 readonly get
865 {
866 return _sourceDamage;
867 }
868 set
869 {
870 _sourceDamage = Math.Max(value, 1);
871 }
872 }

Referenced by Terraria.NetMessage.SendData().