private void RemoveLastAbility()
    {
        if (!Gm.combatManager.IsAbilityQueueEmpty())
        {
            RemoveAbilityItemLock();
            Gm.combatManager.RemoveLastQueuedAbility();

            Gm.hudManager.commandInterface.ShowCompatibleCommands(Gm.combatManager, CurrentActor);

            if (Gm.combatManager.IsAbilityQueueEmpty())
            {
                Gm.hudManager.inputInfoInterface.ShowCommands(new Dictionary <string, string>
                {
                    { "WASD", "Browse commands" },
                    { "SPACE", "Enqueue command" },
                    { "E", "Close panel" }
                });
            }
        }
        else
        {
            EventManager <List <AbilityDetails> > .Invoke(EventType.OnAbilityQueueChanged, null);

            Gm.SwitchState(typeof(State_PlayerTurn_Move));
        }
    }
 private void AdvanceToPerformanceState()
 {
     if (!Gm.combatManager.IsAbilityQueueEmpty())
     {
         // Gm.combatManager.ConfirmAbilityQueue();
         Gm.SwitchState(typeof(State_PlayerTurn_Performance));
     }
 }
示例#3
0
    private bool TryToAttackTarget(Combatant target)
    {
        if (!_hasAttacked && CurrentActor.HasAbilityThatCanReach(CurrentActor.point, target.point))
        {
            _hasAttacked = true;
            Gm.combatManager.EnqueueCommand(new AbilityDetails(CurrentActor.GetCurrentlyPerformableAbilities()[0], CurrentActor, new List <GridObject> {
                target
            }));
            Gm.SwitchState(typeof(State_EnemyTurn_Performance), 0.5f);

            return(true);
        }

        return(false);
    }
 private void SwitchToAbilitySelectionState()
 {
     Gm.SwitchState(typeof(State_PlayerTurn_PickAbility));
 }
 private void SwitchToInventoryState()
 {
     Gm.SwitchState(typeof(State_PlayerTurn_Inventory));
 }
 private void SwitchToMoveState()
 {
     // Gm.combatManager.ClearAbilityQueue();
     Gm.SwitchState(typeof(State_PlayerTurn_Move));
 }
 private void ReturnToAbilityState()
 {
     Gm.SwitchState(typeof(State_PlayerTurn_PickAbility));
 }
 private void ConfirmTarget()
 {
     Gm.combatManager.EnqueueCommand(new AbilityDetails(_currentCommand, CurrentActor, DetermineTargets()));
     Gm.SwitchState(typeof(State_PlayerTurn_PickAbility));
 }