Exemplo n.º 1
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);
    }
Exemplo n.º 2
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);
    }
Exemplo n.º 3
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        GroupCardSelectBack d = delegate(Group val)
        {
            card.EffectDataGroup = val;

            normalDele d1 = delegate
            {
                Group      result = new Group();
                normalDele d2     = delegate
                {
                    List <Card> list     = result.ToList();
                    int         reduceLP = 0;
                    foreach (var item in list)
                    {
                        reduceLP += item.GetCurAfk();
                    }
                    duel.ReduceLP(reduceLP, card.controller, ComVal.reason_Effect, card, effect);
                    duel.FinishHandle();
                };
                duel.AddDelegate(d2, true);
                Group target = card.EffectDataGroup.GetFitlerGroup(Fiter1);
                result = duel.SendToGraveyard(ComVal.Area_Monster, target, card, ComVal.reason_EffectDestroy, effect);
            };
            duel.AddDelayAction(d1, ComVal.resetEvent_LeaveEndPhase, 0);
            duel.FinishHandle();
        };

        duel.SpeicalSummon(ComVal.Area_Graveyard, group, card.controller, card, ComVal.reason_Effect, effect, ComVal.CardPutType_UpRightFront, d);
    }
Exemplo n.º 4
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);
    }
Exemplo n.º 5
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Card c = group.GetFirstCard();

        if (!card.curArea.IsBind(ComVal.Area_Monster) || !c.curArea.IsBind(ComVal.Area_Graveyard))
        {
            duel.FinishHandle();
            return;
        }

        normalDele d1 = delegate
        {
            StateEffect e1 = new StateEffect();
            e1.SetCardEffectType(ComVal.cardEffectType_equip | ComVal.cardEffectType_Single);
            e1.SetCategory(ComVal.category_equipCard);
            e1.SetEquipCard(card, c);
            e1.SetRangeArea(ComVal.Area_Trap);
            duel.ResignEffect(e1, c, card.controller);

            duel.FinishHandle();
        };

        duel.AddDelegate(d1, true);
        duel.EquipCardFromArea(ComVal.Area_Graveyard, c, card.controller, card, effect);
    }
Exemplo n.º 6
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        if (duel.MonsterAreaIsFull(card.controller))
        {
            duel.FinishHandle();
            return;
        }
        normalDele d = delegate
        {
            duel.FinishHandle();
        };

        duel.SpeicalSummon(ComVal.Area_Graveyard, card, card.controller, card, ComVal.reason_Effect, effect, 0, d);
    }
Exemplo n.º 7
0
 public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
 {
     if (card.curArea.IsBind(ComVal.Area_Trap))
     {
         normalDele d = delegate
         {
             duel.FinishHandle();
         };
         duel.SpeicalSummon(ComVal.Area_NormalTrap, card, card.controller, card, ComVal.reason_Effect, effect, 0, d);
     }
     else
     {
         duel.FinishHandle();
     }
 }
Exemplo n.º 8
0
    public void Cost(IDuel duel, Card card, LauchEffect effect)
    {
        Player player = card.ownerPlayer;

        duel.ReduceLP(player.LP / 2, player, ComVal.reason_Cost, card, effect);
        duel.FinishHandle();
    }
Exemplo n.º 9
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);
    }
Exemplo n.º 10
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        AttackEvent e  = duel.GetCurAttackEvent();
        StateEffect e1 = new StateEffect();

        e1.SetRangeArea(ComVal.Area_Monster);
        e1.SetCategory(ComVal.category_stateEffect | ComVal.category_limitTime);
        e1.SetCardEffectType(ComVal.cardEffectType_Single | ComVal.cardEffectType_normalStateEffect);
        e1.SetStateEffectType(ComVal.stateEffectType_addAfkVal);

        if (e.Attacker.controller == card.controller)
        {
            e1.SetTarget(e.Attacker);
            e1.SetStateEffectVal(e.Attackeder.GetCurAfk());
        }
        else
        {
            e1.SetTarget(e.Attackeder);
            e1.SetStateEffectVal(e.Attacker.GetCurAfk());
        }

        e1.SetResetCode(ComVal.resetEvent_LeaveEndPhase, 0);
        duel.ResignEffect(e1, card, card.controller);
        duel.FinishHandle();
    }
Exemplo n.º 11
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);
    }
Exemplo n.º 12
0
 public void Cost(IDuel duel, Card c, LauchEffect e)
 {
     if (cost == null)
     {
         duel.FinishHandle();
         return;
     }
     cost(duel, c, e);
 }
Exemplo n.º 13
0
    private void Operation1(IDuel duel, Card card, LauchEffect effect, Group target = null)
    {
        normalDele d = delegate
        {
            duel.FinishHandle();
        };

        duel.SpeicalSummon(ComVal.Area_Graveyard, card, card.controller, card, ComVal.reason_Effect, effect, 0, d);
    }
Exemplo n.º 14
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        normalDele norDele = delegate
        {
            duel.FinishHandle();
        };

        duel.SpeicalSummon(ComVal.Area_Hand, card, card.ownerPlayer, card, ComVal.reason_Effect, effect, 0, norDele);
    }
