当前位置: 首页>>代码示例>>C#>>正文


C# Player.ListOutAllEquips方法代码示例

本文整理汇总了C#中Player.ListOutAllEquips方法的典型用法代码示例。如果您正苦于以下问题:C# Player.ListOutAllEquips方法的具体用法?C# Player.ListOutAllEquips怎么用?C# Player.ListOutAllEquips使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Player的用法示例。


在下文中一共展示了Player.ListOutAllEquips方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CZ01Valid

 public bool CZ01Valid(Player player, string fuse)
 {
     ushort who = (ushort)(fuse[fuse.IndexOf('R') + 1] - '0');
     var tl = XI.LibTuple.TL;
     return player.Uid == who && (player.Tux.Any(p => player.GetPrice(tl.DecodeTux(p).Code, false) > 0) ||
             player.ListOutAllEquips().Any(p => player.GetPrice(tl.DecodeTux(p).Code, true) > 0));
 }
开发者ID:palome06,项目名称:psd48,代码行数:7,代码来源:CZ02.cs

示例2: CZ01Input

 public string CZ01Input(Player player, string fuse, string prev)
 {
     if (prev != "")
         return "";
     else
     {
         var tl = XI.LibTuple.TL;
         List<ushort> goods = new List<ushort>();
         goods.AddRange(player.Tux.Where(p => player.GetPrice(tl.DecodeTux(p).Code, false) > 0));
         if (!player.WeaponDisabled)
             goods.AddRange(player.ListOutAllEquips().Where(p => player.GetPrice(tl.DecodeTux(p).Code, true) > 0));
         return "/Q1(p" + string.Join("p", goods) + ")";
     }
 }
开发者ID:palome06,项目名称:psd48,代码行数:14,代码来源:CZ02.cs

示例3: JN30403Input

 public string JN30403Input(Player player, int type, string fuse, string prev)
 {
     if (prev == "")
         return "/Q1(p" + string.Join("p", player.ListOutAllEquips()) + ")";
     else if (!prev.Contains(","))
         return "/T1" + AAllTareds(player);
     else return "";
 }
开发者ID:palome06,项目名称:psd48,代码行数:8,代码来源:XJ405.cs

示例4: JN30303Valid

        public bool JN30303Valid(Player player, int type, string fuse)
        {
            if (player.IsSKOpt && !XI.Board.IsAttendWarSucc(player))
                return false;

            List<ushort> equips = player.ListOutAllEquips().ToList();
            foreach (string ce in XI.Board.CsEqiups)
            {
                int idx = ce.IndexOf(',');
                ushort who = ushort.Parse(ce.Substring(0, idx));
                ushort card = ushort.Parse(ce.Substring(idx + 1));
                if (who == player.Uid)
                    equips.Remove(card);
            }
            return equips.Count > 0;
        }
开发者ID:palome06,项目名称:psd48,代码行数:16,代码来源:XJ405.cs

示例5: JN30303Input

 public string JN30303Input(Player player, int type, string fuse, string prev)
 {
     if (prev == "")
     {
         List<ushort> equips = player.ListOutAllEquips().ToList();
         foreach (string ce in XI.Board.CsEqiups)
         {
             int idx = ce.IndexOf(',');
             ushort who = ushort.Parse(ce.Substring(0, idx));
             ushort card = ushort.Parse(ce.Substring(idx + 1));
             if (who == player.Uid)
                 equips.Remove(card);
         }
         return "/Q1(p" + string.Join("p", equips) + ")";
     }
     else return "";
 }
开发者ID:palome06,项目名称:psd48,代码行数:17,代码来源:XJ405.cs

