示例#1
0
        private static bool Prefix(TrainingFieldCampaignBehavior __instance)
        {
            if (!CultureStartOptions.FreePlayLoadedOnCondition())
            {
                //foreach (CharacterObject troop in PartyBase.MainParty.MemberRoster..ToList<CharacterObject>())
                //{
                // if (!troop.IsPlayerCharacter)
                // {
                //    PartyBase.MainParty.MemberRoster.RemoveTroop(troop, 1, default(UniqueTroopDescriptor), 0);

                // }
                // }
                //Setting Various extra values to try and match usual complete tutorial phase to make sure events fire.
                AccessTools.Field(typeof(TrainingFieldCampaignBehavior), "_talkedWithBrotherForTheFirstTime").SetValue(__instance, true);
                TutorialPhase.Instance.PlayerTalkedWithBrotherForTheFirstTime();

                Hero brother = (Hero)AccessTools.Property(typeof(StoryModeHeroes), "ElderBrother").GetValue(null);
                brother.ChangeState(Hero.CharacterStates.Disabled);
                //Believe this is line missed that is causing all the brother issues
                brother.Clan = CampaignData.NeutralFaction;


                StoryMode.StoryMode.Current.MainStoryLine.CompleteTutorialPhase(true);
                Vec2 StartPos = GetSettlementLoc(CSCharCreationOption.CSOptionSettlement());
                MobileParty.MainParty.Position2D = StartPos;
                MapState mapstate;
                mapstate = (GameStateManager.Current.ActiveState as MapState);
                mapstate.Handler.TeleportCameraToMainParty();
                SelectClanName();
                CSApplyChoices.ApplyStoryOptions();
            }
            return(false);
        }
示例#2
0
        private static bool Prefix(CampaignBehaviorBase __instance)
        {
            // Overwriting entire base options this is default patch. Todo make generic based on conditional patch
            Hero brother = StoryMode.StoryMode.Current.MainStoryLine.Brother;

            PartyBase.MainParty.MemberRoster.RemoveTroop(brother.CharacterObject, 1, default(UniqueTroopDescriptor), 0);
            StoryMode.StoryMode.Current.MainStoryLine.CompleteTutorialPhase(true);
            Vec2 StartPos = GetSettlementLoc();

            MobileParty.MainParty.Position2D = StartPos;
            MapState mapstate;

            mapstate = (GameStateManager.Current.ActiveState as MapState);
            mapstate.Handler.TeleportCameraToMainParty();
            SelectClanName();
            CSApplyChoices.UpdateNezzyFolly();
            return(false);
        }