private void PreBattle(MobileParty targetParty) { PlayerEncounter.LeaveSettlement(); PlayerEncounter.Finish(true); StartBattleAction.Apply(targetParty.Party, MobileParty.MainParty.Party); PlayerEncounter.RestartPlayerEncounter(MobileParty.MainParty.Party, targetParty.Party, true); PlayerEncounter.Update(); }
public void BattleInCenter(MenuCallbackArgs args) { MobileParty targetParty = this._parties.Where(obj => obj.Name.ToString() == args.Text.ToString()).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); }
public void BattleInLordShall(MenuCallbackArgs args) { Hero target = this._lordHeros.Where(obj => obj.Name.ToString() == args.Text.ToString()).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); MobileParty targetParty = target.Clan.CreateNewMobileParty(target); AddRandomTroopToParty(targetParty); SelectMainPartyMember(args, () => { PreBattle(targetParty); OpenBattleJustHero(scene, upgradeLevel); }, SneakMaxNum); //InformationManager.AddQuickInformation(); }
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); }
public void Leave(MenuCallbackArgs args) { PlayerEncounter.LeaveSettlement(); PlayerEncounter.Finish(true); }
protected override void OnMenuOptionClicked(MenuCallbackArgs args) { PlayerEncounter.LeaveSettlement(); PlayerEncounter.Finish(); }