示例6: JN60201Valid

        public bool JN60201Valid(Player player, int type, string linkFuse)
        {
            int lfidx = linkFuse.IndexOf(':');
            // linkHeads = { "TP02,0", "TP03,0" };
            string[] linkHeads = linkFuse.Substring(0, lfidx).Split('&');
            string fuse = linkFuse.Substring(lfidx + 1);

            foreach (string linkHeadComp in linkHeads)
            {
                int lastIdx = linkHeadComp.LastIndexOf(',');
                string linkHead = linkHeadComp.Substring(0, lastIdx);
                string rawFuse = linkHeadComp.Substring(lastIdx + 1);
                if (!Artiad.ContentRule.IsFuseMatch(rawFuse, fuse, XI.Board))
                    continue;
                List<string> relateds = XI.Sk03[linkHead].ToList();
                relateds.Add(linkHead);
                // relateds = { "TP03,0", "FJ02,0!0" };
                foreach (string rlink in relateds)
                {
                    if (rlink.StartsWith("JN60201"))
                        continue;
                    int rcmIdx = rlink.IndexOf(',');
                    string rName = Algo.Substring(rlink, 0, rcmIdx);
                    int pdIdx = rlink.IndexOf('!', rcmIdx + 1);
                    if (pdIdx < 0) // Not equip special case
                    {
                        int tType = int.Parse(rlink.Substring(rcmIdx + 1));
                        foreach (ushort ut in player.Tux)
                        {
                            Tux tux = XI.LibTuple.TL.DecodeTux(ut);
                            if (tux.Code == rName && tux.Bribe(player, tType, fuse))
                            {
                                var vs = XI.Board.Garden.Values.Where(p => p.IsTared && p.Uid != player.Uid).ToList();
                                if ((rName == "TP01" || rName == "TPT3") && player.IsSKOpt)
                                    vs = vs.Where(p => p.Team == player.Team).ToList();
                                if (vs.Any(p => tux.Valid(p, tType, fuse)))
                                    return true;
                            }
                        }
                    }
                    else
                    {
                        int tConsType = int.Parse(Algo.Substring(rlink, rcmIdx + 1, pdIdx));
                        int tType = (pdIdx < 0) ? -1 : int.Parse(rlink.Substring(pdIdx + 1));
                        foreach (ushort ut in player.ListOutAllEquips())
                        {
                            Base.Card.TuxEqiup tux = XI.LibTuple.TL.DecodeTux(ut) as Base.Card.TuxEqiup;
                            if (tux != null && tux.Code == rName)
                            {
                                var vs = XI.Board.Garden.Values.Where(p => p.IsTared && p.Uid != player.Uid).ToList();
                                foreach (Player py in vs)
                                {
                                    if (tux.ConsumeValidHolder(player, py, tConsType, tType, linkFuse))
                                        return true;
                                }
                            }
                        }
                    }
                }
            }
            return false;
        }
开发者ID:palome06,项目名称:psd48,代码行数:62,代码来源:XJ405.cs

