Exemplo n.º 1
0
        private static void SetConsideredAction(out TextObject textObject, TextObject actionTargetName, KingdomDecision?clanDecision, ConsiderationType considerationType, bool revertPolicy = false, Settlement?annexedSettlement = null)
        {
            textObject = new TextObject(ConsiderationDescription);
            switch (considerationType)
            {
            case ConsiderationType.MakingPeace:
                textObject.SetTextVariable("CONSIDERED_ACTION", ActionMakingPeace);
                textObject.SetTextVariable("ACTION_DETAILS", TextObject.Empty);
                break;

            case ConsiderationType.DeclaringWar:
                textObject.SetTextVariable("CONSIDERED_ACTION", ActionDeclaringWar);
                textObject.SetTextVariable("ACTION_DETAILS", TextObject.Empty);
                break;

            case ConsiderationType.ChangingKingdomPolicy:
                textObject.SetTextVariable("CONSIDERED_ACTION", revertPolicy ? ActionDisavowingKingdomPolicy : ActionIntroducingKingdomPolicy);
                textObject.SetTextVariable("ACTION_DETAILS", TextObject.Empty);
                break;

            case ConsiderationType.AnnexingFief:
                SetEntityProperties(null, "ANNEXED_SETTLEMENT", annexedSettlement);
                textObject.SetTextVariable("CONSIDERED_ACTION", new TextObject(ActionAnnexingFief));
                textObject.SetTextVariable("ACTION_DETAILS", new TextObject(AnnexingFiefActionDetails));
                break;

            default:
                throw new ArgumentException(string.Format("{0} is not supported Consideration type", considerationType.ToString()), nameof(considerationType));
            }
            textObject.SetTextVariable("ACTION_TARGET", actionTargetName);
            textObject.SetTextVariable("CONSIDER_OUTCOME", clanDecision is null ? OutcomeIsAbstain : OutcomeIsElectionStart);
        }
Exemplo n.º 2
0
        private static void SetPossibleAction(out TextObject textObject, ConsiderationType considerationType)
        {
            textObject = new TextObject(NoFactionFound);
            switch (considerationType)
            {
            case ConsiderationType.MakingPeace:
                textObject.SetTextVariable("POSSIBLE_ACTION", PossibleActionMakingPeace);
                break;

            case ConsiderationType.DeclaringWar:
                textObject.SetTextVariable("POSSIBLE_ACTION", PossibleActionDeclaringWar);
                break;

            case ConsiderationType.ChangingKingdomPolicy:
                textObject.SetTextVariable("POSSIBLE_ACTION", PossibleActionChangingKingdomPolicy);
                break;

            case ConsiderationType.AnnexingFief:
                textObject.SetTextVariable("POSSIBLE_ACTION", PossibleActionAnnexingFief);
                break;

            default:
                throw new ArgumentException(string.Format("{0} is not supported Consideration type", considerationType.ToString()), nameof(considerationType));
            }
        }