Esempio n. 1
0
        private static void ApplyInternal(Clan usurpingClan)
        {
            if (Settings.Instance.EnableStorylineProtection &&
                StoryMode.StoryMode.Current?.MainStoryLine?.MainStoryLineSide == MainStoryLineSide.None)
            {
                if (StoryModeData.IsKingdomImperial(usurpingClan.Kingdom))
                {
                    StoryMode.StoryMode.Current.MainStoryLine.SetStoryLineSide(MainStoryLineSide.SupportImperialKingdom);
                }
                else
                {
                    StoryMode.StoryMode.Current.MainStoryLine.SetStoryLineSide(MainStoryLineSide.SupportAntiImperialKingdom);
                }
            }
            List <Clan> supportingClans, opposingClans;

            GetClanSupport(usurpingClan, out supportingClans, out opposingClans);

            usurpingClan.Influence -= usurpingClan.Kingdom.RulingClan.Influence;
            usurpingClan.Kingdom.RulingClan.Influence = 0;
            usurpingClan.Kingdom.RulingClan           = usurpingClan;

            AdjustRelations(usurpingClan, supportingClans, 10);
            AdjustRelations(usurpingClan, opposingClans, 20);
        }
 public static void Apply(Clan usurpingClan)
 {
     if (Settings.Instance.EnableStorylineProtection && StoryMode.StoryMode.Current.MainStoryLine.MainStoryLineSide == MainStoryLineSide.None)
     {
         InformationManager.ShowInquiry(new InquiryData(
                                            new TextObject("{=fQxiCdBA}Main Storyline").ToString(),
                                            new TextObject("{=3wXqST66}By usurping this throne, you are committing to {STANCE} the empire in the main storyline.")
                                            .SetTextVariable("STANCE", StoryModeData.IsKingdomImperial(usurpingClan.Kingdom) ? new TextObject("{=yAFwbD9B}unifying") : new TextObject("{=IGJVx5XI}destroying"))
                                            .ToString(),
                                            true,
                                            true,
                                            new TextObject(StringConstants.Accept).ToString(),
                                            new TextObject(StringConstants.Decline).ToString(),
                                            () => ApplyInternal(usurpingClan),
                                            null,
                                            ""), true);
     }
     else
     {
         ApplyInternal(usurpingClan);
     }
 }
Esempio n. 3
0
        private static void ApplyInternal(Clan usurpingClan)
        {
            if (IsStoryMode && IsNoSideChosenInStory)
            {
                if (StoryModeData.IsKingdomImperial(usurpingClan.Kingdom))
                {
                    StoryMode.StoryMode.Current.MainStoryLine.SetStoryLineSide(MainStoryLineSide.SupportImperialKingdom);
                }
                else
                {
                    StoryMode.StoryMode.Current.MainStoryLine.SetStoryLineSide(MainStoryLineSide.SupportAntiImperialKingdom);
                }
            }

            GetClanSupport(usurpingClan, out var supportingClans, out List <Clan> opposingClans);

            usurpingClan.Influence -= usurpingClan.Kingdom.RulingClan.Influence;
            usurpingClan.Kingdom.RulingClan.Influence = 0;
            usurpingClan.Kingdom.RulingClan           = usurpingClan;

            AdjustRelations(usurpingClan, supportingClans, 10);
            AdjustRelations(usurpingClan, opposingClans, 20);
        }
Esempio n. 4
0
        public static void Apply(Clan usurpingClan)
        {
            // can be null if we're in sandbox rather than story mode

            if (IsStoryMode && IsNoSideChosenInStory)
            {
                InformationManager.ShowInquiry(new InquiryData(
                                                   new TextObject("{=fQxiCdBA}Main Storyline").ToString(),
                                                   new TextObject("{=3wXqST66}By usurping this throne, you are committing to {STANCE} the empire in the main storyline.")
                                                   .SetTextVariable("STANCE", StoryModeData.IsKingdomImperial(usurpingClan.Kingdom) ? new TextObject("{=yAFwbD9B}unifying") : new TextObject("{=IGJVx5XI}destroying"))
                                                   .ToString(),
                                                   true,
                                                   true,
                                                   new TextObject(StringConstants.Accept).ToString(),
                                                   new TextObject(StringConstants.Decline).ToString(),
                                                   () => ApplyInternal(usurpingClan),
                                                   null), true);
            }
            else
            {
                ApplyInternal(usurpingClan);
            }
        }