Пример #1
0
        public override async Task <int> CardUseEffect()
        {
            var switchCard = await Card.GetMenuSwitch(("警告", "创造1张铜色/银色“矮人”牌"), ("战斗的召唤", "使1个单位获得7点强化"));

            if (switchCard == 0)
            {
                return(await Card.CreateAndMoveStay(
                           GwentMap.GetCreateCardsId(
                               x => x.HasAnyCategorie(Categorie.Dwarf) &&
                               (x.Group == Group.Copper || x.Group == Group.Silver),
                               RNG)
                           .ToList()));
            }

            if (switchCard == 1)
            {
                var targets = await Game.GetSelectPlaceCards(Card, 1, selectMode : SelectModeType.MyRow);

                if (targets.Count() == 0)
                {
                    return(0);
                }
                //强化7
                foreach (var target in targets)
                {
                    await target.Effect.Strengthen(7, Card);
                }

                return(0);
            }


            return(0);
        }
Пример #2
0
        public async Task Play(LocalPlayer player)
        {
            _player = player;
            var op1 = await _player.ReceiveAsync();

            var gameInformation = op1.Arguments.ToArray()[0].ToType <GameInfomation>();

            Console.WriteLine($"~匹配成功~");
            //Console.WriteLine($"您的对手是:{gameInformation.EnemyName},他的卡组有{gameInformation.EnemyDeckCount}张牌的说~!\n\n");
            Console.WriteLine($"抽到了手牌呢,您的手牌是");
            var hand = GwentMap.DeckChange(gameInformation.MyHandCard.Select(x => x.CardId));

            hand.Select(x => $"{GwentMap.FlavorMap[x.Group]}{x.Strength}  ").ForAll(Console.Write);
            Console.WriteLine("\n\n看起来不错呢~不过因为游戏还没有完成,胜负只能交给伟大的RNG啦!\n因为需要一点悬念~所以请按下任意键知晓比赛结果~");
            Console.ReadKey();
            var op2 = await _player.ReceiveAsync();

            var end = op2.Arguments.ToArray()[0].ToType <bool>();

            if (end)
            {
                Console.WriteLine($"胜利了呢,RNG万岁!");
                return;
            }
            Console.WriteLine($"失败了呢...看来运气有点不好呐");
        }
Пример #3
0
        public override async Task <int> CardUseEffect()
        {
            //选择选项,设置每个选项的名字和效果
            var switchCard = await Card.GetMenuSwitch
                             (
                ("挑拨", "创造1个铜色“食腐生物”或“吸血鬼”单位,并使其获得2点增益。"),
                ("剧毒", "摧毁1个铜色 / 银色“食腐生物”或“吸血鬼”单位。")
                             );

            if (switchCard == 0)
            {
                var cards = GwentMap.GetCreateCardsId(x => x.Group == Group.Copper &&
                                                      (x.Categories.Contains(Categorie.Necrophage) ||
                                                       x.Categories.Contains(Categorie.Vampire)), Game.RNG).ToArray();
                if ((await Game.CreateAndMoveStay(PlayerIndex, cards, isCanOver: true)) == 1)
                {
                    await Game.PlayersStay[PlayerIndex].First().Effect.Boost(2, Card);
                    return(1);
                }
                return(0);
            }
            else if (switchCard == 1)
            {
                var target = await Game.GetSelectPlaceCards(Card, 1, false,
                                                            x => x.Status.Categories.Contains(Categorie.Necrophage) ||
                                                            x.Status.Categories.Contains(Categorie.Vampire));

                if (target.Count == 0)
                {
                    return(0);
                }
                await target.Single().Effect.ToCemetery(CardBreakEffectType.Scorch);
            }
            return(0);
        }
        public override async Task <int> CardPlayEffect(bool isSpying, bool isReveal)
        {
            var cardsId = GwentMap.GetCards().FilterCards(Group.Copper, CardType.Unit, x => x.HasAllCategorie(Categorie.WildHunt))
                          .Select(x => x.CardId);

            return(await Game.CreateAndMoveStay(PlayerIndex, cardsId.ToArray()));
        }
        public override async Task <int> CardUseEffect()
        {       //创造
            await Card.CreateAndMoveStay(GwentMap.GetCreateCardsId(x => x.Faction == Faction.Skellige && (x.Group == Group.Copper || x.Group == Group.Silver) && x.HasAllCategorie(Categorie.Soldier), RNG).ToList());

            //强化玩家悬牌
            await Game.PlayersStay[PlayerIndex][0].Effect.Strengthen(3, Card);

            return(1);
        }
