Example #1
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Group g1 = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_ElementalHERO, false, card.ownerPlayer, ComVal.CardType_Monster_Fusion, ComVal.Area_Extra);
        Group g2 = duel.GetIncludeNameCardFromArea("", false, card.ownerPlayer, ComVal.cardType_Monster, ComVal.Area_Monster | ComVal.Area_Graveyard);

        g1 = g1.GetCanFusionGroup(g2);
        g1 = card.controller.GetCanSpSummonGroup(g1);
        GroupCardSelectBack callBack = delegate(Group theGroup)
        {
            Card  c  = theGroup.GetCard(0);
            Group g3 = c.cardMaterialFitler.GetGroup(g2);

            GroupCardSelectBack callBack1 = delegate(Group theGroup1)
            {
                normalDele finish = delegate
                {
                    duel.FinishHandle();
                };
                normalDele d = delegate
                {
                    duel.SpeicalSummon(ComVal.Area_Extra, c, card.ownerPlayer, card, ComVal.reason_FusionSummon, effect, 0, finish);
                };
                duel.AddDelegate(d);
                duel.SendToRemove(ComVal.Area_Graveyard | ComVal.Area_Monster, theGroup1, card, ComVal.reason_FusionMaterial, effect);
            };
            duel.SelectFusionMaterialFromGroup(g3, callBack1, c);
        };

        duel.SelectCardFromGroup(g1, callBack, 1, card.controller);
    }
Example #2
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Group g1 = duel.GetIncludeNameCardFromArea("", false, card.ownerPlayer, ComVal.CardType_Monster_Fusion, ComVal.Area_Extra);
        Group g2 = duel.GetIncludeNameCardFromArea("", false, card.ownerPlayer, ComVal.cardType_Monster, ComVal.Area_Hand | ComVal.Area_Monster);

        g1 = g1.GetCanFusionGroup(g2);
        g1 = card.controller.GetCanSpSummonGroup(g1);
        if (g1.GroupNum == 0)
        {
            duel.FinishHandle();
            return;
        }
        GroupCardSelectBack callBack = delegate(Group theGroup)
        {
            Card  c  = theGroup.GetCard(0);
            Group g3 = c.cardMaterialFitler.GetGroup(g2);

            GroupCardSelectBack callBack1 = delegate(Group theGroup1)
            {
                normalDele dele = delegate
                {
                    duel.FinishHandle();
                };
                normalDele d = delegate
                {
                    duel.SpeicalSummon(ComVal.Area_Extra, c, card.ownerPlayer, card, ComVal.reason_Effect, effect, 0, dele);
                };
                duel.AddDelegate(d);
                duel.SendToGraveyard(ComVal.Area_Monster | ComVal.Area_Hand, theGroup1, card, ComVal.reason_FusionMaterial);
            };
            duel.SelectFusionMaterialFromGroup(g3, callBack1, c);
        };

        duel.SelectCardFromGroup(g1, callBack, 1, card.controller);
    }
Example #3
0
    public bool CheckLauch(IDuel duel, Card card, LauchEffect effect, Code code)
    {
        Group g  = duel.GetIncludeNameCardFromArea("", false, card.ownerPlayer, ComVal.cardType_Monster, ComVal.Area_Monster | ComVal.Area_Hand);
        Group g1 = duel.GetIncludeNameCardFromArea("", false, card.ownerPlayer, ComVal.CardType_Monster_Fusion, ComVal.Area_Extra);

        for (int i = 0; i < g1.GroupNum; i++)
        {
            Card theCard = g1.GetCard(i);
            if (theCard.CanFusion(g) && card.controller.CanSpSummon(theCard))
            {
                return(true);
            }
        }
        return(false);
    }
Example #4
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Group a = duel.GetIncludeNameCardFromArea("", false, card.opponentPlayer, 0, ComVal.Area_Trap, filer, false, null, null);

        duel.AddFinishHandle();
        duel.SendToGraveyard(ComVal.Area_Trap, a, card, ComVal.reason_EffectDestroy, effect);
    }
Example #5
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();
        }
    }
Example #6
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Card c = group.GetCard(0);

        if (c.curArea != ComVal.Area_Monster)
        {
            duel.FinishHandle();
            return;
        }
        Group g = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_MaskHERO, false, card.ownerPlayer, ComVal.CardType_Monster_Fusion, ComVal.Area_Extra);

        g = g.SiftingGroupInAttr(c.GetCurAttribute());
        g = card.controller.GetCanSpSummonGroup(g);
        GroupCardSelectBack d = delegate(Group g1)
        {
            Card c1 = g1.GetCard(0);

            normalDele dele = delegate
            {
                duel.FinishHandle();
            };
            duel.SpeicalSummon(ComVal.Area_Extra, c1, card.ownerPlayer, card, ComVal.reason_Effect, effect, 0, dele);
        };
        normalDele d1 = delegate
        {
            duel.SelectCardFromGroup(g, d, 1, card.controller);
        };

        duel.AddDelegate(d1);
        duel.SendToGraveyard(ComVal.Area_Monster, group, card, ComVal.reason_Effect, effect);
    }