示例7: JN60201Input

        public string JN60201Input(Player player, int type, string linkFuse, string prev)
        {
            int lfidx = linkFuse.IndexOf(':');
            // linkHeads = { "TP02,0", "TP03,0" };
            string[] linkHeads = linkFuse.Substring(0, lfidx).Split('&');
            string fuse = linkFuse.Substring(lfidx + 1);

            ushort targetTo, tuxTo; string rest;
            if (prev == "") { targetTo = 0; tuxTo = 0; rest = ""; }
            else if (prev.IndexOf(',') < 0)
            {
                targetTo = ushort.Parse(prev);
                tuxTo = 0; rest = "";
            }
            else
            {
                string[] parts = prev.Split(',');
                targetTo = ushort.Parse(parts[0]);
                tuxTo = ushort.Parse(parts[1]);
                rest = string.Join(",", Algo.TakeRange(parts, 2, parts.Length));
            }
            List<ushort> usefulPlayer = new List<ushort>();
            List<ushort> usefulTux = new List<ushort>();
            string nextAsk = "";

            System.Func<ushort, Player, int, bool> tuxUsable = (ut, py, tType) =>
            {
                Tux tux = XI.LibTuple.TL.DecodeTux(ut);
                if (tux == null) { return false; }
                string tfuse = tux.IsLinked(tType) ? linkFuse : fuse;
                return tux.Bribe(player, tType, tfuse) && tux.Valid(py, tType, tfuse);
            };
            System.Func<ushort, Player, int, int, bool> eqUsable = (ut, py, tConsume, tType) =>
            {
                TuxEqiup tue = XI.LibTuple.TL.DecodeTux(ut) as TuxEqiup;
                if (tue == null) { return false; }
                string tfuse = tue.IsLinked(tConsume, tType) ? linkFuse : fuse;
                return tue.ConsumeValidHolder(player, py, tConsume, tType, tfuse);
            };

            foreach (string linkHeadComp in linkHeads)
            {
                int lastIdx = linkHeadComp.LastIndexOf(',');
                string linkHead = linkHeadComp.Substring(0, lastIdx);
                string rawFuse = linkHeadComp.Substring(lastIdx + 1);
                if (!Artiad.ContentRule.IsFuseMatch(rawFuse, fuse, XI.Board))
                    continue;
                List<string> relateds = XI.Sk03[linkHead].ToList();
                relateds.Add(linkHead);
                // relateds = { "TP03,0", "FJ02,0!0" };
                foreach (string rlink in relateds)
                {
                    if (rlink.StartsWith("JN60201"))
                        continue;
                    int rcmIdx = rlink.IndexOf(',');
                    string rName = Algo.Substring(rlink, 0, rcmIdx);
                    int pdIdx = rlink.IndexOf('!', rcmIdx + 1);
                    if (pdIdx < 0) // Not equip special case
                    {
                        int tType = int.Parse(rlink.Substring(rcmIdx + 1));
                        if (targetTo == 0)
                        {
                            List<ushort> tuxesWithCode = player.Tux.Where(p =>
                                XI.LibTuple.TL.DecodeTux(p).Code == rName).ToList();
                            usefulPlayer.AddRange(XI.Board.Garden.Values.Where(p => p.IsTared && p.Uid != player.Uid &&
                                tuxesWithCode.Any(q => tuxUsable(q, p, tType))).Select(p => p.Uid));
                        }
                        else if (tuxTo == 0)
                        {
                            Player py = XI.Board.Garden[targetTo];
                            usefulTux.AddRange(player.Tux.Where(p =>
                                XI.LibTuple.TL.DecodeTux(p).Code == rName && tuxUsable(p, py, tType)));
                        }
                        else
                        {
                            Player py = XI.Board.Garden[targetTo];
                            Tux tux = XI.LibTuple.TL.DecodeTux(tuxTo);
                            if (tux != null && tux.Code == rName)
                            {
                                string tfuse = tux.IsLinked(tType) ? linkFuse : fuse;
                                nextAsk = tux.InputHolder(player, py, tType, tfuse, rest); break;
                            }
                        }
                    }
                    else
                    {
                        int tConsType = int.Parse(Algo.Substring(rlink, rcmIdx + 1, pdIdx));
                        int tType = int.Parse(rlink.Substring(pdIdx + 1));
                        if (targetTo == 0)
                        {
                            List<ushort> tuxesWithCode = player.ListOutAllEquips().Where(p =>
                                XI.LibTuple.TL.DecodeTux(p).Code == rName).ToList();
                            usefulPlayer.AddRange(XI.Board.Garden.Values.Where(p => p.IsTared && p.Uid != player.Uid &&
                                tuxesWithCode.Any(q => eqUsable(q, p, tConsType, tType))).Select(p => p.Uid));
                        }
                        else if (tuxTo == 0)
                        {
                            Player py = XI.Board.Garden[targetTo];
                            usefulTux.AddRange(player.ListOutAllEquips().Where(p =>
                                XI.LibTuple.TL.DecodeTux(p).Code == rName && eqUsable(p, py, tConsType, tType)));
//.........这里部分代码省略.........
开发者ID:palome06,项目名称:psd48,代码行数:101,代码来源:XJ405.cs

示例8: JN50401Valid

 public bool JN50401Valid(Player player, int type, string fuse)
 {
     return player.ListOutAllEquips().Count > 0 && XI.Board.Garden.Values.Any(p => p.IsTared &&
         p.Uid != player.Uid && !player.RAM.GetOrSetUshortArray("Present").Contains(p.Uid));
 }
开发者ID:palome06,项目名称:psd48,代码行数:5,代码来源:XJ405.cs

示例9: JN50401Input

 public string JN50401Input(Player player, int type, string fuse, string prev)
 {
     if (prev == "")
     {
         string c = "/Q1(p" + string.Join("p", player.ListOutAllEquips()) + ")";
         string t = "/T1" + FormatPlayers(p => p.IsTared && p.Uid != player.Uid &&
             !player.RAM.GetOrSetUshortArray("Present").Contains(p.Uid));
         return "#装备," + c + "," + t;
     }
     else return "";
 }
开发者ID:palome06,项目名称:psd48,代码行数:11,代码来源:XJ405.cs

示例10: GST2IncrAction

 public void GST2IncrAction(Player player)
 {
     //Base.Card.Monster mon = XI.LibTuple.ML.Decode(XI.LibTuple.ML.Encode("GST2"));
     //if (mon != null)
     //    mon.RAMUshort = 1;
     foreach (ushort ut in player.ListOutAllEquips())
     {
         var tx = XI.LibTuple.TL.DecodeTux(ut);
         if (tx.IsTuxEqiup())
         {
             Base.Card.TuxEqiup te = tx as Base.Card.TuxEqiup;
             if (te != null && !((te.Type == Tux.TuxType.FJ && player.ArmorDisabled) || (
                 te.Type == Tux.TuxType.WQ && player.WeaponDisabled) || (
                 te.Type == Tux.TuxType.XB && player.TroveDisabled)))
             {
                 if (te.IncrOfSTR > 0)
                     XI.RaiseGMessage("G0IA," + player.Uid + ",0,1");
                 if (te.IncrOfDEX > 0)
                     XI.RaiseGMessage("G0IX," + player.Uid + ",0,1");
             }
         }
     }
 }
开发者ID:palome06,项目名称:psd48,代码行数:23,代码来源:FG04.cs

示例11: SJH10

        public void SJH10(Player rd)
        {
            List<ushort> possible = new List<ushort>();
            if (rd.Tux.Count > 0)
                possible.Add(0);
            if (rd.GetEquipCount() > 0)
                possible.Add(1);
            if (rd.Runes.Count > 0)
                possible.Add(2);
            if (rd.Escue.Count > 0)
                possible.Add(3);
            string[] name = { "手牌", "装备牌", "标记", "助战NPC" };
            if (possible.Count > 0)
            {
                string select = XI.AsyncInput(rd.Uid, "#请选择要全部弃置的牌类型##" +
                    string.Join("##", possible.Select(p => name[p])) + ",Y" + possible.Count, "SJH10", "0");
                if (select != VI.CinSentinel)
                {
                    ushort pick = possible[int.Parse(select) - 1];
                    if (pick == 0)
                    {
                        XI.RaiseGMessage("G0DH," + rd.Uid + ",2," + rd.Tux.Count);
                        XI.RaiseGMessage("G0DH," + rd.Uid + ",0,1");
                    }
                    if (pick == 1)
                    {
                        XI.RaiseGMessage("G0QZ," + rd.Uid + "," + string.Join(",", rd.ListOutAllEquips()));
                        System.Func<ushort, bool> isEq = (p) => XI.LibTuple.TL.DecodeTux(p).IsTuxEqiup();
                        List<ushort> picks = Artiad.Procedure.CardHunter(XI, Card.PileGenre.Tux,
                            (p) => isEq(p), (a, r) => a.Any(p => isEq(p)), false);
                        if (picks.Count > 0)
                            XI.RaiseGMessage("G0HQ,2," + rd.Uid + ",0,0," + picks.Single());
                    }
                    else if (pick == 2)
                    {
                        XI.RaiseGMessage("G0OF," + rd.Uid + "," + string.Join(",", rd.Runes));
                        string obtain = XI.AsyncInput(rd.Uid, "#获得标记,F1(p" + string.Join("p",
                            XI.LibTuple.RL.GetFullAppendableList()) +")", "SJH10", "1");
                        if (!obtain.StartsWith(VI.CinSentinel))
                            XI.RaiseGMessage("G0IF," + rd.Uid + "," + obtain);
                    }
                    else if (pick == 3)
                    {
                        XI.RaiseGMessage("G2OL," + string.Join(",", rd.Escue.Select(p => rd.Uid + "," + p)));
                        XI.RaiseGMessage(new Artiad.Abandon()
                        {
                            Zone = Artiad.CustomsHelper.ZoneType.PLAYER,
                            Genre = Card.Genre.NMB,
                            SingleUnit = new Artiad.CustomsUnit()
                            {
                                Source = rd.Uid,
                                Cards = rd.Escue.ToArray()
                            }
                        }.ToMessage());
                        rd.Escue.Clear();

                        ushort pop = XI.Board.RestNPCPiles.Dequeue();
                        XI.RaiseGMessage(new Artiad.ImperialLeft()
                        {
                            Zone = Artiad.ImperialLeft.ZoneType.W,
                            Trigger = rd.Uid,
                            Card = pop
                        }.ToMessage());
                        ushort wang = XI.Board.Wang.Peek();
                        NPC npc = XI.LibTuple.NL.Decode(NMBLib.OriginalNPC(wang));
                        UEchoCode r5ed = XI.HandleWithNPCEffect(rd, npc, "SJH10");
                        if (r5ed == UEchoCode.NO_OPTIONS)
                            XI.AsyncInput(rd.Uid, "#无法执行,//", "SJH10", "2");
                        if (r5ed == UEchoCode.END_ACTION)
                            XI.RaiseGMessage("G1YP," + rd.Uid + "," + wang);

                        if (XI.Board.Wang.Count > 0 && XI.Board.Wang.Peek() == wang)
                        { // In case the NPC has been taken away
                            XI.RaiseGMessage(new Artiad.ImperialLeft()
                            {
                                Zone = Artiad.ImperialLeft.ZoneType.W,
                                IsReset = true
                            }.ToMessage());
                            XI.RaiseGMessage(new Artiad.Abandon()
                            {
                                Zone = Artiad.CustomsHelper.ZoneType.EXPLICIT,
                                Genre = Card.Genre.NMB,
                                SingleUnit = new Artiad.CustomsUnit() { SingleCard = wang }
                            }.ToMessage());
                        }
                    }
                }
            }
        }
开发者ID:palome06,项目名称:psd48,代码行数:89,代码来源:SJ101.cs

示例12: JNH1703Action

 public void JNH1703Action(Player player, int type, string fuse, string argst)
 {
     ushort tar = ushort.Parse(argst);
     List<ushort> eqs = player.ListOutAllEquips().ToList();
     if (eqs.Count > 0)
         XI.RaiseGMessage("G0QZ," + player.Uid + "," + string.Join(",", eqs));
     int hp = player.HP;
     XI.RaiseGMessage("G0HQ,0," + tar + "," + player.Uid + ",2," + player.Tux.Count);
     Cure(player, XI.Board.Garden[tar], hp);
     Harm(player, player, hp, FiveElement.A, (long)HPEvoMask.TERMIN_AT);
     Artiad.Procedure.ArticuloMortis(XI, XI.WI, false);
 }
开发者ID:palome06,项目名称:psd48,代码行数:12,代码来源:HL014.cs

示例13: JNT0701BKValid

        public bool JNT0701BKValid(Player player, int type, string linkFuse, ushort owner)
        {
            if (player.Uid == owner)
                return false;
            Player opy = XI.Board.Garden[owner];
            if (player.Team != opy.Team)
                return false;
            int lfidx = linkFuse.IndexOf(':');
            string[] linkHeads = linkFuse.Substring(0, lfidx).Split('&');
            string fuse = linkFuse.Substring(lfidx + 1);

            foreach (string linkHeadComp in linkHeads)
            {
                int lastIdx = linkHeadComp.LastIndexOf(',');
                string linkHead = linkHeadComp.Substring(0, lastIdx);
                string rawFuse = linkHeadComp.Substring(lastIdx + 1);
                if (!Artiad.ContentRule.IsFuseMatch(rawFuse, fuse, XI.Board))
                    continue;
                List<string> relateds = XI.Sk03[linkHead].ToList();
                relateds.Add(linkHead);
                // relateds = { "TP03,0", "FJ02,0!0" };
                foreach (string rlink in relateds)
                {
                    if (rlink.StartsWith("JNT0701"))
                        continue;
                    int rcmIdx = rlink.IndexOf(',');
                    string rName = Algo.Substring(rlink, 0, rcmIdx);
                    int pdIdx = rlink.IndexOf('!', rcmIdx + 1);
                    if (pdIdx < 0) // Not equip special case
                    {
                        int tType = int.Parse(rlink.Substring(rcmIdx + 1));
                        //foreach (ushort ut in player.Tux)
                        //{
                        //    Base.Card.Tux tux = XI.LibTuple.TL.DecodeTux(ut);
                        //    if (tux != null && tux.Code == rName)
                        //        if (tux.Bribe(opy, tType, fuse) && tux.Valid(opy, tType, fuse))
                        //            return true;
                        //}
                        Base.Card.Tux tux = XI.LibTuple.TL.EncodeTuxCode(rName);
                        if (player.Tux.Count > 0 && tux != null)
                        {
                            string tfuse = tux.IsLinked(tType) ? linkFuse : fuse;
                            if (tux.Bribe(opy, tType, fuse) && tux.Valid(opy, tType, tfuse))
                                return true;
                        }
                    }
                    else
                    {
                        int tConsType = int.Parse(rlink.Substring(pdIdx + 1));
                        int tType = int.Parse(Algo.Substring(rlink, rcmIdx + 1, pdIdx));
                        foreach (ushort ut in player.ListOutAllEquips())
                        {
                            TuxEqiup tue = XI.LibTuple.TL.DecodeTux(ut) as TuxEqiup;
                            if (tue != null && tue.Code == rName)
                            {
                                string tfuse = tue.IsLinked(tConsType, tType) ? linkFuse : fuse;
                                if (tue.ConsumeValidHolder(player, opy, tConsType, tType, tfuse))
                                    return true;
                            }
                        }
                    }
                }
            }
            return false;
        }
开发者ID:palome06,项目名称:psd48,代码行数:65,代码来源:TR007.cs


注:本文中的Player.ListOutAllEquips方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。