public void CalculateCriticalDamage(float attackPercentage, float defensePercentage, float sabotagePercentage) { AllGivenDamage += CriticalHitPower; CriticalDamageToAttack = MathConts.GetPercentageOf(CriticalHitPower, attackPercentage); CriticalDamageToDefense = MathConts.GetPercentageOf(CriticalHitPower, defensePercentage); CriticalDamageToSabotage = MathConts.GetPercentageOf(CriticalHitPower, sabotagePercentage); }
public void CalculatePassiveDamage(float attackPercentage, float defensePercentage, float sabotagePercentage) { AllGivenDamage += BleedingPower; PassiveDamageToAttack = MathConts.GetPercentageOf(BleedingPower, attackPercentage); PassiveDamageToDefense = MathConts.GetPercentageOf(BleedingPower, defensePercentage); PassiveDamageToSabotage = MathConts.GetPercentageOf(BleedingPower, sabotagePercentage); }
public void CalculateBaseDamage(float TotalDamage, float attackPercentage, float defensePercentage, float sabotagePercentage) { NormalDamage = TotalDamage; AllGivenDamage += TotalDamage; NormalDamageToAttack = MathConts.GetPercentageOf(TotalDamage, attackPercentage); NormalDamageToDefense = MathConts.GetPercentageOf(TotalDamage, defensePercentage); NormalDamageToSabotage = MathConts.GetPercentageOf(TotalDamage, sabotagePercentage); }
public override void ApplyPrimaryEffect(Squadron squadron) { if (IsActive() && squadron.SabPowers.HealthPower.CurrentHp > 0) { squadron.SabPowers.HealthPower.RestoreLife( MathConts.GetPercentageOf(squadron.SabPowers.HealthPower.MaxHp, EffectValue + ComboEffectValue)); } }
public override void ApplyPrimaryEffect(Squadron squadron) { if (IsActive() && !EffectApplied) { squadron.SabPowers.SabotagePower.Bonus += MathConts.GetPercentageOf(squadron.SabPowers.SabotagePower.Base, (EffectValue + ComboEffectValue)); EffectApplied = true; } }
public override void ApplyPrimaryEffect(Squadron squadron) { if (IsActive() && MathConts.ProcessChance(ChanceValue, squadron.Inspiration, GetName())) { squadron.AtkPowers.AttackPower.OnTurnBonusAttack = MathConts.GetPercentageOf(squadron.AtkPowers.AttackPower.Total, EffectValue + ComboEffectValue); squadron.DefPowers.AttackPower.OnTurnBonusAttack = MathConts.GetPercentageOf(squadron.DefPowers.AttackPower.Total, EffectValue + ComboEffectValue); squadron.SabPowers.AttackPower.OnTurnBonusAttack = MathConts.GetPercentageOf(squadron.SabPowers.SabotagePower.Total / 2, EffectValue + ComboEffectValue); } }
public override void ApplyPrimaryEffect(Squadron squadron) { if (IsActive() && !EffectApplied) { squadron.AtkPowers.HealthPower.BonusHp = MathConts.GetPercentageOf(squadron.AtkPowers.HealthPower.MaxHp, EffectValue + ComboEffectValue); EffectApplied = true; } }
public override void ApplyPrimaryEffect(Squadron squadron) { if (IsActive() && !EffectApplied && MathConts.ProcessChance(ChanceValue, squadron.Inspiration, GetName())) { squadron.AtkPowers.AttackPower.PassiveDamage = MathConts.GetPercentageOf(squadron.AtkPowers.AttackPower.Total, EffectValue + ComboEffectValue); EffectApplied = true; } }
public override void ApplyPrimaryEffect(Squadron squadron) { if (IsActive() && !EffectApplied && squadron.SabPowers.HealthPower.CurrentHp == 0) { if (MathConts.ProcessChance(ChanceValue, squadron.Inspiration, GetName())) { squadron.SabPowers.HealthPower.Revive(MathConts.GetPercentageOf(squadron.SabPowers.HealthPower.MaxHp, (EffectValue + ComboEffectValue))); } EffectApplied = true; } }
private void CriplingStrike(Attack attack) { if (attack.CripleStrikePower > 0) { switch (attack.GetCripleStrikeTarget()) { case AbilityType.ATTACK: CripleStrikeToAttack = MathConts.GetPercentageOf(AttackDefensivePower, attack.CripleStrikePower); break; case AbilityType.DEFENSE: CripleStrikeToDefense = MathConts.GetPercentageOf(DefenseDefensivePower, attack.CripleStrikePower); break; case AbilityType.SABOTAGE: CripleStrikeToSabotage -= MathConts.GetPercentageOf(SabotageDefensivePower, attack.CripleStrikePower); break; } } AttackDefensivePower = MathConts.RoundNumber(AttackDefensivePower - CripleStrikeToAttack); DefenseDefensivePower = MathConts.RoundNumber(DefenseDefensivePower - CripleStrikeToDefense); SabotageDefensivePower = MathConts.RoundNumber(SabotageDefensivePower - CripleStrikeToSabotage); }
private float ApplyAdrenalineRush(float currentHp, float attackPower) => (AdrenalineRush > 0 && currentHp < MathConts.GetPercentageOf(Squad.AtkPowers.HealthPower.MaxHp, 30.0f)) ? MathConts.GetPercentageOf(attackPower, AdrenalineRush) : 0;