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

◆ statDefense

DefenseStat Terraria.Player.statDefense

The defense value of this player.
The Defense wiki pageteaches how player defense affects incoming damage alongside F:Terraria.Player.DefenseEffectiveness.
The value resets to 0 during M:Terraria.Player.ResetEffects and is manipulated throughout M:Terraria.Player.Update(System.Int32).
If the final value is needed, M:Terraria.ModLoader.ModPlayer.PostUpdate or anytime later is the best place. As such it is not recommended to manipulate the value during PostUpdate or at any time later for compatibility. Failure to follow this guideline will result in inconsistent behavior.
Due to this field being a T:Terraria.Player.DefenseStat, modders can freely add, subtract, multiply, and divide the value. The final result will properly account for all modifications applied.

Definition at line 2075 of file Player.cs.

Referenced by Terraria.Player.GrantArmorBenefits(), Terraria.Player.GrantPrefixBenefits(), Terraria.Player.Hurt(), Terraria.Player.ResetEffects(), Terraria.Player.Update(), Terraria.Player.UpdateArmorSets(), Terraria.Player.UpdateBuffs(), Terraria.Player.UpdateEquips(), and Terraria.Player.UpdatePermanentBoosters().