Commit 6cfea5b9 authored by nekrozar's avatar nekrozar Committed by mercury233

add Card.IsCanOverlay (#1253)

parent f82da2d3
...@@ -47,16 +47,15 @@ end ...@@ -47,16 +47,15 @@ end
function c10443957.atkval(e,c) function c10443957.atkval(e,c)
return c:GetOverlayCount()*200 return c:GetOverlayCount()*200
end end
function c10443957.filter(c,tp) function c10443957.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and not c:IsType(TYPE_TOKEN) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanOverlay()
and (c:IsControler(tp) or c:IsAbleToChangeControler())
end end
function c10443957.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c10443957.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c10443957.filter(chkc,tp) and chkc~=e:GetHandler() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c10443957.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingTarget(c10443957.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),tp) end and Duel.IsExistingTarget(c10443957.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,c10443957.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler(),tp) Duel.SelectTarget(tp,c10443957.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
end end
function c10443957.operation(e,tp,eg,ep,ev,re,r,rp) function c10443957.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -40,6 +40,9 @@ end ...@@ -40,6 +40,9 @@ end
function c10877309.xyzfilter(c) function c10877309.xyzfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x126) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x126)
end end
function c10877309.matfilter(c)
return c:IsSetCard(0x126) and c:IsCanOverlay()
end
function c10877309.ccfilter(c) function c10877309.ccfilter(c)
return bit.band(c:GetType(),0x7) return bit.band(c:GetType(),0x7)
end end
...@@ -47,7 +50,7 @@ function c10877309.fselect(g) ...@@ -47,7 +50,7 @@ function c10877309.fselect(g)
return g:GetClassCount(c10877309.ccfilter)==g:GetCount() return g:GetClassCount(c10877309.ccfilter)==g:GetCount()
end end
function c10877309.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c10877309.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,e:GetHandler(),0x126) local g=Duel.GetMatchingGroup(c10877309.matfilter,tp,LOCATION_GRAVE,0,e:GetHandler())
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c10877309.xyzfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c10877309.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10877309.xyzfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c10877309.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
and g:CheckSubGroup(c10877309.fselect,3,3) end and g:CheckSubGroup(c10877309.fselect,3,3) end
...@@ -57,7 +60,7 @@ end ...@@ -57,7 +60,7 @@ end
function c10877309.matop(e,tp,eg,ep,ev,re,r,rp) function c10877309.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsSetCard),tp,LOCATION_GRAVE,0,nil,0x126) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c10877309.matfilter),tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:SelectSubGroup(tp,c10877309.fselect,false,3,3) local sg=g:SelectSubGroup(tp,c10877309.fselect,false,3,3)
if sg and sg:GetCount()==3 then if sg and sg:GetCount()==3 then
......
...@@ -26,6 +26,7 @@ end ...@@ -26,6 +26,7 @@ end
function c11109820.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c11109820.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and e:GetHandler():IsCanOverlay()
and Duel.IsExistingTarget(c11109820.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end and Duel.IsExistingTarget(c11109820.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectTarget(tp,c11109820.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) local g1=Duel.SelectTarget(tp,c11109820.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
......
...@@ -113,7 +113,7 @@ function c11221418.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -113,7 +113,7 @@ function c11221418.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetLabel()==Duel.GetTurnCount(tp) return Duel.GetTurnPlayer()==tp and e:GetLabel()==Duel.GetTurnCount(tp)
end end
function c11221418.mfilter(c) function c11221418.mfilter(c)
return c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c11221418.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c11221418.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c11221418.mfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c11221418.mfilter(chkc) end
......
...@@ -56,7 +56,7 @@ function c11510448.filter1(c) ...@@ -56,7 +56,7 @@ function c11510448.filter1(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
end end
function c11510448.filter2(c) function c11510448.filter2(c)
return c:IsSetCard(0xf1) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0xf1) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c11510448.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c11510448.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -69,11 +69,11 @@ function c11646785.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,11 +69,11 @@ function c11646785.setop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c11646785.mtfilter(c,e) function c11646785.mtfilter(c,e)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsType(TYPE_TOKEN) and c:IsSetCard(0x10dc) and not c:IsImmuneToEffect(e) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x10dc) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end end
function c11646785.mttg(e,tp,eg,ep,ev,re,r,rp,chk) function c11646785.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c11646785.mtfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e) end and Duel.IsExistingMatchingCard(c11646785.mtfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
end end
function c11646785.mtop(e,tp,eg,ep,ev,re,r,rp) function c11646785.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -62,9 +62,9 @@ end ...@@ -62,9 +62,9 @@ end
function c12615446.xyzcon(e,tp,eg,ep,ev,re,r,rp) function c12615446.xyzcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetBattleTarget() local tc=c:GetBattleTarget()
if not c:IsRelateToBattle() or c:IsFacedown() then return false end if not c:IsRelateToBattle() then return false end
e:SetLabelObject(tc) e:SetLabelObject(tc)
return tc:IsLocation(LOCATION_GRAVE) and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) return tc:IsLocation(LOCATION_GRAVE) and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and tc:IsCanOverlay()
end end
function c12615446.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) function c12615446.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end
...@@ -75,7 +75,7 @@ end ...@@ -75,7 +75,7 @@ end
function c12615446.xyzop(e,tp,eg,ep,ev,re,r,rp) function c12615446.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.Overlay(c,tc) Duel.Overlay(c,tc)
end end
end end
...@@ -27,13 +27,12 @@ function c12744567.initial_effect(c) ...@@ -27,13 +27,12 @@ function c12744567.initial_effect(c)
end end
c12744567.xyz_number=101 c12744567.xyz_number=101
function c12744567.filter(c) function c12744567.filter(c)
return not c:IsType(TYPE_TOKEN) and c:IsAbleToChangeControler() return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsCanOverlay()
and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end end
function c12744567.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c12744567.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c12744567.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c12744567.filter(chkc) end
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingTarget(c12744567.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingTarget(c12744567.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,c12744567.filter,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c12744567.filter,tp,0,LOCATION_MZONE,1,1,nil)
end end
function c12744567.operation(e,tp,eg,ep,ev,re,r,rp) function c12744567.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -52,16 +52,19 @@ end ...@@ -52,16 +52,19 @@ end
function c13046291.matfilter(c) function c13046291.matfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_XYZ) and c:GetOverlayCount()==0 return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_XYZ) and c:GetOverlayCount()==0
end end
function c13046291.matfilter2(c)
return c:IsRace(RACE_REPTILE+RACE_DINOSAUR) and c:IsCanOverlay()
end
function c13046291.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13046291.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c13046291.matfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c13046291.matfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c13046291.matfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c13046291.matfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,RACE_REPTILE+RACE_DINOSAUR) end and Duel.IsExistingMatchingCard(c13046291.matfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c13046291.matfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c13046291.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c13046291.matop(e,tp,eg,ep,ev,re,r,rp) function c13046291.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsRace),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,RACE_REPTILE+RACE_DINOSAUR) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c13046291.matfilter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) and g:GetCount()>0 then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,2) local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,2)
......
...@@ -58,10 +58,12 @@ end ...@@ -58,10 +58,12 @@ end
function c15092394.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15092394.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c15092394.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c15092394.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c15092394.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c15092394.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c15092394.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c15092394.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
function c15092394.spop(e,tp,eg,ep,ev,re,r,rp) function c15092394.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
...@@ -95,7 +95,8 @@ function c1735088.matfilter(c) ...@@ -95,7 +95,8 @@ function c1735088.matfilter(c)
end end
function c1735088.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c1735088.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1735088.matfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1735088.matfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1735088.matfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c1735088.matfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c1735088.matfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c1735088.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
......
...@@ -36,10 +36,10 @@ function c1825445.tglimit(e,c) ...@@ -36,10 +36,10 @@ function c1825445.tglimit(e,c)
end end
function c1825445.filter1(c,e,tp) function c1825445.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xdc) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xdc)
and Duel.IsExistingMatchingCard(c1825445.filter2,tp,LOCATION_MZONE,0,1,c,e) and Duel.IsExistingMatchingCard(c1825445.filter2,tp,LOCATION_MZONE,0,1,c)
end end
function c1825445.filter2(c,e) function c1825445.filter2(c,e)
return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_TOKEN) and c:IsFaceup() and not c:IsImmuneToEffect(e) return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end end
function c1825445.mttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c1825445.mttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c1825445.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c1825445.filter1(chkc,e,tp) end
......
...@@ -91,7 +91,7 @@ function c18326736.skipcon(e) ...@@ -91,7 +91,7 @@ function c18326736.skipcon(e)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() return Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end end
function c18326736.mtfilter(c) function c18326736.mtfilter(c)
return c:IsSetCard(0x109c) return c:IsSetCard(0x109c) and c:IsCanOverlay()
end end
function c18326736.mttg(e,tp,eg,ep,ev,re,r,rp,chk) function c18326736.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
......
...@@ -27,7 +27,7 @@ function c18678554.xyzfilter(c) ...@@ -27,7 +27,7 @@ function c18678554.xyzfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x126) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x126)
end end
function c18678554.matfilter(c) function c18678554.matfilter(c)
return c:IsSetCard(0x126) return c:IsSetCard(0x126) and c:IsCanOverlay()
end end
function c18678554.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c18678554.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c18678554.xyzfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c18678554.xyzfilter(chkc) end
...@@ -49,7 +49,7 @@ end ...@@ -49,7 +49,7 @@ end
function c18678554.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c18678554.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c18678554.xyzfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c18678554.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c18678554.xyzfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c18678554.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_GRAVE,1,nil) end and Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c18678554.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c18678554.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
...@@ -57,7 +57,7 @@ function c18678554.matop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function c18678554.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(aux.TRUE),tp,0,LOCATION_GRAVE,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsCanOverlay),tp,0,LOCATION_GRAVE,1,1,nil)
Duel.Overlay(tc,g) Duel.Overlay(tc,g)
end end
end end
...@@ -80,7 +80,7 @@ function c18897163.xyzcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,7 +80,7 @@ function c18897163.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function c18897163.xyzfilter(c) function c18897163.xyzfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xaf) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xaf) and c:IsCanOverlay()
end end
function c18897163.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) function c18897163.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c18897163.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c18897163.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
......
...@@ -16,7 +16,7 @@ function c19310321.filter1(c) ...@@ -16,7 +16,7 @@ function c19310321.filter1(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()==0 return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()==0
end end
function c19310321.filter2(c) function c19310321.filter2(c)
return c:IsSetCard(0x76) return c:IsSetCard(0x76) and c:IsCanOverlay()
end end
function c19310321.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c19310321.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -49,11 +49,14 @@ end ...@@ -49,11 +49,14 @@ end
function c1992816.olcon(e,tp,eg,ep,ev,re,r,rp) function c1992816.olcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()==0 and e:GetHandler():IsType(TYPE_XYZ) return e:GetHandler():GetOverlayCount()==0 and e:GetHandler():IsType(TYPE_XYZ)
end end
function c1992816.matfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end
function c1992816.oltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c1992816.oltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsType(TYPE_MONSTER) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1992816.matfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_GRAVE,0,2,nil,TYPE_MONSTER) end if chk==0 then return Duel.IsExistingTarget(c1992816.matfilter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_GRAVE,0,2,2,nil,TYPE_MONSTER) local g=Duel.SelectTarget(tp,c1992816.matfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,2,0,0)
end end
function c1992816.olop(e,tp,eg,ep,ev,re,r,rp) function c1992816.olop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -30,8 +30,8 @@ end ...@@ -30,8 +30,8 @@ end
function c20802187.xyzfilter(c) function c20802187.xyzfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
end end
function c20802187.matfilter(c) function c20802187.matfilter(c,e)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(4) and not c:IsType(TYPE_TOKEN) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(4) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end end
function c20802187.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c20802187.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c20802187.xyzfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c20802187.xyzfilter(chkc) end
...@@ -44,8 +44,8 @@ function c20802187.matop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,8 +44,8 @@ function c20802187.matop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c20802187.matfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c20802187.matfilter,tp,LOCATION_MZONE,0,1,1,nil,e)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Overlay(tc,g) Duel.Overlay(tc,g)
end end
......
...@@ -35,7 +35,8 @@ function c23689428.filter(c) ...@@ -35,7 +35,8 @@ function c23689428.filter(c)
end end
function c23689428.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23689428.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c23689428.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c23689428.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c23689428.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c23689428.filter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c23689428.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c23689428.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
...@@ -43,7 +44,7 @@ end ...@@ -43,7 +44,7 @@ end
function c23689428.xyzop(e,tp,eg,ep,ev,re,r,rp) function c23689428.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) and c:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) and c:IsRelateToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c)) Duel.Overlay(tc,Group.FromCards(c))
end end
end end
......
...@@ -61,9 +61,9 @@ end ...@@ -61,9 +61,9 @@ end
function c24701066.xyzcon(e,tp,eg,ep,ev,re,r,rp) function c24701066.xyzcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetBattleTarget() local tc=c:GetBattleTarget()
if not c:IsRelateToBattle() or c:IsFacedown() then return false end if not c:IsRelateToBattle() then return false end
e:SetLabelObject(tc) e:SetLabelObject(tc)
return tc and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and not tc:IsType(TYPE_TOKEN) return tc and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and tc:IsCanOverlay()
end end
function c24701066.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) function c24701066.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end
...@@ -74,7 +74,7 @@ end ...@@ -74,7 +74,7 @@ end
function c24701066.xyzop(e,tp,eg,ep,ev,re,r,rp) function c24701066.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.Overlay(c,tc) Duel.Overlay(c,tc)
end end
end end
......
...@@ -41,32 +41,31 @@ function c2665273.drtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,32 +41,31 @@ function c2665273.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsPlayerCanDraw(1-tp,1) end and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end end
function c2665273.ofilter(c,tp) function c2665273.matfilter(c,e)
return not c:IsType(TYPE_TOKEN) and (c:IsControler(tp) or c:IsAbleToChangeControler()) return c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end end
function c2665273.drop(e,tp,eg,ep,ev,re,r,rp) function c2665273.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local td=Duel.Draw(tp,1,REASON_EFFECT) local td=Duel.Draw(tp,1,REASON_EFFECT)
local ed=Duel.Draw(1-tp,1,REASON_EFFECT) local ed=Duel.Draw(1-tp,1,REASON_EFFECT)
local cp=c:GetControler()
if td+ed>0 and c:IsRelateToEffect(e) then if td+ed>0 and c:IsRelateToEffect(e) then
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local tg1=Duel.GetMatchingGroup(c2665273.ofilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,aux.ExceptThisCard(e),cp) local tg1=Duel.GetMatchingGroup(c2665273.matfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,aux.ExceptThisCard(e),e)
if td>0 and tg1:GetCount()>0 then if td>0 and tg1:GetCount()>0 then
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local tc1=tg1:Select(tp,1,1,nil):GetFirst() local tc1=tg1:Select(tp,1,1,nil):GetFirst()
if tc1 and not tc1:IsImmuneToEffect(e) then if tc1 then
tc1:CancelToGrave() tc1:CancelToGrave()
sg:AddCard(tc1) sg:AddCard(tc1)
end end
end end
local tg2=Duel.GetMatchingGroup(c2665273.ofilter,1-tp,LOCATION_HAND+LOCATION_ONFIELD,0,aux.ExceptThisCard(e),cp) local tg2=Duel.GetMatchingGroup(c2665273.matfilter,1-tp,LOCATION_HAND+LOCATION_ONFIELD,0,aux.ExceptThisCard(e),e)
if ed>0 and tg2:GetCount()>0 then if ed>0 and tg2:GetCount()>0 then
Duel.ShuffleHand(1-tp) Duel.ShuffleHand(1-tp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_XMATERIAL)
local tc2=tg2:Select(1-tp,1,1,nil):GetFirst() local tc2=tg2:Select(1-tp,1,1,nil):GetFirst()
if tc2 and not tc2:IsImmuneToEffect(e) then if tc2 then
tc2:CancelToGrave() tc2:CancelToGrave()
sg:AddCard(tc2) sg:AddCard(tc2)
end end
......
...@@ -17,6 +17,7 @@ end ...@@ -17,6 +17,7 @@ end
function c26708437.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c26708437.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c26708437.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c26708437.filter(chkc,e,tp) end
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanOverlay()
and Duel.IsExistingTarget(c26708437.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c26708437.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c26708437.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c26708437.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......
...@@ -23,6 +23,7 @@ function c27068117.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -23,6 +23,7 @@ function c27068117.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if e:GetLabel()==0 then return false end if e:GetLabel()==0 then return false end
e:SetLabel(0) e:SetLabel(0)
return Duel.IsExistingTarget(c27068117.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingTarget(c27068117.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and e:GetHandler():IsCanOverlay()
end end
e:SetLabel(0) e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
......
...@@ -29,7 +29,7 @@ function c28400508.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,7 +29,7 @@ function c28400508.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 c28400508.cfilter(c) function c28400508.cfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsSetCard(0x48) and not c:IsCode(28400508) return c:IsRace(RACE_DRAGON) and c:IsSetCard(0x48) and not c:IsCode(28400508) and c:IsCanOverlay()
end end
function c28400508.spfilter(c,e,tp) function c28400508.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsSetCard(0x48) and not c:IsCode(28400508) return c:IsRace(RACE_DRAGON) and c:IsSetCard(0x48) and not c:IsCode(28400508)
...@@ -49,7 +49,7 @@ function c28400508.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function c28400508.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
local fid=0 local fid=0
if tc then if tc then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(28400508,1)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c28400508.cfilter),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,tc) local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c28400508.cfilter),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,tc)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.Overlay(tc,g2) Duel.Overlay(tc,g2)
......
...@@ -30,7 +30,8 @@ function c28770951.matfilter(c) ...@@ -30,7 +30,8 @@ function c28770951.matfilter(c)
end end
function c28770951.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c28770951.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c28770951.matfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c28770951.matfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c28770951.matfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c28770951.matfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c28770951.matfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c28770951.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
......
...@@ -25,8 +25,8 @@ function c31320433.initial_effect(c) ...@@ -25,8 +25,8 @@ function c31320433.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c31320433.xyz_number=47 c31320433.xyz_number=47
function c31320433.matfilter(c) function c31320433.matfilter(c,e)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsType(TYPE_TOKEN) and c:IsLevel(3) and c:IsAttribute(ATTRIBUTE_WATER) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsLevel(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end end
function c31320433.mattg(e,tp,eg,ep,ev,re,r,rp,chk) function c31320433.mattg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c31320433.matfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c31320433.matfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
...@@ -34,7 +34,7 @@ end ...@@ -34,7 +34,7 @@ end
function c31320433.matop(e,tp,eg,ep,ev,re,r,rp) function c31320433.matop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c31320433.matfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c31320433.matfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,e)
if g:GetCount()>=0 then if g:GetCount()>=0 then
Duel.Overlay(e:GetHandler(),g) Duel.Overlay(e:GetHandler(),g)
end end
......
...@@ -21,6 +21,7 @@ end ...@@ -21,6 +21,7 @@ end
function c31554054.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c31554054.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c31554054.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c31554054.filter(chkc,e,tp) end
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and e:GetHandler():IsCanOverlay()
and Duel.GetAttackTarget():IsAbleToDeck() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetAttackTarget():IsAbleToDeck() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c31554054.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c31554054.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -27,7 +27,8 @@ end ...@@ -27,7 +27,8 @@ end
function c31755044.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c31755044.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c31755044.matfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c31755044.matfilter(chkc) end
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and Duel.IsExistingTarget(c31755044.matfilter,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingTarget(c31755044.matfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c31755044.matfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c31755044.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
......
...@@ -40,7 +40,7 @@ c32559361.xyz_number=9 ...@@ -40,7 +40,7 @@ c32559361.xyz_number=9
function c32559361.target(e,tp,eg,ep,ev,re,r,rp,chk) function c32559361.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetBattleTarget() local tc=c:GetBattleTarget()
if chk==0 then return tc and c:IsType(TYPE_XYZ) and not tc:IsType(TYPE_TOKEN) and tc:IsAbleToChangeControler() end if chk==0 then return tc and c:IsType(TYPE_XYZ) and tc:IsCanOverlay() end
end end
function c32559361.operation(e,tp,eg,ep,ev,re,r,rp) function c32559361.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -38,7 +38,8 @@ function c3298689.filter2(c,e,tp,mc,rk) ...@@ -38,7 +38,8 @@ function c3298689.filter2(c,e,tp,mc,rk)
end end
function c3298689.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c3298689.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c3298689.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c3298689.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c3298689.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c3298689.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c3298689.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c3298689.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
...@@ -70,7 +71,7 @@ function c3298689.xyzfilter(c) ...@@ -70,7 +71,7 @@ function c3298689.xyzfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ)
end end
function c3298689.matfilter(c) function c3298689.matfilter(c)
return c:IsSetCard(0x10db) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x10db) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c3298689.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c3298689.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c3298689.xyzfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c3298689.xyzfilter(chkc) end
...@@ -82,7 +83,7 @@ end ...@@ -82,7 +83,7 @@ end
function c3298689.matop(e,tp,eg,ep,ev,re,r,rp) function c3298689.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c3298689.matfilter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c3298689.matfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Overlay(tc,g) Duel.Overlay(tc,g)
......
...@@ -34,12 +34,15 @@ function c39030163.mtcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,12 +34,15 @@ function c39030163.mtcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function c39030163.mtfilter(c,e)
return c:IsCanOverlay() and c:IsCanBeEffectTarget(e)
end
function c39030163.mttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c39030163.mttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=e:GetHandler():GetEquipGroup() local g=e:GetHandler():GetEquipGroup()
if chkc then return g:IsContains(chkc) and chkc:IsCanBeEffectTarget(e) end if chkc then return g:IsContains(chkc) and chkc:IsCanBeEffectTarget(e) end
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and g:IsExists(Card.IsCanBeEffectTarget,1,nil,e) end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and g:IsExists(c39030163.mtfilter,1,nil,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local tg=g:FilterSelect(tp,Card.IsCanBeEffectTarget,1,2,nil,e) local tg=g:FilterSelect(tp,c39030163.mtfilter,1,2,nil,e)
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
end end
function c39030163.mtfilter(c,e) function c39030163.mtfilter(c,e)
......
...@@ -15,12 +15,12 @@ function c43841694.filter(c,e,tp) ...@@ -15,12 +15,12 @@ function c43841694.filter(c,e,tp)
return c:IsType(TYPE_XYZ) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_XYZ) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c43841694.filter2(c) function c43841694.filter2(c)
return c:IsFaceup() and c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) return c:IsFaceup() and c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsCanOverlay()
end end
function c43841694.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c43841694.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c43841694.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingTarget(c43841694.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingTarget(c43841694.filter2,tp,LOCATION_REMOVED,0,1,nil) end and Duel.IsExistingTarget(c43841694.filter2,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c43841694.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g1=Duel.SelectTarget(tp,c43841694.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
...@@ -36,7 +36,7 @@ function c43841694.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +36,7 @@ function c43841694.activate(e,tp,eg,ep,ev,re,r,rp)
sg:RemoveCard(tc) sg:RemoveCard(tc)
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect() Duel.BreakEffect()
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.Overlay(tc,sg) Duel.Overlay(tc,sg)
end end
end end
......
...@@ -66,9 +66,11 @@ function c46060017.matfilter(c) ...@@ -66,9 +66,11 @@ function c46060017.matfilter(c)
end end
function c46060017.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c46060017.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c46060017.matfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c46060017.matfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c46060017.matfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c46060017.matfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c46060017.matfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c46060017.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
function c46060017.matop(e,tp,eg,ep,ev,re,r,rp) function c46060017.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -59,7 +59,7 @@ function c4820694.tgfilter(c) ...@@ -59,7 +59,7 @@ function c4820694.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x53) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsSetCard(0x53) and c:IsType(TYPE_XYZ)
end end
function c4820694.mfilter(c) function c4820694.mfilter(c)
return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c4820694.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c4820694.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -29,13 +29,12 @@ function c48739166.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,13 +29,12 @@ function c48739166.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end end
function c48739166.filter(c) function c48739166.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAbleToChangeControler() return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsCanOverlay()
and not c:IsType(TYPE_TOKEN) and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end end
function c48739166.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c48739166.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c48739166.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c48739166.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c48739166.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c48739166.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,c48739166.filter,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c48739166.filter,tp,0,LOCATION_MZONE,1,1,nil)
end end
function c48739166.operation(e,tp,eg,ep,ev,re,r,rp) function c48739166.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -26,6 +26,7 @@ function c49033797.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,6 +26,7 @@ function c49033797.target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(flag) e:SetLabel(flag)
if flag==3 then if flag==3 then
return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,0xb6) return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,0xb6)
and e:GetHandler():IsCanOverlay()
elseif flag==6 then elseif flag==6 then
return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,0xb7) return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,0xb7)
elseif flag==5 then elseif flag==5 then
......
...@@ -64,7 +64,7 @@ function c53334641.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function c53334641.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c53334641.mtfilter(c) function c53334641.mtfilter(c)
return c:IsSetCard(0x8d) return c:IsSetCard(0x8d) and c:IsCanOverlay()
end end
function c53334641.mttg(e,tp,eg,ep,ev,re,r,rp,chk) function c53334641.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
......
...@@ -45,17 +45,16 @@ function c55470553.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,17 +45,16 @@ function c55470553.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangePosition(at,POS_FACEUP_DEFENSE) Duel.ChangePosition(at,POS_FACEUP_DEFENSE)
end end
end end
function c55470553.spfilter(c,tp) function c55470553.spfilter(c)
return c:IsFaceup() and c:IsSetCard(0x107f) and not c:IsType(TYPE_TOKEN) return c:IsFaceup() and c:IsSetCard(0x107f) and c:IsCanOverlay()
and (c:IsControler(tp) or c:IsAbleToChangeControler())
end end
function c55470553.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c55470553.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c55470553.spfilter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c55470553.spfilter(chkc) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c55470553.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end and Duel.IsExistingTarget(c55470553.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,c55470553.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) Duel.SelectTarget(tp,c55470553.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c55470553.spop(e,tp,eg,ep,ev,re,r,rp) function c55470553.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -66,11 +66,11 @@ function c57031794.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,11 +66,11 @@ function c57031794.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c57031794.mtfilter(c,e) function c57031794.mtfilter(c,e)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsType(TYPE_TOKEN) and c:IsSetCard(0x10dc) and not c:IsImmuneToEffect(e) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x10dc) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end end
function c57031794.mttg(e,tp,eg,ep,ev,re,r,rp,chk) function c57031794.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c57031794.mtfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e) end and Duel.IsExistingMatchingCard(c57031794.mtfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
end end
function c57031794.mtop(e,tp,eg,ep,ev,re,r,rp) function c57031794.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -80,11 +80,11 @@ function c57450198.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,11 +80,11 @@ function c57450198.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c57450198.mtfilter(c,e) function c57450198.mtfilter(c,e)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsType(TYPE_TOKEN) and c:IsSetCard(0x10dc) and not c:IsImmuneToEffect(e) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x10dc) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end end
function c57450198.mttg(e,tp,eg,ep,ev,re,r,rp,chk) function c57450198.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c57450198.mtfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e) end and Duel.IsExistingMatchingCard(c57450198.mtfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
end end
function c57450198.mtop(e,tp,eg,ep,ev,re,r,rp) function c57450198.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -66,15 +66,18 @@ end ...@@ -66,15 +66,18 @@ end
function c58600555.condition(e,tp,eg,ep,ev,re,r,rp) function c58600555.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c58600555.cfilter,1,nil) return eg:IsExists(c58600555.cfilter,1,nil)
end end
function c58600555.matfilter(c)
return c:IsRace(RACE_INSECT) and c:IsCanOverlay()
end
function c58600555.target(e,tp,eg,ep,ev,re,r,rp,chk) function c58600555.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,1,nil,RACE_INSECT) end and Duel.IsExistingMatchingCard(c58600555.matfilter,tp,LOCATION_GRAVE,0,1,nil) end
end end
function c58600555.operation(e,tp,eg,ep,ev,re,r,rp) function c58600555.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsRace),tp,LOCATION_GRAVE,0,1,1,nil,RACE_INSECT) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c58600555.matfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Overlay(c,g) Duel.Overlay(c,g)
end end
......
...@@ -52,11 +52,14 @@ end ...@@ -52,11 +52,14 @@ end
function c59208943.tgfilter(c) function c59208943.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
end end
function c59208943.matfilter(c)
return c:IsSetCard(0x126) and c:IsCanOverlay()
end
function c59208943.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c59208943.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c59208943.tgfilter(chkc) and chkc~=c end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c59208943.tgfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c59208943.tgfilter,tp,LOCATION_MZONE,0,1,c) if chk==0 then return Duel.IsExistingTarget(c59208943.tgfilter,tp,LOCATION_MZONE,0,1,c)
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x126) end and Duel.IsExistingMatchingCard(c59208943.matfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c59208943.tgfilter,tp,LOCATION_MZONE,0,1,1,c) Duel.SelectTarget(tp,c59208943.tgfilter,tp,LOCATION_MZONE,0,1,1,c)
end end
...@@ -64,7 +67,7 @@ function c59208943.matop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +67,7 @@ function c59208943.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x126) local g=Duel.SelectMatchingCard(tp,c59208943.matfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Overlay(tc,g) Duel.Overlay(tc,g)
end end
......
...@@ -51,9 +51,9 @@ end ...@@ -51,9 +51,9 @@ end
function c60195675.xyzcon(e,tp,eg,ep,ev,re,r,rp) function c60195675.xyzcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetBattleTarget() local tc=c:GetBattleTarget()
if not c:IsRelateToBattle() or c:IsFacedown() then return false end if not c:IsRelateToBattle() then return false end
e:SetLabelObject(tc) e:SetLabelObject(tc)
return tc and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and not tc:IsType(TYPE_TOKEN) return tc and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and tc:IsCanOverlay()
end end
function c60195675.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) function c60195675.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end
...@@ -64,7 +64,7 @@ end ...@@ -64,7 +64,7 @@ end
function c60195675.xyzop(e,tp,eg,ep,ev,re,r,rp) function c60195675.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.Overlay(c,tc) Duel.Overlay(c,tc)
end end
end end
......
...@@ -52,15 +52,15 @@ end ...@@ -52,15 +52,15 @@ end
function c60944809.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60944809.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60944809.matfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60944809.matfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60944809.matfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c60944809.matfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c60944809.matfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c60944809.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c60944809.matop(e,tp,eg,ep,ev,re,r,rp) function c60944809.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsCanOverlay,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Overlay(tc,g) Duel.Overlay(tc,g)
end end
......
...@@ -77,7 +77,7 @@ function c60954556.xyzcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +77,7 @@ function c60954556.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function c60954556.xyzfilter(c) function c60954556.xyzfilter(c)
return c:IsSetCard(0xf7) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0xf7) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c60954556.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60954556.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c60954556.xyzfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c60954556.xyzfilter(chkc) end
......
...@@ -44,12 +44,15 @@ function c62541668.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -44,12 +44,15 @@ function c62541668.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c62541668.rmfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c62541668.rmfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function c62541668.matfilter(c)
return c:IsLocation(LOCATION_REMOVED) and c:IsCanOverlay()
end
function c62541668.rmop(e,tp,eg,ep,ev,re,r,rp) function c62541668.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c62541668.rmfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c62541668.rmfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED) local og=Duel.GetOperatedGroup():Filter(c62541668.matfilter,nil)
if og:GetCount()>0 and c:IsRelateToEffect(e) then if og:GetCount()>0 and c:IsRelateToEffect(e) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
......
...@@ -96,7 +96,7 @@ function c63049052.eqlimit(e,c) ...@@ -96,7 +96,7 @@ function c63049052.eqlimit(e,c)
return c:GetControler()==e:GetOwnerPlayer() and c:IsType(TYPE_XYZ) return c:GetControler()==e:GetOwnerPlayer() and c:IsType(TYPE_XYZ)
end end
function c63049052.mfilter(c) function c63049052.mfilter(c)
return c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c63049052.mattg(e,tp,eg,ep,ev,re,r,rp,chk) function c63049052.mattg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c63049052.mfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c63049052.mfilter,tp,LOCATION_HAND,0,1,nil) end
......
...@@ -92,7 +92,7 @@ function c67865534.xyzcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,7 +92,7 @@ function c67865534.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end end
function c67865534.xyzfilter(c) function c67865534.xyzfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_MONSTER) return c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c67865534.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c67865534.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c67865534.xyzfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c67865534.xyzfilter(chkc) end
......
...@@ -37,37 +37,34 @@ end ...@@ -37,37 +37,34 @@ end
function c69073023.spfilter(c,e,tp) function c69073023.spfilter(c,e,tp)
return c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c69073023.matfilter(c)
return not c:IsType(TYPE_TOKEN) and c:IsAbleToChangeControler()
end
function c69073023.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c69073023.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c69073023.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingTarget(c69073023.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingTarget(c69073023.matfilter,tp,0,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingTarget(Card.IsCanOverlay,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c69073023.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c69073023.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
e:SetLabelObject(g:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,c69073023.matfilter,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SelectTarget(tp,Card.IsCanOverlay,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c69073023.spop(e,tp,eg,ep,ev,re,r,rp) function c69073023.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local hc=e:GetLabelObject()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=tg:Filter(c69073023.spfilter,nil,e,tp):GetFirst() local tc=g:GetFirst()
if tc and tc:IsRelateToEffect(e) if tc==hc then tc=g:GetNext() end
and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then if hc:IsRelateToEffect(e) and Duel.SpecialSummon(hc,0,tp,tp,false,false,POS_FACEUP)>0 then
local mat=tg:Filter(c69073023.matfilter,tc,e,tp):GetFirst() if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
if mat and mat:IsRelateToEffect(e) and not mat:IsImmuneToEffect(e) then local og=tc:GetOverlayGroup()
local og=mat:GetOverlayGroup()
if og:GetCount()>0 then if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE) Duel.SendtoGrave(og,REASON_RULE)
end end
mat:CancelToGrave() tc:CancelToGrave()
Duel.Overlay(tc,mat) Duel.Overlay(hc,tc)
end end
end end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
...@@ -59,11 +59,15 @@ function c69757518.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,11 +59,15 @@ function c69757518.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
function c69757518.tdfilter(c)
return c:IsAbleToDeck() or c:IsCanOverlay()
end
function c69757518.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c69757518.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil) end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingTarget(c69757518.tdfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,2,nil) local g=Duel.SelectTarget(tp,c69757518.tdfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,2,0,0)
end end
......
...@@ -53,7 +53,8 @@ end ...@@ -53,7 +53,8 @@ end
function c71166481.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71166481.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c71166481.xfilter(chkc) and chkc~=c end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c71166481.xfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c71166481.xfilter,tp,LOCATION_MZONE,0,1,c) end if chk==0 then return Duel.IsExistingTarget(c71166481.xfilter,tp,LOCATION_MZONE,0,1,c)
and c:IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c71166481.xfilter,tp,LOCATION_MZONE,0,1,1,c) Duel.SelectTarget(tp,c71166481.xfilter,tp,LOCATION_MZONE,0,1,1,c)
end end
......
...@@ -33,7 +33,7 @@ function c71921856.initial_effect(c) ...@@ -33,7 +33,7 @@ function c71921856.initial_effect(c)
end end
c71921856.xyz_number=79 c71921856.xyz_number=79
function c71921856.filter(c) function c71921856.filter(c)
return c:IsSetCard(0x84) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x84) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c71921856.target(e,tp,eg,ep,ev,re,r,rp,chk) function c71921856.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
......
...@@ -26,7 +26,7 @@ function c720147.matfilter1(c,tp,g) ...@@ -26,7 +26,7 @@ function c720147.matfilter1(c,tp,g)
and Duel.IsExistingMatchingCard(c720147.matfilter2,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,g:GetCount(),sg) and Duel.IsExistingMatchingCard(c720147.matfilter2,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,g:GetCount(),sg)
end end
function c720147.matfilter2(c) function c720147.matfilter2(c)
return c:IsSetCard(0x134) and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_TOKEN) and not c:IsForbidden() return c:IsSetCard(0x134) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c720147.fselect(g,tp) function c720147.fselect(g,tp)
if Duel.IsExistingTarget(c720147.matfilter1,tp,LOCATION_MZONE,0,1,g,tp,g) then if Duel.IsExistingTarget(c720147.matfilter1,tp,LOCATION_MZONE,0,1,g,tp,g) then
......
...@@ -3,7 +3,6 @@ function c72502414.initial_effect(c) ...@@ -3,7 +3,6 @@ function c72502414.initial_effect(c)
--material --material
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(72502414,0)) e1:SetDescription(aux.Stringid(72502414,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
...@@ -17,9 +16,11 @@ function c72502414.filter(c) ...@@ -17,9 +16,11 @@ function c72502414.filter(c)
end end
function c72502414.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c72502414.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c72502414.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c72502414.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c72502414.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c72502414.filter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c72502414.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c72502414.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
function c72502414.operation(e,tp,eg,ep,ev,re,r,rp) function c72502414.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -26,7 +26,7 @@ function c73881652.tgfilter(c) ...@@ -26,7 +26,7 @@ function c73881652.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xf1) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xf1)
end end
function c73881652.matfilter(c) function c73881652.matfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf1) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf1) and c:IsCanOverlay()
end end
function c73881652.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c73881652.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c73881652.tgfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c73881652.tgfilter(chkc) end
......
...@@ -11,7 +11,7 @@ function c74100225.initial_effect(c) ...@@ -11,7 +11,7 @@ function c74100225.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c74100225.filter(c,cat) function c74100225.filter(c,cat)
return c:IsSetCard(cat) and c:IsType(TYPE_MONSTER) return c:IsSetCard(cat) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c74100225.spfilter(c,e,tp) function c74100225.spfilter(c,e,tp)
return c:IsSetCard(0x504e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x504e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -18,7 +18,8 @@ end ...@@ -18,7 +18,8 @@ end
function c74852810.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c74852810.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c74852810.filter1,tp,0,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingTarget(c74852810.filter1,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingTarget(c74852810.filter2,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingTarget(c74852810.filter2,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c74852810.filter1,tp,0,LOCATION_MZONE,1,1,nil) local g1=Duel.SelectTarget(tp,c74852810.filter1,tp,0,LOCATION_MZONE,1,1,nil)
e:SetLabelObject(g1:GetFirst()) e:SetLabelObject(g1:GetFirst())
......
...@@ -60,7 +60,7 @@ function c77799846.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -60,7 +60,7 @@ function c77799846.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c77799846.mfilter(c) function c77799846.mfilter(c)
return c:IsSetCard(0x85) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x85) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c77799846.spop(e,tp,eg,ep,ev,re,r,rp) function c77799846.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -54,13 +54,15 @@ function c7850740.tgfilter(c,tp,eg) ...@@ -54,13 +54,15 @@ function c7850740.tgfilter(c,tp,eg)
end end
function c7850740.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c7850740.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c7850740.tgfilter(chkc,tp,eg) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c7850740.tgfilter(chkc,tp,eg) end
if chk==0 then return Duel.IsExistingTarget(c7850740.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp,eg) end if chk==0 then return Duel.IsExistingTarget(c7850740.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp,eg)
and e:GetHandler():IsCanOverlay() end
if eg:GetCount()==1 then if eg:GetCount()==1 then
Duel.SetTargetCard(eg) Duel.SetTargetCard(eg)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c7850740.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,eg) Duel.SelectTarget(tp,c7850740.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,eg)
end end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
function c7850740.matop(e,tp,eg,ep,ev,re,r,rp) function c7850740.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -58,7 +58,8 @@ end ...@@ -58,7 +58,8 @@ end
function c78876707.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c78876707.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c78876707.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c78876707.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and e:GetHandler():IsCanOverlay() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c78876707.spop(e,tp,eg,ep,ev,re,r,rp) function c78876707.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -27,9 +27,13 @@ function c79094383.matfilter(c) ...@@ -27,9 +27,13 @@ function c79094383.matfilter(c)
end end
function c79094383.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c79094383.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c79094383.matfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c79094383.matfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c79094383.matfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c79094383.matfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c79094383.matfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c79094383.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end end
function c79094383.matop(e,tp,eg,ep,ev,re,r,rp) function c79094383.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -66,8 +66,10 @@ function c79985120.spfilter(c,e,tp) ...@@ -66,8 +66,10 @@ function c79985120.spfilter(c,e,tp)
end end
function c79985120.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c79985120.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c79985120.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c79985120.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and e:GetHandler():IsCanOverlay() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
function c79985120.spop(e,tp,eg,ep,ev,re,r,rp) function c79985120.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -68,21 +68,23 @@ end ...@@ -68,21 +68,23 @@ end
function c8165596.condition(e,tp,eg,ep,ev,re,r,rp) function c8165596.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function c8165596.filter(c) function c8165596.filter(c,mc)
return c:IsSetCard(0x55,0x7b) return c:IsSetCard(0x55,0x7b) and (c:IsAbleToHand() or (mc:IsType(TYPE_XYZ) and c:IsCanOverlay()))
end end
function c8165596.target(e,tp,eg,ep,ev,re,r,rp,chk) function c8165596.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8165596.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c8165596.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler()) end
end end
function c8165596.operation(e,tp,eg,ep,ev,re,r,rp) function c8165596.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c8165596.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c8165596.filter,tp,LOCATION_DECK,0,1,1,nil,c)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and (tc:IsAbleToHand() and Duel.SelectOption(tp,1190,aux.Stringid(8165596,2))==0) then if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT) if c:IsType(TYPE_XYZ) and tc:IsCanOverlay() and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,aux.Stringid(8165596,2))==1) then
Duel.ConfirmCards(1-tp,tc) Duel.Overlay(c,Group.FromCards(tc))
else else
Duel.Overlay(c,Group.FromCards(tc)) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end end
end end
...@@ -35,7 +35,7 @@ end ...@@ -35,7 +35,7 @@ end
function c82496097.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c82496097.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c82496097.matfilter(chkc) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end if chkc then return c82496097.matfilter(chkc) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c82496097.matfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c82496097.matfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_GRAVE,1,nil) end and Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c82496097.matfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c82496097.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
...@@ -43,7 +43,7 @@ function c82496097.matop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function c82496097.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(aux.TRUE),tp,0,LOCATION_GRAVE,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsCanOverlay),tp,0,LOCATION_GRAVE,1,1,nil)
Duel.Overlay(tc,g) Duel.Overlay(tc,g)
end end
end end
......
...@@ -29,8 +29,8 @@ function c83108603.xyzfilter(c,tp) ...@@ -29,8 +29,8 @@ function c83108603.xyzfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c83108603.matfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,c) and Duel.IsExistingMatchingCard(c83108603.matfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,c)
end end
function c83108603.matfilter(c) function c83108603.matfilter(c,e)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x107d) and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_TOKEN) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x107d) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end end
function c83108603.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c83108603.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c83108603.xyzfilter(chkc,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c83108603.xyzfilter(chkc,tp) end
...@@ -43,7 +43,7 @@ function c83108603.matop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function c83108603.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c83108603.matfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,tc) local g=Duel.SelectMatchingCard(tp,c83108603.matfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,tc,e)
if g:GetCount()>0 then if g:GetCount()>0 then
local mg=g:GetFirst():GetOverlayGroup() local mg=g:GetFirst():GetOverlayGroup()
if mg:GetCount()>0 then if mg:GetCount()>0 then
......
...@@ -31,10 +31,10 @@ function c83319610.initial_effect(c) ...@@ -31,10 +31,10 @@ function c83319610.initial_effect(c)
end end
function c83319610.filter1(c,e,tp) function c83319610.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRace(RACE_MACHINE) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRace(RACE_MACHINE)
and Duel.IsExistingMatchingCard(c83319610.filter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c,e) and Duel.IsExistingMatchingCard(c83319610.filter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c)
end end
function c83319610.filter2(c,e) function c83319610.filter2(c,e)
return c:IsSetCard(0x58) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsImmuneToEffect(e) return c:IsSetCard(0x58) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end end
function c83319610.mttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c83319610.mttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c83319610.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c83319610.filter1(chkc,e,tp) end
......
...@@ -29,6 +29,7 @@ function c8339504.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,6 +29,7 @@ function c8339504.target(e,tp,eg,ep,ev,re,r,rp,chk)
if e:GetLabel()~=100 then return false end if e:GetLabel()~=100 then return false end
e:SetLabel(0) e:SetLabel(0)
return e:IsHasType(EFFECT_TYPE_ACTIVATE) return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and e:GetHandler():IsCanOverlay()
and Duel.CheckReleaseGroup(tp,c8339504.cfilter,1,nil,e,tp) and Duel.CheckReleaseGroup(tp,c8339504.cfilter,1,nil,e,tp)
end end
e:SetLabel(0) e:SetLabel(0)
......
...@@ -76,7 +76,7 @@ function c84869738.xyzfilter(c) ...@@ -76,7 +76,7 @@ function c84869738.xyzfilter(c)
return c:IsFaceup() and c:IsSetCard(0x20f8) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsSetCard(0x20f8) and c:IsType(TYPE_XYZ)
end end
function c84869738.matfilter(c) function c84869738.matfilter(c)
return c:IsSetCard(0x20f8) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA)) return c:IsSetCard(0x20f8) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA)) and c:IsCanOverlay()
end end
function c84869738.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c84869738.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c84869738.xyzfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c84869738.xyzfilter(chkc) end
...@@ -88,8 +88,8 @@ end ...@@ -88,8 +88,8 @@ end
function c84869738.matop(e,tp,eg,ep,ev,re,r,rp) function c84869738.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c84869738.matfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,2,2,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c84869738.matfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,2,2,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Overlay(tc,g) Duel.Overlay(tc,g)
end end
......
...@@ -69,11 +69,11 @@ function c85252081.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,11 +69,11 @@ function c85252081.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c85252081.mtfilter(c,e) function c85252081.mtfilter(c,e)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsType(TYPE_TOKEN) and c:IsSetCard(0x10dc) and not c:IsImmuneToEffect(e) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x10dc) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end end
function c85252081.mttg(e,tp,eg,ep,ev,re,r,rp,chk) function c85252081.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c85252081.mtfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e) end and Duel.IsExistingMatchingCard(c85252081.mtfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
end end
function c85252081.mtop(e,tp,eg,ep,ev,re,r,rp) function c85252081.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -32,10 +32,13 @@ end ...@@ -32,10 +32,13 @@ end
function c86643777.filter(c) function c86643777.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRace(RACE_INSECT) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRace(RACE_INSECT)
end end
function c86643777.matfilter(c)
return c:IsRace(RACE_INSECT) and c:IsCanOverlay()
end
function c86643777.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86643777.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c86643777.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c86643777.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c86643777.filter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c86643777.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND,0,1,nil,RACE_INSECT) end and Duel.IsExistingMatchingCard(c86643777.matfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c86643777.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c86643777.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
...@@ -44,7 +47,7 @@ function c86643777.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +47,7 @@ function c86643777.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,Card.IsRace,tp,LOCATION_HAND,0,1,1,nil,RACE_INSECT) local g=Duel.SelectMatchingCard(tp,c86643777.matfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Overlay(tc,g) Duel.Overlay(tc,g)
end end
......
...@@ -57,7 +57,7 @@ function c8696773.matcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function c8696773.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function c8696773.matfilter(c) function c8696773.matfilter(c)
return c:IsSetCard(0x107d) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x107d) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c8696773.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c8696773.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c8696773.matfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c8696773.matfilter(chkc) end
......
...@@ -46,11 +46,14 @@ end ...@@ -46,11 +46,14 @@ end
function c8809344.condition(e,tp,eg,ep,ev,re,r,rp) function c8809344.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsType(TYPE_XYZ) and e:GetHandler():GetOverlayCount()>0 return e:GetHandler():IsType(TYPE_XYZ) and e:GetHandler():GetOverlayCount()>0
end end
function c8809344.matfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end
function c8809344.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c8809344.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsType(TYPE_MONSTER) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c8809344.matfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_MONSTER) end if chk==0 then return Duel.IsExistingTarget(c8809344.matfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_GRAVE,0,1,1,nil,TYPE_MONSTER) local g=Duel.SelectTarget(tp,c8809344.matfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end end
function c8809344.operation(e,tp,eg,ep,ev,re,r,rp) function c8809344.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -39,7 +39,7 @@ end ...@@ -39,7 +39,7 @@ end
function c90098780.spop(e,tp,eg,ep,ev,re,r,rp) function c90098780.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local g=Duel.GetMatchingGroup(Card.IsCanOverlay,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(90098780,2)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(90098780,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:Select(tp,1,2,nil) local sg=g:Select(tp,1,2,nil)
......
...@@ -55,7 +55,7 @@ function c90126061.con(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c90126061.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattledGroupCount()>0 return e:GetHandler():GetBattledGroupCount()>0
end end
function c90126061.mtfilter(c) function c90126061.mtfilter(c)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c90126061.mttg(e,tp,eg,ep,ev,re,r,rp,chk) function c90126061.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90126061.mtfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90126061.mtfilter(chkc) end
......
...@@ -59,7 +59,7 @@ function c92015800.indval2(e,te,rp) ...@@ -59,7 +59,7 @@ function c92015800.indval2(e,te,rp)
return rp==1-e:GetHandlerPlayer() and te:IsActivated() and te:GetHandler():GetAttribute()&e:GetHandler():GetAttribute()~=0 return rp==1-e:GetHandlerPlayer() and te:IsActivated() and te:GetHandler():GetAttribute()&e:GetHandler():GetAttribute()~=0
end end
function c92015800.xyzfilter(c) function c92015800.xyzfilter(c)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c92015800.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) function c92015800.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c92015800.xyzfilter,tp,0,LOCATION_GRAVE,1,nil) if chk==0 then return Duel.IsExistingTarget(c92015800.xyzfilter,tp,0,LOCATION_GRAVE,1,nil)
......
...@@ -47,9 +47,11 @@ function c9260791.filter(c) ...@@ -47,9 +47,11 @@ function c9260791.filter(c)
end end
function c9260791.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9260791.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9260791.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9260791.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9260791.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c9260791.filter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c9260791.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c9260791.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
function c9260791.operation(e,tp,eg,ep,ev,re,r,rp) function c9260791.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -26,7 +26,7 @@ function c93854893.ovfilter(c) ...@@ -26,7 +26,7 @@ function c93854893.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x11b) and c:IsType(TYPE_LINK) return c:IsFaceup() and c:IsSetCard(0x11b) and c:IsType(TYPE_LINK)
end end
function c93854893.ofilter(c) function c93854893.ofilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c93854893.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c93854893.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) local b1=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)
......
...@@ -27,15 +27,15 @@ function c96142517.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -27,15 +27,15 @@ function c96142517.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
end end
function c96142517.filter1(c,e,tp) function c96142517.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return c:IsType(TYPE_XYZ) return c:IsType(TYPE_XYZ) and c:IsCanOverlay()
and Duel.IsExistingMatchingCard(c96142517.filter2,tp,0,LOCATION_GRAVE,1,nil,e,rk) and Duel.IsExistingMatchingCard(c96142517.filter2,tp,0,LOCATION_GRAVE,1,nil,e,rk)
and Duel.IsExistingMatchingCard(c96142517.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rk+1) and Duel.IsExistingMatchingCard(c96142517.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rk+1)
end end
function c96142517.filter2(c,e,rk) function c96142517.filter2(c,e,rk)
return c:IsType(TYPE_XYZ) and c:IsRank(rk) and c:IsCanBeEffectTarget(e) return c:IsType(TYPE_XYZ) and c:IsRank(rk) and c:IsCanBeEffectTarget(e) and c:IsCanOverlay()
end end
function c96142517.filter3(c) function c96142517.filter3(c)
return c:IsType(TYPE_XYZ) and c:IsRank(8) and c:IsCode(48995978) return c:IsType(TYPE_XYZ) and c:IsRank(8) and c:IsCode(48995978) and c:IsCanOverlay()
end end
function c96142517.spfilter(c,e,tp,rk) function c96142517.spfilter(c,e,tp,rk)
if c:GetOriginalCode()==6165656 then if c:GetOriginalCode()==6165656 then
...@@ -58,17 +58,17 @@ function c96142517.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -58,17 +58,17 @@ function c96142517.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c96142517.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c96142517.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g1=Duel.SelectTarget(tp,c96142517.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g1=Duel.SelectTarget(tp,c96142517.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local rk=g1:GetFirst():GetRank() local rk=g1:GetFirst():GetRank()
e:SetLabel(rk) e:SetLabel(rk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g2=Duel.SelectTarget(tp,c96142517.filter2,tp,0,LOCATION_GRAVE,1,1,nil,e,rk) local g2=Duel.SelectTarget(tp,c96142517.filter2,tp,0,LOCATION_GRAVE,1,1,nil,e,rk)
g1:Merge(g2) g1:Merge(g2)
local g=Duel.GetMatchingGroup(c96142517.filter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,rk) local g=Duel.GetMatchingGroup(c96142517.filter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,rk)
g:Sub(g1) g:Sub(g1)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(96142517,1)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(96142517,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:Select(tp,1,99,nil) local sg=g:Select(tp,1,99,nil)
Duel.SetTargetCard(sg) Duel.SetTargetCard(sg)
g1:Merge(sg) g1:Merge(sg)
...@@ -76,7 +76,7 @@ function c96142517.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -76,7 +76,7 @@ function c96142517.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local xg=Duel.GetMatchingGroup(c96142517.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,9) local xg=Duel.GetMatchingGroup(c96142517.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,9)
if rk==8 and xg:GetClassCount(Card.GetOriginalCode)==1 and xg:GetFirst():GetOriginalCode()==6165656 if rk==8 and xg:GetClassCount(Card.GetOriginalCode)==1 and xg:GetFirst():GetOriginalCode()==6165656
and not g1:IsExists(Card.IsCode,1,nil,48995978) then and not g1:IsExists(Card.IsCode,1,nil,48995978) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local ng=Duel.SelectTarget(tp,c96142517.filter3,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) local ng=Duel.SelectTarget(tp,c96142517.filter3,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
g1:Merge(ng) g1:Merge(ng)
end end
......
...@@ -68,8 +68,10 @@ function c96157835.spfilter2(c,e,tp) ...@@ -68,8 +68,10 @@ function c96157835.spfilter2(c,e,tp)
end end
function c96157835.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c96157835.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c96157835.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c96157835.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and e:GetHandler():IsCanOverlay() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
function c96157835.spop2(e,tp,eg,ep,ev,re,r,rp) function c96157835.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end if Duel.GetLocationCountFromEx(tp)<=0 then return end
......
...@@ -59,9 +59,9 @@ end ...@@ -59,9 +59,9 @@ end
function c97584719.xyzcon(e,tp,eg,ep,ev,re,r,rp) function c97584719.xyzcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetBattleTarget() local tc=c:GetBattleTarget()
if not c:IsRelateToBattle() or c:IsFacedown() then return false end if not c:IsRelateToBattle() then return false end
e:SetLabelObject(tc) e:SetLabelObject(tc)
return tc and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and not tc:IsType(TYPE_TOKEN) return tc and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and tc:IsCanOverlay()
end end
function c97584719.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) function c97584719.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end
...@@ -72,7 +72,7 @@ end ...@@ -72,7 +72,7 @@ end
function c97584719.xyzop(e,tp,eg,ep,ev,re,r,rp) function c97584719.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.Overlay(c,tc) Duel.Overlay(c,tc)
end end
end end
......
...@@ -12,10 +12,13 @@ end ...@@ -12,10 +12,13 @@ end
function c97738431.filter(c) function c97738431.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) and c:GetOverlayCount()==0 return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) and c:GetOverlayCount()==0
end end
function c97738431.matfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end
function c97738431.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c97738431.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c97738431.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c97738431.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c97738431.filter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c97738431.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND,0,2,nil,TYPE_MONSTER) end and Duel.IsExistingMatchingCard(c97738431.matfilter,tp,LOCATION_HAND,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c97738431.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c97738431.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
...@@ -23,7 +26,7 @@ function c97738431.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,7 +26,7 @@ function c97738431.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER) local g=Duel.GetMatchingGroup(c97738431.matfilter,tp,LOCATION_HAND,0,nil)
if g:GetCount()>=2 then if g:GetCount()>=2 then
local og=g:Select(tp,2,2,nil) local og=g:Select(tp,2,2,nil)
Duel.Overlay(tc,og) Duel.Overlay(tc,og)
......
...@@ -50,17 +50,15 @@ function c98918572.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -50,17 +50,15 @@ function c98918572.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c98918572.xyzfilter,tp,LOCATION_MZONE,0,2,nil) end if chk==0 then return Duel.IsExistingTarget(c98918572.xyzfilter,tp,LOCATION_MZONE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(98918572,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(98918572,1))
local g1=Duel.SelectTarget(tp,c98918572.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c98918572.xyzfilter,tp,LOCATION_MZONE,0,2,2,nil)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g2=Duel.SelectTarget(tp,c98918572.xyzfilter,tp,LOCATION_MZONE,0,1,1,g1:GetFirst())
end end
function c98918572.xyzop(e,tp,eg,ep,ev,re,r,rp) function c98918572.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()~=2 then return end if g:GetCount()~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local xc=g:Select(tp,1,1,nil):GetFirst()
g:RemoveCard(xc)
local tc=g:GetFirst() local tc=g:GetFirst()
local xc=g:GetNext()
if xc==e:GetLabelObject() then tc,xc=xc,tc end
if not tc:IsImmuneToEffect(e) then if not tc:IsImmuneToEffect(e) then
local og=xc:GetOverlayGroup() local og=xc:GetOverlayGroup()
if og:GetCount()>0 then if og:GetCount()>0 then
......
...@@ -15,6 +15,7 @@ end ...@@ -15,6 +15,7 @@ end
function c99397762.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c99397762.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c99397762.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c99397762.filter(chkc) end
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and e:GetHandler():IsCanOverlay()
and Duel.IsExistingTarget(c99397762.filter,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingTarget(c99397762.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c99397762.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c99397762.filter,tp,LOCATION_MZONE,0,1,1,nil)
......
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