Commit b7a6fba0 authored by Chen Bill's avatar Chen Bill

add Auxiliary.DragonXyzSpSummonType

parent 2d5b89b0
...@@ -27,7 +27,7 @@ function c27337596.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,7 +27,7 @@ function c27337596.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c27337596.spfilter(c,e,tp) function c27337596.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,aux.DragonXyzSpSummonType(c))
end end
function c27337596.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c27337596.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -39,7 +39,7 @@ function c27337596.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c27337596.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c27337596.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c27337596.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP) then if tc and Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,aux.DragonXyzSpSummonType(tc),POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK)
...@@ -49,6 +49,9 @@ function c27337596.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,6 +49,9 @@ function c27337596.spop(e,tp,eg,ep,ev,re,r,rp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE) e2:SetCode(EFFECT_SET_DEFENSE)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
if aux.DragonXyzSpSummonType(tc) then
tc:CompleteProcedure()
end
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
...@@ -49,7 +49,7 @@ function c2978414.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,7 +49,7 @@ function c2978414.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c2978414.spfilter(c,e,tp) function c2978414.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,aux.DragonXyzSpSummonType(c))
end end
function c2978414.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c2978414.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -61,7 +61,10 @@ function c2978414.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,10 @@ function c2978414.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c2978414.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c2978414.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) local sc=g:GetFirst()
if Duel.SpecialSummon(g,0,tp,tp,false,aux.DragonXyzSpSummonType(sc),POS_FACEUP)~=0 and aux.DragonXyzSpSummonType(sc) then
sc:CompleteProcedure()
end
end end
end end
function c2978414.ctfilter(c) function c2978414.ctfilter(c)
......
...@@ -39,7 +39,7 @@ function c54358015.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -39,7 +39,7 @@ function c54358015.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c54358015.spfilter(c,e,tp) function c54358015.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,aux.DragonXyzSpSummonType(c))
end end
function c54358015.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c54358015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -51,7 +51,10 @@ function c54358015.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,10 @@ function c54358015.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c54358015.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c54358015.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) local sc=g:GetFirst()
if Duel.SpecialSummon(g,0,tp,tp,false,aux.DragonXyzSpSummonType(sc),POS_FACEUP)~=0 and aux.DragonXyzSpSummonType(sc) then
sc:CompleteProcedure()
end
end end
end end
function c54358015.tgtg(e,c) function c54358015.tgtg(e,c)
......
...@@ -33,7 +33,7 @@ function c90726340.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,7 +33,7 @@ function c90726340.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c90726340.spfilter(c,e,tp) function c90726340.spfilter(c,e,tp)
return c:IsLevelAbove(5) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelAbove(5) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,aux.DragonXyzSpSummonType(c))
end end
function c90726340.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c90726340.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90726340.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90726340.spfilter(chkc,e,tp) end
...@@ -45,7 +45,7 @@ function c90726340.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -45,7 +45,7 @@ function c90726340.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c90726340.spop(e,tp,eg,ep,ev,re,r,rp) function c90726340.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsRace(RACE_DRAGON) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then if tc:IsRelateToEffect(e) and tc:IsRace(RACE_DRAGON) and Duel.SpecialSummonStep(tc,0,tp,tp,false,aux.DragonXyzSpSummonType(tc),POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
...@@ -62,6 +62,9 @@ function c90726340.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,6 +62,9 @@ function c90726340.spop(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EFFECT_CANNOT_ATTACK) e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3,true) tc:RegisterEffect(e3,true)
if aux.DragonXyzSpSummonType(tc) then
tc:CompleteProcedure()
end
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
...@@ -920,12 +920,19 @@ function Auxiliary.DrytronSpSummonOperation(func) ...@@ -920,12 +920,19 @@ function Auxiliary.DrytronSpSummonOperation(func)
end end
end end
end end
---Return the type of `nolimit` in Duel.SpecialSummon() ---The `nolimit` parameter for Special Summon effects of Drytron cards
---@param c Card ---@param c Card
---@return boolean ---@return boolean
function Auxiliary.DrytronSpSummonType(c) function Auxiliary.DrytronSpSummonType(c)
return c:IsType(TYPE_SPSUMMON) return c:IsType(TYPE_SPSUMMON)
end end
---The `nolimit` parameter for Special Summon effects of Dragon, Xyz monsters where Soul Drain Dragon is available.
---(Soul Drain Dragon, Level 8/LIGHT/Dragon/4000/0)
---@param c Card
---@return boolean
function Auxiliary.DragonXyzSpSummonType(c)
return c:GetOriginalCode()==55735315
end
--additional destroy effect for the Labrynth field --additional destroy effect for the Labrynth field
function Auxiliary.LabrynthDestroyOp(e,tp,res) function Auxiliary.LabrynthDestroyOp(e,tp,res)
local c=e:GetHandler() local c=e:GetHandler()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment