public override void Execute() { if (Character.Target == null) { return; } Character.MakeAttack(AspectFactory.Attack()); }
public void AddDefenderConstitution() { var melee = AspectFactory.Attack(); melee.AddAssaulterStrength(20); melee.AddDefenderConstitution(30); Assert.AreEqual(30, melee.CalculateDamage(60)); }
public void AddAssaulterAccuracy() { var melee = AspectFactory.Attack(); melee.AddAssaulterAccuracy(5); Assert.AreEqual(95, melee.CalculateHitChance()); melee.AddAssaulterAccuracy(5); Assert.AreEqual(95, melee.CalculateHitChance()); }
public void AddAttackerCriticalChance() { var attack = AspectFactory.Attack(); attack.AddAssaulterCriticalChance(10); Assert.AreEqual(10, attack.assaulterCriticalChance); attack.AddAssaulterCriticalChance(4); Assert.AreEqual(14, attack.assaulterCriticalChance); }
public void AddAssaulterIntellect() { var attack = AspectFactory.Attack(); attack.AddAssaulterIntellect(10); Assert.AreEqual(10, attack.assaulterIntellect); attack.AddAssaulterIntellect(15); Assert.AreEqual(25, attack.assaulterIntellect); }
public void AddDevenderEvasion() { var melee = AspectFactory.Attack(); melee.AddDefenderEvasion(5); Assert.AreEqual(5, melee.defenderEvasion); melee.AddDefenderEvasion(5); Assert.AreEqual(10, melee.defenderEvasion); }
public void AddDefenderWisdom() { var attack = AspectFactory.Attack(); attack.AddDefenderWisdom(10); Assert.AreEqual(10, attack.defenderWisdom); attack.AddDefenderWisdom(15); Assert.AreEqual(25, attack.defenderWisdom); }
public void AddDefenderMagicArmor() { var attack = AspectFactory.Attack(); attack.AddDefenderMagicArmor(40); Assert.AreEqual(240, attack.defenderMagicArmor); attack.AddDefenderMagicArmor(50); Assert.AreEqual(290, attack.defenderMagicArmor); }
public void AddAssaulterMagicAttack() { var attack = AspectFactory.Attack(); attack.AddAssaulterMagicAttack(100); Assert.AreEqual(300, attack.assaulterMagicAttack); attack.AddAssaulterMagicAttack(120); Assert.AreEqual(420, attack.assaulterMagicAttack); }
public void CheckCritical() { var attack = AspectFactory.Attack(); attack.CheckCritical(); Assert.IsFalse(attack.CriticalHit); attack.AddAssaulterCriticalChance(100); attack.CheckCritical(); Assert.IsTrue(attack.CriticalHit); }
public void AddAssaulterDexterety() { var attack = AspectFactory.Attack(); attack.AddAssaulterDexterety(20); Assert.AreEqual(20, attack.assaulterDexterety); attack.AddAssaulterDexterety(5); Assert.AreEqual(25, attack.assaulterDexterety); }
public void AddAssaulterAttack() { var melee = AspectFactory.Attack(); melee.AddAssaulterAttack(100); Assert.AreEqual(90, melee.CalculateDamage(60)); melee.AddAssaulterAttack(100); Assert.AreEqual(120, melee.CalculateDamage(60)); }
public void AddDefenderArmor() { var melee = AspectFactory.Attack(); melee.AddDefenderArmor(100); Assert.AreEqual(40, melee.CalculateDamage(60)); melee.AddDefenderArmor(100); Assert.AreEqual(30, melee.CalculateDamage(60)); }
public void NormalizeChance() { var melee = AspectFactory.Attack(); Assert.AreEqual(5, melee.NormalizeChance(0)); Assert.AreEqual(5, melee.NormalizeChance(5)); Assert.AreEqual(10, melee.NormalizeChance(10)); Assert.AreEqual(50, melee.NormalizeChance(50)); Assert.AreEqual(90, melee.NormalizeChance(90)); Assert.AreEqual(95, melee.NormalizeChance(95)); Assert.AreEqual(95, melee.NormalizeChance(100)); }
public void IsHitTest() { var attack = AspectFactory.Attack(); attack.AddDefenderEvasion(40); var hit = attack.Hit(); Assert.AreEqual(hit, attack.Hit()); Assert.AreEqual(hit, attack.Hit()); Assert.AreEqual(hit, attack.Hit()); Assert.AreEqual(hit, attack.Hit()); Assert.AreEqual(hit, attack.Hit()); }
public void DefenderAttackIgnored() { var stats = AspectFactory.Stats(); stats.Attack = 100; var ev = Event.Create("ch_is_attacking_this", EventReturnMethod.None, new EventArg("ch", null), new EventArg("ch1", null), new EventArg("attack", AspectFactory.Attack())); stats.ReceiveEvent(ev); Assert.AreEqual(60, ev["attack"].CalculateDamage(60)); }
public void TestFixtureSetUp() { UnityConfigurator.Configure(); _attack = AspectFactory.Attack(); _attack.SetAssaulterWeaponBaseDamage(22); _attack.AddAssaulterStrength(22); _attack.AddAssaulterIntellect(20); _attack.AddAssaulterDexterety(21); _attack.AddAssaulterAttack(20); _attack.AddAssaulterMagicAttack(0); _attack.AddAssaulterAccuracy(20); _attack.AddAssaulterCriticalChance(15); _attack.AddDefenderArmor(15); _attack.AddDefenderMagicArmor(0); _attack.AddDefenderEvasion(25); _attack.AddDefenderConstitution(22); _attack.AddDefenderWisdom(21); }