public override void GetWeaponKnockback(Player player, ref float knockback) { // Adds knockback bonuses knockback = knockback + EnergyPlayer.ModPlayer(player).energyKnockback; }
public override void GetWeaponCrit(Player player, ref int crit) { // Adds crit bonuses crit = crit + EnergyPlayer.ModPlayer(player).energyCrit; }
// As a modder, you could also opt to make the Get overrides also sealed. Up to the modder public override void GetWeaponDamage(Player player, ref int damage) { // Multiplies the damage by our custom damage multiplier damage = (int)(damage * EnergyPlayer.ModPlayer(player).energyDamage + 5E-06f); }