Commit 978dd040 authored by VanillaSalt's avatar VanillaSalt

fix

parent 655ecc3b
--ルーンアイズ・ペンデュラム・ドラゴン --ルーンアイズ・ペンデュラム・ドラゴン
function c1516510.initial_effect(c) function c1516510.initial_effect(c)
c:EnableReviveLimit()
--fusion material --fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,16178681,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),1,true,false)
--multi attack
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCode(EFFECT_FUSION_MATERIAL) e1:SetCondition(c1516510.condition)
e1:SetCondition(aux.FConditionCodeFun(16178681,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),1,true,false)) e1:SetOperation(c1516510.operation)
e1:SetOperation(c1516510.fsop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c1516510.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end end
c1516510.material_count=1 function c1516510.condition(e,tp,eg,ep,ev,re,r,rp)
c1516510.material={16178681} return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION
function c1516510.imfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:GetSummonType()==SUMMON_TYPE_PENDULUM
end end
function c1516510.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkf) function c1516510.operation(e,tp,eg,ep,ev,re,r,rp)
local g1=nil
local g2=nil
if gc then
g1=Group.FromCards(gc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g2=eg:FilterSelect(tp,Card.IsRace,1,1,nil,RACE_SPELLCASTER)
Duel.SetFusionMaterial(g2)
g1:Merge(g2)
else
local sg1=Group.CreateGroup()
local sg2=Group.CreateGroup()
local fs=false
local tc=eg:GetFirst()
while tc do
if tc:IsCode(16178681) or tc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then sg1:AddCard(tc) end
if tc:IsRace(RACE_SPELLCASTER) then
sg2:AddCard(tc)
if aux.FConditionCheckF(tc,chkf) then fs=true end
end
tc=eg:GetNext()
end
if sg2:GetCount()==1 then
sg1:Sub(sg2)
end
if chkf~=PLAYER_NONE then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
if fs then g1=sg1:Select(tp,1,1,nil)
else g1=sg1:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf) end
local tc1=g1:GetFirst()
sg2:RemoveCard(tc1)
if aux.FConditionCheckF(tc1,chkf) or sg2:GetCount()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g2=sg2:Select(tp,1,1,tc1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g2=sg2:FilterSelect(tp,aux.FConditionCheckF,1,1,tc1,chkf)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g1=sg1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g2=sg2:Select(tp,1,1,g1:GetFirst())
end
g1:Merge(g2)
Duel.SetFusionMaterial(g1)
end
local c=e:GetHandler() local c=e:GetHandler()
local flag=e:GetLabel()
if bit.band(flag,0x3)~=0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
if g2:GetFirst():GetOriginalLevel()<5 then if bit.band(flag,0x1)~=0 then
e1:SetDescription(aux.Stringid(1516510,0)) e1:SetDescription(aux.Stringid(1516510,0))
e1:SetValue(1) e1:SetValue(1)
else else
e1:SetDescription(aux.Stringid(1516510,1)) e1:SetDescription(aux.Stringid(1516510,1))
e1:SetValue(2) e1:SetValue(2)
end end
e1:SetReset(RESET_EVENT+0xfe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetCondition(c1516510.dircon) e2:SetCondition(c1516510.dircon)
e2:SetReset(RESET_EVENT+0xfe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_ATTACK) e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetCondition(c1516510.atkcon) e3:SetCondition(c1516510.atkcon)
c:RegisterEffect(e3) c:RegisterEffect(e3)
if g1:IsExists(c1516510.imfilter,1,nil) then if bit.band(flag,0x4)~=0 then
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT) e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c1516510.efilter) e4:SetValue(c1516510.efilter)
e4:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+RESET_END) e4:SetOwnerPlayer(tp)
e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
end end
...@@ -102,5 +65,26 @@ function c1516510.atkcon(e) ...@@ -102,5 +65,26 @@ function c1516510.atkcon(e)
return e:GetHandler():IsDirectAttacked() return e:GetHandler():IsDirectAttacked()
end end
function c1516510.efilter(e,re) function c1516510.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetHandlerPlayer() return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c1516510.lvfilter(c)
return not c:IsCode(16178681)
end
function c1516510.imfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:GetSummonType()==SUMMON_TYPE_PENDULUM
end
function c1516510.valcheck(e,c)
local g=c:GetMaterial()
local flag=0
local lg=g:Filter(c1516510.lvfilter,nil)
local lv=lg:GetFirst():GetOriginalLevel()
if lv>0 and lv<5 then
flag=0x1
elseif lv>4 then
flag=0x2
end
if g:IsExists(c1516510.imfilter,1,nil) then
flag=flag+0x4
end
e:GetLabelObject():SetLabel(flag)
end end
...@@ -28,7 +28,7 @@ function c23536866.mfilter1(c,exg) ...@@ -28,7 +28,7 @@ function c23536866.mfilter1(c,exg)
return exg:IsExists(c23536866.mfilter2,1,nil,c) return exg:IsExists(c23536866.mfilter2,1,nil,c)
end end
function c23536866.mfilter2(c,mc) function c23536866.mfilter2(c,mc)
return not c.xyz_filter or c.xyz_filter(mc) return c.xyz_filter(mc)
end end
function c23536866.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23536866.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -12,10 +12,10 @@ function c33252803.initial_effect(c) ...@@ -12,10 +12,10 @@ function c33252803.initial_effect(c)
end end
function c33252803.filter1(c,e,tp) function c33252803.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) return c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048)
and Duel.IsExistingMatchingCard(c33252803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRank()+1,c.xyz_number) and Duel.IsExistingMatchingCard(c33252803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1,c.xyz_number)
end end
function c33252803.filter2(c,e,tp,rank,no) function c33252803.filter2(c,e,tp,mc,rk,no)
return c:GetRank()==rank and c:IsSetCard(0x1048) and c.xyz_number==no return c:GetRank()==rk and c:IsSetCard(0x1048) and c.xyz_number==no and mc:IsCanBeXyzMaterial(c,true)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
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)
...@@ -31,7 +31,7 @@ function c33252803.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function c33252803.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
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,c33252803.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetRank()+1,tc.xyz_number) local g=Duel.SelectMatchingCard(tp,c33252803.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,tc.xyz_number)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
......
...@@ -20,8 +20,8 @@ function c36953371.initial_effect(c) ...@@ -20,8 +20,8 @@ function c36953371.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c36953371.descon(e,tp,eg,ep,ev,re,r,rp) function c36953371.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO and return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP)
end end
function c36953371.filter(c) function c36953371.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
......
...@@ -29,11 +29,11 @@ function c45950291.filter1(c,e,tp) ...@@ -29,11 +29,11 @@ function c45950291.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return rk>0 and c:IsFaceup() return rk>0 and c:IsFaceup()
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,rk+2,c:GetRace(),c:GetAttribute(),c:GetCode(),e,tp) and Duel.IsExistingMatchingCard(c45950291.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+2,c:GetRace(),c:GetAttribute(),c:GetCode())
end end
function c45950291.filter2(c,rk,rc,att,code,e,tp) function c45950291.filter2(c,e,tp,mc,rk,rc,att,code)
if c:IsCode(6165656) and code~=48995978 then return false end if c:IsCode(6165656) and code~=48995978 then return false end
return c:GetRank()==rk and c:IsRace(rc) and c:IsAttribute(att) return c:GetRank()==rk and c:IsRace(rc) and c:IsAttribute(att) and mc:IsCanBeXyzMaterial(c,true)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
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)
...@@ -49,7 +49,7 @@ function c45950291.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function c45950291.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
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,tc:GetRank()+2,tc:GetRace(),tc:GetAttribute(),tc:GetCode(),e,tp) 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 sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
......
...@@ -12,11 +12,12 @@ function c47660516.initial_effect(c) ...@@ -12,11 +12,12 @@ function c47660516.initial_effect(c)
end end
function c47660516.filter1(c,e,tp) function c47660516.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return rk>0 and c:IsFaceup() and Duel.IsExistingMatchingCard(c47660516.filter2,tp,LOCATION_EXTRA,0,1,nil,rk+1,c:GetRace(),c:GetCode(),e,tp) return rk>0 and c:IsFaceup()
and Duel.IsExistingMatchingCard(c47660516.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1,c:GetRace(),c:GetCode())
end end
function c47660516.filter2(c,rk,rc,code,e,tp) function c47660516.filter2(c,e,tp,mc,rk,rc,code)
if c:IsCode(6165656) and code~=48995978 then return false end if c:IsCode(6165656) and code~=48995978 then return false end
return c:GetRank()==rk and c:IsRace(rc) and (c:IsSetCard(0x1048) or c:IsSetCard(0x1073)) return c:GetRank()==rk and c:IsRace(rc) and (c:IsSetCard(0x1048) or c:IsSetCard(0x1073)) and mc:IsCanBeXyzMaterial(c,true)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
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)
...@@ -32,7 +33,7 @@ function c47660516.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +33,7 @@ function c47660516.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
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,tc:GetRank()+1,tc:GetRace(),tc:GetCode(),e,tp) 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 sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
......
...@@ -12,11 +12,12 @@ function c48333324.initial_effect(c) ...@@ -12,11 +12,12 @@ function c48333324.initial_effect(c)
end end
function c48333324.filter1(c,e,tp) function c48333324.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return rk>0 and c:IsFaceup() and Duel.IsExistingMatchingCard(c48333324.filter2,tp,LOCATION_EXTRA,0,1,nil,rk+1,c:GetRace(),c:GetCode(),e,tp) return rk>0 and c:IsFaceup()
and Duel.IsExistingMatchingCard(c48333324.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1,c:GetRace(),c:GetCode())
end end
function c48333324.filter2(c,rk,rc,code,e,tp) function c48333324.filter2(c,e,tp,mc,rk,rc,code)
if c:IsCode(6165656) and code~=48995978 then return false end if c:IsCode(6165656) and code~=48995978 then return false end
return c:GetRank()==rk and c:IsRace(rc) and c:IsSetCard(0x1048) return c:GetRank()==rk and c:IsRace(rc) and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c,true)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
function c48333324.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c48333324.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -36,7 +37,7 @@ function c48333324.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +37,7 @@ function c48333324.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
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,tc:GetRank()+1,tc:GetRace(),tc:GetCode(),e,tp) 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 sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
......
-- --閃光の宝札
function c48356796.initial_effect(c) function c48356796.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -61,7 +61,7 @@ function c49919798.cpop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,7 @@ function c49919798.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
local code=tc:GetCode() local code=tc:GetOriginalCode()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......
...@@ -32,7 +32,7 @@ function c56611470.mfilter1(c,exg) ...@@ -32,7 +32,7 @@ function c56611470.mfilter1(c,exg)
return exg:IsExists(c56611470.mfilter2,1,nil,c) return exg:IsExists(c56611470.mfilter2,1,nil,c)
end end
function c56611470.mfilter2(c,mc) function c56611470.mfilter2(c,mc)
return not c.xyz_filter or c.xyz_filter(mc) return c.xyz_filter(mc)
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
......
...@@ -39,10 +39,11 @@ function c57734012.filter1(c,e,tp) ...@@ -39,10 +39,11 @@ function c57734012.filter1(c,e,tp)
local no=c.xyz_number local no=c.xyz_number
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) return no and no>=101 and no<=107 and c:IsSetCard(0x48) and not c:IsSetCard(0x1048)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
and Duel.IsExistingMatchingCard(c57734012.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,no) and Duel.IsExistingMatchingCard(c57734012.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,no)
end end
function c57734012.filter2(c,e,tp,no) function c57734012.filter2(c,e,tp,mc,no)
return c.xyz_number==no and c:IsSetCard(0x1048) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) return c.xyz_number==no and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c,true)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
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)
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
...@@ -58,7 +59,7 @@ function c57734012.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +59,7 @@ function c57734012.activate(e,tp,eg,ep,ev,re,r,rp)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c57734012.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc1.xyz_number) local g2=Duel.SelectMatchingCard(tp,c57734012.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc1,tc1.xyz_number)
local tc2=g2:GetFirst() local tc2=g2:GetFirst()
if tc2 then if tc2 then
Duel.Overlay(tc2,g1) Duel.Overlay(tc2,g1)
......
...@@ -21,7 +21,7 @@ function c61314842.mfilter1(c,exg) ...@@ -21,7 +21,7 @@ function c61314842.mfilter1(c,exg)
return exg:IsExists(c61314842.mfilter2,1,nil,c) return exg:IsExists(c61314842.mfilter2,1,nil,c)
end end
function c61314842.mfilter2(c,mc) function c61314842.mfilter2(c,mc)
return not c.xyz_filter or c.xyz_filter(mc) return c.xyz_filter(mc)
end end
function c61314842.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c61314842.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -12,16 +12,16 @@ function c92365601.initial_effect(c) ...@@ -12,16 +12,16 @@ function c92365601.initial_effect(c)
end end
function c92365601.filter1(c,e,tp) function c92365601.filter1(c,e,tp)
return c:IsFaceup() and c:GetRank()==4 return c:IsFaceup() and c:GetRank()==4
and Duel.IsExistingMatchingCard(c92365601.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end end
function c92365601.filter2(c,e,tp) function c92365601.filter2(c,e,tp,mc)
return c:GetRank()==5 and c:IsSetCard(0x1048) return c:GetRank()==5 and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c,true)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
function c92365601.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c92365601.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c92365601.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c92365601.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c92365601.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) and Duel.IsExistingTarget(c92365601.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c92365601.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c92365601.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c92365601.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
...@@ -31,7 +31,7 @@ function c92365601.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function c92365601.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
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,c92365601.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c92365601.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
......
...@@ -25,11 +25,11 @@ end ...@@ -25,11 +25,11 @@ end
function c94220427.filter1(c,e,tp) function c94220427.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return rk>4 and c:IsFaceup() return rk>4 and c:IsFaceup()
and Duel.IsExistingMatchingCard(c94220427.filter2,tp,LOCATION_EXTRA,0,1,nil,rk+1,c:GetCode(),e,tp) and Duel.IsExistingMatchingCard(c94220427.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1,c:GetCode())
end end
function c94220427.filter2(c,rk,code,e,tp) function c94220427.filter2(c,e,tp,mc,rk,code)
if c:IsCode(6165656) and code~=48995978 then return false end if c:IsCode(6165656) and code~=48995978 then return false end
return c:GetRank()==rk and (c:IsSetCard(0x1048) or c:IsSetCard(0x1073)) return c:GetRank()==rk and (c:IsSetCard(0x1048) or c:IsSetCard(0x1073)) and mc:IsCanBeXyzMaterial(c,true)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
function c94220427.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c94220427.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -45,7 +45,7 @@ function c94220427.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function c94220427.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
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,c94220427.filter2,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetRank()+1,tc:GetCode(),e,tp) local g=Duel.SelectMatchingCard(tp,c94220427.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,tc:GetCode())
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
......
...@@ -159,11 +159,18 @@ function Auxiliary.AddSynchroProcedure2(c,f1,f2) ...@@ -159,11 +159,18 @@ function Auxiliary.AddSynchroProcedure2(c,f1,f2)
e1:SetValue(SUMMON_TYPE_SYNCHRO) e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function Auxiliary.XyzAlterFilter(c,alterf,xyzc)
return alterf(c) and c:IsCanBeXyzMaterial(xyzc,true)
end
function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,desc,maxct,op) function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,desc,maxct,op)
if c.xyz_filter==nil then if c.xyz_filter==nil then
local code=c:GetOriginalCode() local code=c:GetOriginalCode()
local mt=_G["c" .. code] local mt=_G["c" .. code]
mt.xyz_filter=f if f then
mt.xyz_filter=function(mc) return f(mc) and mc:IsXyzLevel(c,lv) end
else
mt.xyz_filter=function(mc) return mc:IsXyzLevel(c,lv) end
end
mt.xyz_count=ct mt.xyz_count=ct
end end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -210,7 +217,7 @@ function Auxiliary.XyzCondition2(f,lv,minc,maxc,alterf,desc,op) ...@@ -210,7 +217,7 @@ function Auxiliary.XyzCondition2(f,lv,minc,maxc,alterf,desc,op)
local ft=Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE) local ft=Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)
local ct=-ft local ct=-ft
if minc<=ct then return false end if minc<=ct then return false end
if ct<1 and Duel.IsExistingMatchingCard(alterf,c:GetControler(),LOCATION_MZONE,0,1,nil) if ct<1 and Duel.IsExistingMatchingCard(Auxiliary.XyzAlterFilter,c:GetControler(),LOCATION_MZONE,0,1,nil,alterf,c)
and (not op or op(e,c:GetControler(),0)) then and (not op or op(e,c:GetControler(),0)) then
return true return true
end end
...@@ -223,15 +230,15 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op) ...@@ -223,15 +230,15 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
c:SetMaterial(og) c:SetMaterial(og)
Duel.Overlay(c,og) Duel.Overlay(c,og)
else else
local ft=Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft local ct=-ft
local b1=Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og) local b1=Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og)
local b2=ct<1 and Duel.IsExistingMatchingCard(alterf,tp,LOCATION_MZONE,0,1,nil) local b2=ct<1 and Duel.IsExistingMatchingCard(Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,nil,alterf,c)
and (not op or op(e,tp,0)) and (not op or op(e,tp,0))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
if b2 and (not b1 or Duel.SelectYesNo(tp,desc)) then if b2 and (not b1 or Duel.SelectYesNo(tp,desc)) then
if op then op(e,tp,1) end if op then op(e,tp,1) end
local mg=Duel.SelectMatchingCard(tp,alterf,tp,LOCATION_MZONE,0,1,1,nil) local mg=Duel.SelectMatchingCard(tp,Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,1,nil,alterf,c)
local mg2=mg:GetFirst():GetOverlayGroup() local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then if mg2:GetCount()~=0 then
Duel.Overlay(c,mg2) Duel.Overlay(c,mg2)
......
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