Commit 8b7c18ce authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 3a5ab86e
...@@ -77,7 +77,7 @@ function cm.lkcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -77,7 +77,7 @@ function cm.lkcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(mat,REASON_COST) Duel.SendtoGrave(mat,REASON_COST)
end end
function cm.lktg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 and Duel.IsExistingMatchingCard(cm.profilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_LINK)>0 and Duel.IsExistingMatchingCard(cm.profilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function cm.lkop(e,tp,eg,ep,ev,re,r,rp) function cm.lkop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -67,7 +67,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +67,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.sfilter,tp,LOCATION_GRAVE,0,c,e,tp) local g=Duel.GetMatchingGroup(cm.sfilter,tp,LOCATION_GRAVE,0,c,e,tp)
local mg=g:Filter(cm.ffilter,nil,e) local mg=g:Filter(cm.ffilter,nil,e)
mg:AddCard(c) mg:AddCard(c)
if mg:GetCount()<2 or Duel.GetLocationCountFromEx(tp,tp,c)<=0 then return end if mg:GetCount()<2 or Duel.GetLocationCountFromEx(tp,tp,c,TYPE_FUSION)<=0 then return end
local sg=Duel.GetMatchingGroup(cm.ffilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,c) local sg=Duel.GetMatchingGroup(cm.ffilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,c)
if sg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if sg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -38,7 +38,7 @@ function cm.filter1(c,e,tp) ...@@ -38,7 +38,7 @@ function cm.filter1(c,e,tp)
return spo.named(c) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,true) return spo.named(c) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCountFromEx(tp)>0 and Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCountFromEx(tp,tp,nil,0)>0 and Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and not Duel.IsPlayerAffectedByEffect(tp,59822133)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_EXTRA)
end end
......
...@@ -21,7 +21,7 @@ end ...@@ -21,7 +21,7 @@ end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemove() return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemove()
and Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.GetLocationCountFromEx(tp,tp,c)>0 and Duel.GetLocationCountFromEx(tp,tp,c,0)>0
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and cm.filter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
......
...@@ -20,7 +20,7 @@ end ...@@ -20,7 +20,7 @@ end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsFacedown() or not c:IsType(TYPE_FUSION) return c:IsFacedown() or not c:IsType(TYPE_FUSION)
end end
function cm.con(e,c) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
...@@ -28,7 +28,7 @@ function cm.filter(c,e,tp) ...@@ -28,7 +28,7 @@ function cm.filter(c,e,tp)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial()
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(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_FUSION)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.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
......
...@@ -53,7 +53,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +53,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsFaceup() and not Duel.IsExistingMatchingCard(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,1,nil,TYPE_MONSTER) return c:IsFaceup() and not Duel.IsExistingMatchingCard(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,1,nil,TYPE_MONSTER)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsSetCard(0x1406) and ((c:IsFaceup() and c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp)>0) or c:IsLocation(LOCATION_DECK)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m) return c:IsSetCard(0x1406) and ((c:IsFaceup() and c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,0)>0) or c:IsLocation(LOCATION_DECK)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -55,7 +55,7 @@ function cm.spfilter(c,e,tp) ...@@ -55,7 +55,7 @@ function cm.spfilter(c,e,tp)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp)==0 then return end if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,0)==0 then return end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -70,9 +70,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,9 +70,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,c,e,tp) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,c,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil)<2 then if c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,0)<2 then
return return
elseif ((c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_HAND)) or (c:IsLocation(LOCATION_HAND) and tc:IsLocation(LOCATION_EXTRA))) and Duel.GetLocationCountFromEx(tp,tp,nil)<1 then elseif ((c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_HAND)) or (c:IsLocation(LOCATION_HAND) and tc:IsLocation(LOCATION_EXTRA))) and Duel.GetLocationCountFromEx(tp,tp,nil,0)<1 then
return return
end end
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -55,7 +55,7 @@ function cm.spfilter(c,e,tp) ...@@ -55,7 +55,7 @@ function cm.spfilter(c,e,tp)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp)==0 then return end if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,0)==0 then return end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -70,9 +70,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,9 +70,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,c,e,tp) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,c,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil)<2 then if c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,0)<2 then
return return
elseif ((c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_HAND)) or (c:IsLocation(LOCATION_HAND) and tc:IsLocation(LOCATION_EXTRA))) and Duel.GetLocationCountFromEx(tp,tp,nil)<1 then elseif ((c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_HAND)) or (c:IsLocation(LOCATION_HAND) and tc:IsLocation(LOCATION_EXTRA))) and Duel.GetLocationCountFromEx(tp,tp,nil,0)<1 then
return return
end end
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -27,11 +27,11 @@ function c26801007.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,11 +27,11 @@ function c26801007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
return true return true
end end
function c26801007.filter1(c,e,tp) function c26801007.filter1(c,e,tp)
return c:IsLevel(6) and bit.band(c:GetType(),0x81)==0x81 and Duel.IsExistingMatchingCard(c26801007.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetOriginalAttribute()) return c:IsLevel(6) and bit.band(c:GetType(),0x81)==0x81 and Duel.IsExistingMatchingCard(c26801007.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetOriginalAttribute(),c)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end end
function c26801007.filter2(c,e,tp,att) function c26801007.filter2(c,e,tp,att,mc)
return c:IsLevel(6) and c:GetOriginalAttribute()==att and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() return c:IsLevel(6) and c:IsType(TYPE_FUSION) 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 c26801007.target(e,tp,eg,ep,ev,re,r,rp,chk) function c26801007.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -45,10 +45,10 @@ function c26801007.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,10 +45,10 @@ function c26801007.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 c26801007.activate(e,tp,eg,ep,ev,re,r,rp) function c26801007.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,c26801007.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,att) local g=Duel.SelectMatchingCard(tp,c26801007.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)
......
...@@ -31,7 +31,7 @@ function c26803106.cfilter(c,tp) ...@@ -31,7 +31,7 @@ function c26803106.cfilter(c,tp)
return c:GetSummonLocation()==LOCATION_EXTRA return c:GetSummonLocation()==LOCATION_EXTRA
end end
function c26803106.descon(e,tp,eg,ep,ev,re,r,rp) function c26803106.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c26803106.cfilter,1,nil,tp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(c26803106.cfilter,1,nil,tp)
end end
function c26803106.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c26803106.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -11,23 +11,22 @@ function c26806048.initial_effect(c) ...@@ -11,23 +11,22 @@ function c26806048.initial_effect(c)
e1:SetOperation(c26806048.activate) e1:SetOperation(c26806048.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c26806048.cfilter(c,tp) function c26806048.cfilter(c,tp,mc)
return c:IsAttack(2200) and c:IsDefense(600) and Duel.GetLocationCountFromEx(tp,tp,c)>0 return c:IsAttack(2200) and c:IsDefense(600) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c26806048.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c26806048.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c26806048.cfilter,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroup(tp,c26806048.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c26806048.cfilter,1,1,nil,tp) local g=Duel.SelectReleaseGroup(tp,c26806048.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c26806048.filter(c,e,tp) function c26806048.filter(c,e,tp,mc)
return c:IsAttack(2200) and c:IsDefense(600) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttack(2200) and c:IsDefense(600) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c26806048.target(e,tp,eg,ep,ev,re,r,rp,chk) function c26806048.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c26806048.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c26806048.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 c26806048.activate(e,tp,eg,ep,ev,re,r,rp) function c26806048.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,c26806048.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c26806048.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
......
...@@ -16,16 +16,16 @@ function c26807013.initial_effect(c) ...@@ -16,16 +16,16 @@ function c26807013.initial_effect(c)
e2:SetTarget(c26807013.target) e2:SetTarget(c26807013.target)
e2:SetOperation(c26807013.operation) e2:SetOperation(c26807013.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Rank Up --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(26807013,1)) e3:SetDescription(aux.Stringid(26807013,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,26807913) e3:SetCountLimit(1,26807913)
e3:SetTarget(c26807013.starget) e3:SetTarget(c26807013.sptg1)
e3:SetOperation(c26807013.soperation) e3:SetOperation(c26807013.spop1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c26807013.cfilter(c) function c26807013.cfilter(c)
...@@ -52,33 +52,32 @@ function c26807013.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,33 +52,32 @@ function c26807013.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c26807013.stgfilter(c,e,tp) function c26807013.spfilter1(c,e,tp)
local att=c:GetAttribute() return c:IsFaceup() and c:IsAttack(2200) and c:IsDefense(600)
if not (c:IsFaceup() and c:IsAttack(2200) and c:IsDefense(600) and Duel.IsExistingMatchingCard(c26807013.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetAttribute())
and Duel.GetLocationCountFromEx(tp,tp,c)>0 and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)) then return false end and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
return Duel.IsExistingMatchingCard(c26807013.sspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,att,c)
end end
function c26807013.sspfilter(c,e,tp,att,mc) function c26807013.spfilter2(c,e,tp,mc,att)
return c:IsAttack(2200) and c:IsDefense(600) and c:IsRank(6) and c:IsType(TYPE_XYZ) and c:IsAttribute(att) and mc:IsCanBeXyzMaterial(c,tp) return c:IsType(TYPE_XYZ) and c:IsAttack(2200) and c:IsDefense(600) and c:IsRank(6) 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 c26807013.starget(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c26807013.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c26807013.stgfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c26807013.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c26807013.stgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c26807013.spfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c26807013.stgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) Duel.SelectTarget(tp,c26807013.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c26807013.soperation(e,tp,eg,ep,ev,re,r,rp) function c26807013.spop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or not tc:IsControler(tp) if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
or Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(c,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,c26807013.sspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetRank()+2,tc) local g=Duel.SelectMatchingCard(tp,c26807013.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetAttribute())
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
if mg:GetCount()>0 then if mg:GetCount()~=0 then
Duel.Overlay(sc,mg) Duel.Overlay(sc,mg)
end end
sc:SetMaterial(Group.FromCards(tc)) sc:SetMaterial(Group.FromCards(tc))
......
...@@ -62,32 +62,31 @@ function c26807031.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -62,32 +62,31 @@ function c26807031.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c26807031.spfilter(c,e,tp,mc) function c26807031.spfilter(c,e,tp,mc)
return c:IsAttack(2200) and c:IsDefense(600) and c:IsAttribute(ATTRIBUTE_WATER) and mc:IsCanBeXyzMaterial(c) and c:IsType(TYPE_XYZ) return c:IsAttack(2200) and c:IsDefense(600) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ) 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 c26807031.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c26807031.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(c26807031.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end and Duel.IsExistingMatchingCard(c26807031.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,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 c26807031.spop(e,tp,eg,ep,ev,re,r,rp) function c26807031.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp,tp,c)>0 and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c26807031.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c) local g=Duel.SelectMatchingCard(tp,c26807031.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=c:GetOverlayGroup() local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then if mg:GetCount()~=0 then
Duel.Overlay(sc,mg) Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end end
end end
end end
...@@ -54,22 +54,19 @@ function c81000007.aclimit(e,re,tp) ...@@ -54,22 +54,19 @@ function c81000007.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) return re:IsActiveType(TYPE_MONSTER)
end end
function c81000007.filter0(c) function c81000007.filter0(c)
return (c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end end
function c81000007.filter1(c,e) function c81000007.filter1(c,e)
return (c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e) return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end end
function c81000007.filter2(c,e,tp,m,f,chkf) function c81000007.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and not c:IsType(TYPE_EFFECT) and (not f or f(c)) return c:IsType(TYPE_FUSION) and not c:IsType(TYPE_EFFECT) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function c81000007.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function c81000007.target(e,tp,eg,ep,ev,re,r,rp,chk) function c81000007.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local mg=Duel.GetMatchingGroup(c81000007.filter0,tp,LOCATION_MZONE+LOCATION_REMOVED+LOCATION_GRAVE,0,nil) local mg=Duel.GetMatchingGroup(c81000007.filter0,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local res=Duel.IsExistingMatchingCard(c81000007.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf) local res=Duel.IsExistingMatchingCard(c81000007.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -83,10 +80,11 @@ function c81000007.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -83,10 +80,11 @@ function c81000007.target(e,tp,eg,ep,ev,re,r,rp,chk)
return res return res
end 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_TODECK,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
end end
function c81000007.activate(e,tp,eg,ep,ev,re,r,rp) function c81000007.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
local mg=Duel.GetMatchingGroup(c81000007.filter1,tp,LOCATION_MZONE+LOCATION_REMOVED+LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c81000007.filter1),tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local sg1=Duel.GetMatchingGroup(c81000007.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf) local sg1=Duel.GetMatchingGroup(c81000007.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg3=nil local mg3=nil
local sg2=nil local sg2=nil
......
...@@ -41,8 +41,9 @@ end ...@@ -41,8 +41,9 @@ end
function c81009005.spfilter2(c,e,tp,m,f,chkf) function c81009005.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 c81009005.spfilter3(c,e,tp,chkf) function c81009005.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(c81009005.spfilter0,tp,LOCATION_GRAVE,0,c) local mg=Duel.GetMatchingGroup(c81009005.spfilter0,tp,LOCATION_GRAVE,0,c)
local res=c81009005.spfilter2(c,e,tp,mg,nil,chkf) local res=c81009005.spfilter2(c,e,tp,mg,nil,chkf)
if not res then if not res then
...@@ -58,15 +59,16 @@ function c81009005.spfilter3(c,e,tp,chkf) ...@@ -58,15 +59,16 @@ function c81009005.spfilter3(c,e,tp,chkf)
end end
function c81009005.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c81009005.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.IsExistingMatchingCard(c81009005.spfilter3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,chkf) end and Duel.IsExistingMatchingCard(c81009005.spfilter3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,chkf,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
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 c81009005.spop(e,tp,eg,ep,ev,re,r,rp) function c81009005.spop(e,tp,eg,ep,ev,re,r,rp)
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(c81009005.spfilter3),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,chkf) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c81009005.spfilter3),tp,LOCATION_GRAVE+LOCATION_REMOVED,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(c81009005.spfilter1,tp,LOCATION_GRAVE,0,nil,e) local mg1=Duel.GetMatchingGroup(c81009005.spfilter1,tp,LOCATION_GRAVE,0,nil,e)
...@@ -80,7 +82,7 @@ function c81009005.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,7 +82,7 @@ function c81009005.spop(e,tp,eg,ep,ev,re,r,rp)
local mf=ce:GetValue() local mf=ce:GetValue()
mgchk2=c81009005.spfilter2(tc,e,tp,mg2,mf,chkf) mgchk2=c81009005.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)
......
...@@ -12,7 +12,7 @@ function c81010038.initial_effect(c) ...@@ -12,7 +12,7 @@ function c81010038.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c81010038.cfilter(c,tp) function c81010038.cfilter(c,tp)
return c:IsAttack(1550) and c:IsDefense(1050) and c:IsLevel(4) and Duel.GetLocationCountFromEx(tp,tp,c)>0 return c:IsAttack(1550) and c:IsDefense(1050) and c:IsLevel(4) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c81010038.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c81010038.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c81010038.cfilter,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroup(tp,c81010038.cfilter,1,nil,tp) end
...@@ -20,14 +20,13 @@ function c81010038.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,14 +20,13 @@ function c81010038.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c81010038.filter(c,e,tp) function c81010038.filter(c,e,tp)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsLevel(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsLevel(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c81010038.target(e,tp,eg,ep,ev,re,r,rp,chk) function c81010038.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81010038.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c81010038.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 c81010038.activate(e,tp,eg,ep,ev,re,r,rp) function c81010038.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,c81010038.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c81010038.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
......
...@@ -57,11 +57,11 @@ end ...@@ -57,11 +57,11 @@ end
function c81010057.tgfilter(c,e,tp) function c81010057.tgfilter(c,e,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_NORMAL) and c:IsLevel(8) and c:IsCanBeFusionMaterial() return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_NORMAL) and c:IsLevel(8) and c:IsCanBeFusionMaterial()
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_FMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_FMATERIAL)
and Duel.IsExistingMatchingCard(c81010057.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode()) and Duel.IsExistingMatchingCard(c81010057.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end end
function c81010057.spfilter(c,e,tp,code) function c81010057.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 c81010057.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c81010057.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 c81010057.tgfilter(chkc,e,tp) end if chkc==0 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c81010057.tgfilter(chkc,e,tp) end
...@@ -72,10 +72,10 @@ function c81010057.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -72,10 +72,10 @@ function c81010057.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c81010057.activate(e,tp,eg,ep,ev,re,r,rp) function c81010057.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,c81010057.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetCode()) local sg=Duel.SelectMatchingCard(tp,c81010057.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))
......
...@@ -30,21 +30,18 @@ function c81011002.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,21 +30,18 @@ function c81011002.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c81011002.spfilter(c,e,tp) function c81011002.spfilter(c,e,tp)
return c:IsType(TYPE_XYZ) and c:IsRank(10) and c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsCode(81011002) return c:IsType(TYPE_XYZ) and c:IsRank(10) and c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsCode(81011002) 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 c81011002.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c81011002.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(c81011002.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c81011002.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 c81011002.spop(e,tp,eg,ep,ev,re,r,rp) function c81011002.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,c81011002.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c81011002.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() if g:GetCount()>0 then
if tc then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c81011002.spcon2(e,tp,eg,ep,ev,re,r,rp) function c81011002.spcon2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -53,33 +53,34 @@ function c81011012.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,33 +53,34 @@ function c81011012.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c81011012.spfilter(c,e,tp,mc) function c81011012.filter(c,e,tp,mc)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and c:IsRankBelow(6) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and c:IsRankBelow(6) and c:IsType(TYPE_XYZ)
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 c81011012.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c81011012.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,c)>0 if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and Duel.IsExistingMatchingCard(c81011012.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
and Duel.IsExistingMatchingCard(c81011012.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,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 c81011012.spop(e,tp,eg,ep,ev,re,r,rp) function c81011012.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 c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e)
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c81011012.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c) local g=Duel.SelectMatchingCard(tp,c81011012.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst() local tc=g:GetFirst()
if sc then if tc then
local mg=c:GetOverlayGroup() local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then if mg:GetCount()~=0 then
Duel.Overlay(sc,mg) Duel.Overlay(tc,mg)
end end
sc:SetMaterial(Group.FromCards(c)) tc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c)) Duel.Overlay(tc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
end end
......
...@@ -50,16 +50,6 @@ end ...@@ -50,16 +50,6 @@ end
function c81011030.stop(e,tp,eg,ep,ev,re,r,rp) function c81011030.stop(e,tp,eg,ep,ev,re,r,rp)
Duel.SortDecktop(tp,1-tp,3) Duel.SortDecktop(tp,1-tp,3)
end end
function c81011030.spfilter1(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ) and c:IsRankBelow(6)
and Duel.IsExistingMatchingCard(c81011030.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+4)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c81011030.spfilter2(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c81011030.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c81011030.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(81011030,tp,ACTIVITY_SPSUMMON)==0 if chk==0 then return Duel.GetCustomActivityCount(81011030,tp,ACTIVITY_SPSUMMON)==0
and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) end and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) end
...@@ -73,17 +63,25 @@ function c81011030.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -73,17 +63,25 @@ function c81011030.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1) aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
end end
function c81011030.spfilter1(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRankBelow(6) and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c81011030.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+4)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c81011030.spfilter2(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c81011030.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c81011030.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c81011030.spfilter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c81011030.spfilter1(chkc,e,tp) end
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) if chk==0 then return Duel.IsExistingTarget(c81011030.spfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
and Duel.IsExistingTarget(c81011030.spfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c81011030.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) Duel.SelectTarget(tp,c81011030.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c81011030.spop(e,tp,eg,ep,ev,re,r,rp) function c81011030.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,c81011030.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+4) local g=Duel.SelectMatchingCard(tp,c81011030.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+4)
......
...@@ -86,16 +86,13 @@ function c81012011.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,16 +86,13 @@ function c81012011.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousPosition(POS_FACEUP)
end end
function c81012011.filter(c,e,tp) function c81012011.filter(c,e,tp)
return c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) return c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c81012011.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c81012011.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(c81012011.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c81012011.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 c81012011.spop(e,tp,eg,ep,ev,re,r,rp) function c81012011.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCountFromEx(tp)
if ft<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c81012011.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c81012011.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -17,15 +17,13 @@ function c81012033.ritual_filter(c) ...@@ -17,15 +17,13 @@ function c81012033.ritual_filter(c)
return c:IsType(TYPE_RITUAL) and c:IsRace(RACE_PYRO) and c:IsType(TYPE_PENDULUM) return c:IsType(TYPE_RITUAL) and c:IsRace(RACE_PYRO) and c:IsType(TYPE_PENDULUM)
end end
function c81012033.spfilter(c,e,tp) function c81012033.spfilter(c,e,tp)
return c:IsType(TYPE_RITUAL) and c:IsLevelBelow(4) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_RITUAL) and c:IsLevelBelow(4) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c81012033.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c81012033.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(c81012033.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c81012033.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 c81012033.spop(e,tp,eg,ep,ev,re,r,rp) function c81012033.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,c81012033.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c81012033.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -57,23 +57,16 @@ function c81012061.splimit(e,c) ...@@ -57,23 +57,16 @@ function c81012061.splimit(e,c)
end end
function c81012061.spfilter(c,e,tp) function c81012061.spfilter(c,e,tp)
return c:IsRace(RACE_PYRO) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_PYRO) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL) 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 c81012061.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c81012061.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then return Duel.IsExistingMatchingCard(c81012061.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(c81012061.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 c81012061.spop(e,tp,eg,ep,ev,re,r,rp) function c81012061.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,c81012061.spfilter,tp,loc,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c81012061.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
......
...@@ -19,12 +19,11 @@ function c81017007.filter1(c,e,tp) ...@@ -19,12 +19,11 @@ function c81017007.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return rk>0 and c:IsFaceup() and c:IsRace(RACE_WARRIOR) return rk>0 and c:IsFaceup() and c:IsRace(RACE_WARRIOR)
and Duel.IsExistingMatchingCard(c81017007.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1) and Duel.IsExistingMatchingCard(c81017007.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 c81017007.filter2(c,e,tp,mc,rk) function c81017007.filter2(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsSetCard(0x819) and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and c:IsSetCard(0x819) 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 c81017007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c81017007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c81017007.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c81017007.filter1(chkc,e,tp) end
...@@ -36,7 +35,7 @@ end ...@@ -36,7 +35,7 @@ end
function c81017007.activate(e,tp,eg,ep,ev,re,r,rp) function c81017007.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,c81017007.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1) local g=Duel.SelectMatchingCard(tp,c81017007.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1)
......
...@@ -15,12 +15,11 @@ function c81017012.filter1(c,e,tp) ...@@ -15,12 +15,11 @@ function c81017012.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x819) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x819)
and Duel.IsExistingMatchingCard(c81017012.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1) and Duel.IsExistingMatchingCard(c81017012.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 c81017012.filter2(c,e,tp,mc,rk) function c81017012.filter2(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsRace(RACE_WARRIOR) and (c:IsAttribute(ATTRIBUTE_DARK) or c:IsAttribute(ATTRIBUTE_LIGHT)) and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_LIGHT+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 c81017012.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c81017012.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c81017012.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c81017012.filter1(chkc,e,tp) end
...@@ -31,7 +30,7 @@ function c81017012.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -31,7 +30,7 @@ function c81017012.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c81017012.activate(e,tp,eg,ep,ev,re,r,rp) function c81017012.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,c81017012.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1) local g=Duel.SelectMatchingCard(tp,c81017012.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1)
......
...@@ -47,12 +47,11 @@ end ...@@ -47,12 +47,11 @@ end
function c81017014.filter1(c,e,tp) function c81017014.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x819) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x819)
and Duel.IsExistingMatchingCard(c81017014.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode()) and Duel.IsExistingMatchingCard(c81017014.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 c81017014.filter2(c,e,tp,mc,code) function c81017014.filter2(c,e,tp,mc,code)
return c:IsType(TYPE_XYZ) and c:IsSetCard(0x819) and not c:IsCode(code) and mc:IsCanBeXyzMaterial(c) return c:IsType(TYPE_XYZ) and c:IsSetCard(0x819) 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 c81017014.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c81017014.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c81017014.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c81017014.filter1(chkc,e,tp) end
...@@ -63,7 +62,7 @@ function c81017014.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -63,7 +62,7 @@ function c81017014.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c81017014.spop(e,tp,eg,ep,ev,re,r,rp) function c81017014.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,c81017014.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,c81017014.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetCode())
......
...@@ -57,18 +57,18 @@ function c81017015.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,18 +57,18 @@ function c81017015.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end end
function c81017015.spfilter(c,e,tp) function c81017015.spfilter(c,e,tp)
return c:IsSetCard(0x819) and c:IsRank(4) and not c:IsCode(81017015) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) return c:IsSetCard(0x819) and not c:IsCode(81017015) and c:IsType(TYPE_XYZ)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c81017015.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c81017015.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_XMATERIAL)
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c81017015.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c81017015.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and e:GetHandler():IsCanOverlay() end and e:GetHandler():IsCanOverlay() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c81017015.spop(e,tp,eg,ep,ev,re,r,rp) function c81017015.spop(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_XMATERIAL) then return end if not aux.MustMaterialCheck(nil,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,c81017015.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c81017015.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -35,14 +35,13 @@ end ...@@ -35,14 +35,13 @@ end
function c81019024.spfilter(c,e,tp) function c81019024.spfilter(c,e,tp)
return c:IsAttack(1550) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) return c:IsAttack(1550) and c:IsType(TYPE_RITUAL) 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 c81019024.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c81019024.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(c81019024.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c81019024.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 c81019024.spop(e,tp,eg,ep,ev,re,r,rp) function c81019024.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,c81019024.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c81019024.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -59,16 +59,14 @@ function c81021008.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,16 +59,14 @@ function c81021008.descon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end end
function c81021008.desfilter(c,e,tp) function c81021008.desfilter(c,e,tp)
return c:IsSetCard(0x818) and not c:IsCode(81021008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x818) and not c:IsCode(81021008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c81021008.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c81021008.destg(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(c81021008.desfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c81021008.desfilter,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,tp,1000) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end end
function c81021008.desop(e,tp,eg,ep,ev,re,r,rp) function c81021008.desop(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,c81021008.desfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c81021008.desfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -57,15 +57,13 @@ function c81041006.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,15 +57,13 @@ function c81041006.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_LINK) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_LINK)
end end
function c81041006.spfilter2(c,e,tp) function c81041006.spfilter2(c,e,tp)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c81041006.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c81041006.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(c81041006.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c81041006.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 c81041006.spop(e,tp,eg,ep,ev,re,r,rp) function c81041006.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,c81041006.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c81041006.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -83,14 +83,13 @@ end ...@@ -83,14 +83,13 @@ end
function c81041016.spfilter(c,e,tp) function c81041016.spfilter(c,e,tp)
return c:IsAttack(1550) and (c:IsType(TYPE_LINK) or (c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM))) return c:IsAttack(1550) and (c:IsType(TYPE_LINK) or (c:IsType(TYPE_RITUAL) 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 c81041016.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c81041016.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(c81041016.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c81041016.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 c81041016.spop(e,tp,eg,ep,ev,re,r,rp) function c81041016.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,c81041016.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c81041016.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -12,7 +12,7 @@ function c81041021.initial_effect(c) ...@@ -12,7 +12,7 @@ function c81041021.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c81041021.cfilter(c,tp) function c81041021.cfilter(c,tp)
return bit.band(c:GetType(),0x81)==0x81 and c:IsType(TYPE_PENDULUM) and c:GetLevel()<c:GetOriginalLevel() and Duel.GetLocationCountFromEx(tp,tp,c)>0 return bit.band(c:GetType(),0x81)==0x81 and c:IsType(TYPE_PENDULUM) and c:GetLevel()<c:GetOriginalLevel() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c81041021.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c81041021.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c81041021.cfilter,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroup(tp,c81041021.cfilter,1,nil,tp) end
...@@ -20,14 +20,13 @@ function c81041021.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,14 +20,13 @@ function c81041021.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c81041021.filter(c,e,tp) function c81041021.filter(c,e,tp)
return c:IsAttack(1550) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttack(1550) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c81041021.target(e,tp,eg,ep,ev,re,r,rp,chk) function c81041021.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81041021.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c81041021.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 c81041021.activate(e,tp,eg,ep,ev,re,r,rp) function c81041021.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,c81041021.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c81041021.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
......
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