Exemple #1
0
        public DefaultSpell(AbilityTable ability)
        {
            Name        = ability.Name;
            Active      = ability.Active;
            Description = ability.Description;

            CoolDown[0] = (int)ability.Cd1;
            CoolDown[1] = (int)ability.Cd2;
            CoolDown[2] = (int)ability.Cd3;
            CoolDown[3] = (int)ability.Cd4;

            ManaCost[0] = (int)ability.ManaCost1;
            ManaCost[1] = (int)ability.ManaCost2;
            ManaCost[2] = (int)ability.ManaCost3;
            ManaCost[3] = (int)ability.ManaCost4;

            if ((int)ability.Cd1 == (int)ability.Cd2 && (int)ability.Cd2 == (int)ability.Cd3 && (int)ability.Cd3 == (int)ability.Cd4)
            {
                SameCoolDown = true;
            }
            if ((int)ability.ManaCost1 == (int)ability.ManaCost2 && (int)ability.ManaCost2 == (int)ability.ManaCost3 && (int)ability.ManaCost3 == (int)ability.ManaCost4)
            {
                SameManaCost = true;
            }
        }
    async Task AsyncLoad()
    {
        Func <bool> func = () =>
        {
            CharacterTable = new CharacterTable(characterTable);
            AbilityTable   = new AbilityTable(abilityTable);
            BuildingTable  = new BuildingTable(buildingTable);
            return(true);
        };

        isLoad = await Task.FromResult(func());
    }
Exemple #3
0
        public AbilityReader() : base()
        {
            this._paths.Add("Assets/Data/Ability/XML/Astral.xml");
            this._paths.Add("Assets/Data/Ability/XML/Fighting.xml");
            this._paths.Add("Assets/Data/Ability/XML/Grass.xml");
            this._paths.Add("Assets/Data/Ability/XML/Light.xml");
            this._paths.Add("Assets/Data/Ability/XML/Poison.xml");
            this._paths.Add("Assets/Data/Ability/XML/Physical.xml");
            this._paths.Add("Assets/Data/Ability/XML/Shapeshift.xml");
            this._paths.Add("Assets/Data/Ability/XML/Songs.xml");
            this._paths.Add("Assets/Data/Ability/XML/WeaponAbilities.xml");

            this._mediator = new AbilityMediator();
            this._table    = AbilityTable.Instance;
        }
Exemple #4
0
        public Ultimate(AbilityTable ability)
        {
            Name        = ability.Name;
            Active      = ability.Active;
            Description = ability.Description;

            CoolDown[0] = (int)ability.Cd1;
            CoolDown[1] = (int)ability.Cd2;
            CoolDown[2] = (int)ability.Cd3;

            ManaCost[0] = (int)ability.ManaCost1;
            ManaCost[1] = (int)ability.ManaCost2;
            ManaCost[2] = (int)ability.ManaCost3;

            if ((int)ability.Cd1 == (int)ability.Cd2 && (int)ability.Cd2 == (int)ability.Cd3)
            {
                SameCoolDown = true;
            }
            if ((int)ability.ManaCost1 == (int)ability.ManaCost2 && (int)ability.ManaCost2 == (int)ability.ManaCost3)
            {
                SameManaCost = true;
            }
        }
 public void Load()
 {
     AbilityTable   = new AbilityTable("Table\\AbilityTable.csv");
     CharacterTable = new CharacterTable("Table\\CharacterTable.csv");
     BuildingTable  = new BuildingTable("Table\\BuildingTable.csv");
 }