Exemplo n.º 1
0
        internal PostBattleState(Seven seven, int exp, int ap, int gil, List<IInventoryItem> items)
            : base(seven)
        {
            Exp = exp;
            AP = ap;
            Gil = gil;
            Items = new List<Inventory.Record>();

            LevelUp = new LevelUp[Party.PARTY_SIZE];
            MateriaLevelUp = new MateriaLevelUp[Party.PARTY_SIZE];

            Exp_multiplier = new int[] { 100, 100, 100 };
            Gil_multiplier = 100;

            for (int i = 0; i < 3; i++)
            {
                if (Party[i] != null)
                {
                    foreach (MateriaOrb m in Party[i].Materia)
                    {
                        if (m != null)
                        {
                            if (m.Name == "gilplus")
                            {
                                switch (m.Level)
                                {
                                    case 0:
                                        Gil_multiplier += 50;
                                        break;
                                    case 1:
                                        Gil_multiplier += 100;
                                        break;
                                    case 2:
                                        Gil_multiplier += 200;
                                        break;
                                }
                            }
                            if (m.Name == "expplus")
                            {
                                switch (m.Level)
                                {
                                    case 0:
                                        Exp_multiplier[i] += 50;
                                        break;
                                    case 1:
                                        Exp_multiplier[i] += 75;
                                        break;
                                    case 2:
                                        Exp_multiplier[i] += 100;
                                        break;
                                }
                            }
                        }
                    }
                }
            }

            CollectItems(items);

            _state = State.BeforeGainExp;
        }
Exemplo n.º 2
0
        public override void KeyPressHandle(Key k)
        {
            switch (_state)
            {
                case State.BeforeGainExp:

                    GiveExp();
                    _state = State.AfterGainExp;
                    break;

                case State.AfterGainExp:

                    lock (_sync)
                    {
                        _stopGivingExp = true;
                    }

                    GiveExpAnimation.Join();
                    GiveExpAnimation = null;

                    for (int i = 0; i < LevelUp.Length; i++)
                    {
                        LevelUp[i].Visible = false;
                    }

                    Mastered.Visible = false;

                    _screen = HoardScreen;
                    _screen.ChangeControl(HoardItemLeft);
                    _state = State.HoardScreen;

                    break;

                case State.HoardScreen:

                    _screen.Control.ControlHandle(k);

                    break;
            }
        }