public CombatResult CalculateAverageDamage(Force myForce, Force enemyForce, List<Effect> boosts, bool vsEpic = true) { EnsureEffectProcs(); var result = new CombatResult(); foreach (var effect in Effects) { result.Add(effect.CalculateAverageDamage(myForce, enemyForce, boosts, vsEpic)); } // Apply Rally Effects - Rally will only work once for each ability and will affect abilities which deal no damage if (boosts != null) { foreach (var rallyEffect in boosts.Where(x => x.Type == EffectType.Rally)) { var abilBonus = rallyEffect.ParentAbilityProcChance*rallyEffect.EffectValue*this.ProcChance; if (HasEffect(EffectType.FlurryDamage)) { var baseBonus = abilBonus; abilBonus = 0; foreach (var effect in GetEffects(EffectType.FlurryDamage)) { abilBonus += baseBonus*effect.EffectValue; } } result.Damage += abilBonus; } } return result; }
public CombatResult CalculateAverageDamage(Force myForce, Force enemyForce, bool vsEpic = true) { var result = new CombatResult(); foreach (var ability in Abilities) { // Formations can never recieve Boosts result.Add(ability.CalculateAverageDamage(myForce, enemyForce, null, vsEpic)); } return result; }
public CombatResult CalculateAverageDamage(Force myForce, Force enemyForce, List<Effect> boosts, bool vsEpic = true) { var result = new CombatResult(); var useableBoosts = new List<Effect>(); if(boosts != null) { useableBoosts.AddRange(boosts.Where(effect => effect.IsBoostEffect() && this.IsClassification(effect.TargetType)).ToList()); } foreach (var ability in Abilities) { result.Add(ability.CalculateAverageDamage(myForce, enemyForce, useableBoosts, vsEpic)); } return result; }
public CombatResult CalculateTotalDamageContribution(Guid claimerID, Force myForce, Force enemyForce, List<Effect> boosts, bool vsEpic = true) { var result = new CombatResult(); result.Add(this.CalculateAverageDamage(myForce, enemyForce, boosts, vsEpic)); result.Add(this.CalculateReinforcedDamage(claimerID, myForce, enemyForce, boosts, vsEpic)); return result; }
public CombatResult CalculateReinforcedDamage(Guid claimerID, Force myForce, Force enemyForce, List<Effect> boosts, bool vsEpic = true) { EnsureEffectProcs(); var result = new CombatResult(); if (HasEffect(EffectType.Reinforce) == false) { return result; } foreach (var effect in GetEffects(EffectType.Reinforce)) { result.Add(effect.CalculateReinforcedDamage(claimerID, myForce, enemyForce, boosts, vsEpic)); } return result; }
public CombatResult CalculateAverageForceDamage(Force enemy) { var total = new CombatResult(); foreach (var unit in GetUnits()) { total.Add(unit.CalculateTotalDamageContribution(this, enemy, this.GetBoostAbilities(), enemy.IsEpicBoss)); } return total; }
public CombatResult CalculateReinforcedDamage(Guid claimerID, Force myForce, Force enemyForce, List<Effect> boosts, bool vsEpic) { var result = new CombatResult(); foreach (var unit in myForce.ClaimReinforcements(claimerID, TargetType, EffectValue)) { // Add each reinforced units total average damage potential (including reinforcements it might bring in too) var baseDamage = unit.CalculateTotalDamageContribution(myForce, enemyForce, boosts, vsEpic); result.Add(baseDamage.AdjustToProcChance(ParentAbilityProcChance)); } return result; }
public CombatResult CalculateReinforcedDamage(Force myForce, Force enemyForce, List<Effect> boosts, bool vsEpic = true) { var result = new CombatResult(); foreach (var ability in Abilities.Where(x => x.HasEffect(EffectType.Reinforce))) { result.Add(ability.CalculateReinforcedDamage(this.ID, myForce, enemyForce, boosts, vsEpic)); } return result; }