public void TestThatCharAbilityHasCorrectEffect()
 {
     Character bob = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior");
     Effect blah = new Effect("blah", 1, 0.0, true, bob);
     var target = new CharAbility("Fire", blah, "spell",1, bob);
     Assert.AreEqual(target.getAbilityEffect(), blah);
 }
示例#2
0
 //returns the third ability
 private void setFourthAbility()
 {
     Character bob = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior");
     Effect blah = new Effect("health", 1, 1.0, true, bob);
     CharAbility blahAb = new CharAbility("Blah", blah, "attack", 1, bob);
     characterAbilities[3] = blahAb;
 }
 public void TestThatCharClassHasASecondAbility()
 {
     var target = new CharClass("Warrior", null);
     Character bob = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior");
     Effect blah = new Effect("health", 1, 1.0, true, bob);
     CharAbility[] targ2 = target.getCharacterAbilities();
     CharAbility blahAb = new CharAbility("Blah", blah, "attack", 1, bob);
     Assert.AreEqual(targ2[1].getAbilityName(), blahAb.getAbilityName());
 }
 public void TestThatSetAbility4SetsTheAbilityListCorrectly()
 {
     var target = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior");
     CharAbility ca = new CharAbility("Hit", new Effect("health", 1, 10, false, null), "attack", 10, null);
     target.SetFourthAbilityForCharacter(ca);
     Assert.AreEqual(target.GetCharacterAbilities()[3], ca);
 }
示例#5
0
 public void SetThirdAbilityForCharacter(CharAbility ab)
 {
     abilityList[2] = ab;
 }
示例#6
0
 public void SetSecondAbilityForCharacter(CharAbility ab)
 {
     abilityList[1] = ab;
 }
示例#7
0
 public void SetFourthAbilityForCharacter(CharAbility ab)
 {
     abilityList[3] = ab;
 }
示例#8
0
 public void SetFirstAbilityForCharacter(CharAbility ab)
 {
     abilityList[0] = ab;
 }
 public void TestThatCharAbilityHasCorrectMPCostWithZeroCost()
 {
     Character bob = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior");
     var target = new CharAbility("Fire", null, "spell",0, bob);
     Assert.AreEqual(target.getMPCost(), 1);
 }
 public void TestThatCharAbilityHasCorrectModifier()
 {
     Character bob = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior");
     Effect blah = new Effect("blah", 1, 0.0, true, bob);
     var target = new CharAbility("Fire", blah, "spell", 1, bob);
 }
 public void TestThatCharAbilityHasCorrectAbilityName()
 {
     Character bob = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior");
     var target = new CharAbility("Fire", null, "spell",50, bob);
     Assert.AreEqual(target.getAbilityName(),"Fire");
 }
 public void TestThatCharAbilityInitializes()
 {
     Character bob = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior");
     var target = new CharAbility("Fire", null, "spell",50, bob);
     Assert.IsNotNull(target);
 }
 public void TestThatCharAbilityHasEmptyAbilityEffects()
 {
     Character bob = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior");
     var target = new CharAbility("Fire", null, "spell",50, bob);
     Assert.IsNull(target.getAbilityEffect());
 }