private void BattleInTavern(MenuCallbackArgs args) { this._sneakType = SneakType.Tavern; int upgradeLevel = Settlement.CurrentSettlement.GetComponent <Town>().GetWallLevel(); String scene = LocationComplex.Current.GetLocationWithId("tavern").GetSceneName(upgradeLevel); int num = Campaign.Current.Models.LocationModel.GetSettlementUpgradeLevel(PlayerEncounter.LocationEncounter); //CampaignMission.OpenIndoorMission(scene, num, LocationComplex.Current.GetLocationWithId("prison"), null); this._tempTargetParty = MBObjectManager.Instance.CreateObject <MobileParty>("sms_prison"); AddRandomTroopToParty(this._tempTargetParty); SelectMainPartyMember(args, () => { PreBattle(this._tempTargetParty); OpenBattleJustHero(scene, upgradeLevel); }, 20); }
public void BattleInCenter(MenuCallbackArgs args) { this._sneakType = SneakType.Center; MobileParty targetParty = this._parties.Where(obj => obj.Name.ToString() == args.Text.ToString()).ToList().GetRandomElement(); if (null == targetParty) { PlayerEncounter.LeaveSettlement(); PlayerEncounter.Finish(true); return; } int upgradeLevel = Settlement.CurrentSettlement.GetComponent <Town>().GetWallLevel(); String scene = LocationComplex.Current.GetLocationWithId("center").GetSceneName(upgradeLevel); PreBattle(targetParty); StartBattleNormal(scene, upgradeLevel); }
private void BattleInPrison(MenuCallbackArgs args) { this._sneakType = SneakType.Prison; int upgradeLevel = Settlement.CurrentSettlement.GetComponent <Town>().GetWallLevel(); String scene = LocationComplex.Current.GetLocationWithId("prison").GetSceneName(upgradeLevel); //int num = Campaign.Current.Models.LocationModel.GetSettlementUpgradeLevel(PlayerEncounter.LocationEncounter); scene = "sms_prison"; //scene = "sue_test"; this._tempTargetParty = MBObjectManager.Instance.CreateObject <MobileParty>("sms_prison"); this._tempTargetParty.Party.Owner = Settlement.CurrentSettlement.OwnerClan.Leader; AddRandomTroopToParty(this._tempTargetParty); this._tempTargetParty.SetCustomName(new TextObject(Settlement.CurrentSettlement.Name + "监狱警卫队")); SelectMainPartyMember(args, () => { PreBattle(this._tempTargetParty); OpenBattleJustHero(scene, upgradeLevel); }, SneakMaxNum); }
public void BattleInLordShall(MenuCallbackArgs args) { this._sneakType = SneakType.LordShall; Hero target = this._lordHerosWithOutParty.Where(obj => obj.Name.ToString() == args.Text.ToString()).ToList().GetRandomElement(); if (null == target) { PlayerEncounter.LeaveSettlement(); PlayerEncounter.Finish(true); return; } int upgradeLevel = Settlement.CurrentSettlement.GetComponent <Town>().GetWallLevel(); String scene = LocationComplex.Current.GetLocationWithId("lordshall").GetSceneName(upgradeLevel); //empire_castle_keep_a_l3_interior this._tempTargetParty = target.Clan.CreateNewMobileParty(target); AddRandomTroopToParty(this._tempTargetParty); SelectMainPartyMember(args, () => { PreBattle(this._tempTargetParty); OpenBattleJustHero(scene, upgradeLevel); }, SneakMaxNum); }