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

◆ GetKnockback()

float Terraria.Player.HurtModifiers.GetKnockback ( float baseKnockback,
bool knockbackImmune )
inline

Definition at line 779 of file Player.cs.

780 {
781 float knockback = Math.Max(Knockback.ApplyTo(baseKnockback), 0f);
782 if (knockbackImmune)
783 {
784 knockback *= 1f - Math.Clamp(KnockbackImmunityEffectiveness.Value, 0f, 1f);
785 }
786 return knockback;
787 }
float ApplyTo(float baseValue)
Use this to apply the modifiers of this T:Terraria.ModLoader.StatModifier to the baseValue ....
StatModifier Knockback
Modifiers to apply to the knockback. Add to F:Terraria.ModLoader.StatModifier.Base to increase the kn...
Definition Player.cs:664
MultipliableFloat KnockbackImmunityEffectiveness
Use this to reduce the effectiveness of F:Terraria.Player.noKnockback (cobalt shield accessory)....
Definition Player.cs:672

References Terraria.ModLoader.StatModifier.ApplyTo(), Terraria.Player.HurtModifiers.Knockback, Terraria.Player.HurtModifiers.KnockbackImmunityEffectiveness, and Terraria.ModLoader.MultipliableFloat.Value.

Referenced by Terraria.Player.HurtModifiers.ToHurtInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: