Exemplo n.º 1
0
 static App()
 {
     // Create the ability service passing to it the resources
     // folder named "resources"
     AbilityService = new AbilityService("resources");
     Logger.Write.ResourcesLocated("Resources loaded");
 }
Exemplo n.º 2
0
 public void TestToString()
 {
     var test = new Ability
     {
         Prefix = "/magic",
         English = "Cure",
         Targets = "Self"
     };
     var cure = new AbilityService("resources").CreateAbility("Cure");
     Assert.Equals(test.ToString(), cure.ToString());
 }
Exemplo n.º 3
0
        public void TestCreateAbility()
        {
            var retriever = new AbilityService(
                Path.Combine(Environment.CurrentDirectory, "Resources"));

            // Test create ability for all major skill types.
            var cure = retriever.CreateAbility("Cure");
            var provoke = retriever.CreateAbility("Provoke");
            var ragingAxe = retriever.CreateAbility("Raging Axe");

            Assert.AreEqual(8, cure.MpCost);
            Assert.AreEqual(AbilityType.Jobability, provoke.AbilityType);
            Assert.AreEqual(AbilityType.Weaponskill, ragingAxe.AbilityType);
        }