Ejemplo n.º 1
0
    public void SetupNewBattle(CharacterTeam inPlayerTeam, CharacterTeam inEnemyTeam)
    {
        turnQueue.Clear();
        currentSkillResults.Clear();
        currentDeadCharacters.Clear();
        activeCharacter         = null;
        activeSkillCommand      = null;
        isProcessing            = false;
        stepIndex               = 0;
        turnNum                 = 0;
        curBattleTransmuteCount = 0;

        playerTeam = inPlayerTeam;
        enemyTeam  = inEnemyTeam;
        RefreshCharactersInBattleList();

        playerTeam.PrepareForBattle();
        enemyTeam.PrepareForBattle();

        /*
         * Debug.Log("battle order:");
         * foreach (CharacterData c in charactersInBattle)
         * {
         *  Debug.Log(c.name + " : " + c.orderInTeam);
         * }
         */
    }
Ejemplo n.º 2
0
    public void ReceivePlayerTeamReviveResponse(bool inShouldRevive)
    {
        if (inShouldRevive)
        {
            //revive dead team members, then heal+restore both teams
            playerTeam.PrepareForAdventure();
            adventure.ApplyKitchenBoostToPlayerTeam();
            playerTeam.PrepareForBattle();

            enemyTeam.HealAndCureAllMembers();

            //curFile.teamLastRevivedAt = DateTime.Now; //commented out because this property doesn't exist in the mock save file
            playerTeamHasRevivedOnceThisTrip = true;

            if (EPlayerTeamRevived != null)
            {
                EPlayerTeamRevived();
            }
        }

        //no matter what, just resume. either the battle continues to flow or the next step will see the dead team and exit the battle
        Resume();
    }