Commit fc5dd11a authored by VanillaSalt's avatar VanillaSalt

fix

parent ff327aa3
...@@ -11,7 +11,7 @@ function c10069180.initial_effect(c) ...@@ -11,7 +11,7 @@ function c10069180.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c10069180.condition(e,tp,eg,ep,ev,re,r,rp) function c10069180.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_SPELL+TYPE_CONTINUOUS and Duel.IsChainNegatable(ev) return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_SPELL+TYPE_CONTINUOUS and Duel.IsChainNegatable(ev)
end end
function c10069180.target(e,tp,eg,ep,ev,re,r,rp,chk) function c10069180.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -12,21 +12,22 @@ end ...@@ -12,21 +12,22 @@ end
function c12071500.filter1(c,e) function c12071500.filter1(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end end
function c12071500.filter2(c,e,tp,m,chkf) function c12071500.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x102) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x102) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION+0x10,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION+0x10,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function c12071500.target(e,tp,eg,ep,ev,re,r,rp,chk) function c12071500.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c12071500.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e) local mg1=Duel.GetMatchingGroup(c12071500.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c12071500.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c12071500.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c12071500.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c12071500.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -36,14 +37,15 @@ end ...@@ -36,14 +37,15 @@ end
function c12071500.activate(e,tp,eg,ep,ev,re,r,rp) function c12071500.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c12071500.filter1,tp,LOCATION_GRAVE+LOCATION_HAND,0,nil,e) local mg1=Duel.GetMatchingGroup(c12071500.filter1,tp,LOCATION_GRAVE+LOCATION_HAND,0,nil,e)
local sg1=Duel.GetMatchingGroup(c12071500.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c12071500.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c12071500.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c12071500.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -22,21 +22,22 @@ end ...@@ -22,21 +22,22 @@ end
function c1264319.filter1(c,e) function c1264319.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function c1264319.filter2(c,e,tp,m,chkf) function c1264319.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) 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 c1264319.target(e,tp,eg,ep,ev,re,r,rp,chk) function c1264319.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c1264319.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c1264319.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c1264319.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c1264319.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c1264319.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c1264319.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -46,14 +47,15 @@ end ...@@ -46,14 +47,15 @@ end
function c1264319.activate(e,tp,eg,ep,ev,re,r,rp) function c1264319.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c1264319.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c1264319.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c1264319.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c1264319.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c1264319.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c1264319.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -29,8 +29,7 @@ function c16516630.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -29,8 +29,7 @@ function c16516630.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SelectTarget(tp,c16516630.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c16516630.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c16516630.operation(e,tp,eg,ep,ev,re,r,rp) function c16516630.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=Duel.GetFirstTarget()
local tc=g:GetFirst()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -31,12 +31,12 @@ function c20470500.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,12 +31,12 @@ function c20470500.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000) e1:SetReset(RESET_EVENT+0x57a0000)
bc:RegisterEffect(e1) bc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x17a0000) e2:SetReset(RESET_EVENT+0x57a0000)
bc:RegisterEffect(e2) bc:RegisterEffect(e2)
end end
function c20470500.repfilter(c) function c20470500.repfilter(c)
......
...@@ -13,6 +13,7 @@ function c20686759.initial_effect(c) ...@@ -13,6 +13,7 @@ function c20686759.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c20686759.eqlimit) e2:SetValue(c20686759.eqlimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--damage --damage
......
...@@ -50,8 +50,7 @@ function c21454943.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -50,8 +50,7 @@ function c21454943.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
else Duel.SetTargetCard(a) end else Duel.SetTargetCard(a) end
end end
function c21454943.operation(e,tp,eg,ep,ev,re,r,rp,chk) function c21454943.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=Duel.GetFirstTarget()
local tc=g:GetFirst()
local c=e:GetHandler() local c=e:GetHandler()
if not tc or not tc:IsRelateToEffect(e) or not c:IsRelateToEffect(e) then return end if not tc or not tc:IsRelateToEffect(e) or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -20,6 +20,7 @@ function c22046459.initial_effect(c) ...@@ -20,6 +20,7 @@ function c22046459.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
......
...@@ -28,11 +28,11 @@ function c23274061.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,11 +28,11 @@ function c23274061.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000) e1:SetReset(RESET_EVENT+0x57a0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x17a0000) e2:SetReset(RESET_EVENT+0x57a0000)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
...@@ -12,21 +12,22 @@ end ...@@ -12,21 +12,22 @@ end
function c23299957.filter1(c,e) function c23299957.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function c23299957.filter2(c,e,tp,m,chkf) function c23299957.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1016) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1016) and (not f or f(c))
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 c23299957.target(e,tp,eg,ep,ev,re,r,rp,chk) function c23299957.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c23299957.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c23299957.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c23299957.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c23299957.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c23299957.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c23299957.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -36,14 +37,15 @@ end ...@@ -36,14 +37,15 @@ end
function c23299957.activate(e,tp,eg,ep,ev,re,r,rp) function c23299957.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c23299957.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c23299957.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c23299957.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c23299957.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c23299957.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c23299957.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -50,8 +50,7 @@ function c2377034.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -50,8 +50,7 @@ function c2377034.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end end
function c2377034.thop(e,tp,eg,ep,ev,re,r,rp) function c2377034.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=Duel.GetFirstTarget()
local tc=g:GetFirst()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
......
...@@ -31,12 +31,13 @@ function c2403771.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,12 +31,13 @@ function c2403771.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end end
function c2403771.thop(e,tp,eg,ep,ev,re,r,rp) function c2403771.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_DECK,0,nil,TYPE_EQUIP) local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_DECK,0,nil,TYPE_EQUIP)
if g:GetCount()>=3 then if g:GetCount()>=3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,3,3,nil) local sg=g:Select(tp,3,3,nil)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local tg=sg:Select(1-tp,1,1,nil) local tg=sg:Select(1-tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc:IsAbleToHand() then Duel.SendtoHand(tc,nil,REASON_EFFECT) if tc:IsAbleToHand() then Duel.SendtoHand(tc,nil,REASON_EFFECT)
......
...@@ -12,21 +12,22 @@ end ...@@ -12,21 +12,22 @@ end
function c24094653.filter1(c,e) function c24094653.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function c24094653.filter2(c,e,tp,m,chkf) function c24094653.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) return c:IsType(TYPE_FUSION) and (not f or f(c))
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 c24094653.target(e,tp,eg,ep,ev,re,r,rp,chk) function c24094653.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c24094653.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c24094653.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c24094653.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c24094653.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c24094653.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c24094653.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -36,14 +37,15 @@ end ...@@ -36,14 +37,15 @@ end
function c24094653.activate(e,tp,eg,ep,ev,re,r,rp) function c24094653.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c24094653.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c24094653.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c24094653.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c24094653.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c24094653.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c24094653.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -19,21 +19,22 @@ end ...@@ -19,21 +19,22 @@ end
function c33550694.filter1(c,e) function c33550694.filter1(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end end
function c33550694.filter2(c,e,tp,m,chkf) function c33550694.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) return c:IsType(TYPE_FUSION) and (not f or f(c))
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 c33550694.target(e,tp,eg,ep,ev,re,r,rp,chk) function c33550694.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c33550694.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c33550694.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c33550694.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c33550694.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c33550694.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c33550694.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -44,14 +45,15 @@ function c33550694.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,14 +45,15 @@ function c33550694.operation(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(c33550694.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c33550694.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c33550694.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c33550694.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c33550694.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c33550694.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -50,8 +50,7 @@ end ...@@ -50,8 +50,7 @@ end
function c35514096.operation(e,tp,eg,ep,ev,re,r,rp) function c35514096.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if e:GetLabel()==2 then if e:GetLabel()==2 then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=Duel.GetFirstTarget()
local tc=g:GetFirst()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
......
...@@ -23,21 +23,22 @@ end ...@@ -23,21 +23,22 @@ end
function c36484016.filter1(c,e) function c36484016.filter1(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end end
function c36484016.filter2(c,e,tp,m,chkf) function c36484016.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x101) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x101) and (not f or f(c))
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 c36484016.target(e,tp,eg,ep,ev,re,r,rp,chk) function c36484016.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c36484016.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e) local mg1=Duel.GetMatchingGroup(c36484016.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c36484016.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c36484016.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c36484016.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c36484016.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -47,14 +48,15 @@ end ...@@ -47,14 +48,15 @@ end
function c36484016.activate(e,tp,eg,ep,ev,re,r,rp) function c36484016.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c36484016.filter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c36484016.filter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c36484016.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c36484016.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c36484016.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c36484016.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -12,21 +12,22 @@ end ...@@ -12,21 +12,22 @@ end
function c3659803.filter1(c,e) function c3659803.filter1(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end end
function c3659803.filter2(c,e,tp,m,chkf) function c3659803.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_MACHINE) return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_MACHINE) 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 c3659803.target(e,tp,eg,ep,ev,re,r,rp,chk) function c3659803.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c3659803.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e) local mg1=Duel.GetMatchingGroup(c3659803.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c3659803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c3659803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c3659803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c3659803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -36,14 +37,15 @@ end ...@@ -36,14 +37,15 @@ end
function c3659803.activate(e,tp,eg,ep,ev,re,r,rp) function c3659803.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c3659803.filter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c3659803.filter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c3659803.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c3659803.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c3659803.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c3659803.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -12,21 +12,22 @@ end ...@@ -12,21 +12,22 @@ end
function c37630732.filter1(c,e) function c37630732.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function c37630732.filter2(c,e,tp,m,chkf) function c37630732.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_MACHINE) return c:IsType(TYPE_FUSION) and c:IsRace(RACE_MACHINE) 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 c37630732.target(e,tp,eg,ep,ev,re,r,rp,chk) function c37630732.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c37630732.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c37630732.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c37630732.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c37630732.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c37630732.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c37630732.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -36,14 +37,15 @@ end ...@@ -36,14 +37,15 @@ end
function c37630732.activate(e,tp,eg,ep,ev,re,r,rp) function c37630732.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c37630732.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c37630732.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c37630732.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c37630732.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c37630732.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c37630732.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -24,21 +24,22 @@ end ...@@ -24,21 +24,22 @@ end
function c39261576.filter1(c,e) function c39261576.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function c39261576.filter2(c,e,tp,m,chkf) function c39261576.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) 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 c39261576.target(e,tp,eg,ep,ev,re,r,rp,chk) function c39261576.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c39261576.filter1,tp,LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c39261576.filter1,tp,LOCATION_MZONE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c39261576.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c39261576.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c39261576.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c39261576.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -48,14 +49,15 @@ end ...@@ -48,14 +49,15 @@ end
function c39261576.activate(e,tp,eg,ep,ev,re,r,rp) function c39261576.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c39261576.filter1,tp,LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c39261576.filter1,tp,LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c39261576.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c39261576.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c39261576.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c39261576.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -29,6 +29,7 @@ function c39980304.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,6 +29,7 @@ function c39980304.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c39980304.chain_target) e1:SetTarget(c39980304.chain_target)
e1:SetOperation(c39980304.chain_operation) e1:SetOperation(c39980304.chain_operation)
e1:SetValue(aux.TRUE)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c39980304.filter(c,e) function c39980304.filter(c,e)
......
--折断的竹光 --折竹光
function c41587307.initial_effect(c) function c41587307.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -13,6 +13,7 @@ function c41587307.initial_effect(c) ...@@ -13,6 +13,7 @@ function c41587307.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
......
...@@ -62,8 +62,7 @@ function c42940404.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -62,8 +62,7 @@ function c42940404.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c42940404.eqop(e,tp,eg,ep,ev,re,r,rp) function c42940404.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=Duel.GetFirstTarget()
local tc=g:GetFirst()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not tc:IsRelateToEffect(e) or not c42940404.filter(tc) then if not tc:IsRelateToEffect(e) or not c42940404.filter(tc) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
......
...@@ -12,21 +12,22 @@ end ...@@ -12,21 +12,22 @@ end
function c45906428.filter1(c,e) function c45906428.filter1(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end end
function c45906428.filter2(c,e,tp,m,chkf) function c45906428.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3008) and (not f or f(c))
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 c45906428.target(e,tp,eg,ep,ev,re,r,rp,chk) function c45906428.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c45906428.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e) local mg1=Duel.GetMatchingGroup(c45906428.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c45906428.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c45906428.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c45906428.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c45906428.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -36,14 +37,15 @@ end ...@@ -36,14 +37,15 @@ end
function c45906428.activate(e,tp,eg,ep,ev,re,r,rp) function c45906428.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c45906428.filter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c45906428.filter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c45906428.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c45906428.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c45906428.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c45906428.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -12,11 +12,11 @@ function c48130397.initial_effect(c) ...@@ -12,11 +12,11 @@ function c48130397.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c48130397.filter1(c,e,tp) function c48130397.filter1(c,e,tp)
return (c:GetControler()==tp or c:IsFaceup()) and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return (c:IsControler(tp) or c:IsFaceup()) and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function c48130397.filter2(c,e,tp,m,chkf) function c48130397.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) return c:IsType(TYPE_FUSION) and (not f or f(c))
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 c48130397.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c48130397.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
...@@ -26,13 +26,14 @@ function c48130397.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,13 +26,14 @@ function c48130397.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c48130397.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e,tp) local mg1=Duel.GetMatchingGroup(c48130397.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e,tp)
local res=Duel.IsExistingMatchingCard(c48130397.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c48130397.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c48130397.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c48130397.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -43,14 +44,15 @@ end ...@@ -43,14 +44,15 @@ end
function c48130397.activate(e,tp,eg,ep,ev,re,r,rp) function c48130397.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c48130397.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e,tp) local mg1=Duel.GetMatchingGroup(c48130397.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e,tp)
local sg1=Duel.GetMatchingGroup(c48130397.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c48130397.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c48130397.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c48130397.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -65,8 +65,7 @@ function c48568432.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -65,8 +65,7 @@ function c48568432.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c48568432.eqop(e,tp,eg,ep,ev,re,r,rp) function c48568432.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=Duel.GetFirstTarget()
local tc=g:GetFirst()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not tc:IsRelateToEffect(e) or not c48568432.filter(tc) then if not tc:IsRelateToEffect(e) or not c48568432.filter(tc) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
......
...@@ -13,6 +13,7 @@ function c50418970.initial_effect(c) ...@@ -13,6 +13,7 @@ function c50418970.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--pos --pos
......
...@@ -22,11 +22,11 @@ function c5284653.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,11 +22,11 @@ function c5284653.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000) e1:SetReset(RESET_EVENT+0x57a0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x17a0000) e2:SetReset(RESET_EVENT+0x57a0000)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
...@@ -45,12 +45,12 @@ function c54702678.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,12 +45,12 @@ function c54702678.disop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000) e1:SetReset(RESET_EVENT+0x57a0000)
bc:RegisterEffect(e1,true) bc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x17a0000) e2:SetReset(RESET_EVENT+0x57a0000)
bc:RegisterEffect(e2,true) bc:RegisterEffect(e2,true)
end end
function c54702678.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c54702678.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -12,21 +12,22 @@ end ...@@ -12,21 +12,22 @@ end
function c55824220.filter1(c,e) function c55824220.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function c55824220.filter2(c,e,tp,m,chkf) function c55824220.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) 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 c55824220.target(e,tp,eg,ep,ev,re,r,rp,chk) function c55824220.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c55824220.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c55824220.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c55824220.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c55824220.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c55824220.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c55824220.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -36,14 +37,15 @@ end ...@@ -36,14 +37,15 @@ end
function c55824220.activate(e,tp,eg,ep,ev,re,r,rp) function c55824220.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c55824220.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c55824220.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c55824220.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c55824220.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c55824220.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c55824220.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -11,7 +11,7 @@ function c56058888.initial_effect(c) ...@@ -11,7 +11,7 @@ function c56058888.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c56058888.condition(e,tp,eg,ep,ev,re,r,rp) function c56058888.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_TRAP+TYPE_CONTINUOUS and Duel.IsChainNegatable(ev) return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_TRAP+TYPE_CONTINUOUS and Duel.IsChainNegatable(ev)
end end
function c56058888.target(e,tp,eg,ep,ev,re,r,rp,chk) function c56058888.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -13,17 +13,19 @@ function c62991886.initial_effect(c) ...@@ -13,17 +13,19 @@ function c62991886.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP) e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_SET_BASE_ATTACK) e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetCondition(c62991886.condition)
e2:SetValue(c62991886.value) e2:SetValue(c62991886.value)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Equip limit --Equip limit
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c62991886.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c62991886.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
...@@ -35,11 +37,14 @@ function c62991886.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,11 +37,14 @@ function c62991886.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Equip(tp,e:GetHandler(),tc) Duel.Equip(tp,e:GetHandler(),tc)
end end
end end
function c62991886.condition(e)
return Duel.GetLP(0)~=Duel.GetLP(1)
end
function c62991886.value(e,c) function c62991886.value(e,c)
local p=e:GetHandler():GetControler() local p=e:GetHandler():GetControler()
if Duel.GetLP(p)<Duel.GetLP(1-p) then if Duel.GetLP(p)<Duel.GetLP(1-p) then
return 2400 return 2400
elseif Duel.GetLP(p)>Duel.GetLP(1-p) then elseif Duel.GetLP(p)>Duel.GetLP(1-p) then
return 1000 return 1000
else return c:GetBaseAttack() end end
end end
--ウォール·シャドウ --ウォール·シャドウ
function c63162310.initial_effect(c) function c63162310.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--special summon limit
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
end end
...@@ -74,8 +74,7 @@ function c63676256.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -74,8 +74,7 @@ function c63676256.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c63676256.eqop(e,tp,eg,ep,ev,re,r,rp) function c63676256.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=Duel.GetFirstTarget()
local tc=g:GetFirst()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not tc:IsRelateToEffect(e) or not c63676256.filter(tc) then if not tc:IsRelateToEffect(e) or not c63676256.filter(tc) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
......
...@@ -13,6 +13,7 @@ function c63789924.initial_effect(c) ...@@ -13,6 +13,7 @@ function c63789924.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Check & Discard --Check & Discard
......
...@@ -24,6 +24,7 @@ function c64801562.initial_effect(c) ...@@ -24,6 +24,7 @@ function c64801562.initial_effect(c)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT) e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(1) e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--selfdes --selfdes
......
...@@ -12,21 +12,22 @@ end ...@@ -12,21 +12,22 @@ end
function c71490127.filter1(c,e) function c71490127.filter1(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end end
function c71490127.filter2(c,e,tp,m,chkf) function c71490127.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) return c:IsType(TYPE_FUSION) and c:IsRace(RACE_DRAGON) and (not f or f(c))
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 c71490127.target(e,tp,eg,ep,ev,re,r,rp,chk) function c71490127.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c71490127.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e) local mg1=Duel.GetMatchingGroup(c71490127.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c71490127.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c71490127.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c71490127.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c71490127.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -36,14 +37,15 @@ end ...@@ -36,14 +37,15 @@ end
function c71490127.activate(e,tp,eg,ep,ev,re,r,rp) function c71490127.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c71490127.filter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c71490127.filter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c71490127.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c71490127.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c71490127.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c71490127.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -12,21 +12,22 @@ end ...@@ -12,21 +12,22 @@ end
function c72029628.filter1(c,e) function c72029628.filter1(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end end
function c72029628.filter2(c,e,tp,m,chkf) function c72029628.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and (not f or f(c))
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 c72029628.target(e,tp,eg,ep,ev,re,r,rp,chk) function c72029628.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c72029628.filter1,tp,LOCATION_GRAVE,0,nil,e) local mg1=Duel.GetMatchingGroup(c72029628.filter1,tp,LOCATION_GRAVE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c72029628.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c72029628.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c72029628.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c72029628.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -36,14 +37,15 @@ end ...@@ -36,14 +37,15 @@ end
function c72029628.activate(e,tp,eg,ep,ev,re,r,rp) function c72029628.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c72029628.filter1,tp,LOCATION_GRAVE,0,nil,e) local mg1=Duel.GetMatchingGroup(c72029628.filter1,tp,LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c72029628.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c72029628.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c72029628.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c72029628.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -44,8 +44,7 @@ function c74153887.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -44,8 +44,7 @@ function c74153887.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c74153887.operation(e,tp,eg,ep,ev,re,r,rp) function c74153887.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then if e:GetLabel()==1 then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=Duel.GetFirstTarget()
local tc=g:GetFirst()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
......
...@@ -22,11 +22,11 @@ function c76650663.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,11 +22,11 @@ function c76650663.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000) e1:SetReset(RESET_EVENT+0x57a0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x17a0000) e2:SetReset(RESET_EVENT+0x57a0000)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
...@@ -19,6 +19,7 @@ function c7817703.initial_effect(c) ...@@ -19,6 +19,7 @@ function c7817703.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c7817703.eqlimit) e3:SetValue(c7817703.eqlimit)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
...@@ -29,7 +30,7 @@ function c7817703.filter(c) ...@@ -29,7 +30,7 @@ function c7817703.filter(c)
return c:IsFaceup() and c:IsSetCard(0x26) and c:GetLevel()==3 return c:IsFaceup() and c:IsSetCard(0x26) and c:GetLevel()==3
end end
function c7817703.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c7817703.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c7817703.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c7817703.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c7817703.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c7817703.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c7817703.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c7817703.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
...@@ -40,8 +40,7 @@ function c78794994.eqlimit(e,c) ...@@ -40,8 +40,7 @@ function c78794994.eqlimit(e,c)
end end
function c78794994.operation(e,tp,eg,ep,ev,re,r,rp) function c78794994.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local sg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=Duel.GetFirstTarget()
local tc=sg:GetFirst()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
......
...@@ -13,6 +13,7 @@ function c79068663.initial_effect(c) ...@@ -13,6 +13,7 @@ function c79068663.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--damage --damage
......
...@@ -50,8 +50,7 @@ function c86170989.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -50,8 +50,7 @@ function c86170989.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c86170989.operation(e,tp,eg,ep,ev,re,r,rp) function c86170989.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==2 then if e:GetLabel()==2 then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=Duel.GetFirstTarget()
local tc=g:GetFirst()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -29,8 +29,7 @@ function c89310929.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -29,8 +29,7 @@ function c89310929.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c89310929.operation(e,tp,eg,ep,ev,re,r,rp) function c89310929.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=Duel.GetFirstTarget()
local tc=g:GetFirst()
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -24,6 +24,7 @@ function c91580102.initial_effect(c) ...@@ -24,6 +24,7 @@ function c91580102.initial_effect(c)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT) e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(1) e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--atkdown --atkdown
...@@ -39,7 +40,7 @@ function c91580102.initial_effect(c) ...@@ -39,7 +40,7 @@ function c91580102.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c91580102.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c91580102.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
...@@ -30,6 +30,7 @@ function c9236985.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,6 +30,7 @@ function c9236985.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc then if tc then
Duel.PayLPCost(tp,tc:GetLevel()*500) Duel.PayLPCost(tp,tc:GetLevel()*500)
tc:SetMaterial(Group.CreateGroup())
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
......
...@@ -12,21 +12,22 @@ end ...@@ -12,21 +12,22 @@ end
function c94820406.filter1(c,e) function c94820406.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function c94820406.filter2(c,e,tp,m,chkf) function c94820406.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_FIEND) and return c:IsType(TYPE_FUSION) and c:IsRace(RACE_FIEND) and (not f or f(c))
c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION+0x10,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION+0x10,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function c94820406.target(e,tp,eg,ep,ev,re,r,rp,chk) function c94820406.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c94820406.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c94820406.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c94820406.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf) local res=Duel.IsExistingMatchingCard(c94820406.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c94820406.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c94820406.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
...@@ -36,14 +37,15 @@ end ...@@ -36,14 +37,15 @@ end
function c94820406.activate(e,tp,eg,ep,ev,re,r,rp) function c94820406.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c94820406.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c94820406.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c94820406.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf) local sg1=Duel.GetMatchingGroup(c94820406.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c94820406.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf) local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c94820406.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
...@@ -19,6 +19,7 @@ function c95515060.initial_effect(c) ...@@ -19,6 +19,7 @@ function c95515060.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--disable --disable
......
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