コード例 #1
0
    private void TaskOnClick()
    {
        if (Moral.GetCurrentMoralState() == MoralState.Best && !wantsHeal && !wantsDetermination)
        {
            return;
        }

        var character = PartyActions.GetActiveCharacter();

        if (wantsHeal)
        {
            CharacterActions.HealCharacterBy(1, character);
        }
        else
        {
            int moralevalue = Moral.GetMoraleInt();
            if (moralevalue < 0)
            {
                CharacterActions.LowerCharacterDeterminationBy(moralevalue, character);
            }
            else
            {
                CharacterActions.RaiseCharacterDeterminationBy(moralevalue, character);
            }
        }
        Destroy(popUp);
        var phaseView = FindObjectOfType <PhaseView>();

        phaseView.NextPhase();
    }
コード例 #2
0
 public static void HealAllPlayers(int amount)
 {
     foreach (Character c in PartyHandler.PartySession)
     {
         if (c is ISideCharacter)
         {
             continue;
         }
         CharacterActions.HealCharacterBy(amount, c);
     }
 }
コード例 #3
0
    public void ProcessRestAction(ActionContainer action)
    {
        var character = action.GetExecutingCharacter();

        if (InventionStorage.IsAvailable(Invention.Bed))
        {
            var active = PartyActions.ExecutingCharacter;
            CharacterActions.RaiseCharacterDeterminationBy(1, active);
            CharacterActions.HealCharacterBy(2, active);
        }
        else
        {
            var active = PartyActions.ExecutingCharacter;
            CharacterActions.HealCharacterBy(1, active);
        }
    }