public override async Task OnCardDeath(GameCard taget, CardLocation soure)
        {
            if (taget != Card)
            {
                return;
            }
            await Game.CreateCard(CardId.Chort, PlayerIndex, soure);

            return;
        }
        public override async Task OnCardDeath(GameCard taget, CardLocation soure)
        {
            if (taget != Card)
            {
                return;
            }
            await Card.Effect.Resurrect(soure);

            return;
        }
示例#3
0
        public override async Task OnCardToCemetery(GameCard taget, CardLocation soure)
        {
            if (taget != Card)
            {
                return;
            }
            var range = new Random().Next(0, Game.PlayersHandCard[PlayerIndex].Count() + 1);
            await Card.Effect.Resurrect(new CardLocation(RowPosition.MyDeck, range), Card);

            await Card.Effect.Strengthen(3, Card);
        }
示例#4
0
        public override async Task OnCardDeath(GameCard taget, CardLocation soure)
        {
            if (taget != Card)
            {
                return;
            }
            _resurrectTarget = soure;
            _resurrectFlag   = true;
            await Task.CompletedTask;

            return;
        }
示例#5
0
        public async Task HandleEvent(AfterCardDeath @event)
        {
            if (@event.Target != Card)
            {
                return;
            }
            _resurrectTarget = @event.DeathLocation;
            _resurrectFlag   = true;
            await Task.CompletedTask;

            return;
        }
示例#6
0
 public override async Task OnCardDeath(GameCard taget, CardLocation source)//死亡时触发的事件
 {
     if (Card.Status.IsLock)
     {
         return;
     }
     if (taget == Card)
     {
         var row   = Game.RowToList(taget.PlayerIndex, source.RowPosition);
         var cards = row.WhereAllLowest().ToList();
         for (var i = 0; i < cards.Count; i++)
         {
             await cards[i].Effect.ToCemetery(CardBreakEffectType.Scorch);
         }
     }
 }
示例#7
0
        public override async Task OnCardDeath(GameCard taget, CardLocation soure)
        {
            if (taget != Card)
            {
                return;
            }
            var cards = Game.GetAllCard(Card.PlayerIndex).Where(x => x.Status.CardRow.IsOnPlace() && x.PlayerIndex == AnotherPlayer).Mess().Take(5).ToList();

            foreach (var card in cards)
            {
                if (card.Status.CardRow.IsOnPlace())
                {
                    await card.Effect.Boost(5, Card);
                }
            }
            return;
        }
示例#8
0
 public static bool TagetIsShowBack(this GameCard card, CardLocation taget, int tagetPlayerIndex, int LookplayerIndex)
 {
     if (!taget.RowPosition.IsOnRow())
     {
         return(true);
     }
     if (tagetPlayerIndex == LookplayerIndex && taget.RowPosition.IsOnPlace() && card.Status.Conceal)
     {
         return(true);
     }
     if (tagetPlayerIndex != LookplayerIndex)
     {
         if (taget.RowPosition.IsInHand() && !card.Status.IsReveal)
         {
             return(true);
         }
         if (taget.RowPosition.IsOnPlace() && card.Status.Conceal)
         {
             return(true);
         }
     }
     return(false);
 }
示例#9
0
 public static CardLocation Mirror(this CardLocation location) => new CardLocation()
 {
     RowPosition = location.RowPosition.Mirror(), CardIndex = location.CardIndex
 };