Exemple #1
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));
            }
        }
Exemple #2
0
 public static void PrepareConsiderationDebugMessage(ConsiderationType considerationType, Clan clan, IFaction?otherFaction, KingdomDecision?clanDecision, out TextObject debugLogMessage)
 {
     if (otherFaction != null)
     {
         SetConsideredAction(out debugLogMessage, otherFaction.Name, clanDecision, considerationType);
     }
     else
     {
         SetPossibleAction(out debugLogMessage, considerationType);
     }
     SetEntityProperties(debugLogMessage, "REFLECTING_CLAN", clan);
 }
Exemple #3
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);
        }