Exemplo n.º 1
0
 public void OpenSpellbookPanel(Item_Spellbook book)
 {
     _spellbookScreenActive = true;
     _spellbookInterface    = new SpellbookInterface(this);
     _spellbookPanel        = new SpellbookPanel(this, _spellbookInterface);
     _spellbookInterface.ReadSpellbook(book);
 }
Exemplo n.º 2
0
        public int CreateItem(string itemType)
        {
            GameObject obj = null;

            if (itemType == "tonic_healthSmall")
            {
                obj = new Potion_Health(GetNextID());
            }
            else if (itemType == "tonic_essenceSmall")
            {
                obj = new Tonic_EssenceSmall(GetNextID());
            }
            else if (itemType == "essenceCrystal" || itemType == "soul")
            {
                obj = new EssenceCrystal(10, GetNextID());
            }
            else if (itemType == "amuletSealing")
            {
                obj = new Amulet_Sealing(GetNextID());
            }
            else if (itemType == "itemSpellbook")
            {
                obj = new Item_Spellbook(GetNextID());
            }
            else
            {
                throw new NotImplementedException();
            }

            return(RegisterGameObject(obj));
        }
Exemplo n.º 3
0
        public LearnSpellInterface(PlayScene scene, Item_Spellbook s)
        {
            _scene = scene;

            spellbook = s;
            spell     = _scene.CreateSpell(spellbook.spellID, _scene.GetStudent().InstanceID);

            slotSelected = -1;

            displayConfirmation = false;

            //maxTierShown = _scene.GetStudent().SpellSchoolLevels[0];
        }
Exemplo n.º 4
0
        public void OnLearnSpellFromSpellbook(Item_Spellbook book, int slotSelected)
        {
            if (slotSelected > NumOfSpellSlots)
            {
                slotSelected = NumOfSpellSlots;
            }

            if (Spells.Count >= slotSelected)
            {
                OnForgetSpell(Spells[slotSelected - 1]);
                Spells[slotSelected - 1] = _scene.CreateSpell(book.spellID, InstanceID);
            }
            else
            {
                slotSelected = Spells.Count + 1;
                Spells.Add(_scene.CreateSpell(book.spellID, InstanceID));
            }

            RemoveItem(book);
        }
Exemplo n.º 5
0
 public void OnReadSpellbook(Item_Spellbook book)
 {
     _scene.OpenSpellbookPanel(book);
 }
Exemplo n.º 6
0
 public void OpenLearnSpellPanel(Item_Spellbook s)
 {
     _learnSpellScreenActive = true;
     _learnSpellInterface    = new LearnSpellInterface(this, s);
     _learnSpellPanel        = new LearnSpellPanel(this, _learnSpellInterface);
 }
Exemplo n.º 7
0
 public void ReadSpellbook(Item_Spellbook book)
 {
     readSpellbookMode = true;
     spellbook         = book;
     spellbookSpell    = _scene.CreateSpell(book.spellID, _scene.GetStudent().InstanceID);
 }