public static void SetLosers(int startIndex, PlayerMan p) { try { for (int i = startIndex; i < startIndex + 4; i++) { if (p.GetPlObj(i)) { p.GetPlObj(i).isLoseAndStop = true; } } } catch { return; } }
public static bool SetVictoryConditions() { if (!isIronMan) { return(false); } else { Referee matchRef = RefereeMan.inst.GetRefereeObj(); MatchMain main = MatchMain.inst; if (main.isTimeUp) { endMatch = true; main.isMatchEnd = true; matchRef.PlDir = PlDirEnum.Left; matchRef.ReqRefereeAnm(BasicSkillEnum.Refe_Stand_MatchEnd_Front_Left); matchRef.State = RefeStateEnum.DeclareVictory; Announcer.inst.PlayGong_MatchEnd(); //Determine the winner PlayerMan p = PlayerMan.inst; if (wins[0] > wins[1]) { global::MatchEvaluation.inst.ResultType = global::MatchResultEnum.KO; matchRef.SentenceLose(p.GetPlObj(4).PlIdx); SetLosers(4, p); } else if (wins[0] < wins[1]) { global::MatchEvaluation.inst.ResultType = global::MatchResultEnum.KO; matchRef.SentenceLose(p.GetPlObj(0).PlIdx); SetLosers(0, p); } return(true); } else { return(false); } } }
public static void PreMatchTaunts() { if (!tauntCheck) { MatchMain mm = MatchMain.inst; if (mm.isTimeCounting) { PlayerMan pm = PlayerMan.inst; Player p1 = pm.GetPlObj(0); Player p2 = pm.GetPlObj(4); if (p1 == null || p2 == null) { return; } string p1name = DataBase.GetWrestlerFullName(p1.WresParam); string p2name = DataBase.GetWrestlerFullName(p2.WresParam); if (tauntList.Contains(p1name) && tauntList.Contains(p2name)) { int edit1TauntNo = tauntDat[tauntList.IndexOf(p1name)]; int edit2TauntNo = tauntDat[tauntList.IndexOf(p2name)]; SkillSlotEnum skill1 = new SkillSlotEnum(); SkillSlotEnum skill2 = new SkillSlotEnum(); // EDIT 1 TAUNT if (edit1TauntNo == 5) { skill1 = SkillSlotEnum.Performance_Enter; } else if (edit1TauntNo == 1) { skill1 = SkillSlotEnum.Performance_1; } else if (edit1TauntNo == 2) { skill1 = SkillSlotEnum.Performance_2; } else if (edit1TauntNo == 3) { skill1 = SkillSlotEnum.Performance_3; } else if (edit1TauntNo == 4) { skill1 = SkillSlotEnum.Performance_4; } // EDIT 2 TAUNT if (edit2TauntNo == 5) { skill2 = SkillSlotEnum.Performance_Enter; } else if (edit2TauntNo == 1) { skill2 = SkillSlotEnum.Performance_1; } else if (edit2TauntNo == 2) { skill2 = SkillSlotEnum.Performance_2; } else if (edit2TauntNo == 3) { skill2 = SkillSlotEnum.Performance_3; } else if (edit2TauntNo == 4) { skill2 = SkillSlotEnum.Performance_4; } p1.animator.StartSlotAnm_Immediately(skill1, 0, true, p1.TargetPlIdx); p2.animator.StartSlotAnm_Immediately(skill2, 0, true, p2.TargetPlIdx); tauntCheck = true; } } } }
public static void LoadAttire() { GlobalWork gw = GlobalWork.inst; PlayerMan pm = PlayerMan.inst; SaveData saveData = SaveData.inst; for (int pl = 0; pl < 8; pl++) { needsToChangeToMatchAttire[pl] = false; if (gw.MatchSetting.matchWrestlerInfo[pl].entry) { plObj = pm.GetPlObj(pl); //string[] list = Directory.GetFiles("./AceModsData/AttireExtension/", DataBase.GetWrestlerFullName(plObj.WresParam) + "*.*"); DirectoryInfo di = new DirectoryInfo("./AceModsData/AttireExtension/"); FileInfo[] files = di.GetFiles(DataBase.GetWrestlerFullName(plObj.WresParam) + "*.cos"); if (files.Length > 0) { //MessageBox.Show(files.Length.ToString()); Attire_Select attireSelect = new Attire_Select(files, pl); attireSelect.ShowDialog(); if (File.Exists("./AceModsData/AttireExtension/" + DataBase.GetWrestlerFullName(plObj.WresParam) + attireSelect.chosenAttire + ".cos")) { StreamReader cdReader = new StreamReader("./AceModsData/AttireExtension/" + DataBase.GetWrestlerFullName(plObj.WresParam) + attireSelect.chosenAttire + ".cos"); CostumeData loadedCostumeData = new CostumeData(); while (cdReader.Peek() != -1) { loadedCostumeData.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { loadedCostumeData.layerTex[i, j] = cdReader.ReadLine(); loadedCostumeData.color[i, j].r = float.Parse(cdReader.ReadLine()); loadedCostumeData.color[i, j].g = float.Parse(cdReader.ReadLine()); loadedCostumeData.color[i, j].b = float.Parse(cdReader.ReadLine()); loadedCostumeData.color[i, j].a = float.Parse(cdReader.ReadLine()); loadedCostumeData.highlightIntensity[i, j] = float.Parse(cdReader.ReadLine()); } loadedCostumeData.partsScale[i] = float.Parse(cdReader.ReadLine()); } entAttire = cdReader.ReadLine(); } cdReader.Dispose(); cdReader.Close(); bool check = false; if (!String.IsNullOrEmpty(entAttire)) { if (gw.MatchSetting.BattleRoyalKind != BattleRoyalKindEnum.RoyalRumble) { if (!gw.MatchSetting.isSkipEntranceScene) { if (gw.MatchSetting.arena != VenueEnum.BarbedWire && gw.MatchSetting.arena != VenueEnum.Cage && gw.MatchSetting.arena != VenueEnum.Dodecagon && gw.MatchSetting.arena != VenueEnum.Dojo && gw.MatchSetting.arena != VenueEnum.LandMine_BarbedWire && gw.MatchSetting.arena != VenueEnum.LandMine_FluorescentLamp && gw.MatchSetting.arena != VenueEnum.YurakuenHall) { check = true; } } } } if (check) { needsToChangeToMatchAttire[pl] = true; StreamReader cdReader2 = new StreamReader("./AceModsData/AttireExtension/" + entAttire + ".cos"); CostumeData loadedCostumeDataEnt = new CostumeData(); while (cdReader2.Peek() != -1) { loadedCostumeDataEnt.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { loadedCostumeDataEnt.layerTex[i, j] = cdReader2.ReadLine(); loadedCostumeDataEnt.color[i, j].r = float.Parse(cdReader2.ReadLine()); loadedCostumeDataEnt.color[i, j].g = float.Parse(cdReader2.ReadLine()); loadedCostumeDataEnt.color[i, j].b = float.Parse(cdReader2.ReadLine()); loadedCostumeDataEnt.color[i, j].a = float.Parse(cdReader2.ReadLine()); loadedCostumeDataEnt.highlightIntensity[i, j] = float.Parse(cdReader2.ReadLine()); } loadedCostumeDataEnt.partsScale[i] = float.Parse(cdReader2.ReadLine()); } } try { plObj.FormRen.DestroySprite(); plObj.FormRen.InitTexture(loadedCostumeDataEnt); for (int i = 0; i < 9; i++) { plObj.FormRen.partsScale[i] = loadedCostumeDataEnt.partsScale[i]; } plObj.FormRen.InitSprite(false); L.D("ATTIRE EXTENSION: ATTIRE CHANGED TO ENTRANCE ATTIRE"); } catch { L.D("ATTIRE EXTENSION: ATTIRE NOT CHANGED TO ENTRANCE ATTIRE"); 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[pl] = false; } if (pl == 0) { cosDat1.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat1.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat1.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat1.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat1.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat1.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat1.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat1.partsScale[i] = loadedCostumeData.partsScale[i]; } } else if (pl == 1) { cosDat2.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat2.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat2.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat2.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat2.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat2.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat2.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat2.partsScale[i] = loadedCostumeData.partsScale[i]; } } else if (pl == 2) { cosDat3.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat3.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat3.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat3.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat3.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat3.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat3.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat3.partsScale[i] = loadedCostumeData.partsScale[i]; } } else if (pl == 3) { cosDat4.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat4.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat4.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat4.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat4.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat4.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat4.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat4.partsScale[i] = loadedCostumeData.partsScale[i]; } } else if (pl == 4) { cosDat5.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat5.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat5.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat5.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat5.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat5.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat5.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat5.partsScale[i] = loadedCostumeData.partsScale[i]; } } else if (pl == 5) { cosDat6.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat6.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat6.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat6.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat6.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat6.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat6.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat6.partsScale[i] = loadedCostumeData.partsScale[i]; } } else if (pl == 6) { cosDat7.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat7.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat7.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat7.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat7.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat7.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat7.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat7.partsScale[i] = loadedCostumeData.partsScale[i]; } } else if (pl == 7) { cosDat8.valid = true; for (int i = 0; i < 9; i++) { for (int j = 0; j < 16; j++) { cosDat8.layerTex[i, j] = loadedCostumeData.layerTex[i, j]; cosDat8.color[i, j].r = loadedCostumeData.color[i, j].r; cosDat8.color[i, j].g = loadedCostumeData.color[i, j].g; cosDat8.color[i, j].b = loadedCostumeData.color[i, j].b; cosDat8.color[i, j].a = loadedCostumeData.color[i, j].a; cosDat8.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j]; } cosDat8.partsScale[i] = loadedCostumeData.partsScale[i]; } } } else { try { plObj.FormRen.DestroySprite(); plObj.FormRen.InitTexture(loadedCostumeData); for (int i = 0; i < 9; i++) { plObj.FormRen.partsScale[i] = loadedCostumeData.partsScale[i]; } plObj.FormRen.InitSprite(false); L.D("ATTIRE EXTENSION: ATTIRE CHANGED"); } catch { L.D("ATTIRE EXTENSION: ATTIRE NOT CHANGED"); 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); } } } attireSelect.Dispose(); } } } }