Commit fc5dd11a authored by VanillaSalt's avatar VanillaSalt

fix

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