游戏王ygocore吧 关注:243,869贴子:2,901,712

【DIY】功能代码分享,给跟我一样的新人减少麻烦。

只看楼主收藏回复

因为自己玩游戏王的初衷就是自娱自乐,对时下流行的堆坑卡没有兴趣,也因此接触DIY就不是为了写符合规则的系列卡,而是为了满足自身内在心理需求的娱乐卡。
有感于自己在DIY道路上接触知识信息的困难,所以想分享给相同需求的人,让他人避免自己这般低效繁琐的摸索,能直接获得最核心的知识信息。
以下代码都是单一功能的实现,复制到改卡工具中创建新卡即可。


1楼2018-09-09 07:00回复
    【魔陷卡的额外代码】
    --xxxxxxxxxxxxxxxxxxxx
    function cxxxx.initial_effect(c)
    --activate
    local e1=Effect.CreateEffect(c)
    e1:SetType(EFFECT_TYPE_ACTIVATE)
    e1:SetCode(EVENT_FREE_CHAIN)
    c:RegisterEffect(e1)


    2楼2018-09-09 07:02
    回复(2)
      【无视条件,从手牌、卡组、墓地、额外、除外区特殊召唤一只怪兽】
      ps:改下卡片编码。
      --spsummon
      local e2=Effect.CreateEffect(c)
      e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
      e2:SetDescription(aux.Stringid(201901,0))
      e2:SetType(EFFECT_TYPE_IGNITION)
      e2:SetRange(LOCATION_SZONE)
      e2:SetCost(c201901.cost)
      e2:SetTarget(c201901.target)
      e2:SetOperation(c201901.operation)
      c:RegisterEffect(e2)
      function c201901.filter(c,e,tp)
      return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
      end
      function c201901.cost(e,tp,eg,ep,ev,re,r,rp,chk)
      if chk==0 then return Duel.CheckLPCost(tp,0) end
      Duel.PayLPCost(tp,0)
      end
      function c201901.target(e,tp,eg,ep,ev,re,r,rp,chk)
      if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
      and Duel.IsExistingMatchingCard(c201901.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_REMOVED,0,1,nil,e,tp) end
      Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_REMOVED)
      end
      function c201901.operation(e,tp,eg,ep,ev,re,r,rp)
      if Duel.GetLocationCountFromEx(tp)<=0 then return end
      Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
      local g=Duel.SelectMatchingCard(tp,c201901.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_REMOVED,0,1,1,nil,e,tp)
      if g:GetCount()>0 then
      Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP_ATTACK)
      end
      end


      3楼2018-09-09 07:04
      回复(1)
        【效果免疫,咕咚、蛇神的特效】
        --immune
        local e3=Effect.CreateEffect(c)
        e3:SetType(EFFECT_TYPE_SINGLE)
        e3:SetCode(EFFECT_IMMUNE_EFFECT)
        e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
        e3:SetRange(LOCATION_SZONE)
        e3:SetValue(c201901.efilter)
        c:RegisterEffect(e3)
        function c201901.efilter(e,te)
        return te:GetOwner()~=e:GetOwner()
        end


        4楼2018-09-09 07:06
        回复
          【手牌无限】
          --wuxianshoupai
          local e2=Effect.CreateEffect(c)
          e2:SetType(EFFECT_TYPE_FIELD)
          e2:SetCode(EFFECT_HAND_LIMIT)
          e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
          e2:SetRange(LOCATION_FZONE)
          e2:SetTargetRange(1,0)
          e2:SetValue(100)
          c:RegisterEffect(e2)


          5楼2018-09-09 07:06
          回复
            【不被战斗破坏】
            --zhandou
            local e2=Effect.CreateEffect(c)
            e2:SetType(EFFECT_TYPE_SINGLE)
            e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
            e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
            e2:SetRange(LOCATION_MZONE)
            e2:SetValue(1)
            c:RegisterEffect(e2)


            6楼2018-09-09 07:07
            回复
              【对方发动魔法、陷阱、怪兽效果时可选择无效并破坏】
              --negate
              local e2=Effect.CreateEffect(c)
              e2:SetDescription(aux.Stringid(20180004,0))
              e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
              e2:SetType(EFFECT_TYPE_QUICK_O)
              e2:SetCode(EVENT_CHAINING)
              e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
              e2:SetCountLimit(99)
              e2:SetRange(LOCATION_MZONE)
              e2:SetCondition(c20180004.negcon)
              e2:SetTarget(c20180004.negtg)
              e2:SetOperation(c20180004.negop)
              c:RegisterEffect(e2)
              function c20180004.negcon(e,tp,eg,ep,ev,re,r,rp)
              local c=e:GetHandler()
              if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
              return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
              end
              function c20180004.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
              if chk==0 then return true end
              Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
              if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
              Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
              end
              end
              function c20180004.negop(e,tp,eg,ep,ev,re,r,rp)
              if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
              Duel.Destroy(eg,REASON_EFFECT)
              end
              end


              7楼2018-09-09 07:07
              回复
                【封锁魔法陷阱,自然竹笋的效果】
                --moxianfengyin
                local e4=Effect.CreateEffect(c)
                e4:SetType(EFFECT_TYPE_FIELD)
                e4:SetCode(EFFECT_DISABLE)
                e4:SetRange(LOCATION_FZONE)
                e4:SetTargetRange(0,LOCATION_SZONE)
                e4:SetTarget(c201909.distg)
                c:RegisterEffect(e4)
                function c201909.distg(e,c)
                return c:IsType(TYPE_TRAP+TYPE_SPELL)
                end


                8楼2018-09-09 07:08
                回复(3)
                  【封锁怪兽效果,血魔D,技抽】
                  --guaishoufengyin
                  local e5=Effect.CreateEffect(c)
                  e5:SetType(EFFECT_TYPE_FIELD)
                  e5:SetRange(LOCATION_FZONE)
                  e5:SetTargetRange(0,LOCATION_MZONE)
                  e5:SetCode(EFFECT_DISABLE)
                  c:RegisterEffect(e5)


                  9楼2018-09-09 07:09
                  回复
                    【封锁召唤】
                    --disable summon
                    local e5=Effect.CreateEffect(c)
                    e5:SetType(EFFECT_TYPE_FIELD)
                    e5:SetRange(LOCATION_SZONE)
                    e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
                    e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
                    e5:SetTargetRange(0,1)
                    c:RegisterEffect(e5)
                    local e6=e5:Clone()
                    e6:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
                    c:RegisterEffect(e6)
                    local e7=e5:Clone()
                    e7:SetCode(EFFECT_CANNOT_SUMMON)
                    c:RegisterEffect(e7)


                    10楼2018-09-09 07:10
                    回复
                      【送去墓地的卡除外】
                      --chuwai
                      local e3=Effect.CreateEffect(c)
                      e3:SetType(EFFECT_TYPE_FIELD)
                      e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
                      e3:SetCode(EFFECT_TO_GRAVE_REDIRECT)
                      e3:SetRange(LOCATION_MZONE)
                      e3:SetTargetRange(0xff,0xff)
                      e3:SetValue(LOCATION_REMOVED)
                      c:RegisterEffect(e3)


                      11楼2018-09-09 07:11
                      回复
                        【1回合有3次可以从以下效果把1个发动。
                        ●可以把自己场上1只怪兽送去墓地,对方场上怪兽全部回到卡组。
                        ●可以把自己场上1张魔法·陷阱卡送去墓地,对方场上的魔法·陷阱卡全部回到卡组。
                        ●可以把自己卡组最上面1张卡送去墓地,对方墓地的卡全部回到卡组。】
                        --to deck
                        local e4=Effect.CreateEffect(c)
                        e4:SetDescription(aux.Stringid(201940,1))
                        e4:SetType(EFFECT_TYPE_IGNITION)
                        e4:SetCategory(CATEGORY_TODECK)
                        e4:SetRange(LOCATION_MZONE)
                        e4:SetCountLimit(3,EFFECT_COUNT_CODE_SINGLE)
                        e4:SetCost(c201940.tdcost1)
                        e4:SetTarget(c201940.tdtg1)
                        e4:SetOperation(c201940.tdop1)
                        c:RegisterEffect(e4)
                        local e3=Effect.CreateEffect(c)
                        e5:SetDescription(aux.Stringid(201940,2))
                        e5:SetType(EFFECT_TYPE_IGNITION)
                        e5:SetCategory(CATEGORY_TODECK)
                        e5:SetRange(LOCATION_MZONE)
                        e5:SetCountLimit(3,EFFECT_COUNT_CODE_SINGLE)
                        e5:SetCost(c201940.tdcost2)
                        e5:SetTarget(c201940.tdtg2)
                        e5:SetOperation(c201940.tdop2)
                        c:RegisterEffect(e5)
                        local e6=Effect.CreateEffect(c)
                        e6:SetDescription(aux.Stringid(201940,3))
                        e6:SetType(EFFECT_TYPE_IGNITION)
                        e6:SetCategory(CATEGORY_TODECK)
                        e6:SetRange(LOCATION_MZONE)
                        e6:SetCountLimit(3,EFFECT_COUNT_CODE_SINGLE)
                        e6:SetCost(c201940.tdcost3)
                        e6:SetTarget(c201940.tdtg3)
                        e6:SetOperation(c201940.tdop3)
                        c:RegisterEffect(e6)
                        function c201940.cfilter1(c)--to songzou
                        return c:IsAbleToGraveAsCost()
                        end
                        function c201940.tdcost1(e,tp,eg,ep,ev,re,r,rp,chk)
                        if chk==0 then return Duel.IsExistingMatchingCard(c201940.cfilter1,tp,LOCATION_MZONE,0,1,nil) end
                        Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
                        Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
                        local g=Duel.SelectMatchingCard(tp,c201940.cfilter1,tp,LOCATION_MZONE,0,1,1,nil)
                        Duel.SendtoGrave(g,REASON_COST)
                        end
                        function c201940.tdtg1(e,tp,eg,ep,ev,re,r,rp,chk)
                        if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) end
                        local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil)
                        Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
                        end
                        function c201940.tdop1(e,tp,eg,ep,ev,re,r,rp)
                        local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil)
                        Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
                        end
                        function c201940.cfilter2(c)
                        return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
                        end
                        function c201940.tdcost2(e,tp,eg,ep,ev,re,r,rp,chk)
                        if chk==0 then return Duel.IsExistingMatchingCard(c201940.cfilter2,tp,LOCATION_ONFIELD,0,1,nil) end
                        Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
                        Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
                        local g=Duel.SelectMatchingCard(tp,c201940.cfilter2,tp,LOCATION_ONFIELD,0,1,1,nil)
                        Duel.SendtoGrave(g,REASON_COST)
                        end
                        function c201940.filter2(c)
                        return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
                        end
                        function c201940.tdtg2(e,tp,eg,ep,ev,re,r,rp,chk)
                        if chk==0 then return Duel.IsExistingMatchingCard(c201940.filter2,tp,0,LOCATION_ONFIELD,1,nil) end
                        local g=Duel.GetMatchingGroup(c201940.filter2,tp,0,LOCATION_ONFIELD,nil)
                        Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
                        end
                        function c201940.tdop2(e,tp,eg,ep,ev,re,r,rp)
                        local g=Duel.GetMatchingGroup(c201940.filter2,tp,0,LOCATION_ONFIELD,nil)
                        Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
                        end
                        function c201940.tdcost3(e,tp,eg,ep,ev,re,r,rp,chk)
                        if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
                        Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
                        Duel.DiscardDeck(tp,1,REASON_COST)
                        end
                        function c201940.tdtg3(e,tp,eg,ep,ev,re,r,rp,chk)
                        if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end
                        local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil)
                        Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
                        end
                        function c201940.tdop3(e,tp,eg,ep,ev,re,r,rp)
                        local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil)
                        Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
                        end


                        12楼2018-09-09 07:13
                        收起回复
                          【控场:自己场上的魔陷或怪兽满了,需要清理】
                          一个是光枪龙功能,一个是质量加速器。
                          --to hand
                          local e1=Effect.CreateEffect(c)
                          e1:SetDescription(aux.Stringid(201903,0))
                          e1:SetCategory(CATEGORY_TOHAND)
                          e1:SetType(EFFECT_TYPE_IGNITION)
                          e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
                          e1:SetRange(LOCATION_SZONE)
                          e1:SetCountLimit(99,201903)
                          e1:SetCost(c201903.cost)
                          e1:SetTarget(c201903.target)
                          e1:SetOperation(c201903.operation)
                          c:RegisterEffect(e1)
                          --pohuaiguaishou
                          local e3=Effect.CreateEffect(c)
                          e3:SetDescription(aux.Stringid(201903,0))
                          e3:SetCategory(CATEGORY_DAMAGE)
                          e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
                          e3:SetType(EFFECT_TYPE_IGNITION)
                          e3:SetRange(LOCATION_SZONE)
                          e3:SetCost(c201903.damcost)
                          e3:SetTarget(c201903.damtg)
                          e3:SetOperation(c201903.damop)
                          c:RegisterEffect(e3)
                          function c201903.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
                          if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end
                          local g=Duel.SelectReleaseGroup(tp,aux.TRUE,1,1,nil)
                          Duel.Release(g,REASON_COST)
                          end
                          function c201903.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
                          if chk==0 then return true end
                          Duel.SetTargetPlayer(1-tp)
                          Duel.SetTargetParam(10)
                          Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,10)
                          end
                          function c201903.damop(e,tp,eg,ep,ev,re,r,rp)
                          if not e:GetHandler():IsRelateToEffect(e) then return end
                          local p,d=Duel.GetChainInfo
                          (0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
                          Duel.Damage(p,d,REASON_EFFECT)
                          end
                          function c201903.costfilter(c)
                          return c:IsDiscardable() and c:IsAbleToGraveAsCost()
                          end
                          function c201903.cost(e,tp,eg,ep,ev,re,r,rp,chk)
                          if chk==0 then return Duel.IsExistingMatchingCard
                          (c201903.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
                          local rt=Duel.GetTargetCount
                          (Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
                          Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
                          local cg=Duel.SelectMatchingCard(tp,c201903.costfilter,tp,LOCATION_HAND,0,1,rt,nil)
                          Duel.SendtoGrave(cg,REASON_COST+REASON_DISCARD)
                          e:SetLabel(cg:GetCount())
                          end
                          function c201903.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
                          if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
                          if chk==0 then return Duel.IsExistingTarget
                          (Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
                          local ct=e:GetLabel()
                          Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
                          local tg=Duel.SelectTarget
                          (tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil)
                          Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,ct,0,0)
                          end
                          function c201903.operation(e,tp,eg,ep,ev,re,r,rp,chk)
                          local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
                          local rg=tg:Filter(Card.IsRelateToEffect,nil,e)
                          if rg:GetCount()>0 then
                          Duel.SendtoHand(rg,nil,REASON_EFFECT)
                          end
                          end


                          13楼2018-09-09 07:18
                          回复
                            【卡片循环:扔一张卡,检索或回收3张卡。墓地回到卡组】
                            教堂的功能拓展,将种类与数量改了下。任意卡都可回收。
                            --search
                            local e2=Effect.CreateEffect(c)
                            e2:SetDescription(aux.Stringid(201902,0))
                            e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
                            e2:SetType(EFFECT_TYPE_IGNITION)
                            e2:SetRange(LOCATION_SZONE)
                            e2:SetCountLimit(99,201902)
                            e2:SetCost(c201902.thcost)
                            e2:SetTarget(c201902.thtg)
                            e2:SetOperation(c201902.thop)
                            c:RegisterEffect(e2)
                            --spsummon
                            local e3=Effect.CreateEffect(c)
                            e3:SetDescription(aux.Stringid(201902,1))
                            e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
                            e3:SetType(EFFECT_TYPE_IGNITION)
                            e3:SetRange(LOCATION_SZONE)
                            e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
                            e3:SetCountLimit(99,201902)
                            e3:SetCost(c201902.spcost)
                            e3:SetTarget(c201902.sptg)
                            e3:SetOperation(c201902.spop)
                            c:RegisterEffect(e3)
                            function c201902.cfilter(c)
                            return c:IsType(TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER) and c:IsDiscardable()
                            end
                            function c201902.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
                            if chk==0 then return Duel.IsExistingMatchingCard(c201902.cfilter,tp,LOCATION_HAND,0,1,nil) end
                            Duel.DiscardHand(tp,c201902.cfilter,1,1,REASON_COST+REASON_DISCARD)
                            end
                            function c201902.thfilter(c)
                            return ((c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK+ATTRIBUTE_DEVINE+ATTRIBUTE_EARTH+ATTRIBUTE_FIRE+ATTRIBUTE_WATER+ATTRIBUTE_WIND)) or c:IsType(TYPE_SPELL+TYPE_TRAP))
                            and c:IsAbleToHand()
                            end
                            function c201902.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
                            if chk==0 then return Duel.IsExistingMatchingCard(c201902.thfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,3,nil) end
                            Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,3,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
                            end
                            function c201902.thop(e,tp,eg,ep,ev,re,r,rp)
                            if not e:GetHandler():IsRelateToEffect(e) then return end
                            Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
                            local g=Duel.SelectMatchingCard(tp,c201902.thfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,3,3,nil)
                            if g:GetCount()>0 then
                            Duel.SendtoHand(g,nil,REASON_EFFECT)
                            Duel.ConfirmCards(3-tp,g)
                            end
                            end
                            function c201902.spfilter(c,e,tp)
                            local lv=c:GetLevel()
                            return lv>0 and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK+ATTRIBUTE_DEVINE+ATTRIBUTE_EARTH+ATTRIBUTE_FIRE+ATTRIBUTE_WATER+ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
                            and Duel.IsExistingMatchingCard(c201902.cfilter2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_REMOVED,0,lv,nil)
                            end
                            function c201902.cfilter2(c)
                            return c:IsType(TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER) and c:IsAbleToDeckAsCost()
                            end
                            function c201902.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
                            e:SetLabel(100)
                            if chk==0 then return true end
                            end
                            function c201902.spfilter2(c,e,tp,lv)
                            return c:GetLevel()==lv and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK+ATTRIBUTE_DEVINE+ATTRIBUTE_EARTH+ATTRIBUTE_FIRE+ATTRIBUTE_WATER+ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
                            end
                            function c201902.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
                            if chkc then return chkc:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_REMOVED) and chkc:IsControler(tp) and c201902.spfilter2(chkc,e,tp,e:GetLabel()) end
                            if chk==0 then
                            if e:GetLabel()~=100 then return false end
                            e:SetLabel(0)
                            return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
                            and Duel.IsExistingMatchingCard(c201902.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_REMOVED,0,1,nil,e,tp)
                            end
                            e:SetLabel(0)
                            Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
                            local g=Duel.SelectTarget(tp,c201902.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_REMOVED,0,1,1,nil,e,tp)
                            local lv=g:GetFirst():GetLevel()
                            e:SetLabel(lv)
                            Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
                            local tg=Duel.SelectMatchingCard(tp,c201902.cfilter2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_REMOVED,0,lv,lv,nil)
                            Duel.SendtoDeck(tg,nil,2,REASON_COST)
                            Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
                            end
                            function c201902.spop(e,tp,eg,ep,ev,re,r,rp)
                            if not e:GetHandler():IsRelateToEffect(e) then return end
                            local tc=Duel.GetFirstTarget()
                            if tc:IsRelateToEffect(e) then
                            Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)
                            end
                            end


                            15楼2018-09-09 07:21
                            回复
                              目前在用的大致就是这些,按照相同路数可以去抄卡。
                              但更准确高效的,还是需要了解更多相关知识才可以。
                              个人目前已经实现了多数想要的功能,如果有更多发现积累的,欢迎分享。
                              降低学习成本,去除知识信息的壁垒,一贯是好的。
                              希望DIY能像简单的游戏修改器一样,点点功能即可。
                              而非每个人都要过三关斩六将,从零开始学起。


                              16楼2018-09-09 07:25
                              回复