예제 #1
0
 public void TestThatEffectApplyEffectIsAppliedToDodge()
 {
     Character bob = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior");
     var target = new Effect("dodge", 1, 1.0, true, bob);
     target.ApplyEffect();
     Assert.AreEqual(target.GetCharacter().GetCharacterDodgeChance(), bob.GetCharacterDodgeChance());
 }
예제 #2
0
 public void TestThatCharacterHasZeroDodgeChance()
 {
     var target = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior");
     target.DeductCharacterStat("dodgeChance", 10 * .04);
     Assert.AreEqual(target.GetCharacterDodgeChance(), 0);
 }
예제 #3
0
 public void TestThatCharacterHasCorrectDodgeChanceAfterDeductingOverAll()
 {
     var target = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior");
     target.DeductCharacterStat("dodgeChance", 11 * .04);
     Assert.AreEqual(target.GetCharacterDodgeChance(), 0);
 }
예제 #4
0
 public void TestThatCharacterHasCorrectDodgeChance()
 {
     var target = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior");
     Assert.AreEqual(target.GetCharacterDodgeChance(), (10* 0.04));
 }