Esempio n. 1
0
        private void PostBattle(PlayerPartyStatus status)
        {
            Grid postBattle = new Grid("Main");

            postBattle.OnEnter = () => {
                postBattle.List.Clear();
                if (status == PlayerPartyStatus.ALIVE || status == PlayerPartyStatus.NOT_FOUND)
                {
                    if (status == PlayerPartyStatus.ALIVE)
                    {
                        postBattle.List.Add(GetLootButton(postBattle));
                        if (!wasExperienceGiven)
                        {
                            wasExperienceGiven = true;
                            GiveExperienceToVictors();
                        }
                    }
                    Character anyoneFromVictorParty = VictoriousParty.FirstOrDefault();
                    postBattle.List.Add(PageUtil.GenerateItemsGrid(false, this, postBattle, anyoneFromVictorParty, PageUtil.GetOutOfBattlePlayableHandler(this)));
                    postBattle.List.Add(PageUtil.GenerateGroupEquipmentGrid(postBattle, this, VictoriousParty, PageUtil.GetOutOfBattlePlayableHandler(this), false));
                    postBattle.List.Add(new Process("Continue", () => GoToPage(victory)));
                }
                else
                {
                    postBattle.List.Add(new Process("Continue", () => GoToPage(defeat)));
                }
                Actions = postBattle.List;
            };
            postBattle.Invoke();
        }