Exemplo n.º 15
0
    private void Operation1(IDuel duel, Card card, LauchEffect effect, Group target = null)
    {
        normalDele d = delegate
        {
            duel.AddLP(target.GroupNum * 300, card.controller, ComVal.reason_Effect, card, effect);
            duel.FinishHandle();
        };

        duel.AddDelegate(d, true);
        duel.SendToMainDeck(ComVal.Area_Graveyard, target, card, ComVal.reason_Effect, effect);
    }
Exemplo n.º 16
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Card c = group.GetCard(0);

        if (!c.curArea.IsBind(ComVal.Area_Graveyard))
        {
            duel.FinishHandle();
            return;
        }

        normalDele d = delegate
        {
            Group g = duel.GetIncludeNameCardFromArea("", false, duel.GetOpsitePlayer(card.controller), ComVal.cardType_Monster,
                                                      ComVal.Area_Monster);
            Group targetG = new Group();
            for (int i = 0; i < g.cardList.Count; i++)
            {
                if (g.cardList[i].GetCurAfk() <= c.GetBaseAfk())
                {
                    targetG.AddCard(g.cardList[i]);
                }
            }
            if (targetG.GroupNum == 0)
            {
                duel.FinishHandle();
                return;
            }

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

            duel.SelectCardFromGroup(targetG, callBack, 1, card.controller);
        };

        duel.AddDelegate(d, true);
        duel.AddCardToHandFromArea(ComVal.Area_Graveyard, c, card.controller, card, effect);
    }
Exemplo n.º 17
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        LimitPlayerEffect e1 = new LimitPlayerEffect();

        e1.SetCategory(ComVal.category_limitEffect | ComVal.category_limitTime);
        e1.SetLimitEffectType(ComVal.limitEffectType_spSummonLimit);
        e1.SetResetCode(ComVal.resetEvent_LeaveEndPhase, 1);
        e1.SetTargetType(TargetPlayerType.other);
        e1.SetLimitEffectHandler(LimitEffectHandler);
        duel.ResignEffect(e1, card, card.controller);

        duel.FinishHandle();
    }
Exemplo n.º 18
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);
    }
Exemplo n.º 19
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        StateEffect e1 = new StateEffect();

        e1.SetRangeArea(ComVal.Area_Monster);
        e1.SetCategory(ComVal.category_stateEffect | ComVal.category_limitTime);
        e1.SetCardEffectType(ComVal.cardEffectType_Single | ComVal.cardEffectType_normalStateEffect);
        e1.SetStateEffectType(ComVal.stateEffectType_ChangeAttack);
        e1.SetTarget(card);
        e1.SetStateEffectVal(4000);
        e1.SetResetCode(ComVal.resetEvent_LeaveEndPhase, 1);
        duel.ResignEffect(e1, card, card.controller);
        duel.FinishHandle();
    }
Exemplo n.º 20
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);
    }
Exemplo n.º 21
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        GroupCardSelectBack callBack = delegate(Group g)
        {
            Card       c = g.GetFirstCard();
            normalDele d = delegate
            {
                duel.FinishHandle();
            };
            duel.SpeicalSummon(ComVal.Area_Graveyard, c, card.controller, card, ComVal.reason_Effect, effect, 0, d);
        };

        duel.SelectCardFromGroup(card.controller.group_Graveyard.GetFitlerGroup(fiter), callBack, 1, card.controller);
    }
Exemplo n.º 22
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        if (card.opponentPlayer.GetHandCardNum() == 0)
        {
            duel.FinishHandle();
            return;
        }
        GroupCardSelectBack callBack = delegate(Group g)
        {
            duel.AddFinishHandle();
            duel.SendToRemove(ComVal.Area_Hand, g, card, ComVal.reason_Effect, effect);
        };

        duel.SelectCardFromGroup(card.opponentPlayer.GetHandCardGroup(), callBack, 1, card.controller);
    }
Exemplo n.º 23
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Card c = duel.GetCurChain().GetLastEffect().ownerCard;

        duel.GetCurChain().DisableLastEffect();
        if (c.curArea.IsBind(ComVal.Area_Field))
        {
            duel.AddFinishHandle();
            duel.SendToGraveyard(ComVal.Area_Field, c.ToGroup(), card, ComVal.reason_EffectDestroy, effect);
        }
        else
        {
            duel.FinishHandle();
        }
    }
Exemplo n.º 24
0
    private void Operation4(IDuel duel, Card card, LauchEffect effect, Group target = null)
    {
        Group g = GetTargetGroup4(duel, card);
        GroupCardSelectBack callBack = delegate(Group val)
        {
            Card c = val.GetFirstCard();

            normalDele d = delegate()
            {
                duel.FinishHandle();
            };
            duel.SpeicalSummon(ComVal.Area_Graveyard, c, card.controller, card, ComVal.reason_Effect, effect, 0, d);
        };

        duel.SelectCardFromGroup(g, callBack, 1, card.controller);
    }
