private static void SetupRound() { MatchSetting settings = GlobalWork.inst.MatchSetting; MatchMain main = MatchMain.inst; main.RoundCnt = 1; settings.is3GameMatch = true; settings.RoundNum = 0; //Necessary for compatibility with Mods that change attire settings.isCarryOverHP = true; settings.MatchCnt = 1; //Update teams if the player won if (loserIndex > 3) { UpdateTeamMembers(); WrestlerID wrestler = (WrestlerID)SelectOpponent(0).ID; settings = MatchConfiguration.AddPlayers(true, wrestler, 4, 0, false, 0, settings); //Adding new tag partner if (isTag) { wrestler = (WrestlerID)SelectOpponent(1).ID; settings = MatchConfiguration.AddPlayers(true, wrestler, 5, 0, false, 0, settings); } } }
//Ensure we aren't fielding duplicates //public static String singleOpponent = ""; //public static String tagOpponent = ""; public static MatchSetting AddPlayers(bool entry, WrestlerID wrestlerNo, int slot, int control, bool isSecond, int costume, MatchSetting settings) { settings.matchWrestlerInfo[slot].entry = entry; if (entry) { settings.matchWrestlerInfo[slot].wrestlerID = wrestlerNo; settings.matchWrestlerInfo[slot].costume_no = costume; settings.matchWrestlerInfo[slot].alignment = WrestlerAlignmentEnum.Neutral; //Determine what the assigned pad should be MenuPadKind controller; switch (control) { case 0: settings.matchWrestlerInfo[slot].assignedPad = PadPort.AI; controller = MenuPadKind.COM; break; case 1: settings.matchWrestlerInfo[slot].assignedPad = PadPort.Pad1; controller = MenuPadKind.Pad1; break; case 2: settings.matchWrestlerInfo[slot].assignedPad = PadPort.Pad2; controller = MenuPadKind.Pad2; break; default: settings.matchWrestlerInfo[slot].assignedPad = PadPort.AI; controller = MenuPadKind.COM; break; } settings.matchWrestlerInfo[slot].HP = 65535f; settings.matchWrestlerInfo[slot].SP = 65535f; settings.matchWrestlerInfo[slot].HP_Neck = 65535f; settings.matchWrestlerInfo[slot].HP_Arm = 65535f; settings.matchWrestlerInfo[slot].HP_Waist = 65535f; settings.matchWrestlerInfo[slot].HP_Leg = 65535f; GlobalParam.Set_WrestlerData(slot, controller, wrestlerNo, isSecond, costume, 65535f, 65535f, 65535f, 65535f, 65535f, 65535f); } else { settings.matchWrestlerInfo[slot].wrestlerID = global::WrestlerID.Invalid; GlobalParam.Set_WrestlerData(slot, MenuPadKind.Invalid, global::WrestlerID.Invalid, false, 0, 65535f, 65535f, 65535f, 65535f, 65535f, 65535f); } return(settings); }
private int GetWrestlerEndurance(String part, String wrestlerName) { WrestlerID id = 0; foreach (WresIDGroup wrestler in wrestlerList) { if (wrestler.Name.Equals(wrestlerName)) { id = (WrestlerID)wrestler.ID; } } if (id == 0) { return(0); } else { int endurance = 0; switch (part) { case "Neck": endurance = DataBase.GetWrestlerParam(id).defNeck; break; case "Body": endurance = DataBase.GetWrestlerParam(id).defWaist; break; case "Arm": endurance = DataBase.GetWrestlerParam(id).defArm; break; case "Leg": endurance = DataBase.GetWrestlerParam(id).defLeg; break; } return(endurance); } }
private void we_edit_Click(object sender, EventArgs e) { try { //Menu_SceneManager manager = new Menu_SceneManager(); CreateMenu_SceneManager manager = new CreateMenu_SceneManager(); WresIDGroup wrestler = (WresIDGroup)we_resultList.SelectedItem; WrestlerID wID = (WrestlerID)wrestler.ID; L.D("Loading " + wrestler.Name + " at " + wrestler.ID); if (global::CreateMenu_SceneManager.edit_data == null) { global::CreateMenu_SceneManager.edit_data = new EditWrestlerData(); } if (global::CreateMenu_SceneManager.edit_data.criticalMoveName == null) { global::CreateMenu_SceneManager.edit_data.criticalMoveName = string.Empty; } if (global::CreateMenu_SceneManager.edit_data.ThemeMusic_Filename == null) { global::CreateMenu_SceneManager.edit_data.ThemeMusic_Filename = string.Empty; } global::CreateMenu_SceneManager.edit_data.appearanceData.Set(global::DataBase.GetAppearanceData(wID)); global::CreateMenu_SceneManager.editWrestlerID = wID; global::CreateMenu_SceneManager.edit_data = global::SaveData.GetInst().GetEditWrestlerData(wID).Clone(); global::CreateMenu_SceneManager.flg_Overwrite = true; global::CreateMenu_SceneManager.user_edit_point = 380; global::CreateMenu_SceneManager.presetEditMode = false; MyMusic.Init(); UnityEngine.SceneManagement.SceneManager.LoadScene("Scene_WrestlerEditMenu"); } catch (Exception ex) { L.D("Edit Click Error: " + ex.StackTrace); } }
public static bool ValidateWrestler(WrestlerID wid) { return(DataBase.CheckValidation_DLCMove(wid) && DataBase.CheckEditWrestlerValidation_DLCParts(wid)); }
private void sr_start_Click(object sender, EventArgs e) { if (!ValidateMatch()) { return; } if (MoreMatchTypes_Form.SurvivalRoadData.InProgress) { ShowError("Please end the current Survival Road session first."); } #region Variables MatchSetting settings = GlobalWork.GetInst().MatchSetting; MatchConfig.WresIDGroup player = (MatchConfig.WresIDGroup)sr_wrestler.SelectedItem; MatchConfig.WresIDGroup second = (MatchConfig.WresIDGroup)sr_second.SelectedItem; String selectedType = sr_matchType.SelectedItem.ToString(); WrestlerID wrestlerNo = WrestlerID.AbbieJones; bool isSecond = true; bool controlBoth = false; bool validEntry = false; int control = 0; int oppCount = sr_teamList.Items.Count; #endregion try { settings = SetMatchConfig("Survival", settings); sr_progress.Clear(); //Set-up player team for (int i = 0; i < 4; i++) { //Handling the first player if (i == 0) { wrestlerNo = (WrestlerID)player.ID; isSecond = false; control = 1; validEntry = true; } else if (i == 1) { if (second != null) { validEntry = true; wrestlerNo = (WrestlerID)second.ID; if (sr_tag.Checked) { isSecond = false; if (sr_controlBoth.Checked) { control = 1; } else { control = 0; } } else if (!sr_tag.Checked) { isSecond = true; } //Ensure we handle cases where a second isn't allowed, and a tag match hasn't been selected. if (!sr_tag.Checked && (!selectedType.Equals("Normal"))) { validEntry = false; } } else { validEntry = false; } } else if (i > 1) { validEntry = false; } //Determine if this is a simulation if (sr_simulate.Checked) { control = 0; if (sr_simSecond.Checked && i == 1 && selectedType.Equals("Normal")) { control = 1; } } settings = MatchConfiguration.AddPlayers(validEntry, wrestlerNo, i, control, isSecond, 0, settings); } //Set-up opponents MatchConfig.WresIDGroup opponent; int opponentCount = sr_teamList.Items.Count; for (int i = 4; i < 8; i++) { if (i > 5) { validEntry = false; } else { validEntry = true; int searchIndex; //Get Random opponent if (sr_random.Checked) { searchIndex = UnityEngine.Random.Range(0, opponentCount); } else { searchIndex = 0; } //Determine if we're creating a tag team or single competitor if (opponentCount == 1) { opponent = (MatchConfig.WresIDGroup)sr_teamList.Items[searchIndex]; wrestlerNo = MatchConfiguration.GetWrestlerNo(opponent); initialOpponents[0] = opponent; } else if (i == 4) { opponent = (MatchConfig.WresIDGroup)sr_teamList.Items[searchIndex]; wrestlerNo = MatchConfiguration.GetWrestlerNo(opponent); initialOpponents[0] = opponent; } else if (sr_tag.Checked && i == 5) { opponent = (MatchConfig.WresIDGroup)sr_teamList.Items[searchIndex]; wrestlerNo = MatchConfiguration.GetWrestlerNo(opponent); //Ensure that we aren't fielding duplicate wrestlers while (initialOpponents[0].ID == (int)wrestlerNo) { searchIndex = UnityEngine.Random.Range(0, opponentCount); opponent = (MatchConfig.WresIDGroup)sr_teamList.Items[searchIndex]; wrestlerNo = MatchConfiguration.GetWrestlerNo(opponent); } initialOpponents[1] = opponent; } else if (!sr_tag.Checked && i == 5) { validEntry = false; } } settings = MatchConfiguration.AddPlayers(validEntry, wrestlerNo, i, 0, false, 0, settings); } StartMatch(); } catch (Exception ex) { ShowError("An error has occured."); L.D("ValidateSurvivalMatchError: " + ex); } }
private void btn_matchStart_Click(object sender, EventArgs e) { if (!ValidateMatch()) { return; } if (MoreMatchTypes_Form.ExEliminationData.InProgress) { ShowError("Please end the current Extended Elimination Match first."); return; } #region Variables MatchSetting settings = GlobalWork.GetInst().MatchSetting; WrestlerID wrestlerNo = WrestlerID.AbbieJones; bool isSecond = true; bool controlBoth = false; bool validEntry = false; int control = 0; #endregion //Adding initial teams try { settings = SetMatchConfig(settings); //Set-up Blue team for (int i = 0; i < 4; i++) { if (i >= el_blueList.Items.Count) { break; } //Prepare wrestler wrestlerNo = (WrestlerID)((MatchConfig.WresIDGroup)el_blueList.Items[i]).ID; validEntry = true; if (i == 0) { isSecond = false; if (el_blueControl.Checked) { control = 1; } else { control = 0; } } else { isSecond = true; } settings = MatchConfiguration.AddPlayers(validEntry, wrestlerNo, i, control, isSecond, 0, settings); } //Set-up Red team for (int i = 0; i < 4; i++) { if (i >= el_redList.Items.Count) { break; } //Prepare wrestler wrestlerNo = (WrestlerID)((MatchConfig.WresIDGroup)el_redList.Items[i]).ID; validEntry = true; if (i == 4) { isSecond = false; if (el_redControl.Checked) { control = 1; } else { control = 0; } } else { isSecond = true; } settings = MatchConfiguration.AddPlayers(validEntry, wrestlerNo, i + 4, control, isSecond, 0, settings); } StartMatch(); } catch (Exception ex) { ShowError("An error has occured."); L.D("ValidateExElimMatch: " + ex); } }