Beispiel #1
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Group      g = duel.GetIncludeNameCardFromArea("", true, card.controller, 0, ComVal.Area_Field);
        normalDele d = delegate
        {
            duel.AddFinishHandle();
            duel.DiscardFromDeck(3, card, effect, card.controller);
        };

        GetMes d1 = delegate(bool val)
        {
            if (val)
            {
                GroupCardSelectBack d2 = delegate(Group target)
                {
                    duel.AddDelegate(d, true);
                    duel.SendToGraveyard(ComVal.Area_Field, target, card, ComVal.reason_EffectDestroy, effect);
                };
                duel.SelectCardFromGroup(g, d2, 1, card.controller);
            }
            else
            {
                d();
            }
        };

        if (g.GroupNum > 0)
        {
            duel.ShowDialogBox(card, d1, card.controller.isMy);
        }
        else
        {
            d();
        }
    }
Beispiel #2
0
    private void Operation1(IDuel duel, Card card, LauchEffect effect, Group target = null)
    {
        Group      g  = new Group();
        normalDele d1 = delegate
        {
            GetMes d2 = delegate(bool val)
            {
                if (val)
                {
                    GroupCardSelectBack gCallBack = delegate(Group g2)
                    {
                        duel.AddFinishHandle();
                        duel.SendToGraveyard(ComVal.Area_Field, g2, card, ComVal.reason_EffectDestroy, effect);
                    };

                    Group selectGroup = duel.GetIncludeNameCardFromArea("", true, card.controller, 0, ComVal.Area_Field);
                    duel.SelectCardFromGroup(selectGroup, gCallBack, g.GroupNum, card.controller, false);
                }
                else
                {
                    duel.FinishHandle();
                }
            };

            g = g.GetFitlerGroup(cardFiter);
            if (g.GroupNum > 0)
            {
                duel.ShowDialogBox(card, d2, card.controller.isMy);
            }
            else
            {
                duel.FinishHandle();
            }
        };

        duel.AddDelegate(d1, true);
        g = duel.DiscardFromDeck(3, card, effect, card.controller);
    }