private static void EndRound() { //Force game transition to the post match screen in order to reload wrestlers MatchMain main = MatchMain.inst; main.isMatchEnd = true; MatchSetting settings = GlobalWork.GetInst().MatchSetting; main.isInterruptedMatch = false; //Determine if full HP regen rule is in effect if (isRegen) { RefreshPlayer(0); if (isTag) { RefreshPlayer(1); } } //Ensure the 3 Game Rule Doesn't Force Match to End settings.MatchCnt = 0; settings.is3GameMatch = true; global::GlobalParam.is3GamesMatch = true; global::GlobalParam.m_MacthCount = 0; global::GlobalParam.flg_MacthForceEnd = false; //global::GlobalParam.flg_MacthCount = true; //Update Game Details if (!endRound) { UpdateDetails(); endRound = true; } }
/// <summary> /// Instance a new QualificationStepSetting with specified param /// </summary> /// <param name="matchSetting">Set match setting for qualification step</param> /// <param name="mainEliminationStep">First eliminiation step for main phase</param> /// <param name="countTeamQualified">Set number team qualified by group when type of phase is qualification, else null</param> /// <param name="matchWithRevenche">Set to true if you want two match by team</param> public QualificationStepSetting(MatchSetting matchSetting, EliminationType mainEliminationStep, ushort countTeamQualified, bool matchWithRevenche) : base(matchSetting) { MatchWithRevenche = matchWithRevenche; SetCountQualifiedTeam(mainEliminationStep, countTeamQualified); }
/// <summary> /// Instance a new QualificationStepSetting with specified param /// </summary> /// <param name="matchSetting">Set match setting for qualification step</param> /// <param name="mainEliminationStep">First eliminiation step for main phase</param> /// <param name="countGroup">Set number of qualification group when type of phase is qualification, else null</param> /// <param name="matchWithRevenche">Set to true if you want two match by team</param> public QualificationStepSetting(MatchSetting matchSetting, ushort countGroup, EliminationType mainEliminationStep, bool matchWithRevenche) : base(matchSetting) { SetCountGroup(countGroup, mainEliminationStep); MatchWithRevenche = matchWithRevenche; }
public void IsValidResult(int matchPoint, int teamScore, bool expectedIsValid) { var match = new MatchSetting(true, (ushort)matchPoint, 0, 0, 0); string message; Assert.AreEqual(expectedIsValid, match.IsValidScore((ushort)teamScore, out message)); }
public static void SetTeamMembers() { blueTeamMembers = new Queue <string>(); redTeamMembers = new Queue <string>(); PlayerMan p = PlayerMan.inst; MatchSetting settings = GlobalWork.inst.MatchSetting; //Set the team members for (int i = 0; i < 8; i++) { Player plObj = PlayerMan.inst.GetPlObj(i); if (!plObj) { continue; } if (plObj.isIntruder) { continue; } //This match type cannot include Seconds, so we override the initial setting here. settings.matchWrestlerInfo[i].isSecond = false; if (i < 4) { blueTeamMembers.Enqueue(DataBase.GetWrestlerFullName(plObj.WresParam)); } else { redTeamMembers.Enqueue(DataBase.GetWrestlerFullName(plObj.WresParam)); } } }
public static void SetMatchRules() { isElimination = false; padControls = new MenuPadKind[8]; //Ensure a valid elimination match can take place MatchSetting settings = GlobalWork.inst.MatchSetting; if (settings.BattleRoyalKind != BattleRoyalKindEnum.Off || settings.isS1Rule) { return; } if (settings.arena == VenueEnum.BarbedWire || settings.arena == VenueEnum.Cage || settings.arena == VenueEnum.Dodecagon || settings.arena == VenueEnum.LandMine_BarbedWire || settings.arena == VenueEnum.LandMine_FluorescentLamp) { return; } isElimination = MoreMatchTypes_Form.moreMatchTypesForm.cb_elimination.Checked; if (!isElimination) { return; } //Set variables for the match type endMatch = false; teamNames = new string[2]; memberTrack = new int[2]; memberTrack[0] = 0; memberTrack[1] = 0; loserTrack = -1; SetTeamNames(); SetTeamMembers(); SetPadControls(); }
public void IsValidToFinishedResult(bool canBeDuce, int matchPoint, int teamScore1, int teamScore2, bool expectedIsValid) { var match = new MatchSetting(canBeDuce, (ushort)matchPoint, 0, 0, 0); string message; Assert.AreEqual(expectedIsValid, match.IsValidToFinishedMatch((ushort)teamScore1, (ushort)teamScore2, out message)); }
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); } } }
public static void SetMatchRules() { if (MoreMatchTypes_Form.moreMatchTypesForm.cb_FirstBlood.Checked && GlobalWork.inst.MatchSetting.BattleRoyalKind == BattleRoyalKindEnum.Off) { isFirstBlood = true; } else { isFirstBlood = false; } if (!isFirstBlood) { return; } //Setting rules to Exhibition, Single Fall Matches only MatchSetting setting = GlobalWork.inst.MatchSetting; setting.VictoryCondition = VictoryConditionEnum.OnlyEscape; setting.is10CountKO = false; setting.isOutOfRingCount = false; setting.isFoulCount = false; setting.isElimination = false; setting.isTornadoBattle = true; setting.MatchTime = 0; setting.CriticalRate = CriticalRateEnum.Off; MoreMatchTypes_Form.moreMatchTypesForm.Enabled = false; bloodMeter = new int[8]; endMatch = false; }
public static void SetMatchRules() { MatchSetting settings = GlobalWork.inst.MatchSetting; isSumo = false; endMatch = false; if (settings.arena == VenueEnum.BarbedWire || settings.arena == VenueEnum.Cage || settings.arena == VenueEnum.LandMine_BarbedWire || settings.arena == VenueEnum.LandMine_FluorescentLamp) { return; } if (settings.BattleRoyalKind != BattleRoyalKindEnum.Off) { return; } if (!isOneOnOne()) { return; } if (MoreMatchTypes_Form.moreMatchTypesForm.cb_sumo.Checked) { isSumo = true; settings.isReversalOff = true; settings.isOverTheTopRopeOn = true; settings.isPowerCompetitionOff = true; settings.isExchangeOfStriking = false; settings.isSkipEntranceScene = true; settings.MatchTime = 0; //Populate Basic Attacks String basicMoves = MoreMatchTypes_Form.moreMatchTypesForm.tb_basic.Text.TrimStart().TrimEnd(); if (basicMoves != "") { basicAttacks = CreateMoveList(basicMoves); } else { basicAttacks = new List <string>() { "Shoutei", "Face Slap B", "Chest Slap", "Knife-Edge Chop", "Koppo Style Shoutei", "Throat Chop", "Jigoku-Tsuki" }; } } else { return; } resultText = ""; }
private dynamic DeclineMatch(dynamic arg) { var gameId = (int)arg.id; var matchId = (int)arg.matchid; MatchSetting.ChangeMatchState(gameId, matchId, 2); return(null); }
private dynamic AddPlayerMatch(dynamic arg) { var match = this.Bind <MatchUserResultModel>(); var currentUser = (UserModel)Context.CurrentUser; var gameId = (int)arg.id; MatchSetting.Save(match.UserId, match.Result, currentUser.Id, gameId); return(null); }
public void DefaultValue() { var match = new MatchSetting(); Assert.IsFalse(match.CanBeDuce); Assert.AreEqual(EndTypeConstaint.Point, match.EndBy); Assert.IsNotNull(match.Id); Assert.AreEqual(13, match.MatchPoint); Assert.AreEqual(0, match.PointForDuce); Assert.AreEqual(0, match.PointForLoose); Assert.AreEqual(1, match.PointForWin); }
public void Create_MatchEndByPoint_1(bool canBeDuce, int matchPoint, int pointForWin, int pointForLoose, int pointForDuce) { var match = new MatchSetting(canBeDuce, (ushort)matchPoint, (ushort)pointForWin, (ushort)pointForLoose, (ushort)pointForDuce); Assert.AreEqual(canBeDuce, match.CanBeDuce); Assert.AreEqual(EndTypeConstaint.Point, match.EndBy); Assert.IsNotNull(match.Id); Assert.AreEqual(matchPoint, match.MatchPoint); Assert.AreEqual(pointForDuce, match.PointForDuce); Assert.AreEqual(pointForLoose, match.PointForLoose); Assert.AreEqual(pointForWin, match.PointForWin); }
private dynamic AcceptMatch(dynamic arg) { var gameId = (int)arg.id; var matchId = (int)arg.matchid; MatchSetting.ChangeMatchState(gameId, matchId, 1); var match = MatchSetting.Get(matchId); EloSetting.RecalcRatings(match.uid1, match.uid2, match.result, gameId); return(null); }
public static void UnlockAbilities() { MatchSetting settings = GlobalWork.GetInst().MatchSetting; //Enable Top Rope Throw if (QoL_Form.form.au_overTopRope.Checked && GlobalWork.inst.MatchSetting.BattleRoyalKind == BattleRoyalKindEnum.Off) { enableTopRopeThrow = true; } else { enableTopRopeThrow = false; } }
public UINumber( float wide, float high, FieldBinding field, string append = "", FieldBinding filterField = null, MatchSetting setting = null) : base("0", Color.White) { this._setting = setting; this._field = field; this._append = append; this._filterField = filterField; }
private static void EndMatch() { //Ensure this isn't executed multiple times if (!endMatch) { MatchSetting settings = GlobalWork.GetInst().MatchSetting; //Ensure that we reset the 3 Game Match settings settings.is3GameMatch = false; global::GlobalParam.is3GamesMatch = false; global::GlobalParam.flg_MacthForceEnd = true; endRound = false; endMatch = true; UpdateDetails(); } }
private static void ForceCleanBreak() { for (int i = 0; i < 8; i++) { Player pl = PlayerMan.inst.GetPlObj(i); if (!pl) { continue; } pl.DownTime = 0; //Force Submission Breaks if (pl.isSubmissionAtk) { pl.plCont_AI.padPush = PadBtnEnum.Atk_M; } ; if (!pl.State.ToString().Contains("Down") && !pl.isSubmissionAtk && !pl.isSubmissionDef) { pl.Start_ForceControl(global::ForceCtrlEnum.WaitMatchStart); } } //Do not perform at the start of a match. MatchMain main = MatchMain.inst; if (main.matchTime.min == 0 && main.matchTime.sec == 0) { return; } MatchSetting settings = GlobalWork.inst.MatchSetting; ////Do not perform at the start of a round //if (main.matchTime.sec == 0 && main.matchTime.min % settings.MatchTime == 0) //{ // return; //} Referee mRef = RefereeMan.inst.GetRefereeObj(); global::MatchSEPlayer.inst.PlayRefereeVoice(global::RefeVoiceEnum.Break); mRef.State = global::RefeStateEnum.CallBeforeMatch_1; mRef.ReqRefereeAnm(global::BasicSkillEnum.ROUNDF); mRef.UpdateRefereeAnm(); }
public static void SetMatchRules() { MatchSetting settings = GlobalWork.inst.MatchSetting; isBoxing = false; if (MoreMatchTypes_Form.moreMatchTypesForm.cb_boxing.Checked || MoreMatchTypes_Form.moreMatchTypesForm.cb_kickboxing.Checked && IsOneOnOne()) { isBoxing = true; isDown = false; foulCount = new int[2]; settings.isS1Rule = true; settings.isExchangeOfStriking = false; settings.isPowerCompetitionOff = true; String dqMoves = MoreMatchTypes_Form.moreMatchTypesForm.tb_dq.Text.TrimStart().TrimEnd(); if (dqMoves.Trim() != "") { dqAttacks = CreateMoveList(dqMoves); } else { dqAttacks = new List <string> { "Giant Steel Knuckles", "Brass Knuckle Punch", "Weapon Attack", "Scythe Attack", "Bite", "Testicular Claw", "Chair's Illusion", "Low Blow", "Lip Lock", "Back Low Blow", "Groin Head Drop", "Groin Knee Stamp", "Groin Stomping", "Ategai", "Bronco Buster", "Mist", "Big Fire" }; } } }
private static void SetupMatch() { MatchSetting settings = GlobalWork.inst.MatchSetting; isTag = MoreMatchTypes_Form.SurvivalRoadData.Tag; isRandom = MoreMatchTypes_Form.SurvivalRoadData.RandomSelect; playerEdit = MoreMatchTypes_Form.SurvivalRoadData.Wrestler; secondEdit = MoreMatchTypes_Form.SurvivalRoadData.Second; opponentTeam = MoreMatchTypes_Form.SurvivalRoadData.OpponentName; isRegen = MoreMatchTypes_Form.SurvivalRoadData.RegainHP; //Create Initial Wrestler List waitingOpponents = new List <WresIDGroup>(); usedOpponents = new List <WresIDGroup>(); teamList = new List <WresIDGroup>(); InitializeLists(); currOpponents = new WresIDGroup[2]; //Only a maximum of two characters per team //Setting the initial opponents currOpponents[0] = MoreMatchTypes_Form.SurvivalRoadData.InitialOpponents[0]; if (isTag) { currOpponents[1] = MoreMatchTypes_Form.SurvivalRoadData.InitialOpponents[1]; } endRound = false; endMatch = false; loserIndex = -1; gameDetails = new int[9]; teamNames = new String[2]; SetTeamNames(); //Setting game details gameDetails[0] = Convert.ToInt32(MoreMatchTypes_Form.SurvivalRoadData.Matches); gameDetails[1] = Convert.ToInt32(MoreMatchTypes_Form.SurvivalRoadData.Continues); settings.isSkipEntranceScene = true; settings.intrusionRate[0] = IntrusionRate.None; settings.intrusionRate[1] = IntrusionRate.None; global::GlobalParam.is3GamesMatch = true; global::GlobalParam.m_MacthCount = 0; settings.RoundNum = 0; MatchMain.inst.RoundCnt = 1; }
private dynamic GetSpecificGameView(dynamic arg) { var gameId = (int)arg.id; dynamic model = new ExpandoObject(); var game = GameSetting.Get(gameId); model.GameId = game.Id; model.GameName = game.Name; model.GameDescription = game.Description; var currentUser = (UserModel)Context.CurrentUser; if (!EloSetting.Exists(currentUser.Id, gameId)) { EloSetting.CreateElo(currentUser.Id, gameId); } var scoreForAllUsers = GameSetting.GetScoreForAllUsers(gameId); model.UserScores = scoreForAllUsers; var currentUserScoreModel = scoreForAllUsers.FirstOrDefault(score => score.Username == currentUser.UserName); if (currentUserScoreModel != null) { model.CurrentUserScore = currentUserScoreModel.Score; } model.Matches = MatchSetting.GetMatches(gameId, currentUser.Id); //User Information for Navigation model.Username = currentUser.UserName; model.UserId = currentUser.Id; model.UserIsAdmin = currentUser.IsAdmin; return(View["game", model]); }
public static void SetMatchRules() { isLuchaTag = false; points = new int[2]; MatchSetting settings = GlobalWork.inst.MatchSetting; playerCount = GetPlayerCount(); modifier = 0; if (playerCount < 4 || settings.BattleRoyalKind != BattleRoyalKindEnum.Off || !MoreMatchTypes_Form.moreMatchTypesForm.cb_luchaTag.Checked) { return; } else { countLimit = 0; is2Falls = MoreMatchTypes_Form.moreMatchTypesForm.cb_luchaFalls.Checked; isLuchaTag = true; settings.isOutOfRingCount = true; settings.isTornadoBattle = false; //Determine modifier for Lucha Tags if (playerCount > 4) { modifier = 1; } //Both teams begin with one point; next fall wins. if (!is2Falls) { points[0] = 1; points[1] = 1; } teamNames = new String[2]; SetTeamNames(); } }
public static void SetMatchRules() { MatchSetting settings = GlobalWork.inst.MatchSetting; isTTT = false; if (settings.arena == VenueEnum.BarbedWire || settings.arena == VenueEnum.Dodecagon || settings.BattleRoyalKind != BattleRoyalKindEnum.Off || IsOneOnOne() || settings.isS1Rule) { return; } if (MoreMatchTypes_Form.moreMatchTypesForm.cb_ttt.Checked) { isTTT = true; changeFlag = "blue"; minutePassed = 0; InitTeams(); settings.isTornadoBattle = true; settings.isCutPlay = false; critRate = settings.CriticalRate; outOfRingCount = false; settings.VictoryCondition = VictoryConditionEnum.OnlyEscape; } }
public static int GetPlayerCount() { int players = 0; MatchSetting matchSetting = global::GlobalWork.inst.MatchSetting; for (int i = 0; i < 8; i++) { Player plObj = PlayerMan.inst.GetPlObj(i); if (!plObj) { continue; } if (matchSetting.matchWrestlerInfo[plObj.PlIdx].isSecond || matchSetting.matchWrestlerInfo[plObj.PlIdx].isIntruder) { continue; } players++; } return(players); }
public static void SetMatchRules() { MatchSetting settings = GlobalWork.inst.MatchSetting; if (settings.arena == VenueEnum.BarbedWire || settings.arena == VenueEnum.Cage || settings.arena == VenueEnum.Dodecagon || settings.arena == VenueEnum.LandMine_BarbedWire || settings.arena == VenueEnum.LandMine_FluorescentLamp) { return; } if (settings.BattleRoyalKind != BattleRoyalKindEnum.Off) { return; } isUwfi = MoreMatchTypes_Form.moreMatchTypesForm.cb_uwfi.Checked; if (!isUwfi) { return; } //Populate Illegal Attacks String illegalString = MoreMatchTypes_Form.moreMatchTypesForm.tb_illegal.Text.TrimStart().TrimEnd(); if (illegalString != "") { illegalMoves = CreateMoveList(illegalString); } else { List <String> illegalMoves = new List <String>() { "Knuckle Arrow", "Knuckle Pat", "Elbow to the Crown", "Elbow Stamp", "Elbow Stamp (Neck)", "Elbow Stamp (Arm)", "Elbow Stamp (Leg)", "Stomping (Face)", "Stomping (Neck)", "Clap Kick", "Thumbing to the Eyes", "Thumbing to the Eyes B", "Face Raking", "Choke Attack", "Cobra Claw", "Headbutt", "Headbutt Rush", "Jumping Headbutt", "Leg-Lift Headbutt Rush", "No-Touch Headbutt", "Enzui Headbutt", "Manhattan Drop", "Manhattan Drop B", "Mount Headbutt", "Mount Knuckle Arrow", "Corner Headbutt Rush", "Rope Trailing", "Guillotine Whip", "Corner Strike Rush", "Mount Punches", "Back Mount Punches" }; } //Populate DQ Attacks String dqMoves = MoreMatchTypes_Form.moreMatchTypesForm.tb_dq.Text.TrimStart().TrimEnd(); if (dqMoves != "") { instantDQ = CreateMoveList(dqMoves); } else { instantDQ = new List <String>() { "Giant Steel Knuckles", "Brass Knuckle Punch", "Weapon Attack", "Scythe Attack", "Bite", "Testicular Claw", "Chair's Illusion", "Low Blow", "Lip Lock", "Back Low Blow", "Groin Head Drop", "Groin Knee Stamp", "Groin Stomping", "Ategai", "Bronco Buster", "Mist", "Big Fire" }; } settings.isLumberjack = true; settings.isFoulCount = false; settings.isOutOfRingCount = false; settings.isCutPlay = false; settings.MatchTime = 0; settings.is10CountKO = true; settings.isExchangeOfStriking = false; tdRecorded = new bool[8] { false, false, false, false, false, false, false, false }; koRecorded = new bool[8] { false, false, false, false, false, false, false, false }; foulCount = new int[2]; resultText = ""; ptEndMatch = false; fiveCount = false; points[0] = 15; points[1] = 15; //Check for multi-man teams if (settings.matchWrestlerInfo[1].entry && !settings.matchWrestlerInfo[1].isSecond && !settings.matchWrestlerInfo[1].isSecond) { points[0] = 21; } if (settings.matchWrestlerInfo[5].entry && !settings.matchWrestlerInfo[5].isSecond && !settings.matchWrestlerInfo[5].isIntruder) { points[0] = 21; } SetTeamNames(); Referee mref = RefereeMan.inst.GetRefereeObj(); bleedCeiling = 5 - mref.RefePrm.interfereTime; refName = mref.RefePrm.name; }
public static void RingSetup() { if (MoreMatchTypes_Form.moreMatchTypesForm.cb_sumo.Checked) { MoreMatchTypes_Form.moreMatchTypesForm.removeRopes.Checked = true; MoreMatchTypes_Form.moreMatchTypesForm.removePosts.Checked = true; } List <string> unwantedComponents = new List <string>(); MatchSetting settings = GlobalWork.inst.MatchSetting; if (MoreMatchTypes_Form.moreMatchTypesForm.removePosts.Checked) { MoreMatchTypes_Form.moreMatchTypesForm.removeRopes.Checked = true; } if (MoreMatchTypes_Form.moreMatchTypesForm.removeRopes.Checked) { unwantedComponents.Add("Shadow_Bottom"); unwantedComponents.Add("Shadow_Middle"); unwantedComponents.Add("Shadow_Top"); unwantedComponents.Add("Rope_Bottom"); unwantedComponents.Add("Rope_Middle"); unwantedComponents.Add("Rope_Top"); unwantedComponents.Add("Prefab_Rope(Clone)"); } if (MoreMatchTypes_Form.moreMatchTypesForm.removePosts.Checked) { unwantedComponents.Add("CornerShadow"); unwantedComponents.Add("TurnBuckle_West_A"); unwantedComponents.Add("TurnBuckle_West_B"); unwantedComponents.Add("TurnBuckle_West_C"); unwantedComponents.Add("TurnBuckle_East_A"); unwantedComponents.Add("TurnBuckle_East_B"); unwantedComponents.Add("TurnBuckle_East_C"); unwantedComponents.Add("TurnBuckle_North_A"); unwantedComponents.Add("TurnBuckle_North_B"); unwantedComponents.Add("TurnBuckle_North_C"); unwantedComponents.Add("TurnBuckle_South_A"); unwantedComponents.Add("TurnBuckle_South_B"); unwantedComponents.Add("TurnBuckle_South_C"); unwantedComponents.Add("TurnBuckle_ALL"); unwantedComponents.Add("Post_West"); unwantedComponents.Add("Post_North"); unwantedComponents.Add("Post_South"); unwantedComponents.Add("Post_East"); //Remove deathmatch items unwantedComponents.Add("WoodPlate_South"); unwantedComponents.Add("WoodPlate_North"); unwantedComponents.Add("WoodPlate_East"); unwantedComponents.Add("WoodPlate_West"); } foreach (UnityEngine.Component c in GameObject.FindObjectsOfType <UnityEngine.Component>()) { if (unwantedComponents.Contains(c.name)) { c.gameObject.SetActive(false); } } }
public static void ChangeToMatchAttire() { MatchSetting mSetting = GlobalWork.inst.MatchSetting; for (int x = 0; x < EntranceScene.inst.plIdxList.Length; x++) { int PlIdx = EntranceScene.inst.plIdxList[x]; if (needsToChangeToMatchAttire[PlIdx]) { Player plObjEnt = PlayerMan.inst.PlObj[PlIdx]; if (mSetting.matchWrestlerInfo[PlIdx].entry) { if (!mSetting.matchWrestlerInfo[PlIdx].isSecond) { if (PlIdx == 0) { try { plObjEnt.FormRen.DestroySprite(); plObjEnt.FormRen.InitTexture(cosDat1); for (int i = 0; i < 9; i++) { plObjEnt.FormRen.partsScale[i] = cosDat1.partsScale[i]; } plObjEnt.FormRen.InitSprite(false); L.D("ATTIRE EXTENSION: ATTIRE CHANGED TO MATCH"); } catch { L.D("ATTIRE EXTENSION: ATTIRE NOT CHANGED TO MATCH"); MatchWrestlerInfo w = GlobalWork.inst.MatchSetting.matchWrestlerInfo[plObj.PlIdx]; plObj.FormRen.InitTexture(SaveData.GetInst().GetEditWrestlerData(w.wrestlerID).appearanceData.costumeData[w.costume_no]); plObj.FormRen.InitSprite(false); } } else if (PlIdx == 1) { try { plObjEnt.FormRen.DestroySprite(); plObjEnt.FormRen.InitTexture(cosDat2); for (int i = 0; i < 9; i++) { plObjEnt.FormRen.partsScale[i] = cosDat2.partsScale[i]; } plObjEnt.FormRen.InitSprite(false); L.D("ATTIRE EXTENSION: ATTIRE CHANGED TO MATCH"); } catch { L.D("ATTIRE EXTENSION: ATTIRE NOT CHANGED TO MATCH"); MatchWrestlerInfo w = GlobalWork.inst.MatchSetting.matchWrestlerInfo[plObj.PlIdx]; plObj.FormRen.InitTexture(SaveData.GetInst().GetEditWrestlerData(w.wrestlerID).appearanceData.costumeData[w.costume_no]); plObj.FormRen.InitSprite(false); } } else if (PlIdx == 2) { try { plObjEnt.FormRen.DestroySprite(); plObjEnt.FormRen.InitTexture(cosDat3); for (int i = 0; i < 9; i++) { plObjEnt.FormRen.partsScale[i] = cosDat3.partsScale[i]; } plObjEnt.FormRen.InitSprite(false); L.D("ATTIRE EXTENSION: ATTIRE CHANGED TO MATCH"); } catch { L.D("ATTIRE EXTENSION: ATTIRE NOT CHANGED TO MATCH"); MatchWrestlerInfo w = GlobalWork.inst.MatchSetting.matchWrestlerInfo[plObj.PlIdx]; plObj.FormRen.InitTexture(SaveData.GetInst().GetEditWrestlerData(w.wrestlerID).appearanceData.costumeData[w.costume_no]); plObj.FormRen.InitSprite(false); } } else if (PlIdx == 3) { try { plObjEnt.FormRen.DestroySprite(); plObjEnt.FormRen.InitTexture(cosDat4); for (int i = 0; i < 9; i++) { plObjEnt.FormRen.partsScale[i] = cosDat4.partsScale[i]; } plObjEnt.FormRen.InitSprite(false); L.D("ATTIRE EXTENSION: ATTIRE CHANGED TO MATCH"); } catch { L.D("ATTIRE EXTENSION: ATTIRE NOT CHANGED TO MATCH"); MatchWrestlerInfo w = GlobalWork.inst.MatchSetting.matchWrestlerInfo[plObj.PlIdx]; plObj.FormRen.InitTexture(SaveData.GetInst().GetEditWrestlerData(w.wrestlerID).appearanceData.costumeData[w.costume_no]); plObj.FormRen.InitSprite(false); } } else if (PlIdx == 4) { try { plObjEnt.FormRen.DestroySprite(); plObjEnt.FormRen.InitTexture(cosDat5); for (int i = 0; i < 9; i++) { plObjEnt.FormRen.partsScale[i] = cosDat5.partsScale[i]; } plObjEnt.FormRen.InitSprite(false); L.D("ATTIRE EXTENSION: ATTIRE CHANGED TO MATCH"); } catch { L.D("ATTIRE EXTENSION: ATTIRE NOT CHANGED TO MATCH"); MatchWrestlerInfo w = GlobalWork.inst.MatchSetting.matchWrestlerInfo[plObj.PlIdx]; plObj.FormRen.InitTexture(SaveData.GetInst().GetEditWrestlerData(w.wrestlerID).appearanceData.costumeData[w.costume_no]); plObj.FormRen.InitSprite(false); } } else if (PlIdx == 5) { try { plObjEnt.FormRen.DestroySprite(); plObjEnt.FormRen.InitTexture(cosDat6); for (int i = 0; i < 9; i++) { plObjEnt.FormRen.partsScale[i] = cosDat6.partsScale[i]; } plObjEnt.FormRen.InitSprite(false); L.D("ATTIRE EXTENSION: ATTIRE CHANGED TO MATCH"); } catch { L.D("ATTIRE EXTENSION: ATTIRE NOT CHANGED TO MATCH"); MatchWrestlerInfo w = GlobalWork.inst.MatchSetting.matchWrestlerInfo[plObj.PlIdx]; plObj.FormRen.InitTexture(SaveData.GetInst().GetEditWrestlerData(w.wrestlerID).appearanceData.costumeData[w.costume_no]); plObj.FormRen.InitSprite(false); } } else if (PlIdx == 6) { try { plObjEnt.FormRen.DestroySprite(); plObjEnt.FormRen.InitTexture(cosDat7); for (int i = 0; i < 9; i++) { plObjEnt.FormRen.partsScale[i] = cosDat7.partsScale[i]; } plObjEnt.FormRen.InitSprite(false); L.D("ATTIRE EXTENSION: ATTIRE CHANGED TO MATCH"); } catch { L.D("ATTIRE EXTENSION: ATTIRE NOT CHANGED TO MATCH"); MatchWrestlerInfo w = GlobalWork.inst.MatchSetting.matchWrestlerInfo[plObj.PlIdx]; plObj.FormRen.InitTexture(SaveData.GetInst().GetEditWrestlerData(w.wrestlerID).appearanceData.costumeData[w.costume_no]); plObj.FormRen.InitSprite(false); } } else if (PlIdx == 7) { try { plObjEnt.FormRen.DestroySprite(); plObjEnt.FormRen.InitTexture(cosDat8); for (int i = 0; i < 9; i++) { plObjEnt.FormRen.partsScale[i] = cosDat8.partsScale[i]; } plObjEnt.FormRen.InitSprite(false); L.D("ATTIRE EXTENSION: ATTIRE CHANGED TO MATCH"); } catch { L.D("ATTIRE EXTENSION: ATTIRE NOT CHANGED TO MATCH"); MatchWrestlerInfo w = GlobalWork.inst.MatchSetting.matchWrestlerInfo[plObj.PlIdx]; plObj.FormRen.InitTexture(SaveData.GetInst().GetEditWrestlerData(w.wrestlerID).appearanceData.costumeData[w.costume_no]); plObj.FormRen.InitSprite(false); } } } } needsToChangeToMatchAttire[PlIdx] = false; } } }
public static MatchWrestlerInfo CreateWrestlerInfo(int wID) { #region Variables int num = 0; SaveData inst = SaveData.inst; MatchSetting matchSetting = GlobalWork.inst.MatchSetting; MatchWrestlerInfo matchWrestlerInfo = new MatchWrestlerInfo(); Player plObj = new Player(); matchWrestlerInfo.entry = true; matchWrestlerInfo.isSecond = false; matchWrestlerInfo.isIntruder = false; matchWrestlerInfo.assignedPad = PadPort.Num; matchWrestlerInfo.wrestlerID = (WrestlerID)wID; matchWrestlerInfo.InitialLifeRate = 1f; #endregion matchWrestlerInfo.editCtiticalMoveName = string.Empty; if (!GlobalParam.flg_IsOnline) { matchWrestlerInfo.param = DataBase.GetWrestlerParam(matchWrestlerInfo.wrestlerID); bool flag3 = matchWrestlerInfo.wrestlerID >= WrestlerID.EditWrestlerIDTop; if (flag3) { EditWrestlerData editWrestlerData = SaveData.inst.GetEditWrestlerData(matchWrestlerInfo.wrestlerID); WrestlerAppearanceData wrestlerAppearanceData = editWrestlerData.appearanceData; matchWrestlerInfo.editCtiticalMoveName = editWrestlerData.criticalMoveName; } else { WrestlerAppearanceData wrestlerAppearanceData = PresetWrestlerDataMan.inst.GetPresetAppearanceData(matchWrestlerInfo.wrestlerID); PresetWrestlerData presetWrestlerData = PresetWrestlerDataMan.inst.GetPresetWrestlerData(matchWrestlerInfo.wrestlerID); matchWrestlerInfo.editCtiticalMoveName = presetWrestlerData.criticalMoveName[(int)inst.optionSettings.language]; } } else { int[] array = new int[8]; MonoSingleton <Network> .instance.Online_Wrestler_CostumeSlot(array); Debug.Log(string.Concat(new object[] { "table[i] ", num, " / ", array[num] })); EditWrestlerData editWrestlerData2 = Online_WrestlerData.Online_EditWrestler[array[0]]; matchWrestlerInfo.param = editWrestlerData2.wrestlerParam; WrestlerAppearanceData wrestlerAppearanceData = editWrestlerData2.appearanceData; matchWrestlerInfo.editCtiticalMoveName = editWrestlerData2.criticalMoveName; } matchWrestlerInfo.group = 0; bool flag4 = matchSetting.BattleRoyalKind == BattleRoyalKindEnum.Off; if (flag4) { matchWrestlerInfo.group = num; } else { matchWrestlerInfo.group = num; } matchWrestlerInfo.costume_no = 0; matchWrestlerInfo.alignment = SaveData.inst.groupList[matchWrestlerInfo.param.groupID].alignment; bool flag5 = !matchSetting.isCarryOverHP; if (flag5) { matchWrestlerInfo.HP = 65535f * matchWrestlerInfo.InitialLifeRate; matchWrestlerInfo.SP = 65535f * matchWrestlerInfo.InitialLifeRate; matchWrestlerInfo.HP_Neck = 65535f * matchWrestlerInfo.InitialLifeRate; matchWrestlerInfo.HP_Arm = 65535f * matchWrestlerInfo.InitialLifeRate; matchWrestlerInfo.HP_Waist = 65535f * matchWrestlerInfo.InitialLifeRate; matchWrestlerInfo.HP_Leg = 65535f * matchWrestlerInfo.InitialLifeRate; } return(matchWrestlerInfo); }
//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); }