Пример #6
0
        public override async Task <int> CardUseEffect()
        {
            var id = GwentMap.GetCards().Where(x => x.Faction == Game.PlayersFaction[Card.PlayerIndex])
                     .Where(x => x.Group == Group.Copper)
                     .Mess().First().CardId;
            await Game.CreatCard(id, Card.PlayerIndex, new CardLocation(RowPosition.MyStay, 0));

            return(1);
        }
 public override async Task <int> CardUseEffect()
 {
     return(await Card.CreateAndMoveStay(
                GwentMap.GetCreateCardsId(
                    x => x.Faction == Faction.Nilfgaard &&
                    (x.Group == Group.Copper || x.Group == Group.Silver)
                    )
                .ToList()
                ));
 }
Пример #8
0
 public override async Task <int> CardPlayEffect(bool isSpying, bool isReveal)
 {
     return(await Card.CreateAndMoveStay(
                GwentMap.GetCreateCardsId(
                    x => (x.Group == Group.Silver) && (x.CardInfo().CardType == CardType.Special),
                    RNG
                    )
                .ToList()
                ));
 }
Пример #9
0
        public override async Task <int> CardUseEffect()
        {
            var list = GwentMap.GetCards()
                       .Where(x => x.CardId.CardInfo().CardType == CardType.Unit &&
                              (x.Group == Group.Gold))
                       .Mess(RNG).Take(3).Select(x => x.CardId)
                       .ToList();

            return(await Card.CreateAndMoveStay(list));
        }
Пример #10
0
        public override async Task <int> CardPlayEffect(bool isSpying, bool isReveal)
        {
            var list = GwentMap.GetCards()
                       .Where(x => (x.Categories.Contains(Categorie.Spell)) &&
                              (x.Group == Group.Copper || x.Group == Group.Silver))
                       .Mess(RNG).Take(3).Select(x => x.CardId)
                       .ToList();

            return(await Card.CreateAndMoveStay(list));
        }
Пример #11
0
 public override async Task <int> CardPlayEffect(bool isSpying)
 {
     return(await Card.CreateAndMoveStay(
                GwentMap.GetCreateCardsId(
                    x => x.Faction == Faction.Nilfgaard &&
                    (x.Group == Group.Copper) &&
                    (x.Categories.Contains(Categorie.Soldier))
                    )
                .ToList()
                ));
 }
Пример #12
0
 public override async Task <int> CardUseEffect()
 {
     return(await Card.CreateAndMoveStay(
                GwentMap.GetCreateCardsId(
                    x => x.Faction == Faction.ScoiaTael &&
                    (x.Group == Group.Copper || x.Group == Group.Silver) &&
                    !x.HasAnyCategorie(Categorie.Agent),
                    RNG
                    )
                .ToList()
                ));
 }
Пример #13
0
        public override async Task <int> CardPlayEffect(bool isSpying, bool isReveal)
        {
            var switchCard = await Card.GetMenuSwitch(
                ("暴行", "从牌组打出1张铜色/银色“特殊”牌"),
                ("后援", "创造1个银色“精灵”单位")
                );

            //从牌组打出1张铜色/银色“特殊”牌
            if (switchCard == 0)
            {
                //乱序列出铜色/银色“特殊”牌
                var list = Game.PlayersDeck[Card.PlayerIndex].Where(x => x.CardInfo().CardType == CardType.Special &&
                                                                    (x.Status.Group == Group.Silver || x.Status.Group == Group.Copper))
                           .Mess(Game.RNG)
                           .ToList();

                if (list.Count() == 0)
                {
                    return(0);
                }
                //选一张,如果没选,什么都不做
                var cards = await Game.GetSelectMenuCards(Card.PlayerIndex, list, 1);

                if (cards.Count() == 0)
                {
                    return(0);
                }

                //打出
                var playCard = cards.Single();
                await playCard.MoveToCardStayFirst();

                return(1);
            }

            //选择创造
            else if (switchCard == 1)
            {
                return(await Card.CreateAndMoveStay(
                           GwentMap.GetCreateCardsId(
                               x => x.HasAnyCategorie(Categorie.Elf) &&
                               (x.Group == Group.Silver) && !x.HasAnyCategorie(Categorie.Agent),
                               RNG
                               )
                           .ToList()
                           ));
            }

            return(0);
        }
