public void DetermineWarAsIfNoPlayerInteraction(Faction faction, Faction factionInstigator)
        {
            this.unrestIsBrewing = false;

            if (faction.leader?.GetStatValue(StatDefOf.NegotiationAbility) != null)
            {
                int rollForIntendedOutcome = Rand.Bool ? 1 : 4;
                FactionWarDialogue.DetermineOutcome(faction, factionInstigator, faction.leader, rollForIntendedOutcome, out string blah);
                Find.LetterStack.ReceiveLetter("MFI_FactionWarLeaderDecidedLabel".Translate(),
                                               WarIsOngoing ? "MFI_FactionWarLeaderDecidedOnWar".Translate(faction, factionInstigator)
                                                            : "MFI_FactionWarLeaderDecidedAgainstWar".Translate(faction, factionInstigator),
                                               WarIsOngoing ? LetterDefOf.NegativeEvent : LetterDefOf.NeutralEvent);
                return;
            }
            else if (factionInstigator.leader?.GetStatValue(StatDefOf.NegotiationAbility) != null)
            {
                int rollForIntendedOutcome = Rand.Bool ? 1 : 4;
                FactionWarDialogue.DetermineOutcome(factionInstigator, faction, factionInstigator.leader, rollForIntendedOutcome, out string blah);
                Find.LetterStack.ReceiveLetter("MFI_FactionWarLeaderDecidedLabel".Translate(),
                                               WarIsOngoing ? "MFI_FactionWarLeaderDecidedOnWar".Translate(factionInstigator, faction)
                                                            : "MFI_FactionWarLeaderDecidedAgainstWar".Translate(factionInstigator, faction),
                                               WarIsOngoing ? LetterDefOf.NegativeEvent : LetterDefOf.NeutralEvent);
                return;
            }
        }
Exemplo n.º 2
0
        public void DetermineWarAsIfNoPlayerInteraction(Faction faction, Faction factionInstigator)
        {
            unrestIsBrewing = false;

            var rollForIntendedOutcome = Rand.Bool
                ? DesiredOutcome.CURRY_FAVOUR_FACTION_ONE
                : DesiredOutcome.BROKER_PEACE;

            if (faction.leader?.GetStatValue(StatDefOf.NegotiationAbility) != null)
            {
                var dialogue = new FactionWarDialogue(faction.leader, faction, factionInstigator, null);
                dialogue.DetermineOutcome(rollForIntendedOutcome, out _);

                Find.LetterStack.ReceiveLetter("MFI_FactionWarLeaderDecidedLabel".Translate(),
                                               WarIsOngoing
                        ? "MFI_FactionWarLeaderDecidedOnWar".Translate(faction, factionInstigator)
                        : "MFI_FactionWarLeaderDecidedAgainstWar".Translate(faction, factionInstigator),
                                               WarIsOngoing ? LetterDefOf.NegativeEvent : LetterDefOf.NeutralEvent);
            }
            else if (factionInstigator.leader?.GetStatValue(StatDefOf.NegotiationAbility) != null)
            {
                var dialogue = new FactionWarDialogue(factionInstigator.leader, factionInstigator, faction, null);
                dialogue.DetermineOutcome(rollForIntendedOutcome, out _);

                Find.LetterStack.ReceiveLetter("MFI_FactionWarLeaderDecidedLabel".Translate(),
                                               WarIsOngoing
                        ? "MFI_FactionWarLeaderDecidedOnWar".Translate(factionInstigator, faction)
                        : "MFI_FactionWarLeaderDecidedAgainstWar".Translate(factionInstigator, faction),
                                               WarIsOngoing ? LetterDefOf.NegativeEvent : LetterDefOf.NeutralEvent);
            }
        }