Ejemplo n.º 1
0
        public IEnumerable <string> CheckBag(string bag)
        {
            if (!MagicList.ContainsKey(bag))
            {
                return(new List <string>());
            }
            var directParents = MagicList[bag];
            var ancestors     = directParents.SelectMany(CheckBag);

            return(directParents.Concat(ancestors));
        }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     skills = GameObject.FindGameObjectWithTag("Controller").GetComponent<SkillList>();
     magic = GameObject.FindGameObjectWithTag("Controller").GetComponent<MagicList>();
     Items = GameObject.FindGameObjectWithTag("Controller").GetComponent<AllItemsList>();
     Equipment = GetComponent<CharacterEquipment>();
     skillsKnown = new Dictionary<string, int>();
     magicKnown = new Dictionary<string, int>();
     skillsKnown.Add("Attack", 100);
     skillsKnown.Add("Block", 100);
 }
Ejemplo n.º 3
0
        public void SetValuesInPlayer()
        {
            Game.maxDungeonLevel = dungeonLevel;
            Game.player.name     = name;

            Game.player.attack         = attack;
            Game.player.evasion        = evasion;
            Game.player.blocking       = blocking;
            Game.player.accuracy       = accuracy;
            Game.player.criticalChance = criticalChance;

            Game.player.currentGold         = gold;
            Game.player.specification.level = level;
            Game.player.helth    = helth;
            Game.player.maxHelth = maxHelth;
            Game.player.mana     = mana;
            Game.player.maxMana  = maxMana;
            Game.player.specification.currentExp           = currentExp;
            Game.player.specification.maxExp               = maxExp;
            Game.player.specification.gender               = gender;
            Game.player.specification.specialization       = specialization;
            Game.player.specification.race                 = race;
            Game.player.specification.strength             = strength;
            Game.player.specification.agility              = agility;
            Game.player.specification.intelligence         = intelligence;
            Game.player.specification.spellPower           = spellPower;
            Game.player.specification.levelPoint           = levelPoint;
            Game.player.specification.strengthMultiply     = strengthMultiply;
            Game.player.specification.agilityMultiply      = agilityMultiply;
            Game.player.specification.intelligenceMultiply = intelligenceMultiply;

            Game.player.inventory.activeHelmet = (Helmet)ItemsList.GetItemByName(activeHelmet);
            Game.player.inventory.activeArmor  = (Armor)ItemsList.GetItemByName(activeArmor);
            Game.player.inventory.activeWeapon = (Weapon)ItemsList.GetItemByName(activeWeapon);
            for (int i = 0; i < itemsCount; ++i)
            {
                Game.player.inventory.items.Add(ItemsList.GetItemByName(itemsName[i]));
            }

            for (int i = 0; i < perksCount; ++i)
            {
                Game.player.perksSystem.AddPerk(PerksList.GetPerkByPerkValue(perksValue[i]));
            }

            for (int i = 0; i < magicCount; ++i)
            {
                Game.player.magicSystem.AddSpell(MagicList.GetMagicByName(magicsName[i]));
            }
            Game.player.magicSystem.activeMagic = MagicList.GetMagicByName(activeMagicsName);
        }
Ejemplo n.º 4
0
 public void AddMagic(MagicList magic)
 {
     magicList.Add(magic);
 }
Ejemplo n.º 5
0
    //ADD: Magic
    void Awake()
    {
        //initialize all component variables
        Stats = GetComponent<AttributesScript>();
        KnownAbilities = GetComponent<CharacterKnownAbilities>();
        Status = GetComponent<CharacterStatus>();
        Equipment = GetComponent<CharacterEquipment>();

        Move = GameObject.FindGameObjectWithTag("Controller").GetComponent<MovementScript>();
        pathFind = GameObject.FindGameObjectWithTag("Controller").GetComponent<PathfindingScript>();
        findValid = GameObject.FindGameObjectWithTag("Controller").GetComponent<FindValidPoints>();
        Draw = GameObject.FindGameObjectWithTag("Controller").GetComponent<DrawSquaresScript>();
        Controller = GameObject.FindGameObjectWithTag("Controller").GetComponent<TurnController>();
        Magic = GameObject.FindGameObjectWithTag("Controller").GetComponent<MagicList>();
        Skills = GameObject.FindGameObjectWithTag("Controller").GetComponent<SkillList>();

        Items = GameObject.FindGameObjectWithTag("ItemManager").GetComponent<AllItemsList>();
        if(GetComponent<MouseControlScript>()){
            Mouse = GetComponent<MouseControlScript>();
            isPlayer = true;
        }

        skillSelected = "";
    }
Ejemplo n.º 6
0
 public void AddMagic(MagicList magic)
 {
     magicList.Add(magic);
 }