public void CheckSimpleDamageIncreaseWithAttribute() { var output = AbilityScaler.ScaleAttackAbility(AbilityCalculator.GetPointsFromLevel(2), Element.bashing, BaseStat.strength, 0.3f, 0, 0, true, 0, 0, 0, 0, 0, 0, 0, 0, new List <AbilityAttribute> { new AbilityAttribute { type = "projectileSpread", priority = 100 } }, new AbilitySkillTree()); Assert.Greater(output.damage, 0.3f); }
public void CheckDamageIncreaseWithPositiveAndNegativeAttribute() { var output = AbilityScaler.ScaleAttackAbility(AbilityCalculator.GetPointsFromLevel(2), Element.bashing, BaseStat.strength, 0.75f, 0, 0, true, 0, 0, 0, 0, 0, 0, 0, 0, new List <AbilityAttribute> { new AbilityAttribute { type = "offGCD", priority = 100 }, new AbilityAttribute { type = "delay", priority = 100 } }, new AbilitySkillTree()); Assert.Greater(output.damage, 0.75f); }
protected override void LevelUp(int originalLevel, int targetLevel) { LevelUp(targetLevel - originalLevel); float targetPoints = AbilityCalculator.GetPointsFromLevel(targetLevel); AbilityScaler.RemoveSkillTreeEnhancements(this); var newAbility = AbilityScaler.ScaleAttackAbility((int)targetPoints, element, baseStat, damage, dotDamage, dotTime, isRanged, cooldown, mpUsage, baseMpUsage, radius, icon, hitEffect, rangedProjectile, aoe, attributes, skillTree); level = targetLevel; points = targetPoints; damage = newAbility.damage; dotDamage = newAbility.dotDamage; mpUsage = newAbility.mpUsage; baseMpUsage = newAbility.baseMpUsage; attributes = newAbility.attributes; AbilityScaler.AddSkillTreeEnhancements(this); description = AbilityDescriber.Describe(this); }
private static AttackAbility FuseAttack(float points, ActiveAbility ability1, ActiveAbility ability2) { var element = ((AttackAbility)ability1).element; var icon = ability1.icon; var hitEffect = ((AttackAbility)ability1).hitEffect; var projectile = ((AttackAbility)ability1).rangedProjectile; var aoe = ((AttackAbility)ability1).aoe; var baseStat = ability1.baseStat; var damageRatio = ((AttackAbility)ability1).damage; var dotDamageRatio = ((AttackAbility)ability1).dotDamage; var dotTime = ((AttackAbility)ability1).dotTime; var isRanged = ((AttackAbility)ability1).isRanged; var cooldown = ability1.cooldown; var mp = ability1.mpUsage; var baseMp = ability2.baseMpUsage; var radius = ((AttackAbility)ability1).radius; var attributes = GetCombinedAttributes(ability1, ability2); var output = AbilityScaler.ScaleAttackAbility(points, element, baseStat, damageRatio, dotDamageRatio, dotTime, isRanged, cooldown, mp, baseMp, radius, icon, hitEffect, projectile, aoe, attributes, new AbilitySkillTree()); output.skillTree = new AbilitySkillTree(output); return(output); }
public void CheckSimpleLevelIncrease() { var output = AbilityScaler.ScaleAttackAbility(AbilityCalculator.GetPointsFromLevel(2), Element.bashing, BaseStat.strength, 1, 0, 0, true, 0, 0, 0, 0, 0, 0, 0, 0, new List <AbilityAttribute>(), new AbilitySkillTree()); Assert.AreEqual(output.level, 2); }