public void JNS0202Action(Player player, int type, string fuse, string argst) { if (type == 0) { ushort card = ushort.Parse(argst); XI.RaiseGMessage("G0CC," + player.Uid + ",0," + player.Uid + ",JP03," + card + ";0," + fuse); } else if (type == 1) { foreach (Tux tux in XI.LibTuple.TL.Firsts.Where(p => p.Type == Tux.TuxType.JP)) player.AddToPrice(tux.Code, false, "JNS0202", '=', 1); } else if (type == 2) { foreach (Tux tux in XI.LibTuple.TL.Firsts.Where(p => p.Type == Tux.TuxType.JP)) player.RemoveFromPrice(tux.Code, false, "JNS0202"); } }
public void JNH1401Action(Player player, int type, string fuse, string argst) { if (type == 0) { foreach (Tux tux in XI.LibTuple.TL.Firsts.Where(p => p.Type == Tux.TuxType.ZP)) player.AddToPrice(tux.Code, false, "JNH1401", '=', 1); //player.SetZPDisabled("JNH1401", true); } else if (type == 1) { foreach (Tux tux in XI.LibTuple.TL.Firsts.Where(p => p.Type == Tux.TuxType.ZP)) player.RemoveFromPrice(tux.Code, false, "JNH1401"); //player.SetZPDisabled("JNH1401", false); } else if (type == 2) { int hdx = fuse.IndexOf(';'); string[] g0cc = Algo.Substring(fuse, 0, hdx).Split(','); int kdx = fuse.IndexOf(',', hdx); string origin = Algo.Substring(fuse, kdx + 1, -1); if (origin.StartsWith("G")) { string cardname = g0cc[4]; int inType = int.Parse(Algo.Substring(fuse, hdx + 1, kdx)); Base.Card.Tux tux = XI.LibTuple.TL.EncodeTuxCode(cardname); int prior = tux.Priorities[inType]; XI.InnerGMessage(origin, prior); } } }
public void JNT3902Action(Player player, int type, string fuse, string argst) { if (type == 0) // G0IS { List<Tux> wqs = XI.LibTuple.TL.Firsts.Where(p => p.Type == Tux.TuxType.WQ).ToList(); wqs.ForEach(p => player.AddToPrice(p.Code, false, "JNT3902", '=', 2)); XI.RaiseGMessage(new Artiad.EqSlotVariation() { Who = player.Uid, Slot = Artiad.ClothingHelper.SlotType.WQ, Increase = false }.ToMessage()); } else if (type == 1) // G0OS { List<Tux> wqs = XI.LibTuple.TL.Firsts.Where(p => p.Type == Tux.TuxType.WQ).ToList(); wqs.ForEach(p => player.RemoveFromPrice(p.Code, false, "JNT3902")); XI.RaiseGMessage(new Artiad.EqSlotVariation() { Who = player.Uid, Slot = Artiad.ClothingHelper.SlotType.WQ, Increase = true }.ToMessage()); } else if (type == 2) { int nfj = Artiad.EqImport.Parse(fuse).Imports.Count(p => p.Who == player.Uid && p.GetActualCardAs(XI).Type == Base.Card.Tux.TuxType.FJ); if (nfj > 0) XI.RaiseGMessage("G0IX," + player.Uid + ",0," + nfj); int nxb = Artiad.EqImport.Parse(fuse).Imports.Count(p => p.Who == player.Uid && p.GetActualCardAs(XI).Type == Base.Card.Tux.TuxType.XB); if (nxb > 0) XI.RaiseGMessage("G0IA," + player.Uid + ",0," + nxb); } else if (type == 3) { int nfj = Artiad.EqExport.Parse(fuse).Exports.Count(p => p.Who == player.Uid && p.GetActualCardAs(XI).Type == Base.Card.Tux.TuxType.FJ); if (nfj > 0) XI.RaiseGMessage("G0OX," + player.Uid + ",0," + nfj); int nxb = Artiad.EqExport.Parse(fuse).Exports.Count(p => p.Who == player.Uid && p.GetActualCardAs(XI).Type == Base.Card.Tux.TuxType.XB); if (nxb > 0) XI.RaiseGMessage("G0OA," + player.Uid + ",0," + nxb); } // type == 4, only called. }
public static void LoadDefaultPrice(Player player) { player.ClearPrice(); player.AddToPrice("JP03", false, "0", '=', 1); player.AddToPrice("WQ04", false, "0", '=', 2); player.AddToPrice("WQ04", true, "0", '=', 2); player.AddToPrice("JPH4", false, "0", '=', 2); }
public void JNT1903Action(Player player, int type, string fuse, string argst) { if (type == 0) { player.AddToPrice("WQ04", false, "JNT1903", '!', 0); player.AddToPrice("WQ04", true, "JNT1903", '!', 0); } else if (type == 1) { player.RemoveFromPrice("WQ04", false, "JNT1903"); player.RemoveFromPrice("WQ04", true, "JNT1903"); } else if (type == 2) { ushort ut = XI.LibTuple.TL.UniqueEquipSerial("WQ04"); XI.RaiseGMessage("G2CN,0,1"); XI.RaiseGMessage("G0HQ,2," + player.Uid + ",0,0," + ut); XI.Board.TuxDises.Remove(ut); Artiad.Abandon ab = Artiad.Abandon.Parse(fuse); if (Artiad.CustomsHelper.RemoveCards(ab, ut)) XI.InnerGMessage(ab.ToMessage(), 141); } }