Example #7
0
    public bool CheckLauch(IDuel duel, Card card, LauchEffect effect, Code code)
    {
        int   num = duel.GetIncludeNameCardNumFromArea("", false, card.ownerPlayer, ComVal.cardType_Monster, ComVal.Area_Monster, fitler, false, null, null);
        Group g1  = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_ElementalHERO, false, card.ownerPlayer, ComVal.cardType_Monster, ComVal.Area_MainDeck, fitler1, false, null, null);

        return(card.ownerPlayer.CanSpSummon(g1) && num == 0);
    }
Example #8
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Card target = card.EffectDataCard;

        mCard = target;
        Group g = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_SixSamurai, false, card.controller, ComVal.cardType_Monster, ComVal.Area_MainDeck, Fiter);

        if (!target.curArea.IsBind(ComVal.Area_Monster) || g.GroupNum == 0)
        {
            duel.FinishHandle();
            return;
        }

        GroupCardSelectBack callBack = delegate(Group val)
        {
            normalDele d = delegate
            {
                normalDele DestoryCard = delegate
                {
                    Card c = val.GetFirstCard();
                    duel.SendToGraveyard(ComVal.Area_Monster, c.ToGroup(), card, ComVal.reason_Effect, effect);
                };
                duel.AddDelayAction(DestoryCard, ComVal.resetEvent_LeaveEndPhase, 0);
                duel.FinishHandle();
            };
            duel.SpeicalSummon(ComVal.Area_MainDeck, val.GetFirstCard(), card.controller, card, ComVal.reason_Effect, effect, 0, d);
        };

        duel.SelectCardFromGroup(g, callBack, 1, card.controller);
    }
Example #9
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Group g = duel.GetIncludeNameCardFromArea("", false, duel.GetOpsitePlayer(card.controller), ComVal.cardType_Monster, ComVal.Area_Monster);

        duel.AddFinishHandle();
        duel.SendToGraveyard(ComVal.Area_Monster, g, card, ComVal.reason_EffectDestroy, effect);
    }
Example #10
0
    public bool CheckLauch(IDuel duel, Card card, LauchEffect effect, Code code)
    {
        Group g = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_ElementalHERO, false, card.controller, ComVal.CardType_Monster_Double | ComVal.CardType_Monster_Normal,
                                                  ComVal.Area_Graveyard);

        return(g.GroupNum > 0);
    }
Example #11
0
    private void GetTarget(IDuel duel, Card card, LauchEffect effect, GroupCardSelectBack dele)
    {
        Group g = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_ElementalHERO, false, card.controller, ComVal.CardType_Monster_Double | ComVal.CardType_Monster_Normal,
                                                  ComVal.Area_Graveyard);

        duel.SelectCardFromGroup(g, dele, 1, card.controller);
    }
Example #12
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Group g = duel.GetIncludeNameCardFromArea("", true, null, ComVal.cardType_Monster, ComVal.Area_Monster);

        duel.AddFinishHandle();
        duel.SendToGraveyard(ComVal.Area_Field, g, card, ComVal.reason_EffectDestroy, effect);
    }
Example #13
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Group g = duel.GetIncludeNameCardFromArea("", false, card.controller, 0, ComVal.Area_MainDeck, Fiter);

        duel.AddFinishHandle();
        duel.AddCardToHandFromMainDeck(g.GetCard(0), card.controller, card, effect);
    }
Example #14
0
    public bool CheckLauch(IDuel duel, Card card, LauchEffect effect, Code code)
    {
        Group g = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_Lightsworn, false, card.controller, ComVal.cardType_Monster, ComVal.Area_Graveyard);

        Debug.Log(g.GetTypeNum());
        return(g.GetTypeNum() >= 4);
    }
Example #15
0
    public void GetTarget1(IDuel duel, Card card, LauchEffect effect, GroupCardSelectBack dele)
    {
        int   a   = duel.GetIncludeNameCardNumFromArea(ComStr.KeyWord_Hero, false, card.ownerPlayer, ComVal.cardType_Monster, ComVal.Area_Monster, null, true, card, null);
        Group b   = duel.GetIncludeNameCardFromArea("", true, null, 0, ComVal.Area_Trap);
        int   val = a > b.GroupNum ? b.GroupNum : a;

        duel.SelectCardFromGroup(b, dele, val, card.controller);
    }
