Commit a9ab2c75 authored by mercury233's avatar mercury233 Committed by GitHub

update new rule (#1291)

parent d26161a5
...@@ -70,7 +70,7 @@ function c10424147.spfilter3(c,e) ...@@ -70,7 +70,7 @@ function c10424147.spfilter3(c,e)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0x20dc) and c:IsType(TYPE_XYZ) and c:IsCanBeEffectTarget(e) return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0x20dc) and c:IsType(TYPE_XYZ) and c:IsCanBeEffectTarget(e)
end end
function c10424147.spfilter4(c,e,tp) function c10424147.spfilter4(c,e,tp)
return c:IsCode(84025439) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(84025439) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c10424147.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) function c10424147.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
...@@ -79,8 +79,7 @@ end ...@@ -79,8 +79,7 @@ end
function c10424147.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c10424147.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local g=Duel.GetMatchingGroup(c10424147.spfilter3,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e) local g=Duel.GetMatchingGroup(c10424147.spfilter3,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return g:GetClassCount(Card.GetCode)>=3
and g:GetClassCount(Card.GetCode)>=3
and Duel.IsExistingMatchingCard(c10424147.spfilter4,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c10424147.spfilter4,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,3,3) local sg=g:SelectSubGroup(tp,aux.dncheck,false,3,3)
...@@ -91,7 +90,6 @@ function c10424147.mtfilter(c,e) ...@@ -91,7 +90,6 @@ function c10424147.mtfilter(c,e)
return c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) return c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e)
end end
function c10424147.spop2(e,tp,eg,ep,ev,re,r,rp) function c10424147.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c10424147.spfilter4,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local sg=Duel.SelectMatchingCard(tp,c10424147.spfilter4,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local sc=sg:GetFirst() local sc=sg:GetFirst()
......
...@@ -22,23 +22,16 @@ function c10813327.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,23 +22,16 @@ function c10813327.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c10813327.spfilter(c,e,tp) function c10813327.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function c10813327.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c10813327.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then return Duel.IsExistingMatchingCard(c10813327.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
return loc~=0 and Duel.IsExistingMatchingCard(c10813327.spfilter,tp,loc,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end end
function c10813327.spop(e,tp,eg,ep,ev,re,r,rp) function c10813327.spop(e,tp,eg,ep,ev,re,r,rp)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10813327.spfilter,tp,loc,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c10813327.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -21,12 +21,12 @@ function c11047543.filter2(c,e,tp,lv) ...@@ -21,12 +21,12 @@ function c11047543.filter2(c,e,tp,lv)
and Duel.IsExistingMatchingCard(c11047543.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+clv) and Duel.IsExistingMatchingCard(c11047543.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+clv)
end end
function c11047543.spfilter(c,e,tp,lv) function c11047543.spfilter(c,e,tp,lv)
return c:IsRace(RACE_PSYCHO) and c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsRace(RACE_PSYCHO) and c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c11047543.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c11047543.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.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingTarget(c11047543.filter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
and Duel.IsExistingTarget(c11047543.filter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectTarget(tp,c11047543.filter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) local g1=Duel.SelectTarget(tp,c11047543.filter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
...@@ -36,7 +36,6 @@ function c11047543.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -36,7 +36,6 @@ function c11047543.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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 c11047543.operation(e,tp,eg,ep,ev,re,r,rp) function c11047543.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc1=g:GetFirst() local tc1=g:GetFirst()
local tc2=g:GetNext() local tc2=g:GetNext()
......
...@@ -18,28 +18,26 @@ function c11082056.initial_effect(c) ...@@ -18,28 +18,26 @@ function c11082056.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c11082056.tgfilter(c,e,tp) function c11082056.tgfilter(c,e,tp)
return c:IsType(TYPE_TRAP) and Duel.IsExistingMatchingCard(c11082056.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode()) return c:IsType(TYPE_TRAP) and Duel.IsExistingMatchingCard(c11082056.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end end
function c11082056.spfilter(c,e,tp,code) function c11082056.spfilter(c,e,tp,tc)
return c:IsType(TYPE_FUSION) and c.material_trap and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and code==c.material_trap return c:IsType(TYPE_FUSION) and c.material_trap and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and tc:IsCode(c.material_trap)
and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end end
function c11082056.target(e,tp,eg,ep,ev,re,r,rp,chk) function c11082056.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingMatchingCard(c11082056.tgfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c11082056.tgfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil,e,tp) 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 c11082056.activate(e,tp,eg,ep,ev,re,r,rp) function c11082056.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=Duel.SelectMatchingCard(tp,c11082056.tgfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c11082056.tgfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and not tc:IsImmuneToEffect(e) then if tc and not tc:IsImmuneToEffect(e) then
if tc:IsOnField() and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end if tc:IsOnField() and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end
local code=tc:GetCode()
Duel.SendtoGrave(tc,REASON_EFFECT) Duel.SendtoGrave(tc,REASON_EFFECT)
if not tc:IsLocation(LOCATION_GRAVE) then return end if not tc:IsLocation(LOCATION_GRAVE) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c11082056.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,code) local sg=Duel.SelectMatchingCard(tp,c11082056.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=sg:GetFirst() local sc=sg:GetFirst()
if sc then if sc then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -17,11 +17,11 @@ function c11109820.filter1(c,e,tp) ...@@ -17,11 +17,11 @@ function c11109820.filter1(c,e,tp)
end end
function c11109820.filter2(c,e,tp,mc,rk) function c11109820.filter2(c,e,tp,mc,rk)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c11109820.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rk+c:GetRank()) and Duel.IsExistingMatchingCard(c11109820.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rk+c:GetRank(),Group.FromCards(c,mc))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end end
function c11109820.spfilter(c,e,tp,rk) function c11109820.spfilter(c,e,tp,rk,mg)
return (c:IsRank(rk) or c:IsRank(rk-1)) and not c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return (c:IsRank(rk) or c:IsRank(rk-1)) and not c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end 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
...@@ -62,7 +62,7 @@ function c11109820.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,7 @@ function c11109820.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
if og:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<2 then return end if og:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<2 then return end
local sg=Duel.GetMatchingGroup(c11109820.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,tc1:GetRank()+tc2:GetRank()) local sg=Duel.GetMatchingGroup(c11109820.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,tc1:GetRank()+tc2:GetRank(),nil)
if sg:GetCount()==0 then return end if sg:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local ssg=sg:Select(tp,1,1,nil) local ssg=sg:Select(tp,1,1,nil)
......
...@@ -115,33 +115,34 @@ function c12289247.cfilter(c) ...@@ -115,33 +115,34 @@ function c12289247.cfilter(c)
and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup())
end end
function c12289247.hngoal(g,tp,c) function c12289247.hngoal(g,e,tp,c)
local sg=Group.FromCards(c) local sg=Group.FromCards(c)
sg:Merge(g) sg:Merge(g)
return Duel.GetLocationCountFromEx(tp,tp,sg)>0 return Duel.IsExistingMatchingCard(c12289247.hnfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,sg)
end end
function c12289247.hnfilter(c,e,tp) function c12289247.hnfilter(c,e,tp,sg)
return c:IsCode(13331639) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() return c:IsCode(13331639) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial()
and (not sg or Duel.GetLocationCountFromEx(tp,tp,sg,c)>0)
end end
function c12289247.hncost(e,tp,eg,ep,ev,re,r,rp,chk) function c12289247.hncost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(c12289247.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil) local mg=Duel.GetMatchingGroup(c12289247.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil)
if chk==0 then return c:IsAbleToRemoveAsCost() if chk==0 then return c:IsAbleToRemoveAsCost()
and mg:CheckSubGroupEach(c12289247.hnchecks,c12289247.hngoal,tp,c) end and Duel.IsExistingMatchingCard(c12289247.hnfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and mg:CheckSubGroupEach(c12289247.hnchecks,c12289247.hngoal,e,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=mg:SelectSubGroupEach(tp,c12289247.hnchecks,false,c12289247.hngoal,tp,c) local sg=mg:SelectSubGroupEach(tp,c12289247.hnchecks,false,c12289247.hngoal,e,tp,c)
sg:AddCard(c) sg:AddCard(c)
Duel.Remove(sg,POS_FACEUP,REASON_COST) Duel.Remove(sg,POS_FACEUP,REASON_COST)
end end
function c12289247.hntg(e,tp,eg,ep,ev,re,r,rp,chk) function c12289247.hntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) end
and Duel.IsExistingMatchingCard(c12289247.hnfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c12289247.hnop(e,tp,eg,ep,ev,re,r,rp) function c12289247.hnop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) then return end if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12289247.hnfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c12289247.hnfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
g:GetFirst():CompleteProcedure() g:GetFirst():CompleteProcedure()
......
...@@ -17,15 +17,13 @@ function c13166648.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,15 +17,13 @@ function c13166648.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c13166648.filter(c,e,tp) function c13166648.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_XYZ) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_XYZ)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c13166648.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13166648.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingMatchingCard(c13166648.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c13166648.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c13166648.activate(e,tp,eg,ep,ev,re,r,rp) function c13166648.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c13166648.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13166648.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -122,23 +122,16 @@ function c13331639.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -122,23 +122,16 @@ function c13331639.desop(e,tp,eg,ep,ev,re,r,rp)
end end
function c13331639.spfilter(c,e,tp) function c13331639.spfilter(c,e,tp)
return c:IsSetCard(0x20f8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x20f8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function c13331639.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13331639.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then return Duel.IsExistingMatchingCard(c13331639.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
return loc~=0 and Duel.IsExistingMatchingCard(c13331639.spfilter,tp,loc,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end end
function c13331639.spop(e,tp,eg,ep,ev,re,r,rp) function c13331639.spop(e,tp,eg,ep,ev,re,r,rp)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c13331639.spfilter,tp,loc,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13331639.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -34,22 +34,20 @@ end ...@@ -34,22 +34,20 @@ end
function c1412158.spcon(e,tp,eg,ep,ev,re,r,rp) function c1412158.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() return e:GetHandler():GetTurnID()~=Duel.GetTurnCount()
end end
function c1412158.spfilter(c,e,tp) function c1412158.spfilter(c,e,tp,mc)
return c:IsCode(75923050) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(75923050) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c1412158.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c1412158.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0 if chk==0 then return e:GetHandler():IsAbleToExtra()
and e:GetHandler():IsAbleToExtra() and Duel.IsExistingMatchingCard(c1412158.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end
and Duel.IsExistingMatchingCard(c1412158.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
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 c1412158.spop(e,tp,eg,ep,ev,re,r,rp) function c1412158.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp,tp,c)<=0 then return end if c:IsRelateToEffect(e) and c:IsFaceup() then
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 then local tc=Duel.GetFirstMatchingCard(c1412158.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,c)
local tc=Duel.GetFirstMatchingCard(c1412158.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) if tc and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 then
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
......
...@@ -15,10 +15,9 @@ function c14644902.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -15,10 +15,9 @@ function c14644902.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c14644902.rfilter(c,e,tp) function c14644902.rfilter(c,e,tp)
return c:IsReleasableByEffect() and not c:IsImmuneToEffect(e) return c:IsReleasableByEffect() and not c:IsImmuneToEffect(e)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end end
function c14644902.filter(c,e,tp) function c14644902.filter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c14644902.operation(e,tp,eg,ep,ev,re,r,rp) function c14644902.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -50,10 +50,9 @@ function c15717011.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,10 +50,9 @@ function c15717011.target(e,tp,eg,ep,ev,re,r,rp,chk)
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 c15717011.filter2(c,e,tp,code) function c15717011.filter2(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c15717011.operation(e,tp,eg,ep,ev,re,r,rp) function c15717011.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
local code=e:GetLabel() local code=e:GetLabel()
local tc=Duel.GetFirstMatchingCard(c15717011.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,code) local tc=Duel.GetFirstMatchingCard(c15717011.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,code)
if tc then if tc then
......
...@@ -18,18 +18,16 @@ function c15721392.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,18 +18,16 @@ function c15721392.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c15721392.cfilter,1,nil,tp) return eg:IsExists(c15721392.cfilter,1,nil,tp)
end end
function c15721392.spfilter(c,e,tp) function c15721392.spfilter(c,e,tp)
return c:IsSetCard(0x20dc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x20dc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c15721392.target(e,tp,eg,ep,ev,re,r,rp,chk) function c15721392.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingMatchingCard(c15721392.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c15721392.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c15721392.spfilter2(c,e,tp,mc) function c15721392.spfilter2(c,e,tp,mc)
return c:IsSetCard(0x10dc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.IsCodeListed(mc,c:GetCode()) return c:IsSetCard(0x10dc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.IsCodeListed(mc,c:GetCode())
end end
function c15721392.activate(e,tp,eg,ep,ev,re,r,rp) function c15721392.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c15721392.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local g=Duel.GetMatchingGroup(c15721392.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
......
...@@ -51,15 +51,14 @@ function c16691074.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,15 +51,14 @@ function c16691074.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ)
end end
function c16691074.spfilter2(c,e,tp) function c16691074.spfilter2(c,e,tp)
return c:IsSetCard(0x99) and not c:IsCode(16691074) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x99) and not c:IsCode(16691074)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c16691074.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c16691074.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.IsExistingMatchingCard(c16691074.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c16691074.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c16691074.spop(e,tp,eg,ep,ev,re,r,rp) function c16691074.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16691074.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c16691074.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -74,15 +74,13 @@ function c1686814.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,15 +74,13 @@ function c1686814.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c1686814.spfilter(c,e,tp) function c1686814.spfilter(c,e,tp)
return (c:IsSetCard(0xc2) or (c:IsLevel(7,8) and c:IsRace(RACE_DRAGON))) return (c:IsSetCard(0xc2) or (c:IsLevel(7,8) and c:IsRace(RACE_DRAGON)))
and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c1686814.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c1686814.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.IsExistingMatchingCard(c1686814.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c1686814.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c1686814.spop(e,tp,eg,ep,ev,re,r,rp) function c1686814.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1686814.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c1686814.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -12,34 +12,26 @@ function c1759808.initial_effect(c) ...@@ -12,34 +12,26 @@ function c1759808.initial_effect(c)
e1:SetOperation(c1759808.activate) e1:SetOperation(c1759808.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c1759808.filter(c,e,tp)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
return loc~=0 and c:IsFaceup() and Duel.IsExistingMatchingCard(c1759808.spfilter,tp,loc,0,1,nil,e,tp,c:GetCode())
end
function c1759808.cfilter(c,e,tp) function c1759808.cfilter(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c1759808.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode()) return c:IsFaceup() and Duel.IsExistingMatchingCard(c1759808.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode())
end end
function c1759808.spfilter(c,e,tp,code) function c1759808.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function c1759808.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c1759808.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c:IsControler(1-tp) and c1759808.cfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c:IsControler(1-tp) and c1759808.cfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c1759808.filter,tp,0,LOCATION_MZONE,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c1759808.cfilter,tp,0,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c1759808.filter,tp,0,LOCATION_MZONE,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c1759808.cfilter,tp,0,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end end
function c1759808.activate(e,tp,eg,ep,ev,re,r,rp) function c1759808.activate(e,tp,eg,ep,ev,re,r,rp)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if loc~=0~=0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local code=tc:GetCode()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1759808.spfilter,tp,loc,0,1,1,nil,e,tp,code) local g=Duel.SelectMatchingCard(tp,c1759808.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetCode())
local sc=g:GetFirst() local sc=g:GetFirst()
if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
tc:RegisterFlagEffect(1759808,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) tc:RegisterFlagEffect(1759808,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
......
...@@ -29,30 +29,26 @@ end ...@@ -29,30 +29,26 @@ end
function c17745969.matfilter(c) function c17745969.matfilter(c)
return c:IsFusionType(TYPE_FUSION) and c:IsFusionSetCard(0x16) return c:IsFusionType(TYPE_FUSION) and c:IsFusionSetCard(0x16)
end end
function c17745969.spfilter1(c,e,tp,loc) function c17745969.spfilter1(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c17745969.spfilter2,tp,loc,0,1,nil,e,tp,c:GetAttack()) return c:IsFaceup() and Duel.IsExistingMatchingCard(c17745969.spfilter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,c:GetAttack())
end end
function c17745969.spfilter2(c,e,tp,atk) function c17745969.spfilter2(c,e,tp,atk)
return c:IsSetCard(0x16) and c:IsAttackBelow(atk) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x16) and c:IsAttackBelow(atk) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function c17745969.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c17745969.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local loc=0 if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c17745969.spfilter1(chkc,e,tp) end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end if chk==0 then return Duel.IsExistingTarget(c17745969.spfilter1,tp,0,LOCATION_MZONE,1,nil,e,tp) end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c17745969.spfilter1(chkc,e,tp,loc) end
if chk==0 then return loc~=0 and Duel.IsExistingTarget(c17745969.spfilter1,tp,0,LOCATION_MZONE,1,nil,e,tp,loc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c17745969.spfilter1,tp,0,LOCATION_MZONE,1,1,nil,e,tp,loc) Duel.SelectTarget(tp,c17745969.spfilter1,tp,0,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end end
function c17745969.spop(e,tp,eg,ep,ev,re,r,rp) function c17745969.spop(e,tp,eg,ep,ev,re,r,rp)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if loc~=0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c17745969.spfilter2,tp,loc,0,1,1,nil,e,tp,tc:GetAttack()) local g=Duel.SelectMatchingCard(tp,c17745969.spfilter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetAttack())
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -21,11 +21,11 @@ end ...@@ -21,11 +21,11 @@ end
function c1784686.tgfilter(c,e,tp) function c1784686.tgfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x10a2) and c:IsCanBeFusionMaterial() return c:IsFaceup() and c:IsSetCard(0x10a2) and c:IsCanBeFusionMaterial()
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_FMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_FMATERIAL)
and Duel.IsExistingMatchingCard(c1784686.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode()) and Duel.IsExistingMatchingCard(c1784686.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end end
function c1784686.spfilter(c,e,tp,code) function c1784686.spfilter(c,e,tp,tc)
return aux.IsMaterialListCode(c,code) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) return aux.IsMaterialListCode(c,tc:GetCode()) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end end
function c1784686.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c1784686.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc==0 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1784686.tgfilter(chkc,e,tp) end if chkc==0 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1784686.tgfilter(chkc,e,tp) end
...@@ -36,10 +36,10 @@ function c1784686.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -36,10 +36,10 @@ function c1784686.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c1784686.activate(e,tp,eg,ep,ev,re,r,rp) function c1784686.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_FMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_FMATERIAL) then return end
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeFusionMaterial() and not tc:IsImmuneToEffect(e) then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeFusionMaterial() and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c1784686.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetCode()) local sg=Duel.SelectMatchingCard(tp,c1784686.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=sg:GetFirst() local sc=sg:GetFirst()
if sc then if sc then
sc:SetMaterial(Group.FromCards(tc)) sc:SetMaterial(Group.FromCards(tc))
......
...@@ -66,15 +66,13 @@ function c18210764.teop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,15 +66,13 @@ function c18210764.teop(e,tp,eg,ep,ev,re,r,rp)
end end
function c18210764.spfilter(c,e,tp) function c18210764.spfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsLevel(1) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsLevel(1)
and not c:IsCode(18210764) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(18210764) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c18210764.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c18210764.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.IsExistingMatchingCard(c18210764.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c18210764.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c18210764.spop(e,tp,eg,ep,ev,re,r,rp) function c18210764.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c18210764.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c18210764.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
......
...@@ -41,22 +41,22 @@ function c18326736.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,22 +41,22 @@ function c18326736.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
c:RemoveOverlayCard(tp,3,3,REASON_COST) c:RemoveOverlayCard(tp,3,3,REASON_COST)
c:RegisterFlagEffect(18326736,RESET_CHAIN,0,1) c:RegisterFlagEffect(18326736,RESET_CHAIN,0,1)
end end
function c18326736.filter(c,e,tp,rk) function c18326736.filter(c,e,tp,rk,mc)
return c:IsRank(rk) and not c:IsSetCard(0x48) and e:GetHandler():IsCanBeXyzMaterial(c) return c:IsRank(rk) and not c:IsSetCard(0x48) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c18326736.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c18326736.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0 local c=e:GetHandler()
and aux.MustMaterialCheck(e:GetHandler(),tp,EFFECT_MUST_BE_XMATERIAL) if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c18326736.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetRank()+1) end and Duel.IsExistingMatchingCard(c18326736.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRank()+1,c) 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 c18326736.spop(e,tp,eg,ep,ev,re,r,rp) function c18326736.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp,tp,c)<=0 or not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c18326736.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank()+1) local g=Duel.SelectMatchingCard(tp,c18326736.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank()+1,c)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=c:GetOverlayGroup() local mg=c:GetOverlayGroup()
......
...@@ -16,16 +16,14 @@ function c1845204.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -16,16 +16,14 @@ function c1845204.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
end end
function c1845204.filter(c,e,tp) function c1845204.filter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsLevelBelow(5) return c:IsType(TYPE_FUSION) and c:IsLevelBelow(5) and c:CheckFusionMaterial()
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c1845204.target(e,tp,eg,ep,ev,re,r,rp,chk) function c1845204.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingMatchingCard(c1845204.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c1845204.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c1845204.activate(e,tp,eg,ep,ev,re,r,rp) function c1845204.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1845204.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c1845204.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -11,26 +11,32 @@ function c18597560.initial_effect(c) ...@@ -11,26 +11,32 @@ function c18597560.initial_effect(c)
e1:SetOperation(c18597560.activate) e1:SetOperation(c18597560.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c18597560.cfilter(c,tp) function c18597560.cfilter(c,e,tp)
return c:IsCode(70095154) and Duel.GetLocationCountFromEx(tp,tp,c)>0 return c:IsCode(70095154) and Duel.IsExistingMatchingCard(c18597560.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end end
function c18597560.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c18597560.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c18597560.cfilter,1,nil,tp) end e:SetLabel(100)
local g=Duel.SelectReleaseGroup(tp,c18597560.cfilter,1,1,nil,tp) if chk==0 then return Duel.CheckReleaseGroup(tp,c18597560.cfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(tp,c18597560.cfilter,1,1,nil,e,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c18597560.filter(c,e,tp) function c18597560.filter(c,e,tp,rc)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListSetCard(c,0x1093) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_FUSION) and aux.IsMaterialListSetCard(c,0x1093)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,rc,c)>0
end end
function c18597560.target(e,tp,eg,ep,ev,re,r,rp,chk) function c18597560.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c18597560.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then
local res=e:GetLabel()==100
e:SetLabel(0)
return res or Duel.IsExistingMatchingCard(c18597560.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,nil)
end
e:SetLabel(0)
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 c18597560.activate(e,tp,eg,ep,ev,re,r,rp) function c18597560.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c18597560.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c18597560.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil):GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
tc:RegisterFlagEffect(18597560,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) tc:RegisterFlagEffect(18597560,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -60,16 +60,14 @@ function c18897163.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,16 +60,14 @@ function c18897163.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c18897163.spfilter(c,e,tp) function c18897163.spfilter(c,e,tp)
return c:IsSetCard(0x10af) and c:IsType(TYPE_XYZ) and not c:IsCode(18897163) return c:IsSetCard(0x10af) and c:IsType(TYPE_XYZ) and not c:IsCode(18897163)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c18897163.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c18897163.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.IsExistingMatchingCard(c18897163.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c18897163.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c18897163.spop(e,tp,eg,ep,ev,re,r,rp) function c18897163.spop(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
if Duel.GetLocationCountFromEx(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c18897163.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c18897163.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -24,20 +24,21 @@ end ...@@ -24,20 +24,21 @@ end
function c19355597.splimit(e,se,sp,st) function c19355597.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end end
function c19355597.tgfilter(c,tp) function c19355597.tgfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x1047) and Duel.GetLocationCountFromEx(tp,tp,c)>0 return c:IsFaceup() and c:IsSetCard(0x1047)
and Duel.IsExistingMatchingCard(c19355597.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end end
function c19355597.spfilter(c,e,tp) function c19355597.spfilter(c,e,tp,tc)
return c:IsSetCard(0x1047) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsSetCard(0x1047) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end end
function c19355597.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c19355597.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19355597.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) if chk==0 then return Duel.IsExistingMatchingCard(c19355597.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c19355597.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c19355597.spop(e,tp,eg,ep,ev,re,r,rp) function c19355597.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c19355597.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) local tg=Duel.SelectMatchingCard(tp,c19355597.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -62,16 +62,16 @@ function c20007374.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,16 +62,16 @@ function c20007374.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
function c20007374.filter(c,e,tp) function c20007374.filter(c,e,tp)
return c:IsCode(44508094) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) return c:IsCode(44508094) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c20007374.target(e,tp,eg,ep,ev,re,r,rp,chk) function c20007374.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(c20007374.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c20007374.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c20007374.activate(e,tp,eg,ep,ev,re,r,rp) function c20007374.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp)<=0 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c20007374.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c20007374.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -23,14 +23,12 @@ function c20590784.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,14 +23,12 @@ function c20590784.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c20590784.filter(c,e,tp) function c20590784.filter(c,e,tp)
return c:IsSetCard(0xa3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xa3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function c20590784.activate(e,tp,eg,ep,ev,re,r,rp) function c20590784.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() and Duel.Draw(tp,1,REASON_EFFECT)~=0 then if Duel.NegateAttack() and Duel.Draw(tp,1,REASON_EFFECT)~=0 then
local loc=0 local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c20590784.filter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c20590784.filter),tp,loc,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(20590784,0)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(20590784,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -11,13 +11,13 @@ function c21143940.initial_effect(c) ...@@ -11,13 +11,13 @@ function c21143940.initial_effect(c)
e1:SetOperation(c21143940.activate) e1:SetOperation(c21143940.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c21143940.tfilter(c,att,e,tp) function c21143940.tfilter(c,att,e,tp,tc)
return c:IsSetCard(0xa008) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsSetCard(0xa008) and c:IsAttribute(att)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end end
function c21143940.filter(c,e,tp) function c21143940.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x8) return c:IsFaceup() and c:IsSetCard(0x8)
and Duel.IsExistingMatchingCard(c21143940.tfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetAttribute(),e,tp) and Duel.IsExistingMatchingCard(c21143940.tfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetAttribute(),e,tp,c)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end end
function c21143940.chkfilter(c,att) function c21143940.chkfilter(c,att)
return c:IsFaceup() and c:IsSetCard(0x8) and (c:GetAttribute()&att)==att return c:IsFaceup() and c:IsSetCard(0x8) and (c:GetAttribute()&att)==att
...@@ -35,9 +35,8 @@ function c21143940.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,9 +35,8 @@ function c21143940.activate(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
local att=tc:GetAttribute() local att=tc:GetAttribute()
if Duel.SendtoGrave(tc,REASON_EFFECT)==0 then return end if Duel.SendtoGrave(tc,REASON_EFFECT)==0 then return end
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c21143940.tfilter,tp,LOCATION_EXTRA,0,1,1,nil,att,e,tp) local sg=Duel.SelectMatchingCard(tp,c21143940.tfilter,tp,LOCATION_EXTRA,0,1,1,nil,att,e,tp,nil)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
......
...@@ -43,15 +43,13 @@ function c21834870.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,15 +43,13 @@ function c21834870.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN)
end end
function c21834870.spfilter(c,e,tp) function c21834870.spfilter(c,e,tp)
return not c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return not c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c21834870.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c21834870.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.IsExistingMatchingCard(c21834870.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c21834870.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c21834870.spop(e,tp,eg,ep,ev,re,r,rp) function c21834870.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c21834870.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local tg=Duel.SelectMatchingCard(tp,c21834870.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if tg:GetCount()>0 then if tg:GetCount()>0 then
......
...@@ -50,15 +50,14 @@ function c21984400.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,15 +50,14 @@ function c21984400.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c21984400.spfilter1(c,e,tp) function c21984400.spfilter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x10d) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsSetCard(0x10d) and c:IsType(TYPE_PENDULUM)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c21984400.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c21984400.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingMatchingCard(c21984400.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c21984400.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c21984400.spop1(e,tp,eg,ep,ev,re,r,rp) function c21984400.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c21984400.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c21984400.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
...@@ -68,15 +67,14 @@ function c21984400.spop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,15 +67,14 @@ function c21984400.spop1(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c21984400.spfilter2(c,e,tp) function c21984400.spfilter2(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c21984400.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c21984400.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.IsExistingMatchingCard(c21984400.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c21984400.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c21984400.spop2(e,tp,eg,ep,ev,re,r,rp) function c21984400.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c21984400.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c21984400.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc then if tc then
......
...@@ -73,19 +73,19 @@ function c22211622.rcop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,19 +73,19 @@ function c22211622.rcop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT) Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT)
end end
end end
function c22211622.desfilter(c,tp,mc) function c22211622.desfilter(c,e,tp,mc)
return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0 return c:IsFaceup() and Duel.IsExistingMatchingCard(c22211622.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,Group.FromCards(c,mc))
end end
function c22211622.spfilter(c,e,tp) function c22211622.spfilter(c,e,tp,dg)
return c:IsType(TYPE_XYZ+TYPE_PENDULUM) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_XYZ+TYPE_PENDULUM) and c:IsRace(RACE_DRAGON)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,dg,c)>0
end end
function c22211622.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22211622.sptg(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_ONFIELD) and chkc:IsControler(tp) and c22211622.desfilter(chkc,tp,c) and chkc~=c end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and c22211622.desfilter(chkc,e,tp,c) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c22211622.desfilter,tp,LOCATION_ONFIELD,0,1,c,tp,c) if chk==0 then return Duel.IsExistingTarget(c22211622.desfilter,tp,LOCATION_ONFIELD,0,1,c,e,tp,c) end
and Duel.IsExistingMatchingCard(c22211622.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c22211622.desfilter,tp,LOCATION_ONFIELD,0,1,1,c,tp,c) local g=Duel.SelectTarget(tp,c22211622.desfilter,tp,LOCATION_ONFIELD,0,1,1,c,e,tp,c)
g:AddCard(c) g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
...@@ -96,9 +96,8 @@ function c22211622.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,9 +96,8 @@ function c22211622.spop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
local dg=Group.FromCards(c,tc) local dg=Group.FromCards(c,tc)
if Duel.Destroy(dg,REASON_EFFECT)==2 then if Duel.Destroy(dg,REASON_EFFECT)==2 then
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22211622.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c22211622.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
local sc=g:GetFirst() local sc=g:GetFirst()
if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
......
...@@ -38,7 +38,7 @@ function c23187256.filter(c,e,tp) ...@@ -38,7 +38,7 @@ function c23187256.filter(c,e,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c23187256.target(e,tp,eg,ep,ev,re,r,rp,chk) function c23187256.target(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,tp,nil,TYPE_XYZ)>0
and Duel.IsExistingMatchingCard(c23187256.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c23187256.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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
...@@ -46,7 +46,7 @@ function c23187256.gfilter(c,rank) ...@@ -46,7 +46,7 @@ function c23187256.gfilter(c,rank)
return c:IsRank(rank) return c:IsRank(rank)
end end
function c23187256.operation(e,tp,eg,ep,ev,re,r,rp) function c23187256.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCountFromEx(tp) local ft=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_XYZ)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp] local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
if ect~=nil then ft=math.min(ft,ect) end if ect~=nil then ft=math.min(ft,ect) end
......
...@@ -35,20 +35,21 @@ end ...@@ -35,20 +35,21 @@ end
function c23379054.splimit(e,c,sump,sumtype,sumpos,targetp,se) function c23379054.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetRace()~=RACE_DRAGON return c:GetRace()~=RACE_DRAGON
end end
function c23379054.filter1(c,e,tp,lv) function c23379054.filter1(c,e,tp,lv,mc)
return c:IsType(TYPE_FUSION) and c:IsAbleToRemove() return c:IsType(TYPE_FUSION) and c:IsAbleToRemove()
and Duel.IsExistingMatchingCard(c23379054.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+c:GetLevel()) and Duel.IsExistingMatchingCard(c23379054.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+c:GetLevel(),mc)
end end
function c23379054.filter2(c,e,tp,lv) function c23379054.filter2(c,e,tp,lv,mc)
return c:IsLevel(lv) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(lv) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c23379054.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23379054.target(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_GRAVE) and c23379054.filter1(chkc,e,tp,c:GetLevel()) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c23379054.filter1(chkc,e,tp,c:GetLevel(),c) end
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,c)>0 and c:IsAbleToRemove() if chk==0 then return c:IsAbleToRemove()
and Duel.IsExistingTarget(c23379054.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetLevel()) end and Duel.IsExistingTarget(c23379054.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetLevel(),c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c23379054.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c:GetLevel()) local g=Duel.SelectTarget(tp,c23379054.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c:GetLevel(),c)
g:AddCard(e:GetHandler()) g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
...@@ -60,9 +61,8 @@ function c23379054.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,9 +61,8 @@ function c23379054.operation(e,tp,eg,ep,ev,re,r,rp)
local lv=c:GetLevel()+tc:GetLevel() local lv=c:GetLevel()+tc:GetLevel()
local g=Group.FromCards(c,tc) local g=Group.FromCards(c,tc)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)==2 then if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)==2 then
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c23379054.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv) local sg=Duel.SelectMatchingCard(tp,c23379054.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv,nil)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -18,7 +18,7 @@ function c23536866.filter(c,e,tp) ...@@ -18,7 +18,7 @@ function c23536866.filter(c,e,tp)
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c23536866.xyzfilter(c,mg) function c23536866.xyzfilter(c,mg)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsXyzSummonable(mg,2,2) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsXyzSummonable(mg,2,2) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end end
function c23536866.mfilter1(c,mg,exg) function c23536866.mfilter1(c,mg,exg)
return mg:IsExists(c23536866.mfilter2,1,c,c,exg) return mg:IsExists(c23536866.mfilter2,1,c,c,exg)
...@@ -33,7 +33,6 @@ function c23536866.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -33,7 +33,6 @@ function c23536866.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.GetLocationCountFromEx(tp)>0
and exg:GetCount()>0 end and exg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=mg:FilterSelect(tp,c23536866.mfilter1,1,1,nil,mg,exg) local sg1=mg:FilterSelect(tp,c23536866.mfilter1,1,1,nil,mg,exg)
...@@ -71,7 +70,6 @@ function c23536866.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,7 +70,6 @@ function c23536866.operation(e,tp,eg,ep,ev,re,r,rp)
local e4=e3:Clone() local e4=e3:Clone()
tc2:RegisterEffect(e4) tc2:RegisterEffect(e4)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
if Duel.GetLocationCountFromEx(tp,tp,g)<=0 then return end
local xyzg=Duel.GetMatchingGroup(c23536866.xyzfilter,tp,LOCATION_EXTRA,0,nil,g) local xyzg=Duel.GetMatchingGroup(c23536866.xyzfilter,tp,LOCATION_EXTRA,0,nil,g)
if xyzg:GetCount()>0 then if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -23,13 +23,12 @@ end ...@@ -23,13 +23,12 @@ end
function c23581825.filter2(c,e,tp,mc,rk) function c23581825.filter2(c,e,tp,mc,rk)
if c:GetOriginalCode()==6165656 and not mc:IsCode(48995978) then return false end if c:GetOriginalCode()==6165656 and not mc:IsCode(48995978) then return false end
return c:IsRank(rk) and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c23581825.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23581825.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c23581825.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c23581825.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCountFromEx(tp)>0
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingTarget(c23581825.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c23581825.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -41,7 +40,7 @@ function c23581825.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +40,7 @@ function c23581825.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c23581825.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+2) local g=Duel.SelectMatchingCard(tp,c23581825.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+2)
local sc=g:GetFirst() local sc=g:GetFirst()
......
...@@ -56,17 +56,16 @@ function c23792058.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,17 +56,16 @@ function c23792058.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c23792058.spfilter(c,e,tp) function c23792058.spfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x2016) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x2016)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c23792058.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c23792058.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.IsExistingMatchingCard(c23792058.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c23792058.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c23792058.spop(e,tp,eg,ep,ev,re,r,rp) function c23792058.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c23792058.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local g=Duel.GetMatchingGroup(c23792058.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if Duel.GetLocationCountFromEx(tp)>0 and g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -64,17 +64,16 @@ function c23998625.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,17 +64,16 @@ function c23998625.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c23998625.spfilter(c,e,tp) function c23998625.spfilter(c,e,tp)
return c:IsCode(97403510) and e:GetHandler():IsCanBeXyzMaterial(c) return c:IsCode(97403510) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c23998625.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c23998625.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return aux.MustMaterialCheck(e:GetHandler(),tp,EFFECT_MUST_BE_XMATERIAL)
and aux.MustMaterialCheck(e:GetHandler(),tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c23998625.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c23998625.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c23998625.spop(e,tp,eg,ep,ev,re,r,rp) function c23998625.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetLocationCountFromEx(tp)<=0 or not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not c:IsRelateToEffect(e) or not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
local tc=Duel.GetFirstMatchingCard(c23998625.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local tc=Duel.GetFirstMatchingCard(c23998625.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if tc then if tc then
local cg=Group.FromCards(c) local cg=Group.FromCards(c)
......
...@@ -14,7 +14,8 @@ function c24590232.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -14,7 +14,8 @@ function c24590232.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c24590232.filter1(c,e,tp) function c24590232.filter1(c,e,tp)
local lv=c:GetLevel() local lv=c:GetLevel()
return c:IsType(TYPE_SYNCHRO) and lv<9 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) return c:IsType(TYPE_SYNCHRO) and lv<9
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(c24590232.filter2,tp,LOCATION_GRAVE,0,1,nil,tp,lv) and Duel.IsExistingMatchingCard(c24590232.filter2,tp,LOCATION_GRAVE,0,1,nil,tp,lv)
end end
function c24590232.filter2(c,tp,lv) function c24590232.filter2(c,tp,lv)
...@@ -27,7 +28,7 @@ function c24590232.filter3(c) ...@@ -27,7 +28,7 @@ function c24590232.filter3(c)
return c:GetLevel()>0 and not c:IsType(TYPE_TUNER) and c:IsAbleToRemove() return c:GetLevel()>0 and not c:IsType(TYPE_TUNER) and c:IsAbleToRemove()
end end
function c24590232.activate(e,tp,eg,ep,ev,re,r,rp) function c24590232.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() and Duel.GetLocationCountFromEx(tp)>0 and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) if Duel.NegateAttack() and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(c24590232.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c24590232.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(24590232,0)) then and Duel.SelectYesNo(tp,aux.Stringid(24590232,0)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -29,14 +29,13 @@ function c25148255.mfilter(c,e,tp,mc) ...@@ -29,14 +29,13 @@ function c25148255.mfilter(c,e,tp,mc)
and Duel.IsExistingMatchingCard(c25148255.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg) and Duel.IsExistingMatchingCard(c25148255.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
end end
function c25148255.scfilter(c,mg) function c25148255.scfilter(c,mg)
return aux.IsMaterialListSetCard(c,0x1017) and c:IsSynchroSummonable(nil,mg) return aux.IsMaterialListSetCard(c,0x1017) and c:IsSynchroSummonable(nil,mg) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end end
function c25148255.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c25148255.sctg(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_GRAVE) and chkc:IsControler(tp) and c25148255.mfilter(chkc,e,tp,c) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c25148255.mfilter(chkc,e,tp,c) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and Duel.IsExistingTarget(c25148255.mfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c) end and Duel.IsExistingTarget(c25148255.mfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
Duel.SelectTarget(tp,c25148255.mfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c) Duel.SelectTarget(tp,c25148255.mfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c)
...@@ -49,7 +48,6 @@ function c25148255.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +48,6 @@ function c25148255.scop(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToEffect(e) or Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end if not tc:IsRelateToEffect(e) or Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local mg=Group.FromCards(c,tc) local mg=Group.FromCards(c,tc)
if Duel.GetLocationCountFromEx(tp,tp,mg)<=0 then return end
local g=Duel.GetMatchingGroup(c25148255.scfilter,tp,LOCATION_EXTRA,0,nil,mg) local g=Duel.GetMatchingGroup(c25148255.scfilter,tp,LOCATION_EXTRA,0,nil,mg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -11,7 +11,8 @@ function c26194151.initial_effect(c) ...@@ -11,7 +11,8 @@ function c26194151.initial_effect(c)
end end
function c26194151.filter1(c,e,tp) function c26194151.filter1(c,e,tp)
local lv=c:GetLevel() local lv=c:GetLevel()
return c:IsSetCard(0xa3) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) return c:IsSetCard(0xa3) and c:IsType(TYPE_SYNCHRO)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(c26194151.filter2,tp,LOCATION_GRAVE,0,1,nil,tp,lv) and Duel.IsExistingMatchingCard(c26194151.filter2,tp,LOCATION_GRAVE,0,1,nil,tp,lv)
end end
function c26194151.filter2(c,tp,lv) function c26194151.filter2(c,tp,lv)
...@@ -24,12 +25,10 @@ function c26194151.filter3(c) ...@@ -24,12 +25,10 @@ function c26194151.filter3(c)
return c:GetLevel()>0 and not c:IsType(TYPE_TUNER) and c:IsAbleToRemove() return c:GetLevel()>0 and not c:IsType(TYPE_TUNER) and c:IsAbleToRemove()
end end
function c26194151.target(e,tp,eg,ep,ev,re,r,rp,chk) function c26194151.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingMatchingCard(c26194151.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c26194151.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c26194151.activate(e,tp,eg,ep,ev,re,r,rp) function c26194151.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c26194151.filter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g1=Duel.SelectMatchingCard(tp,c26194151.filter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g1:GetFirst() local tc=g1:GetFirst()
......
...@@ -68,16 +68,14 @@ function c27024795.spcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,16 +68,14 @@ function c27024795.spcon2(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c27024795.cfilter,1,nil,tp) return rp~=tp and eg:IsExists(c27024795.cfilter,1,nil,tp)
end end
function c27024795.spfilter2(c,e,tp) function c27024795.spfilter2(c,e,tp)
return c:IsSetCard(0x4b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x4b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode()) and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode())
end end
function c27024795.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c27024795.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.IsExistingMatchingCard(c27024795.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c27024795.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c27024795.spop2(e,tp,eg,ep,ev,re,r,rp) function c27024795.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c27024795.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c27024795.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then if #g>0 then
......
...@@ -47,11 +47,11 @@ function c27354732.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,11 +47,11 @@ function c27354732.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler()) return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler())
end end
function c27354732.spfilter(c,e,tp) function c27354732.spfilter(c,e,tp)
return c:IsSetCard(0x10d) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) return c:IsSetCard(0x10d) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) and not c:IsCode(27354732)
and not c:IsCode(27354732) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c27354732.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c27354732.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDestructable() and Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return e:GetHandler():IsDestructable()
and Duel.IsExistingMatchingCard(c27354732.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c27354732.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
...@@ -59,7 +59,6 @@ end ...@@ -59,7 +59,6 @@ end
function c27354732.spop(e,tp,eg,ep,ev,re,r,rp) function c27354732.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then
if Duel.GetLocationCountFromEx(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c27354732.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c27354732.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -18,9 +18,10 @@ function c27503418.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,9 +18,10 @@ function c27503418.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetCard(Duel.GetAttackTarget()) Duel.SetTargetCard(Duel.GetAttackTarget())
end end
function c27503418.filter1(c,e,tp,lv) function c27503418.filter1(c,e,tp,tc)
local rlv=c:GetLevel()-lv local rlv=c:GetLevel()-tc:GetLevel()
return rlv>0 and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) return rlv>0 and c:IsType(TYPE_SYNCHRO)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
and Duel.IsExistingMatchingCard(c27503418.filter2,tp,LOCATION_GRAVE,0,1,nil,tp,rlv) and Duel.IsExistingMatchingCard(c27503418.filter2,tp,LOCATION_GRAVE,0,1,nil,tp,rlv)
end end
function c27503418.filter2(c,tp,lv) function c27503418.filter2(c,tp,lv)
...@@ -30,12 +31,12 @@ end ...@@ -30,12 +31,12 @@ end
function c27503418.activate(e,tp,eg,ep,ev,re,r,rp) function c27503418.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttackTarget() local tc=Duel.GetAttackTarget()
if Duel.NegateAttack() and tc:IsRelateToEffect(e) if Duel.NegateAttack() and tc:IsRelateToEffect(e)
and Duel.GetLocationCountFromEx(tp,tp,tc)>0 and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(c27503418.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,tc:GetLevel()) and Duel.IsExistingMatchingCard(c27503418.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,tc)
and tc:IsAbleToRemove() and Duel.SelectYesNo(tp,aux.Stringid(27503418,0)) then and tc:IsAbleToRemove() and Duel.SelectYesNo(tp,aux.Stringid(27503418,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c27503418.filter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetLevel()) local g1=Duel.SelectMatchingCard(tp,c27503418.filter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local lv=g1:GetFirst():GetLevel()-tc:GetLevel() local lv=g1:GetFirst():GetLevel()-tc:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c27503418.filter2,tp,LOCATION_GRAVE,0,1,1,nil,tp,lv) local g2=Duel.SelectMatchingCard(tp,c27503418.filter2,tp,LOCATION_GRAVE,0,1,1,nil,tp,lv)
......
...@@ -58,15 +58,13 @@ function c27552504.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,15 +58,13 @@ function c27552504.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:GetPreviousControler()==tp and rp==1-tp and c:IsReason(REASON_DESTROY) return c:GetPreviousControler()==tp and rp==1-tp and c:IsReason(REASON_DESTROY)
end end
function c27552504.spfilter(c,e,tp) function c27552504.spfilter(c,e,tp)
return c:IsSetCard(0xb1) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsSetCard(0xb1) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c27552504.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c27552504.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.IsExistingMatchingCard(c27552504.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c27552504.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c27552504.spop(e,tp,eg,ep,ev,re,r,rp) function c27552504.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c27552504.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c27552504.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -34,7 +34,7 @@ end ...@@ -34,7 +34,7 @@ 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)
and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp)>0 and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
or c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
and Duel.IsExistingMatchingCard(c28400508.cfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,c) and Duel.IsExistingMatchingCard(c28400508.cfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,c)
end end
......
...@@ -27,18 +27,17 @@ function c29085954.filter(c,e,tp,mc) ...@@ -27,18 +27,17 @@ function c29085954.filter(c,e,tp,mc)
local no=m.xyz_number local no=m.xyz_number
return no and no>=1 and no<=99 and c:IsSetCard(0x48) return no and no>=1 and no<=99 and c:IsSetCard(0x48)
and mc:IsCanBeXyzMaterial(c) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c29085954.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c29085954.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0 if chk==0 then return aux.MustMaterialCheck(e:GetHandler(),tp,EFFECT_MUST_BE_XMATERIAL)
and aux.MustMaterialCheck(e:GetHandler(),tp,EFFECT_MUST_BE_XMATERIAL) and Duel.IsExistingMatchingCard(c29085954.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end
and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)>0 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 c29085954.spop(e,tp,eg,ep,ev,re,r,rp) function c29085954.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) local g=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0)
if g:GetCount()>0 and Duel.GetLocationCountFromEx(tp,tp,c)>0 and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) if g:GetCount()>0 and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then and c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
local tg=g:RandomSelect(1-tp,1) local tg=g:RandomSelect(1-tp,1)
Duel.ConfirmCards(1-tp,tg) Duel.ConfirmCards(1-tp,tg)
......
...@@ -26,35 +26,31 @@ function c29762407.initial_effect(c) ...@@ -26,35 +26,31 @@ function c29762407.initial_effect(c)
e3:SetOperation(c29762407.operation) e3:SetOperation(c29762407.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c29762407.cfilter(c) function c29762407.cfilter(c,e,tp)
return c:IsFaceup() and c:IsCode(89194033) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsCode(89194033) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c29762407.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,Group.FromCards(c,e:GetHandler()))
end end
function c29762407.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c29762407.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() if chk==0 then return e:GetHandler():IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c29762407.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end and Duel.IsExistingMatchingCard(c29762407.cfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c29762407.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c29762407.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
g:AddCard(e:GetHandler()) g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c29762407.filter(c,e,tp) function c29762407.filter(c,e,tp,tg)
return (c:IsLocation(LOCATION_HAND+LOCATION_DECK) or c:IsType(TYPE_FUSION)) return (c:IsLocation(LOCATION_HAND+LOCATION_DECK) or c:IsType(TYPE_FUSION))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_HAND+LOCATION_DECK) and Duel.GetMZoneCount(tp,tg)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,tg,c)>0)
end end
function c29762407.target(e,tp,eg,ep,ev,re,r,rp,chk) function c29762407.target(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=0 if chk==0 then return true end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA)
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if chk==0 then return loc~=0 and Duel.IsExistingMatchingCard(c29762407.filter,tp,loc,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc)
end end
function c29762407.operation(e,tp,eg,ep,ev,re,r,rp) function c29762407.operation(e,tp,eg,ep,ev,re,r,rp)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c29762407.filter,tp,loc,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c29762407.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -48,15 +48,13 @@ function c30864377.splimit(e,se,sp,st) ...@@ -48,15 +48,13 @@ function c30864377.splimit(e,se,sp,st)
end end
function c30864377.espfilter(c,e,tp) function c30864377.espfilter(c,e,tp)
return c:IsSetCard(0x19) and c:IsType(TYPE_FUSION) and not c:IsCode(30864377) return c:IsSetCard(0x19) and c:IsType(TYPE_FUSION) and not c:IsCode(30864377)
and c:IsCanBeSpecialSummoned(e,124,tp,true,false) and c:IsCanBeSpecialSummoned(e,124,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c30864377.esptg(e,tp,eg,ep,ev,re,r,rp,chk) function c30864377.esptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingMatchingCard(c30864377.espfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c30864377.espfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c30864377.espop(e,tp,eg,ep,ev,re,r,rp) function c30864377.espop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c30864377.espfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c30864377.espfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -44,7 +44,7 @@ function c31531170.pendcon(e,c,og) ...@@ -44,7 +44,7 @@ function c31531170.pendcon(e,c,og)
local lscale=c:GetLeftScale() local lscale=c:GetLeftScale()
local rscale=rpz:GetRightScale() local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end if lscale>rscale then lscale,rscale=rscale,lscale end
local ft=Duel.GetLocationCountFromEx(tp) local ft=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
if ft<=0 then return false end if ft<=0 then return false end
if og then if og then
return og:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale,eset) return og:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale,eset)
...@@ -59,7 +59,7 @@ function c31531170.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og) ...@@ -59,7 +59,7 @@ function c31531170.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
local lscale=c:GetLeftScale() local lscale=c:GetLeftScale()
local rscale=rpz:GetRightScale() local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end if lscale>rscale then lscale,rscale=rscale,lscale end
local ft=Duel.GetLocationCountFromEx(tp) local ft=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp] local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
if ect~=nil then ft=math.min(ft,ect) end if ect~=nil then ft=math.min(ft,ect) end
......
...@@ -101,14 +101,13 @@ function c32615065.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,14 +101,13 @@ function c32615065.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c32615065.spfilter(c,e,tp) function c32615065.spfilter(c,e,tp)
return c:IsCode(96220350) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() return c:IsCode(96220350) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial()
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c32615065.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c32615065.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingMatchingCard(c32615065.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c32615065.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c32615065.spop(e,tp,eg,ep,ev,re,r,rp) function c32615065.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c32615065.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c32615065.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -28,13 +28,12 @@ function c3298689.filter1(c,e,tp) ...@@ -28,13 +28,12 @@ function c3298689.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return rk>0 and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:GetOverlayCount()==0 return rk>0 and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:GetOverlayCount()==0
and Duel.IsExistingMatchingCard(c3298689.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1) and Duel.IsExistingMatchingCard(c3298689.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
function c3298689.filter2(c,e,tp,mc,rk) function c3298689.filter2(c,e,tp,mc,rk)
if c:GetOriginalCode()==6165656 and mc:GetCode()~=48995978 then return false end if c:GetOriginalCode()==6165656 and mc:GetCode()~=48995978 then return false end
return c:IsRank(rk) and c:IsAttribute(ATTRIBUTE_DARK) and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and c:IsAttribute(ATTRIBUTE_DARK) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
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
...@@ -47,7 +46,7 @@ end ...@@ -47,7 +46,7 @@ end
function c3298689.activate(e,tp,eg,ep,ev,re,r,rp) function c3298689.activate(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 Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c3298689.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1) local g=Duel.SelectMatchingCard(tp,c3298689.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1)
......
...@@ -15,11 +15,10 @@ function c33252803.filter1(c,e,tp) ...@@ -15,11 +15,10 @@ function c33252803.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) and m return c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) and m
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c33252803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1,m.xyz_number) and Duel.IsExistingMatchingCard(c33252803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1,m.xyz_number)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end end
function c33252803.filter2(c,e,tp,mc,rk,no) function c33252803.filter2(c,e,tp,mc,rk,no)
return c:IsRank(rk) and c:IsSetCard(0x1048) and c.xyz_number==no and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and c:IsSetCard(0x1048) and c.xyz_number==no and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c33252803.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33252803.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c33252803.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c33252803.filter1(chkc,e,tp) end
...@@ -31,7 +30,7 @@ end ...@@ -31,7 +30,7 @@ end
function c33252803.activate(e,tp,eg,ep,ev,re,r,rp) function c33252803.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local m=_G["c"..tc:GetCode()] local m=_G["c"..tc:GetCode()]
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL)
or tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or not m then return end or tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or not m then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33252803.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,m.xyz_number) local g=Duel.SelectMatchingCard(tp,c33252803.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,m.xyz_number)
......
...@@ -38,20 +38,16 @@ function c33280639.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,20 +38,16 @@ function c33280639.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c33280639.filter(c,e,tp) function c33280639.filter(c,e,tp)
return c:IsCode(11790356) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(11790356) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_GRAVE) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function c33280639.target(e,tp,eg,ep,ev,re,r,rp,chk) function c33280639.target(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=0 if chk==0 then return Duel.IsExistingMatchingCard(c33280639.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if chk==0 then return loc~=0 and Duel.IsExistingMatchingCard(c33280639.filter,tp,loc,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc)
end end
function c33280639.activate(e,tp,eg,ep,ev,re,r,rp) function c33280639.activate(e,tp,eg,ep,ev,re,r,rp)
local loc=0 Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33280639.filter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return end
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33280639.filter),tp,loc,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
tc:RegisterFlagEffect(33280639,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) tc:RegisterFlagEffect(33280639,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
......
...@@ -13,18 +13,17 @@ function c34206604.initial_effect(c) ...@@ -13,18 +13,17 @@ function c34206604.initial_effect(c)
end end
function c34206604.filter(c,e,tp) function c34206604.filter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_FUSION) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c34206604.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c34206604.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
end end
function c34206604.target(e,tp,eg,ep,ev,re,r,rp,chk) function c34206604.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingMatchingCard(c34206604.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c34206604.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c34206604.operation(e,tp,eg,ep,ev,re,r,rp) function c34206604.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c34206604.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c34206604.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -17,11 +17,11 @@ function c35014241.cfilter1(c,e,tp) ...@@ -17,11 +17,11 @@ function c35014241.cfilter1(c,e,tp)
end end
function c35014241.cfilter2(c,e,tp,tc) function c35014241.cfilter2(c,e,tp,tc)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and not c:IsType(TYPE_TUNER) and c:IsAbleToExtraAsCost() return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and not c:IsType(TYPE_TUNER) and c:IsAbleToExtraAsCost()
and Duel.IsExistingMatchingCard(c35014241.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel()+tc:GetLevel()) and Duel.IsExistingMatchingCard(c35014241.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel()+tc:GetLevel(),Group.FromCards(c,tc))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,tc))>0
end end
function c35014241.spfilter(c,e,tp,lv) function c35014241.spfilter(c,e,tp,lv,mg)
return c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end end
function c35014241.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c35014241.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1) e:SetLabel(1)
...@@ -43,10 +43,9 @@ function c35014241.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,10 +43,9 @@ function c35014241.target(e,tp,eg,ep,ev,re,r,rp,chk)
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 c35014241.activate(e,tp,eg,ep,ev,re,r,rp) function c35014241.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
local lv=e:GetLabel() local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c35014241.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv) local g=Duel.SelectMatchingCard(tp,c35014241.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end end
......
...@@ -44,15 +44,15 @@ function c35259350.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -44,15 +44,15 @@ function c35259350.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
end end
function c35259350.filter(c,e,tp) function c35259350.filter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c35259350.target(e,tp,eg,ep,ev,re,r,rp,chk) function c35259350.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingMatchingCard(c35259350.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c35259350.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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_RECOVER,nil,0,1-tp,0) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,0)
end end
function c35259350.activate(e,tp,eg,ep,ev,re,r,rp) function c35259350.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCountFromEx(tp) local ft=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
local tg=Duel.GetMatchingGroup(c35259350.filter,tp,LOCATION_EXTRA,0,nil,e,tp) local tg=Duel.GetMatchingGroup(c35259350.filter,tp,LOCATION_EXTRA,0,nil,e,tp)
if ft<=0 or tg:GetCount()==0 then return end if ft<=0 or tg:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
......
...@@ -20,20 +20,19 @@ function c35329581.spfilter(c,e,tp,tc) ...@@ -20,20 +20,19 @@ function c35329581.spfilter(c,e,tp,tc)
return c:IsType(TYPE_SYNCHRO) and c:IsLevel(tc:GetLevel()) return c:IsType(TYPE_SYNCHRO) and c:IsLevel(tc:GetLevel())
and c:GetRace()==tc:GetRace() and c:GetCode()~=tc:GetCode() and c:GetRace()==tc:GetRace() and c:GetCode()~=tc:GetCode()
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c35329581.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c35329581.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c35329581.filter(chkc,e,tp) end if chkc then return eg:IsContains(chkc) and c35329581.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return eg:IsExists(c35329581.filter,1,nil,e,tp) end
and eg:IsExists(c35329581.filter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=eg:FilterSelect(tp,c35329581.filter,1,1,nil,e,tp) local g=eg:FilterSelect(tp,c35329581.filter,1,1,nil,e,tp)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
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 c35329581.activate(e,tp,eg,ep,ev,re,r,rp) function c35329581.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end if not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c35329581.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc) local sg=Duel.SelectMatchingCard(tp,c35329581.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
if sg:GetCount()>0 then if sg:GetCount()>0 then
......
...@@ -91,12 +91,11 @@ end ...@@ -91,12 +91,11 @@ end
function c35906693.filter1(c,e,tp) function c35906693.filter1(c,e,tp)
return c35906693.tgfilter(c) return c35906693.tgfilter(c)
and Duel.IsExistingMatchingCard(c35906693.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and Duel.IsExistingMatchingCard(c35906693.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
function c35906693.filter2(c,e,tp,mc) function c35906693.filter2(c,e,tp,mc)
return c:IsSetCard(0x107f) and c:IsType(TYPE_XYZ) and not c:IsCode(mc:GetCode()) and mc:IsCanBeXyzMaterial(c) return c:IsSetCard(0x107f) and c:IsType(TYPE_XYZ) and not c:IsCode(mc:GetCode()) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c35906693.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c35906693.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c35906693.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c35906693.filter1(chkc,e,tp) end
...@@ -108,7 +107,7 @@ end ...@@ -108,7 +107,7 @@ end
function c35906693.spop(e,tp,eg,ep,ev,re,r,rp) function c35906693.spop(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 Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c35906693.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc) local g=Duel.SelectMatchingCard(tp,c35906693.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
......
...@@ -89,15 +89,13 @@ function c35952884.sumcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,15 +89,13 @@ function c35952884.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c35952884.filter(c,e,tp) function c35952884.filter(c,e,tp)
return c:IsCode(24696097) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) return c:IsCode(24696097) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c35952884.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function c35952884.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingMatchingCard(c35952884.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c35952884.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c35952884.sumop(e,tp,eg,ep,ev,re,r,rp) function c35952884.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
local tg=Duel.GetFirstMatchingCard(c35952884.filter,tp,LOCATION_EXTRA,0,nil,e,tp) local tg=Duel.GetFirstMatchingCard(c35952884.filter,tp,LOCATION_EXTRA,0,nil,e,tp)
if tg then if tg then
Duel.SpecialSummon(tg,0,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tg,0,tp,tp,false,true,POS_FACEUP)
......
...@@ -32,15 +32,15 @@ function c36328300.cfilter(c) ...@@ -32,15 +32,15 @@ function c36328300.cfilter(c)
return c:IsSetCard(0x1034) and (c:IsFaceup() or not c:IsLocation(LOCATION_ONFIELD)) and c:IsAbleToGraveAsCost() return c:IsSetCard(0x1034) and (c:IsFaceup() or not c:IsLocation(LOCATION_ONFIELD)) and c:IsAbleToGraveAsCost()
end end
function c36328300.exfilter(c,tp) function c36328300.exfilter(c,tp)
return Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c))>0 return Duel.GetLocationCountFromEx(tp,tp,c,TYPE_FUSION)>0
end end
function c36328300.gselect(g,tp) function c36328300.gselect(g,tp)
return Duel.GetLocationCountFromEx(tp,tp,g)>0 return Duel.GetLocationCountFromEx(tp,tp,g,TYPE_FUSION)>0
end end
function c36328300.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c36328300.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c36328300.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c36328300.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>=7 if chk==0 then return g:GetClassCount(Card.GetCode)>=7
and (Duel.GetLocationCountFromEx(tp)>0 or g:IsExists(c36328300.exfilter,1,nil,tp)) end and (Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_FUSION)>0 or g:IsExists(c36328300.exfilter,1,nil,tp)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
aux.GCheckAdditional=aux.dncheck aux.GCheckAdditional=aux.dncheck
local rg=g:SelectSubGroup(tp,c36328300.gselect,false,7,7,tp) local rg=g:SelectSubGroup(tp,c36328300.gselect,false,7,7,tp)
...@@ -56,7 +56,7 @@ function c36328300.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,7 +56,7 @@ function c36328300.target(e,tp,eg,ep,ev,re,r,rp,chk)
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 c36328300.activate(e,tp,eg,ep,ev,re,r,rp) function c36328300.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) then return end if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_FUSION)<=0 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c36328300.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c36328300.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -45,15 +45,14 @@ function c36614113.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,15 +45,14 @@ function c36614113.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) return e:GetHandler():IsReason(REASON_EFFECT)
end end
function c36614113.spfilter(c,e,tp) function c36614113.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and not c:IsCode(36614113) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and not c:IsCode(36614113)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c36614113.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c36614113.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.IsExistingMatchingCard(c36614113.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c36614113.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c36614113.spop(e,tp,eg,ep,ev,re,r,rp) function c36614113.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c36614113.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c36614113.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -19,10 +19,11 @@ function c36630403.filter1(c,e,tp,lv) ...@@ -19,10 +19,11 @@ function c36630403.filter1(c,e,tp,lv)
end end
function c36630403.filter2(c,e,tp,lv) function c36630403.filter2(c,e,tp,lv)
return c:IsLevel(lv) and c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(lv) and c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c36630403.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c36630403.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c36630403.filter1(chkc,e,tp,e:GetHandler():GetLevel()) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c36630403.filter1(chkc,e,tp,e:GetHandler():GetLevel()) end
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 and e:GetHandler():IsAbleToRemove() if chk==0 then return e:GetHandler():IsAbleToRemove()
and Duel.IsExistingTarget(c36630403.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler():GetLevel()) end and Duel.IsExistingTarget(c36630403.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler():GetLevel()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c36630403.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetHandler():GetLevel()) local g=Duel.SelectTarget(tp,c36630403.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetHandler():GetLevel())
...@@ -37,7 +38,6 @@ function c36630403.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +38,6 @@ function c36630403.operation(e,tp,eg,ep,ev,re,r,rp)
local lv=c:GetLevel()+tc:GetLevel() local lv=c:GetLevel()+tc:GetLevel()
local g=Group.FromCards(c,tc) local g=Group.FromCards(c,tc)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)==2 then if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)==2 then
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c36630403.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv) local sg=Duel.SelectMatchingCard(tp,c36630403.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv)
if sg:GetCount()>0 then if sg:GetCount()>0 then
......
...@@ -16,11 +16,11 @@ function c36737092.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -16,11 +16,11 @@ function c36737092.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c36737092.filter1(c,e,tp) function c36737092.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost() return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c36737092.filter2,tp,LOCATION_EXTRA,0,1,nil,c:GetLevel(),e,tp) and Duel.IsExistingMatchingCard(c36737092.filter2,tp,LOCATION_EXTRA,0,1,nil,c:GetLevel(),e,tp,c)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end end
function c36737092.filter2(c,lv,e,tp) function c36737092.filter2(c,lv,e,tp,mc)
return c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c36737092.target(e,tp,eg,ep,ev,re,r,rp,chk) function c36737092.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -35,11 +35,9 @@ function c36737092.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,11 +35,9 @@ function c36737092.target(e,tp,eg,ep,ev,re,r,rp,chk)
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 c36737092.activate(e,tp,eg,ep,ev,re,r,rp) function c36737092.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 then return end
local lv=e:GetLabel() local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c36737092.filter2,tp,LOCATION_EXTRA,0,1,1,nil,lv,e,tp) local g=Duel.SelectMatchingCard(tp,c36737092.filter2,tp,LOCATION_EXTRA,0,1,1,nil,lv,e,tp,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -74,18 +74,17 @@ function c36841733.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -74,18 +74,17 @@ function c36841733.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c36841733.spfilter(c,e,tp) function c36841733.spfilter(c,e,tp,mc)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c36841733.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c36841733.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0 if chk==0 then return Duel.IsExistingMatchingCard(c36841733.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end
and Duel.IsExistingMatchingCard(c36841733.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c36841733.spop(e,tp,eg,ep,ev,re,r,rp) function c36841733.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c36841733.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c36841733.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
local c=e:GetHandler() local c=e:GetHandler()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then
......
...@@ -64,15 +64,15 @@ function c37337327.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,15 +64,15 @@ function c37337327.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c37337327.spfilter(c,e,tp) function c37337327.spfilter(c,e,tp)
return c:IsSetCard(0x43) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) return c:IsSetCard(0x43) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c37337327.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c37337327.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(c37337327.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c37337327.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c37337327.spop(e,tp,eg,ep,ev,re,r,rp) function c37337327.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c37337327.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c37337327.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -70,15 +70,13 @@ function c37663536.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,15 +70,13 @@ function c37663536.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP)
end end
function c37663536.spfilter(c,e,tp) function c37663536.spfilter(c,e,tp)
return c:IsCode(12652643) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsCode(12652643) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c37663536.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c37663536.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.IsExistingMatchingCard(c37663536.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c37663536.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c37663536.spop(e,tp,eg,ep,ev,re,r,rp) function c37663536.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c37663536.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c37663536.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -46,15 +46,13 @@ function c3779662.espcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,15 +46,13 @@ function c3779662.espcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c3779662.espfilter(c,e,tp) function c3779662.espfilter(c,e,tp)
return c:IsSetCard(0x19) and c:IsType(TYPE_FUSION) and c:IsLevelBelow(7) return c:IsSetCard(0x19) and c:IsType(TYPE_FUSION) and c:IsLevelBelow(7)
and c:IsCanBeSpecialSummoned(e,123,tp,true,false) and c:IsCanBeSpecialSummoned(e,123,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c3779662.esptg(e,tp,eg,ep,ev,re,r,rp,chk) function c3779662.esptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingMatchingCard(c3779662.espfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c3779662.espfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c3779662.espop(e,tp,eg,ep,ev,re,r,rp) function c3779662.espop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c3779662.espfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c3779662.espfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -55,26 +55,19 @@ function c39024589.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,26 +55,19 @@ function c39024589.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c39024589.filter(c,e,tp) function c39024589.filter(c,e,tp,mc)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x10ec) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x10ec)
and c:IsLevel(1,8) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevel(1,8) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_HAND) and Duel.GetMZoneCount(tp,mc)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0)
end end
function c39024589.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c39024589.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=0 if chk==0 then return Duel.IsExistingMatchingCard(c39024589.filter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_EXTRA)
if e:GetHandler():GetSequence()<5 then ft=ft+1 end
if ft>0 then loc=loc+LOCATION_HAND end
if Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0 then loc=loc+LOCATION_EXTRA end
if chk==0 then return loc~=0 and Duel.IsExistingMatchingCard(c39024589.filter,tp,loc,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc)
end end
function c39024589.spop(e,tp,eg,ep,ev,re,r,rp) function c39024589.spop(e,tp,eg,ep,ev,re,r,rp)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c39024589.filter,tp,loc,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c39024589.filter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -26,12 +26,11 @@ function c41201386.filter1(c,e,tp) ...@@ -26,12 +26,11 @@ function c41201386.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c41201386.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1) and Duel.IsExistingMatchingCard(c41201386.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
function c41201386.filter2(c,e,tp,mc,rk) function c41201386.filter2(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsSetCard(0xba) and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and c:IsSetCard(0xba) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c41201386.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c41201386.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c41201386.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c41201386.filter1(chkc,e,tp) end
...@@ -42,7 +41,7 @@ function c41201386.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -42,7 +41,7 @@ function c41201386.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c41201386.activate(e,tp,eg,ep,ev,re,r,rp) function c41201386.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c41201386.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1) local g=Duel.SelectMatchingCard(tp,c41201386.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1)
......
...@@ -74,12 +74,12 @@ function c42160203.spfilter(c,e,tp) ...@@ -74,12 +74,12 @@ function c42160203.spfilter(c,e,tp)
and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c42160203.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c42160203.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0 if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler(),TYPE_PENDULUM)>0
and Duel.IsExistingMatchingCard(c42160203.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c42160203.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c42160203.spop(e,tp,eg,ep,ev,re,r,rp) function c42160203.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCountFromEx(tp) local ft=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
if ft==0 then return end if ft==0 then return end
ft=math.min(ft,2) ft=math.min(ft,2)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then if Duel.IsPlayerAffectedByEffect(tp,59822133) then
......
...@@ -55,17 +55,16 @@ function c42444868.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,17 +55,16 @@ function c42444868.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c42444868.spfilter(c,e,tp) function c42444868.spfilter(c,e,tp)
return c:IsSetCard(0x10a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x10a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function c42444868.activate(e,tp,eg,ep,ev,re,r,rp) function c42444868.activate(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler() local ec=re:GetHandler()
if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then
ec:CancelToGrave() ec:CancelToGrave()
if Duel.SendtoDeck(ec,nil,2,REASON_EFFECT)~=0 and ec:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then if Duel.SendtoDeck(ec,nil,2,REASON_EFFECT)~=0 and ec:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
local loc=0 local g=Duel.GetMatchingGroup(c42444868.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(42444868,0)) then
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
local g=Duel.GetMatchingGroup(c42444868.spfilter,tp,loc,0,nil,e,tp)
if loc~=0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(42444868,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
......
...@@ -44,7 +44,7 @@ end ...@@ -44,7 +44,7 @@ end
function c42461852.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c42461852.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_EXTRA,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_EXTRA,0,1,nil)
and Duel.IsPlayerCanSpecialSummon(tp) and Duel.IsPlayerCanSpecialSummon(tp)
and Duel.GetLocationCountFromEx(tp)>0 end and Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_LINK)>0 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 c42461852.spop(e,tp,eg,ep,ev,re,r,rp) function c42461852.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -43,13 +43,12 @@ function c43383478.filter1(c,e,tp) ...@@ -43,13 +43,12 @@ function c43383478.filter1(c,e,tp)
end end
function c43383478.filter2(c,e,tp,mc,rk) function c43383478.filter2(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsSetCard(0xba) and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and c:IsSetCard(0xba) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c43383478.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c43383478.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c43383478.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c43383478.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingTarget(c43383478.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c43383478.filter1,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,c43383478.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c43383478.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
...@@ -60,7 +59,7 @@ function c43383478.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +59,7 @@ function c43383478.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c43383478.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1) local g=Duel.SelectMatchingCard(tp,c43383478.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1)
local sc=g:GetFirst() local sc=g:GetFirst()
......
...@@ -15,7 +15,6 @@ function c43476205.filter1(c,e,tp) ...@@ -15,7 +15,6 @@ function c43476205.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return rk>0 and c:IsFaceup() and c:IsSetCard(0xba) return rk>0 and c:IsFaceup() and c:IsSetCard(0xba)
and Duel.IsExistingMatchingCard(c43476205.filter3,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1) and Duel.IsExistingMatchingCard(c43476205.filter3,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
function c43476205.filter2(c,e,tp) function c43476205.filter2(c,e,tp)
...@@ -25,7 +24,7 @@ function c43476205.filter2(c,e,tp) ...@@ -25,7 +24,7 @@ function c43476205.filter2(c,e,tp)
end end
function c43476205.filter3(c,e,tp,mc,rk) function c43476205.filter3(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsSetCard(0xba) and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and c:IsSetCard(0xba) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c43476205.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c43476205.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if Duel.GetTurnPlayer()==tp then if Duel.GetTurnPlayer()==tp then
...@@ -36,8 +35,7 @@ function c43476205.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -36,8 +35,7 @@ function c43476205.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SelectTarget(tp,c43476205.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) Duel.SelectTarget(tp,c43476205.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
else else
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c43476205.filter2(chkc,e,tp) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c43476205.filter2(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingTarget(c43476205.filter2,tp,0,LOCATION_MZONE,1,nil,e,tp) end
and Duel.IsExistingTarget(c43476205.filter2,tp,0,LOCATION_MZONE,1,nil,e,tp) end
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_CONTROL) e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_CONTROL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c43476205.filter2,tp,0,LOCATION_MZONE,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c43476205.filter2,tp,0,LOCATION_MZONE,1,1,nil,e,tp)
...@@ -52,7 +50,7 @@ function c43476205.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +50,7 @@ function c43476205.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetControl(tc,tp)==0 then return end if Duel.GetControl(tc,tp)==0 then return end
Duel.BreakEffect() Duel.BreakEffect()
end end
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c43476205.filter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1) local g=Duel.SelectMatchingCard(tp,c43476205.filter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1)
......
...@@ -21,17 +21,17 @@ function c440556.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -21,17 +21,17 @@ function c440556.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c440556.filter(c,e,tp) function c440556.filter(c,e,tp)
return c:IsRankBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRankBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c440556.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c440556.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.IsExistingMatchingCard(c440556.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c440556.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c440556.spop(e,tp,eg,ep,ev,re,r,rp) function c440556.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c440556.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c440556.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -26,14 +26,14 @@ end ...@@ -26,14 +26,14 @@ end
function c45206713.filter2(c,e,tp,m,f,gc,chkf) function c45206713.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x10af) and (not f or f(c)) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x10af) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c45206713.target(e,tp,eg,ep,ev,re,r,rp,chk) function c45206713.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND) local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND)
local res=Duel.GetLocationCountFromEx(tp)>0 local res=Duel.IsExistingMatchingCard(c45206713.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
and Duel.IsExistingMatchingCard(c45206713.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
...@@ -62,7 +62,7 @@ function c45206713.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,7 @@ function c45206713.operation(e,tp,eg,ep,ev,re,r,rp)
local mf=ce:GetValue() local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c45206713.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf) sg2=Duel.GetMatchingGroup(c45206713.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf)
end end
if (Duel.GetLocationCountFromEx(tp)>0 and sg1:GetCount()>0) or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -78,7 +78,7 @@ function c4538826.spcon(e,c) ...@@ -78,7 +78,7 @@ function c4538826.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return ((c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or return ((c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or
(c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp)>0)) (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0))
and Duel.IsExistingMatchingCard(c4538826.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT) and Duel.IsExistingMatchingCard(c4538826.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT)
and Duel.IsExistingMatchingCard(c4538826.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) and Duel.IsExistingMatchingCard(c4538826.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK)
end end
......
...@@ -17,11 +17,11 @@ function c458748.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,11 +17,11 @@ function c458748.cost(e,tp,eg,ep,ev,re,r,rp,chk)
return true return true
end end
function c458748.filter1(c,e,tp) function c458748.filter1(c,e,tp)
return c:IsSetCard(0xf4) and Duel.IsExistingMatchingCard(c458748.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetOriginalAttribute()) return c:IsSetCard(0xf4) and Duel.IsExistingMatchingCard(c458748.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetOriginalAttribute(),c)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end end
function c458748.filter2(c,e,tp,att) function c458748.filter2(c,e,tp,att,mc)
return c:IsSetCard(0xf4) and c:GetOriginalAttribute()~=att and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() return c:IsSetCard(0xf4) and c:GetOriginalAttribute()~=att and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial()
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c458748.target(e,tp,eg,ep,ev,re,r,rp,chk) function c458748.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -35,10 +35,10 @@ function c458748.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,10 +35,10 @@ function c458748.target(e,tp,eg,ep,ev,re,r,rp,chk)
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 c458748.activate(e,tp,eg,ep,ev,re,r,rp) function c458748.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) then return end if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) then return end
local att=e:GetLabel() local att=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c458748.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,att) local g=Duel.SelectMatchingCard(tp,c458748.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,att,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
tc:SetMaterial(nil) tc:SetMaterial(nil)
......
...@@ -30,13 +30,13 @@ function c45950291.filter1(c,e,tp) ...@@ -30,13 +30,13 @@ function c45950291.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
and not Duel.IsExistingMatchingCard(c45950291.cfilter,tp,LOCATION_MZONE,0,1,nil,rk) and not Duel.IsExistingMatchingCard(c45950291.cfilter,tp,LOCATION_MZONE,0,1,nil,rk)
and Duel.IsExistingMatchingCard(c45950291.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+2,c:GetRace(),c:GetAttribute(),c:GetCode()) and Duel.IsExistingMatchingCard(c45950291.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+2,c:GetRace(),c:GetAttribute(),c:GetCode())
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
function c45950291.filter2(c,e,tp,mc,rk,rc,att,code) function c45950291.filter2(c,e,tp,mc,rk,rc,att,code)
if c:GetOriginalCode()==6165656 and code~=48995978 then return false end if c:GetOriginalCode()==6165656 and code~=48995978 then return false end
return c:IsRank(rk) and c:IsRace(rc) and c:IsAttribute(att) and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and c:IsRace(rc) and c:IsAttribute(att) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c45950291.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c45950291.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c45950291.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c45950291.filter1(chkc,e,tp) end
...@@ -47,7 +47,7 @@ function c45950291.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -47,7 +47,7 @@ function c45950291.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c45950291.activate(e,tp,eg,ep,ev,re,r,rp) function c45950291.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45950291.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+2,tc:GetRace(),tc:GetAttribute(),tc:GetCode()) local g=Duel.SelectMatchingCard(tp,c45950291.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+2,tc:GetRace(),tc:GetAttribute(),tc:GetCode())
......
...@@ -60,12 +60,12 @@ end ...@@ -60,12 +60,12 @@ end
function c46008667.filter1(c,e,tp) function c46008667.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x107a) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x107a)
and Duel.IsExistingMatchingCard(c46008667.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode()) and Duel.IsExistingMatchingCard(c46008667.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode())
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
function c46008667.filter2(c,e,tp,mc,code) function c46008667.filter2(c,e,tp,mc,code)
return c:IsType(TYPE_XYZ) and c:IsSetCard(0x107a) and not c:IsCode(code) and mc:IsCanBeXyzMaterial(c) return c:IsType(TYPE_XYZ) and c:IsSetCard(0x107a) and not c:IsCode(code) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c46008667.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c46008667.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c46008667.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c46008667.filter1(chkc,e,tp) end
...@@ -76,7 +76,7 @@ function c46008667.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -76,7 +76,7 @@ function c46008667.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c46008667.spop(e,tp,eg,ep,ev,re,r,rp) function c46008667.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c46008667.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,c46008667.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetCode())
......
...@@ -18,11 +18,11 @@ function c46232525.initial_effect(c) ...@@ -18,11 +18,11 @@ function c46232525.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c46232525.tgfilter(c,e,tp) function c46232525.tgfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(c46232525.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRace()) return c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(c46232525.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRace(),mc)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end end
function c46232525.spfilter(c,e,tp,race) function c46232525.spfilter(c,e,tp,race,mc)
return c:IsType(TYPE_FUSION) and c.material_race and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and race==c.material_race return c:IsType(TYPE_FUSION) and c.material_race and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and race==c.material_race
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c46232525.target(e,tp,eg,ep,ev,re,r,rp,chk) function c46232525.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c46232525.tgfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c46232525.tgfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e,tp) end
...@@ -38,7 +38,7 @@ function c46232525.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function c46232525.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(tc,REASON_EFFECT) Duel.SendtoGrave(tc,REASON_EFFECT)
if not tc:IsLocation(LOCATION_GRAVE) then return end if not tc:IsLocation(LOCATION_GRAVE) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c46232525.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,race) local sg=Duel.SelectMatchingCard(tp,c46232525.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,race,nil)
local sc=sg:GetFirst() local sc=sg:GetFirst()
if sc then if sc then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -17,11 +17,11 @@ function c46411259.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,11 +17,11 @@ function c46411259.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c46411259.filter1(c,e,tp) function c46411259.filter1(c,e,tp)
local lv=c:GetLevel() local lv=c:GetLevel()
return lv>0 and Duel.IsExistingMatchingCard(c46411259.filter2,tp,LOCATION_EXTRA,0,1,nil,lv,e,tp) return lv>0 and Duel.IsExistingMatchingCard(c46411259.filter2,tp,LOCATION_EXTRA,0,1,nil,lv,e,tp,c)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end end
function c46411259.filter2(c,lv,e,tp) function c46411259.filter2(c,lv,e,tp,mc)
return c:IsType(TYPE_FUSION) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_FUSION) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c46411259.target(e,tp,eg,ep,ev,re,r,rp,chk) function c46411259.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -35,10 +35,9 @@ function c46411259.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,10 +35,9 @@ function c46411259.target(e,tp,eg,ep,ev,re,r,rp,chk)
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 c46411259.activate(e,tp,eg,ep,ev,re,r,rp) function c46411259.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
local lv=e:GetLabel() local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c46411259.filter2,tp,LOCATION_EXTRA,0,1,1,nil,lv,e,tp) local g=Duel.SelectMatchingCard(tp,c46411259.filter2,tp,LOCATION_EXTRA,0,1,1,nil,lv,e,tp,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -57,21 +57,16 @@ end ...@@ -57,21 +57,16 @@ end
function c4688231.spfilter(c,e,tp) function c4688231.spfilter(c,e,tp)
return c:IsSetCard(0xe1) and c:IsType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) return c:IsSetCard(0xe1) and c:IsType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_GRAVE) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function c4688231.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c4688231.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=0 if chk==0 then return Duel.IsExistingMatchingCard(c4688231.spfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if chk==0 then return loc~=0 and Duel.IsExistingMatchingCard(c4688231.spfilter,tp,loc,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc)
end end
function c4688231.spop(e,tp,eg,ep,ev,re,r,rp) function c4688231.spop(e,tp,eg,ep,ev,re,r,rp)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c4688231.spfilter),tp,loc,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c4688231.spfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -15,12 +15,12 @@ function c47185546.filter1(c,e,tp) ...@@ -15,12 +15,12 @@ function c47185546.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return c:IsFaceup() and c:IsRace(RACE_INSECT) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsRace(RACE_INSECT) and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c47185546.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk) and Duel.IsExistingMatchingCard(c47185546.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
function c47185546.filter2(c,e,tp,mc,rk) function c47185546.filter2(c,e,tp,mc,rk)
return (c:IsRank(rk+2) or c:IsRank(rk-2)) and c:IsRace(RACE_INSECT) and mc:IsCanBeXyzMaterial(c) return (c:IsRank(rk+2) or c:IsRank(rk-2)) and c:IsRace(RACE_INSECT) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c47185546.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c47185546.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c47185546.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c47185546.filter1(chkc,e,tp) end
...@@ -31,7 +31,7 @@ function c47185546.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -31,7 +31,7 @@ function c47185546.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c47185546.activate(e,tp,eg,ep,ev,re,r,rp) function c47185546.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c47185546.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()) local g=Duel.SelectMatchingCard(tp,c47185546.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank())
......
...@@ -14,13 +14,12 @@ function c47660516.filter1(c,e,tp) ...@@ -14,13 +14,12 @@ function c47660516.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c47660516.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1,c:GetRace(),c:GetCode()) and Duel.IsExistingMatchingCard(c47660516.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1,c:GetRace(),c:GetCode())
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
function c47660516.filter2(c,e,tp,mc,rk,rc,code) function c47660516.filter2(c,e,tp,mc,rk,rc,code)
if c:GetOriginalCode()==6165656 and code~=48995978 then return false end if c:GetOriginalCode()==6165656 and code~=48995978 then return false end
return c:IsRank(rk) and c:IsRace(rc) and c:IsSetCard(0x1048,0x1073) and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and c:IsRace(rc) and c:IsSetCard(0x1048,0x1073) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c47660516.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c47660516.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c47660516.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c47660516.filter1(chkc,e,tp) end
...@@ -31,7 +30,7 @@ function c47660516.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -31,7 +30,7 @@ function c47660516.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c47660516.activate(e,tp,eg,ep,ev,re,r,rp) function c47660516.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c47660516.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,tc:GetRace(),tc:GetCode()) local g=Duel.SelectMatchingCard(tp,c47660516.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,tc:GetRace(),tc:GetCode())
......
...@@ -18,12 +18,11 @@ function c47882565.filter1(c,e,tp) ...@@ -18,12 +18,11 @@ function c47882565.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return rk>0 and c:IsFaceup() and c:IsSetCard(0xe5) return rk>0 and c:IsFaceup() and c:IsSetCard(0xe5)
and Duel.IsExistingMatchingCard(c47882565.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1) and Duel.IsExistingMatchingCard(c47882565.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
function c47882565.filter2(c,e,tp,mc,rk) function c47882565.filter2(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsSetCard(0xe5) and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and c:IsSetCard(0xe5) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c47882565.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c47882565.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c47882565.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c47882565.filter1(chkc,e,tp) end
...@@ -35,7 +34,7 @@ end ...@@ -35,7 +34,7 @@ end
function c47882565.activate(e,tp,eg,ep,ev,re,r,rp) function c47882565.activate(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 Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c47882565.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1) local g=Duel.SelectMatchingCard(tp,c47882565.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1)
......
...@@ -14,13 +14,12 @@ function c48333324.filter1(c,e,tp) ...@@ -14,13 +14,12 @@ function c48333324.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c48333324.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1,c:GetRace(),c:GetCode()) and Duel.IsExistingMatchingCard(c48333324.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1,c:GetRace(),c:GetCode())
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
function c48333324.filter2(c,e,tp,mc,rk,rc,code) function c48333324.filter2(c,e,tp,mc,rk,rc,code)
if c:GetOriginalCode()==6165656 and code~=48995978 then return false end if c:GetOriginalCode()==6165656 and code~=48995978 then return false end
return c:IsRank(rk) and c:IsRace(rc) and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and c:IsRace(rc) and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c48333324.disfilter(c) function c48333324.disfilter(c)
return (not c:IsDisabled() or c:IsType(TYPE_TRAPMONSTER)) and not (c:IsType(TYPE_NORMAL) and bit.band(c:GetOriginalType(),TYPE_NORMAL)) return (not c:IsDisabled() or c:IsType(TYPE_TRAPMONSTER)) and not (c:IsType(TYPE_NORMAL) and bit.band(c:GetOriginalType(),TYPE_NORMAL))
...@@ -35,7 +34,7 @@ end ...@@ -35,7 +34,7 @@ end
function c48333324.activate(e,tp,eg,ep,ev,re,r,rp) function c48333324.activate(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 Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c48333324.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,tc:GetRace(),tc:GetCode()) local g=Duel.SelectMatchingCard(tp,c48333324.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,tc:GetRace(),tc:GetCode())
......
...@@ -51,7 +51,7 @@ function c48891960.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function c48891960.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
function c48891960.spfilter(c,e,tp) function c48891960.spfilter(c,e,tp)
return c:IsSetCard(0x29) and c:IsAttackBelow(3000) and c:IsType(TYPE_SYNCHRO) return c:IsSetCard(0x29) and c:IsAttackBelow(3000) and c:IsType(TYPE_SYNCHRO)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c48891960.spcon(e,tp,eg,ep,ev,re,r,rp) function c48891960.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -59,13 +59,12 @@ function c48891960.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,13 +59,12 @@ function c48891960.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c48891960.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c48891960.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(c48891960.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c48891960.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c48891960.spop(e,tp,eg,ep,ev,re,r,rp) function c48891960.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c48891960.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c48891960.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
......
...@@ -14,11 +14,10 @@ function c49033797.cfilter(c,tpe) ...@@ -14,11 +14,10 @@ function c49033797.cfilter(c,tpe)
return c:IsFaceup() and c:IsType(tpe) return c:IsFaceup() and c:IsType(tpe)
end end
function c49033797.filter(c,e,tp,cat) function c49033797.filter(c,e,tp,cat)
return c:IsSetCard(cat) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(cat) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c49033797.target(e,tp,eg,ep,ev,re,r,rp,chk) function c49033797.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if Duel.GetLocationCountFromEx(tp)<=0 then return false end
local flag=0 local flag=0
if Duel.IsExistingMatchingCard(c49033797.cfilter,tp,LOCATION_MZONE,0,1,nil,TYPE_FUSION) then flag=flag+1 end if Duel.IsExistingMatchingCard(c49033797.cfilter,tp,LOCATION_MZONE,0,1,nil,TYPE_FUSION) then flag=flag+1 end
if Duel.IsExistingMatchingCard(c49033797.cfilter,tp,LOCATION_MZONE,0,1,nil,TYPE_SYNCHRO) then flag=flag+2 end if Duel.IsExistingMatchingCard(c49033797.cfilter,tp,LOCATION_MZONE,0,1,nil,TYPE_SYNCHRO) then flag=flag+2 end
...@@ -36,7 +35,6 @@ function c49033797.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,7 +35,6 @@ function c49033797.target(e,tp,eg,ep,ev,re,r,rp,chk)
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 c49033797.activate(e,tp,eg,ep,ev,re,r,rp) function c49033797.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
local flag=e:GetLabel() local flag=e:GetLabel()
if flag==3 then if flag==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -45,13 +45,13 @@ function c49082032.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,13 +45,13 @@ function c49082032.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end end
function c49082032.spfilter1(c,e,tp) function c49082032.spfilter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and Duel.GetLocationCountFromEx(tp,tp,c)>0 return c:IsFaceup() and c:IsType(TYPE_XYZ)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c49082032.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRace(),c:GetRank()+1) and Duel.IsExistingMatchingCard(c49082032.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRace(),c:GetRank()+1)
end end
function c49082032.spfilter2(c,e,tp,mc,race,rk) function c49082032.spfilter2(c,e,tp,mc,race,rk)
return c:IsRace(race) and c:IsRank(rk) and c:IsSetCard(0x1048,0x1073) and mc:IsCanBeXyzMaterial(c) return c:IsRace(race) and c:IsRank(rk) and c:IsSetCard(0x1048,0x1073) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c49082032.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c49082032.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c49082032.spfilter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c49082032.spfilter1(chkc,e,tp) end
...@@ -62,7 +62,7 @@ function c49082032.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -62,7 +62,7 @@ function c49082032.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c49082032.spop(e,tp,eg,ep,ev,re,r,rp) function c49082032.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c49082032.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRace(),tc:GetRank()+1) local g=Duel.SelectMatchingCard(tp,c49082032.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRace(),tc:GetRank()+1)
......
...@@ -64,20 +64,19 @@ function c50588353.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,20 +64,19 @@ function c50588353.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
end end
function c50588353.spfilter(c,e,tp) function c50588353.spfilter(c,e,tp,mc)
return c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) return c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c50588353.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c50588353.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0 if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) and Duel.IsExistingMatchingCard(c50588353.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end
and Duel.IsExistingMatchingCard(c50588353.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c50588353.spop(e,tp,eg,ep,ev,re,r,rp) function c50588353.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCountFromEx(tp) if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
if ft<=0 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c50588353.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c50588353.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil):GetFirst()
if tc then if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
......
...@@ -15,11 +15,10 @@ function c50619462.cfilter(c,e,tp) ...@@ -15,11 +15,10 @@ function c50619462.cfilter(c,e,tp)
local race=c:GetOriginalRace() local race=c:GetOriginalRace()
return c:IsFaceup() and (race==RACE_WINDBEAST or race==RACE_BEAST return c:IsFaceup() and (race==RACE_WINDBEAST or race==RACE_BEAST
or race==RACE_BEASTWARRIOR) and c:IsAbleToGraveAsCost() or race==RACE_BEASTWARRIOR) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c50619462.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,race) and Duel.IsExistingMatchingCard(c50619462.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,race,e:GetHandler())
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end end
function c50619462.spfilter(c,e,tp,race) function c50619462.spfilter(c,e,tp,race,mc)
return c:GetOriginalRace()==race and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:GetOriginalRace()==race and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c50619462.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c50619462.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
...@@ -40,40 +39,38 @@ function c50619462.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -40,40 +39,38 @@ function c50619462.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c50619462.spop(e,tp,eg,ep,ev,re,r,rp) function c50619462.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp)>0 then local race=e:GetLabelObject():GetOriginalRace()
local race=e:GetLabelObject():GetOriginalRace() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c50619462.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,race,nil)
local g=Duel.SelectMatchingCard(tp,c50619462.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,race) local tc=g:GetFirst()
local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then tc:RegisterFlagEffect(50619462,RESET_EVENT+RESETS_STANDARD,0,1)
tc:RegisterFlagEffect(50619462,RESET_EVENT+RESETS_STANDARD,0,1) local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE)
e1:SetCode(EFFECT_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1)
tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e2)
tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c)
local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e3:SetCountLimit(1)
e3:SetCountLimit(1) e3:SetLabelObject(tc)
e3:SetLabelObject(tc) e3:SetCondition(c50619462.descon)
e3:SetCondition(c50619462.descon) e3:SetOperation(c50619462.desop)
e3:SetOperation(c50619462.desop) Duel.RegisterEffect(e3,tp)
Duel.RegisterEffect(e3,tp) local e4=Effect.CreateEffect(c)
local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_CANNOT_ATTACK)
e4:SetCode(EFFECT_CANNOT_ATTACK) e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e4,true)
tc:RegisterEffect(e4,true) Duel.SpecialSummonComplete()
Duel.SpecialSummonComplete()
end
end end
end end
function c50619462.descon(e,tp,eg,ep,ev,re,r,rp) function c50619462.descon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -128,7 +128,7 @@ function c50907446.FShaddollSpFilter2(c,fc,tp,mc,chkf) ...@@ -128,7 +128,7 @@ function c50907446.FShaddollSpFilter2(c,fc,tp,mc,chkf)
if aux.FCheckAdditional and not aux.FCheckAdditional(tp,sg,fc) then return false end if aux.FCheckAdditional and not aux.FCheckAdditional(tp,sg,fc) then return false end
return ((c50907446.FShaddollFilter1(c,sg) and c50907446.FShaddollFilter2(mc)) return ((c50907446.FShaddollFilter1(c,sg) and c50907446.FShaddollFilter2(mc))
or (c50907446.FShaddollFilter1(mc,sg) and c50907446.FShaddollFilter2(c))) or (c50907446.FShaddollFilter1(mc,sg) and c50907446.FShaddollFilter2(c)))
and (chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(tp,tp,sg)>0) and (chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(tp,tp,sg,fc)>0)
end end
function c50907446.FShaddollCondition() function c50907446.FShaddollCondition()
return function(e,g,gc,chkf) return function(e,g,gc,chkf)
......
...@@ -38,8 +38,9 @@ end ...@@ -38,8 +38,9 @@ end
function c51476410.spfilter2(c,e,tp,m,f,chkf) function c51476410.spfilter2(c,e,tp,m,f,chkf)
return (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,true) and c:CheckFusionMaterial(m,nil,chkf) return (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,true) and c:CheckFusionMaterial(m,nil,chkf)
end end
function c51476410.spfilter3(c,e,tp,chkf) function c51476410.spfilter3(c,e,tp,chkf,rc)
if not c:IsType(TYPE_FUSION) or not c:IsAbleToExtra() then return false end if not c:IsType(TYPE_FUSION) or not c:IsAbleToExtra() then return false end
if Duel.GetLocationCountFromEx(tp,tp,rc,c)<=0 then return false end
local mg=Duel.GetMatchingGroup(c51476410.spfilter0,tp,LOCATION_GRAVE,0,c) local mg=Duel.GetMatchingGroup(c51476410.spfilter0,tp,LOCATION_GRAVE,0,c)
local res=c51476410.spfilter2(c,e,tp,mg,nil,chkf) local res=c51476410.spfilter2(c,e,tp,mg,nil,chkf)
if not res then if not res then
...@@ -55,9 +56,8 @@ function c51476410.spfilter3(c,e,tp,chkf) ...@@ -55,9 +56,8 @@ function c51476410.spfilter3(c,e,tp,chkf)
end end
function c51476410.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c51476410.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local chkf=PLAYER_NONE local chkf=PLAYER_NONE
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0 if chk==0 then return Duel.IsPlayerCanRemove(tp)
and Duel.IsPlayerCanRemove(tp) and Duel.IsExistingMatchingCard(c51476410.spfilter3,tp,LOCATION_GRAVE,0,1,nil,e,tp,chkf,e:GetHandler()) end
and Duel.IsExistingMatchingCard(c51476410.spfilter3,tp,LOCATION_GRAVE,0,1,nil,e,tp,chkf) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
...@@ -65,7 +65,7 @@ function c51476410.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function c51476410.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanRemove(tp) then return end if not Duel.IsPlayerCanRemove(tp) then return end
local chkf=tp local chkf=tp
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c51476410.spfilter3),tp,LOCATION_GRAVE,0,1,1,nil,e,tp,chkf) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c51476410.spfilter3),tp,LOCATION_GRAVE,0,1,1,nil,e,tp,chkf,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then if tc and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then
local mg1=Duel.GetMatchingGroup(c51476410.spfilter1,tp,LOCATION_GRAVE,0,nil,e) local mg1=Duel.GetMatchingGroup(c51476410.spfilter1,tp,LOCATION_GRAVE,0,nil,e)
...@@ -79,7 +79,7 @@ function c51476410.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,7 @@ function c51476410.spop(e,tp,eg,ep,ev,re,r,rp)
local mf=ce:GetValue() local mf=ce:GetValue()
mgchk2=c51476410.spfilter2(tc,e,tp,mg2,mf,chkf) mgchk2=c51476410.spfilter2(tc,e,tp,mg2,mf,chkf)
end end
if (Duel.GetLocationCountFromEx(tp)>0 and mgchk1) or mgchk2 then if mgchk1 or mgchk2 then
if mgchk1 and (not mgchk2 or not Duel.SelectYesNo(tp,ce:GetDescription())) then if mgchk1 and (not mgchk2 or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1) tc:SetMaterial(mat1)
......
...@@ -50,10 +50,9 @@ function c52101615.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,10 +50,9 @@ function c52101615.target(e,tp,eg,ep,ev,re,r,rp,chk)
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 c52101615.filter2(c,e,tp,code) function c52101615.filter2(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c52101615.operation(e,tp,eg,ep,ev,re,r,rp) function c52101615.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
local code=e:GetLabel() local code=e:GetLabel()
local tc=Duel.GetFirstMatchingCard(c52101615.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,code) local tc=Duel.GetFirstMatchingCard(c52101615.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,code)
if tc then if tc then
......
...@@ -31,15 +31,13 @@ function c52963531.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,15 +31,13 @@ function c52963531.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c52963531.spfilter(c,e,tp) function c52963531.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM) return c:IsFaceup() and c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c52963531.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c52963531.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.IsExistingMatchingCard(c52963531.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c52963531.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c52963531.spop(e,tp,eg,ep,ev,re,r,rp) function c52963531.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c52963531.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c52963531.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -15,12 +15,11 @@ end ...@@ -15,12 +15,11 @@ end
function c54529134.filter1(c,e,tp) function c54529134.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x119) and c:IsType(TYPE_LINK) return c:IsFaceup() and c:IsSetCard(0x119) and c:IsType(TYPE_LINK)
and Duel.IsExistingMatchingCard(c54529134.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and Duel.IsExistingMatchingCard(c54529134.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_LMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_LMATERIAL)
end end
function c54529134.filter2(c,e,tp,mc) function c54529134.filter2(c,e,tp,mc)
return c:IsSetCard(0x119) and c:IsType(TYPE_LINK) and c:IsCode(mc:GetCode()) and mc:IsCanBeLinkMaterial(c) return c:IsSetCard(0x119) and c:IsType(TYPE_LINK) and c:IsCode(mc:GetCode()) and mc:IsCanBeLinkMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c54529134.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c54529134.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c54529134.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c54529134.filter1(chkc,e,tp) end
...@@ -32,7 +31,7 @@ end ...@@ -32,7 +31,7 @@ end
function c54529134.activate(e,tp,eg,ep,ev,re,r,rp) function c54529134.activate(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 Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_LMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_LMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c54529134.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc) local g=Duel.SelectMatchingCard(tp,c54529134.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
......
...@@ -32,7 +32,7 @@ function c56611470.mfilter1(c,mg,exg,tp) ...@@ -32,7 +32,7 @@ function c56611470.mfilter1(c,mg,exg,tp)
end end
function c56611470.mfilter2(c,mc,exg,tp) function c56611470.mfilter2(c,mc,exg,tp)
local g=Group.FromCards(c,mc) local g=Group.FromCards(c,mc)
return exg:IsExists(Card.IsXyzSummonable,1,nil,g) and Duel.GetLocationCountFromEx(tp,tp,g)>0 return exg:IsExists(Card.IsXyzSummonable,1,nil,g)
end end
function c56611470.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c56611470.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
...@@ -61,7 +61,6 @@ function c56611470.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,6 @@ function c56611470.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c56611470.tfilter,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c56611470.tfilter,nil,e)
if g:GetCount()<2 then return end if g:GetCount()<2 then return end
if Duel.GetLocationCountFromEx(tp,tp,g)<=0 then return end
local xyzg=Duel.GetMatchingGroup(c56611470.xyzfilter,tp,LOCATION_EXTRA,0,nil,g) local xyzg=Duel.GetMatchingGroup(c56611470.xyzfilter,tp,LOCATION_EXTRA,0,nil,g)
if xyzg:GetCount()>0 then if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -15,19 +15,18 @@ function c57246528.opfilter(c,e,tp) ...@@ -15,19 +15,18 @@ function c57246528.opfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and Duel.IsExistingMatchingCard(c57246528.tpfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetLevel(),e,tp) return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and Duel.IsExistingMatchingCard(c57246528.tpfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetLevel(),e,tp)
end end
function c57246528.tpfilter(c,lv,e,tp) function c57246528.tpfilter(c,lv,e,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv+1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv+1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c57246528.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c57246528.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c57246528.opfilter(chkc,e,tp) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c57246528.opfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingTarget(c57246528.opfilter,tp,0,LOCATION_MZONE,1,nil,e,tp) end
and Duel.IsExistingTarget(c57246528.opfilter,tp,0,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c57246528.opfilter,tp,0,LOCATION_MZONE,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c57246528.opfilter,tp,0,LOCATION_MZONE,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)
end end
function c57246528.activate(e,tp,eg,ep,ev,re,r,rp) function c57246528.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp)<=0 or not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c57246528.tpfilter,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetLevel(),e,tp):GetFirst() local sg=Duel.SelectMatchingCard(tp,c57246528.tpfilter,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetLevel(),e,tp):GetFirst()
if sg and Duel.SpecialSummonStep(sg,0,tp,tp,false,false,POS_FACEUP) then if sg and Duel.SpecialSummonStep(sg,0,tp,tp,false,false,POS_FACEUP) then
......
...@@ -50,19 +50,19 @@ function c57734012.filter1(c,e,tp) ...@@ -50,19 +50,19 @@ function c57734012.filter1(c,e,tp)
end end
function c57734012.filter2(c,e,tp,mc,no) function c57734012.filter2(c,e,tp,mc,no)
return c.xyz_number==no and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c) return c.xyz_number==no and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c57734012.target(e,tp,eg,ep,ev,re,r,rp,chk) function c57734012.target(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=0 local loc=0
local ect=aux.ExtraDeckSummonCountLimit and Duel.IsPlayerAffectedByEffect(tp,92345028) local ect=aux.ExtraDeckSummonCountLimit and Duel.IsPlayerAffectedByEffect(tp,92345028)
and aux.ExtraDeckSummonCountLimit[tp] and aux.ExtraDeckSummonCountLimit[tp]
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end
if Duel.GetLocationCountFromEx(tp)>0 and (ect==nil or ect>1) then loc=loc+LOCATION_EXTRA end if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_XYZ)>0 and (ect==nil or ect>1) then loc=loc+LOCATION_EXTRA end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetFlagEffect(tp,57734012)==0 and loc~=0 and Duel.GetLocationCountFromEx(tp)>0 and Duel.GetFlagEffect(tp,57734012)==0 and loc~=0
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c57734012.filter1,tp,loc,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c57734012.filter1,tp,loc,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
end end
function c57734012.activate(e,tp,eg,ep,ev,re,r,rp) function c57734012.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,57734012)~=0 then return end if Duel.GetFlagEffect(tp,57734012)~=0 then return end
...@@ -71,13 +71,12 @@ function c57734012.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,13 +71,12 @@ function c57734012.activate(e,tp,eg,ep,ev,re,r,rp)
local ect=aux.ExtraDeckSummonCountLimit and Duel.IsPlayerAffectedByEffect(tp,92345028) local ect=aux.ExtraDeckSummonCountLimit and Duel.IsPlayerAffectedByEffect(tp,92345028)
and aux.ExtraDeckSummonCountLimit[tp] and aux.ExtraDeckSummonCountLimit[tp]
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end
if Duel.GetLocationCountFromEx(tp)>0 and (ect==nil or ect>1) then loc=loc+LOCATION_EXTRA end if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_XYZ)>0 and (ect==nil or ect>1) then loc=loc+LOCATION_EXTRA end
if loc==0 then return end if loc==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c57734012.filter1),tp,loc,0,1,1,nil,e,tp) local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c57734012.filter1),tp,loc,0,1,1,nil,e,tp)
local tc1=g1:GetFirst() local tc1=g1:GetFirst()
if tc1 and Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc1 and Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP)~=0 then
if Duel.GetLocationCountFromEx(tp,tp,tc1)<=0 then return end
if not aux.MustMaterialCheck(tc1,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc1,tp,EFFECT_MUST_BE_XMATERIAL) then return end
local m=_G["c"..tc1:GetCode()] local m=_G["c"..tc1:GetCode()]
if not m then return end if not m then return end
......
...@@ -122,14 +122,13 @@ function c57761191.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -122,14 +122,13 @@ function c57761191.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c57761191.spfilter(c,e,tp) function c57761191.spfilter(c,e,tp)
return c:IsAttribute(0xf) and c:IsType(0x802040) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttribute(0xf) and c:IsType(0x802040) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c57761191.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c57761191.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.IsExistingMatchingCard(c57761191.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c57761191.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c57761191.spop(e,tp,eg,ep,ev,re,r,rp) function c57761191.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c57761191.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c57761191.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -90,14 +90,13 @@ function c58069384.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,14 +90,13 @@ function c58069384.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c58069384.spfilter(c,e,tp) function c58069384.spfilter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_FUSION) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c58069384.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c58069384.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.IsExistingMatchingCard(c58069384.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c58069384.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 c58069384.spop(e,tp,eg,ep,ev,re,r,rp) function c58069384.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c58069384.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c58069384.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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