Exemplo n.º 1
0
 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);
 }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
 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());
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
 public void SetThirdAbilityForCharacter(CharAbility ab)
 {
     abilityList[2] = ab;
 }
Exemplo n.º 6
0
 public void SetSecondAbilityForCharacter(CharAbility ab)
 {
     abilityList[1] = ab;
 }
Exemplo n.º 7
0
 public void SetFourthAbilityForCharacter(CharAbility ab)
 {
     abilityList[3] = ab;
 }
Exemplo n.º 8
0
 public void SetFirstAbilityForCharacter(CharAbility ab)
 {
     abilityList[0] = ab;
 }
Exemplo n.º 9
0
 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);
 }
Exemplo n.º 10
0
 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);
 }
Exemplo n.º 11
0
 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");
 }
Exemplo n.º 12
0
 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);
 }
Exemplo n.º 13
0
 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());
 }