Example #16
0
    private Group GetCanReleaseGroup(IDuel duel, Card card)
    {
        Group resultG   = new Group();
        Group g         = duel.GetIncludeNameCardFromArea("", false, card.controller, ComVal.CardType_Monster_Synchro, ComVal.Area_Monster);
        Group mainDeckG = duel.GetIncludeNameCardFromArea("爆裂体", false, card.controller, ComVal.cardType_Monster, ComVal.Area_MainDeck, Fiter);

        foreach (var item in g.cardList)
        {
            foreach (var mainDeckCard in mainDeckG.cardList)
            {
                if (mainDeckCard.cardName.Contains(item.cardName) && !resultG.ContainCard(item))
                {
                    resultG.AddCard(item);
                }
            }
        }
        return(resultG);
    }
Example #17
0
    private static Group GetTarget(IDuel duel, Card card)
    {
        Group deckG  = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_SixSamurai, false, card.controller, ComVal.cardType_Monster, ComVal.Area_MainDeck);
        Group fieldG = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_SixSamurai, false, card.controller, ComVal.cardType_Monster, ComVal.Area_Monster);

        Group result = new Group();

        foreach (var item in deckG.cardList)
        {
            foreach (var fieldCard in fieldG.cardList)
            {
                if (!result.ContainCard(fieldCard) && fieldCard.GetCurAfk() == item.GetCurAfk() && fieldCard.cardName != item.cardName)
                {
                    result.AddCard(fieldCard);
                }
            }
        }
        return(result);
    }
Example #18
0
    public void Cost(IDuel duel, Card card, LauchEffect effect)
    {
        Group a = duel.GetIncludeNameCardFromArea("", false, card.ownerPlayer, ComVal.cardType_Spell, ComVal.Area_Hand);
        GroupCardSelectBack callBack = delegate(Group group)
        {
            duel.AddFinishHandle();
            duel.SendToGraveyard(ComVal.Area_Hand, group, card, ComVal.reason_Cost, effect);
        };

        duel.SelectCardFromGroup(a, callBack, 1, card.controller);
    }
Example #19
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Group a = duel.GetIncludeNameCardFromArea("英雄", false, effect.ownerCard.ownerPlayer, ComVal.cardType_Monster, ComVal.Area_MainDeck);
        GroupCardSelectBack CallBack = delegate(Group theGroup)
        {
            Card targetCard = theGroup.GetCard(0);
            duel.AddFinishHandle();
            duel.AddCardToHandFromMainDeck(targetCard, effect.ownerCard.ownerPlayer, effect.ownerCard, effect);
        };

        duel.SelectCardFromGroup(a, CallBack, 1, card.controller);
    }
Example #20
0
    private void Operation1(IDuel duel, Card card, LauchEffect effect, Group target = null)
    {
        Group g = duel.GetIncludeNameCardFromArea("", false, card.controller, ComVal.cardType_Monster, ComVal.Area_MainDeck, Fiter);

        GroupCardSelectBack callBack = delegate(Group val)
        {
            duel.AddFinishHandle();
            duel.AddCardToHandFromMainDeck(val.GetCard(0), card.controller, card, effect);
        };

        duel.SelectCardFromGroup(g, callBack, 1, card.controller);
    }
Example #21
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Group g = duel.GetIncludeNameCardFromArea("24094653", false, card.ownerPlayer, ComVal.cardType_Spell, ComVal.Area_MainDeck);
        GroupCardSelectBack callBack = delegate(Group theGroup)
        {
            Card c = theGroup.GetCard(0);
            duel.AddFinishHandle();
            duel.AddCardToHandFromMainDeck(c, card.ownerPlayer, card, effect);
        };

        duel.SelectCardFromGroup(g, callBack, 1, card.controller);
    }
Example #22
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Group g = duel.GetIncludeNameCardFromArea("", false, card.controller, ComVal.CardType_Spell_Field, ComVal.Area_MainDeck);

        GroupCardSelectBack callBack = delegate(Group val)
        {
            duel.AddFinishHandle();
            duel.AddCardToHandFromMainDeck(val.GetCard(0), card.controller, card, effect);
        };

        duel.SelectCardFromGroup(g, callBack, 1, card.controller);
    }