Exemplo n.º 25
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        if (!card.CanDestroy())
        {
            duel.FinishHandle();
            return;
        }
        normalDele d = delegate
        {
            duel.AddFinishHandle();
            duel.DrawCard(card.controller, 1, card, effect);
        };

        duel.AddDelegate(d, true);
        duel.SendToGraveyard(ComVal.Area_Field, group, card, ComVal.reason_Destroy, effect);
    }
Exemplo n.º 26
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Group g    = new Group();
        Code  code = duel.GetCurCode();

        g = code.group.GetFitlerGroup(filter);
        if (g.GroupNum != 0)
        {
            duel.AddFinishHandle();
            duel.SendToRemove(ComVal.Area_Monster, g, card, ComVal.reason_Effect, effect);
        }
        else
        {
            duel.FinishHandle();
        }
    }
Exemplo n.º 27
0
    private void Operation2(IDuel duel, Card card, LauchEffect effect, Group target = null)
    {
        Card targetCard = target.GetFirstCard();

        StateEffect e1 = new StateEffect();

        e1.SetRangeArea(ComVal.Area_Monster);
        e1.SetCategory(ComVal.category_stateEffect | ComVal.category_limitTime);
        e1.SetCardEffectType(ComVal.cardEffectType_Single | ComVal.cardEffectType_normalStateEffect);
        e1.SetStateEffectType(ComVal.stateEffectType_addAfkVal);
        e1.SetTarget(targetCard);
        e1.SetStateEffectVal(500);
        e1.SetResetCode(ComVal.resetEvent_LeaveEndPhase, 0);
        duel.ResignEffect(e1, card, card.controller);
        duel.FinishHandle();
    }
Exemplo n.º 28
0
    public void Operation(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Card target = group.GetCard(0);

        if (target.curArea != ComVal.Area_Graveyard)
        {
            return;
        }
        normalDele dele = delegate
        {
            duel.FinishHandle();
        };

        target.controller = effect.ownerCard.controller;
        duel.SpeicalSummon(ComVal.Area_Graveyard, target, effect.ownerCard.ownerPlayer, effect.ownerCard, ComVal.reason_Effect, effect, 0, dele);
    }
Exemplo n.º 29
0
    public void Operation1(IDuel duel, Card card, LauchEffect effect, Group group = null)
    {
        Group g = duel.GetIncludeNameCardFromArea(ComStr.KeyWord_ElementalHERO, false, card.ownerPlayer, ComVal.cardType_Monster, ComVal.Area_MainDeck, null, true, null, card.cardID);
        GroupCardSelectBack callBack = delegate(Group theGroup)
        {
            normalDele d = delegate
            {
                Card        c  = theGroup.GetCard(0);
                StateEffect e1 = new StateEffect();
                e1.SetRangeArea(ComVal.Area_Monster);
                e1.SetCategory(ComVal.category_stateEffect | ComVal.category_limitTime);
                e1.SetCardEffectType(ComVal.cardEffectType_Single | ComVal.cardEffectType_normalStateEffect);
                e1.SetStateEffectType(ComVal.stateEffectType_ChangeAttribute);
                e1.SetTarget(card);
                e1.SetStateEffectVal(c.attribute);

                e1.SetResetCode(ComVal.resetEvent_LeaveEndPhase, 0);

                StateEffect e2 = e1.Clone() as StateEffect;
                e2.SetStateEffectType(ComVal.stateEffectType_ChangeAttack);
                e2.SetStateEffectVal(c.afk);

                StateEffect e3 = e1.Clone() as StateEffect;
                e3.SetStateEffectType(ComVal.stateEffectType_ChangeDef);
                e3.SetStateEffectVal(c.def);

                duel.ResignEffect(e1, card, card.ownerPlayer);
                duel.ResignEffect(e2, card, card.ownerPlayer);
                duel.ResignEffect(e3, card, card.ownerPlayer);

                LimitPlayerEffect e4 = new LimitPlayerEffect();
                e4.SetCategory(ComVal.category_limitEffect);
                e4.SetTargetType(TargetPlayerType.my);
                e4.SetLimitEffectType(ComVal.limitEffectType_spSummonLimit);
                e4.SetLimitEffectHandler(limitEffectHandler);
                e4.SetResetCode(ComVal.resetEvent_LeaveEndPhase, 0);
                duel.ResignEffect(e4, card, card.ownerPlayer);
                duel.FinishHandle();
            };
            duel.AddDelegate(d);
            duel.SendToGraveyard(ComVal.Area_MainDeck, theGroup, card, ComVal.reason_Effect, effect);
        };

        duel.SelectCardFromGroup(g, callBack, 1, card.controller);
    }
Exemplo n.º 30
0
    private void Operation3(IDuel duel, Card card, LauchEffect effect, Group target = null)
    {
        Group g = GetTargetGroup3(duel, card);

        if (g.GroupNum == 0)
        {
            duel.FinishHandle();
            return;
        }
        GroupCardSelectBack callBack = delegate(Group val)
        {
            Card c = val.GetFirstCard();
            duel.AddFinishHandle();
            duel.AddCardToHandFromArea(c.curArea, c, card.controller, card, effect);
        };

        duel.SelectCardFromGroup(g, callBack, 1, card.controller);
    }