public bool ApplyCondition(Kingdom kingdom, Kingdom otherKingdom, out TextObject textObject, bool forcePlayerCharacterCosts = false) { textObject = null; ThirdPhase thirdPhase = StoryMode.StoryMode.Current.MainStoryLine.ThirdPhase; bool isValidQuestState = thirdPhase == null || !thirdPhase.OppositionKingdoms.Contains(otherKingdom); if (!isValidQuestState) { textObject = new TextObject(ACTIVE_QUEST); } return(isValidQuestState); }
private bool IsValidQuestState(Kingdom kingdom1, Kingdom kingdom2) { bool isValidQuestState = true; Kingdom opposingKingdom = PlayerHelpers.GetOpposingKingdomIfPlayerKingdomProvided(kingdom1, kingdom2); if (opposingKingdom != null) { ThirdPhase thirdPhase = StoryMode.StoryMode.Current.MainStoryLine.ThirdPhase; isValidQuestState = thirdPhase == null || !thirdPhase.OppositionKingdoms.Contains(opposingKingdom); } return(isValidQuestState); }
public bool ApplyCondition(Kingdom kingdom, Kingdom otherKingdom, out TextObject textObject, bool forcePlayerCharacterCosts = false, bool bypassCosts = false) { textObject = null; // check if we actually are in storymode (or sandbox) if (StoryMode.StoryMode.Current == null || StoryMode.StoryMode.Current.MainStoryLine == null) { return(true); } ThirdPhase thirdPhase = StoryMode.StoryMode.Current.MainStoryLine.ThirdPhase; bool isValidQuestState = thirdPhase == null || !thirdPhase.OppositionKingdoms.Contains(otherKingdom); if (!isValidQuestState) { textObject = new TextObject(ACTIVE_QUEST); } return(isValidQuestState); }