コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 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);
 }
コード例 #4
0
 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));
     }
 }
コード例 #5
0
 public override void ApplyPrimaryEffect(Squadron squadron)
 {
     if (IsActive() && !EffectApplied)
     {
         squadron.SabPowers.SabotagePower.Bonus += MathConts.GetPercentageOf(squadron.SabPowers.SabotagePower.Base, (EffectValue + ComboEffectValue));
         EffectApplied = true;
     }
 }
コード例 #6
0
 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);
     }
 }
コード例 #7
0
 public override void ApplyPrimaryEffect(Squadron squadron)
 {
     if (IsActive() && !EffectApplied)
     {
         squadron.AtkPowers.HealthPower.BonusHp =
             MathConts.GetPercentageOf(squadron.AtkPowers.HealthPower.MaxHp, EffectValue + ComboEffectValue);
         EffectApplied = true;
     }
 }
コード例 #8
0
 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;
     }
 }
コード例 #9
0
 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;
     }
 }
コード例 #10
0
    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);
    }
コード例 #11
0
 private float ApplyAdrenalineRush(float currentHp, float attackPower) => (AdrenalineRush > 0 && currentHp < MathConts.GetPercentageOf(Squad.AtkPowers.HealthPower.MaxHp, 30.0f)) ? MathConts.GetPercentageOf(attackPower, AdrenalineRush) : 0;