Пример #14
0
        public override async Task <int> CardPlayEffect(bool isSpying, bool isReveal)
        {
            var target     = GwentMap.GetCards().Where(x => (x.Group != Group.Leader) && x.CardInfo().CardType == CardType.Unit).Mess(RNG).First();
            var switchCard = await Card.GetMenuSwitch(("猜疑", "小于6."), ("警告", "等于6"), ("贪婪", "大于6"));

            int juggnum = target.Strength == 6 ? 6 : (target.Strength > 6 ? 7 : 5);

            if (switchCard != juggnum - 5)
            {
                return(0);
            }
            await Game.CreateCard(target.CardId, PlayerIndex, new CardLocation(RowPosition.MyStay, 0));

            return(1);
        }
Пример #15
0
        public override async Task <int> CardPlayEffect(bool isSpying, bool isReveal)
        {
            var createCards = GwentMap.GetCreateCardsId(x => x.Group == Group.Leader && x.CardId != CardId.Usurper, RNG);
            var count       = await Game.CreateAndMoveStay(
                Game.AnotherPlayer(Card.PlayerIndex),
                createCards.ToArray(),
                1);

            if (count == 0)
            {
                return(0);
            }
            await Game.RowToList(AnotherPlayer, RowPosition.MyStay).First().Effect.Boost(2, Card);

            return(1);
        }
Пример #16
0
        public override async Task <int> CardUseEffect()
        {
            var target = GwentMap.GetCards()
                         .Where(x => x.Is(Group.Copper, CardType.Unit, x => x.HasAnyCategorie(Categorie.Necrophage, Categorie.Insectoid)))
                         .Select(x => x.CardId);
            var count = (await Game.CreateAndMoveStay(PlayerIndex, target.ToArray()));

            if (count == 0)
            {
                return(0);
            }

            await Game.PlayersStay[PlayerIndex][0].Effect.Boost(1, Card);

            return(1);
        }
Пример #17
0
        public override async Task <int> CardPlayEffect(bool isSpying, bool isReveal)
        {
            var switchCard = await Card.GetMenuSwitch(("禁术", "创造1张铜色/银色“炼金”牌。"), ("忌器", "从牌组打出1张铜色/银色“道具”牌。"));

            if (switchCard == 0)
            {
                var ids = GwentMap.GetCreateCardsId(x => x.Is(filter: x => x.HasAllCategorie(Categorie.Alchemy) && x.IsAnyGroup(Group.Copper, Group.Silver)), Game.RNG);
                return(await Game.CreateAndMoveStay(PlayerIndex, ids.ToArray()));
            }
            if (switchCard == 1)
            {
                var list = Game.PlayersDeck[Card.PlayerIndex].Where(x => x.Status.Categories.Contains(Categorie.Item) &&
                                                                    (x.Status.Group == Group.Silver || x.Status.Group == Group.Copper))
                           .Mess(Game.RNG)
                           .ToList();

                if (list.Count() == 0)
                {
                    return(0);
                }
                //选一张,如果没选,什么都不做
                var cards = await Game.GetSelectMenuCards(Card.PlayerIndex, list, 1);

                if (cards.Count() == 0)
                {
                    return(0);
                }

                //打出
                var playCard = cards.Single();
                await playCard.MoveToCardStayFirst();

                return(1);
            }
            return(0);
        }
Пример #18
0
        public override async Task <int> CardPlayEffect(bool isSpying, bool isReveal)
        {
            var ids = GwentMap.GetCreateCardsId(x => x.Is(filter: x => x.HasAllCategorie(Categorie.Cursed) && (x.Faction == Faction.Neutral || x.Faction == Faction.NorthernRealms) && x.IsAnyGroup(Group.Copper, Group.Silver) && !x.HasAnyCategorie(Categorie.Agent)), RNG);

            return(await Game.CreateAndMoveStay(PlayerIndex, ids.ToArray()));
        }
Пример #19
0
        public override async Task <int> CardPlayEffect(bool isSpying, bool isReveal)
        {
            var ids = GwentMap.GetCreateCardsId(x => x.Is(filter: x => x.HasAllCategorie(Categorie.Organic) && x.IsAnyGroup(Group.Copper, Group.Silver)), Game.RNG);

            return(await Game.CreateAndMoveStay(PlayerIndex, ids.ToArray()));
        }