Example #23
0
    public void Operation1(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Group theGroup = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_Change, false, effect.ownerCard.ownerPlayer, ComVal.CardType_Spell_Quick, ComVal.Area_MainDeck);
        GroupCardSelectBack CallBack = delegate(Group targetGroup)
        {
            Card targetCard = targetGroup.GetCard(0);
            duel.AddFinishHandle();
            duel.AddCardToHandFromMainDeck(targetCard, effect.ownerCard.ownerPlayer, effect.ownerCard, effect);
        };

        duel.SelectCardFromGroup(theGroup, CallBack, 1, card.controller);
    }
Example #24
0
    private void Cost(IDuel duel, Card card, LauchEffect effect)
    {
        Group g = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_Lightsworn, false, card.controller, ComVal.cardType_Monster, ComVal.Area_Hand);

        GroupCardSelectBack callBack = delegate(Group val)
        {
            duel.AddFinishHandle();
            duel.SendToGraveyard(ComVal.Area_Hand, val, card, ComVal.reason_Cost, effect);
        };

        duel.SelectCardFromGroup(g, callBack, 1, card.controller);
    }
Example #25
0
    private Group GettargetGroup(IDuel duel, Card card)
    {
        Group g  = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_Hero, false, card.ownerPlayer, ComVal.cardType_Monster, ComVal.Area_Monster, filter, false, null, null);
        Group g1 = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_MaskHERO, false, card.ownerPlayer, ComVal.CardType_Monster_Fusion, ComVal.Area_Extra);

        g1 = card.ownerPlayer.GetCanSpSummonGroup(g1);
        Group g2  = new Group();
        int   val = 0;

        foreach (var item in g1.cardList)
        {
            val = ComVal.Add(item.GetCurAttribute(), val);
        }
        foreach (var item in g.cardList)
        {
            if (ComVal.isBind(item.GetCurAttribute(), val))
            {
                g2.AddCard(item);
            }
        }
        return(g2);
    }
Example #26
0
    public bool CheckLauch1(IDuel duel, Card card, LauchEffect effect, Code code)
    {
        Group a = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_Change, false, card.ownerPlayer, ComVal.CardType_Spell_Quick, ComVal.Area_MainDeck);

        if (a.GroupNum == 0)
        {
            return(false);
        }
        else
        {
            return(true && code.group.ContainCard(card));
        }
    }
Example #27
0
    private void Cost(IDuel duel, Card card, LauchEffect effect)
    {
        Group g = duel.GetIncludeNameCardFromArea("", false, card.controller, 0, ComVal.Area_Monster);

        g = g.GetFitlerGroup(Fiter);

        GroupCardSelectBack callBack = delegate(Group _g)
        {
            duel.SendToGraveyard(ComVal.Area_Monster, _g, card, ComVal.reason_Realease, effect);
        };

        duel.SelectCardFromGroup(g, callBack, 1, card.controller);
    }
Example #28
0
    public bool CheckLauch1(IDuel duel, Card card, LauchEffect effect, Code code)
    {
        int   a = duel.GetIncludeNameCardNumFromArea("", false, card.ownerPlayer, ComVal.cardType_Spell, ComVal.Area_Hand);
        Group b = duel.GetIncludeNameCardFromArea("", false, card.ownerPlayer, ComVal.cardType_Monster, ComVal.Area_MainDeck, filer, false, null, null);

        if (a == 0 || b.GroupNum == 0 || duel.MonsterAreaIsFull(card.ownerPlayer))
        {
            return(false);
        }
        else
        {
            return(true && card.ownerPlayer.CanSpSummon(b));
        }
    }
Example #29
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Group g = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_SixSamurai, false, card.controller, ComVal.cardType_Monster, ComVal.Area_Hand, Fiter);
        GroupCardSelectBack callBack = delegate(Group val)
        {
            normalDele d = delegate()
            {
                duel.FinishHandle();
            };
            duel.SpeicalSummon(ComVal.Area_Hand, val.GetCard(0), card.controller, card, ComVal.reason_Effect, effect, 0, d);
        };

        duel.SelectCardFromGroup(g, callBack, 1, card.controller);
    }
Example #30
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Card  effectDataCard = card.EffectDataCard;
        Group mainDeckG      = duel.GetIncludeNameCardFromArea(effectDataCard.cardName, false, card.controller, ComVal.cardType_Monster, ComVal.Area_MainDeck, Fiter1);

        if (mainDeckG.GroupNum == 0)
        {
            duel.FinishHandle();
            return;
        }
        normalDele d = delegate
        {
            duel.FinishHandle();
        };

        duel.SpeicalSummon(ComVal.Area_MainDeck, mainDeckG.GetCard(0), card.controller, card, ComVal.reason_Effect, effect, ComVal.CardPutType_UpRightFront, d);
    }