Exemplo n.º 1
0
 public void Detach(Character c)
 {
     Game.Lua.GetFunction("detach" + ID).Call(c);
 }
Exemplo n.º 2
0
        public static void SetSelection()
        {
            if (Globals.Party[0] != null)
                _selection = 0;
            else if (Globals.Party[1] != null)
                _selection = 1;
            else if (Globals.Party[2] != null)
                _selection = 2;
            else throw new GameImplementationException("Party has no members.");

            _selected = Globals.Party[_selection];
        }
Exemplo n.º 3
0
 public static void SwapMateria(Armor before, Armor after, Character c)
 {
     for (int i = 0; i < before.Slots.Length; i++)
     {
         Materia m = before.Slots[i];
         if (m != null)
             if (i > after.Slots.Length)
             {
                 m.Detach(c);
                 Materiatory.Put(m);
             }
             else
             {
                 after.Slots[i] = m;
             }
         before.Slots[i] = null;
     }
 }
Exemplo n.º 4
0
 public static void SetSelection(Character c)
 {
     _selected = c;
 }
Exemplo n.º 5
0
        public virtual void Detach(Character c)
        {
            c.StrengthBonus -= _str;
            c.VitalityBonus -= _vit;
            c.DexterityBonus -= _dex;
            c.MagicBonus -= _mag;
            c.SpiritBonus -= _spr;
            c.LuckBonus -= _lck;

            LuaFunction f = Game.Lua.GetFunction("detach" + ID);

            if (f != null) f.Call(c, Level + 1);
        }
Exemplo n.º 6
0
        private static void InitCharacters()
        {
            XmlDocument savegame = Globals.SaveGame;
            XmlDocument gamedata = Util.GetXmlFromResource("data.characters.xml");

            Cloud = new Character(savegame.SelectSingleNode("//Cloud").OuterXml,
                gamedata.SelectSingleNode("//Cloud").OuterXml);
            Tifa = new Character(savegame.SelectSingleNode("//Tifa").OuterXml,
                gamedata.SelectSingleNode("//Tifa").OuterXml);
            Aeris = new Character(savegame.SelectSingleNode("//Aeris").OuterXml,
                gamedata.SelectSingleNode("//Aeris").OuterXml);
            Barret = new Character(savegame.SelectSingleNode("//Barret").OuterXml,
                gamedata.SelectSingleNode("//Barret").OuterXml);
            RedXIII = new Character(savegame.SelectSingleNode("//RedXIII").OuterXml,
                gamedata.SelectSingleNode("//RedXIII").OuterXml);
            Yuffie = new Character(savegame.SelectSingleNode("//Yuffie").OuterXml,
                gamedata.SelectSingleNode("//Yuffie").OuterXml);
            CaitSith = new Character(savegame.SelectSingleNode("//CaitSith").OuterXml,
                gamedata.SelectSingleNode("//CaitSith").OuterXml);
            Vincent = new Character(savegame.SelectSingleNode("//Vincent").OuterXml,
                gamedata.SelectSingleNode("//Vincent").OuterXml);
            Cid = new Character(savegame.SelectSingleNode("//Cid").OuterXml,
                gamedata.SelectSingleNode("//Cid").OuterXml);
            Sephiroth = new Character(savegame.SelectSingleNode("//Sephiroth").OuterXml,
                gamedata.SelectSingleNode("//Sephiroth").OuterXml);

            _table = new Dictionary<string, Character>();
            _table.Add("Cloud", Cloud);
            _table.Add("Tifa", Tifa);
            _table.Add("Aeris", Aeris);
            _table.Add("Barret", Barret);
            _table.Add("RedXIII", RedXIII);
            _table.Add("Yuffie", Yuffie);
            _table.Add("CaitSith", CaitSith);
            _table.Add("Vincent", Vincent);
            _table.Add("Cid", Cid);
            _table.Add("Sephiroth", Sephiroth);

            Aeris.BackRow = true;
        }
Exemplo n.º 7
0
 public void Detach(Character c)
 {
     c.MagicBonus -= _magic;
     Game.Lua.GetFunction("detach" + ID).Call(c);
 }
Exemplo n.º 8
0
 public void Attach(Character c)
 {
     c.MagicBonus += _magic;
     Game.Lua.GetFunction("attach" + ID).Call(c);
 }