示例#1
0
        /// <summary>
        /// When the player chooses a power, see if the player is done upgrading and it's time to move on to the next phase.
        /// </summary>
        /// <param name="e">A PowerChoiceEvent sent out by the character sheet.</param>
        private void HandlePowerChoice(Event e)
        {
            Debug.Assert(e.GetType() == typeof(PowerChoiceEvent), "Non-PowerChoiceEvent in HandlePowerChoice");

            PowerChoiceEvent powerEvent = e as PowerChoiceEvent;

            CheckForAllFinished(powerEvent.defender);
        }
示例#2
0
    /// <summary>
    /// When the player chooses a new ability, direct that choice appropriately.
    /// </summary>
    /// <param name="e">A PowerChoiceEvent (or TutorialPowerChoiceEvent, if it's the tutorial).</param>
    private void HandlePowerChoices(Event e)
    {
        if (Services.Rulebook.GetType() == typeof(Tutorial.TutorialTurnManager))
        {
            Debug.Assert(e.GetType() == typeof(TutorialPowerChoiceEvent), "Non-TutorialPowerChoiceEvent in HandlePowerChoices.");

            TutorialPowerChoiceEvent powerEvent = e as TutorialPowerChoiceEvent;

            powerEvent.defender.PowerUp(powerEvent.tree);
        }
        else
        {
            Debug.Assert(e.GetType() == typeof(PowerChoiceEvent), "Non-PowerChoiceEvent in HandlePowerChoices.");

            PowerChoiceEvent powerEvent = e as PowerChoiceEvent;

            powerEvent.defender.PowerUp(powerEvent.tree);
        }



        SetStatus(TaskStatus.Success);
    }