コード例 #1
0
    public static bool ChooseEnemyThenReSummon(GameEvent gameEvent)
    {
        Card card = gameEvent.player.board.ChooseTarget
                    (
            gameEvent.player.board.GetMinionTargetLambda(gameEvent.player.board.GetAnotherPlayer(gameEvent.player), MinionType.Any, null)
                    );
        int id = card.id;

        gameEvent.hostCard.effectsStay.Add(new ProxyEffect(ProxyEnum.Deathrattle, gameEvent2 =>
        {
            bool isGold = gameEvent2.hostCard.isGold;
            if (true)
            {
                Card byCard  = gameEvent2.hostCard;
                Card newCard = CardBuilder.NewCard(id);
                gameEvent2.player.board.SummonMinionByMinion(new GameEvent()
                {
                    hostCard   = gameEvent2.hostCard,
                    targetCard = newCard,
                    player     = gameEvent2.player,
                }, byCard);
                byCard = newCard;
            }
            return(true);
        }));
        return(true);
    }
コード例 #2
0
    public static bool EatAllAllyThenReSummon(GameEvent gameEvent)
    {
        var cards = gameEvent.player.GetAllAllyMinion().Filter(card => card != gameEvent.hostCard);
        var ids   = cards.Map(card => card.id);

        cards.Map(gameEvent.player.RemoveMinionFromBattlePile);

        gameEvent.hostCard.effectsStay.Add(new ProxyEffect(ProxyEnum.Deathrattle, gameEvent2 =>
        {
            bool isGold = gameEvent2.hostCard.isGold;
            int dValue  = isGold ? 2 : 1;
            if (true)
            {
                Card byCard = gameEvent2.hostCard;
                foreach (var id in ids)
                {
                    Card newCard = CardBuilder.NewCard(id);
                    newCard.effectsStay.Add(new BodyPlusEffect(dValue, dValue));
                    gameEvent2.player.board.SummonMinionByMinion(new GameEvent()
                    {
                        hostCard   = gameEvent2.hostCard,
                        targetCard = newCard,
                        player     = gameEvent2.player,
                    }, byCard);
                    byCard = newCard;
                }
            }
            if (isGold)
            {
                Card byCard = gameEvent2.hostCard;
                foreach (var id in ids)
                {
                    Card newCard = CardBuilder.NewCard(id);
                    newCard.effectsStay.Add(new BodyPlusEffect(dValue, dValue));
                    gameEvent2.player.board.SummonMinionByMinion(new GameEvent()
                    {
                        hostCard   = gameEvent2.hostCard,
                        targetCard = newCard,
                        player     = gameEvent2.player,
                    }, byCard);
                    byCard = newCard;
                }
            }
            return(true);
        }));
        return(true);
    }