Esempio n. 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();
    }
Esempio n. 2
0
    public void ProcessCleanAction(ActionContainer action)
    {
        var character = action.GetExecutingCharacter();

        CharacterActions.RaiseCharacterDeterminationBy(2, character);
        Moral.RaiseMoral();
    }
Esempio n. 3
0
 public static void RaiseDeterminationOfPartyBy(int amount)
 {
     foreach (Character c in PartyHandler.PartySession)
     {
         CharacterActions.RaiseCharacterDeterminationBy(amount, c);
     }
 }
Esempio n. 4
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);
        }
    }
Esempio n. 5
0
    private void TaskOnClick()
    {
        Destroy(popup);
        if (Success)
        {
            myProcessor.item.Research();
        }
        else
        {
            var c = myProcessor.myAction.GetExecutingCharacter();
            if (c is ISideCharacter)
            {
                //Nothing
            }
            else
            {
                CharacterActions.RaiseCharacterDeterminationBy(1, c);
            }
        }

        if (Damage)
        {
            CharacterActions.DamageCharacterBy(1, myProcessor.myAction.GetExecutingCharacter());
        }

        if (Card)
        {
            var c = myProcessor.myAction.GetExecutingCharacter();
            if (c is ISideCharacter)
            {
                CharacterActions.DamageCharacterBy(1, c);
                FindObjectOfType <ActionProcesser>().ProcessNextAction();
            }
            else
            {
                FindObjectOfType <BuildingCard_Deck>().DrawAndShow(true);
            }
        }
        else
        {
            FindObjectOfType <ActionProcesser>().ProcessNextAction();
        }
    }