コード例 #1
0
 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();
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        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);
        }
コード例 #5
0
 public void Leave(MenuCallbackArgs args)
 {
     PlayerEncounter.LeaveSettlement();
     PlayerEncounter.Finish(true);
 }
コード例 #6
0
 protected override void OnMenuOptionClicked(MenuCallbackArgs args)
 {
     PlayerEncounter.LeaveSettlement();
     PlayerEncounter.Finish();
 }