Commit 88a892e7 authored by VanillaSalt's avatar VanillaSalt

fix

parent de68dfc2
...@@ -25,8 +25,10 @@ function c36484016.filter1(c,e) ...@@ -25,8 +25,10 @@ function c36484016.filter1(c,e)
end end
function c36484016.filter2(c,e,tp,m,f,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)) 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) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and m:IsExists(c36484016.filter3,1,nil,c,m,chkf)
and (not c:GetOriginalCode()==17412721 or m:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO)) end
function c36484016.filter3(c,fusc,m,chkf)
return c:IsType(TYPE_SYNCHRO) and fusc:CheckFusionMaterial(m,c,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
...@@ -66,23 +68,19 @@ function c36484016.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,23 +68,19 @@ function c36484016.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if tc:GetOriginalCode()==17412721 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local nmat1=mg1:FilterSelect(tp,Card.IsType,1,1,nil,TYPE_SYNCHRO) local gc=mg1:FilterSelect(tp,c36484016.filter3,1,1,nil,tc,mg1,chkf):GetFirst()
mg1:RemoveCard(nmat1:GetFirst()) local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,gc,chkf)
local nmat2=Duel.SelectFusionMaterial(tp,tc,mg1,nmat1:GetFirst(),chkf) mat1:AddCard(gc)
nmat2:Merge(nmat1) tc:SetMaterial(mat1)
Duel.Remove(nmat2,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
end
else else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local gc=mg2:FilterSelect(tp,c36484016.filter3,1,1,nil,tc,mg2,chkf):GetFirst()
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,gc,chkf)
mat2:AddCard(gc)
local fop=ce:GetOperation() local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2) fop(ce,e,tp,tc,mat2)
end end
......
...@@ -65,7 +65,7 @@ function c53334471.getattribute(g) ...@@ -65,7 +65,7 @@ function c53334471.getattribute(g)
return aat return aat
end end
function c53334471.rmfilter(c,at) function c53334471.rmfilter(c,at)
return not c:GetAttribute()~=at return c:GetAttribute()==at
end end
function c53334471.adjustop(e,tp,eg,ep,ev,re,r,rp) function c53334471.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase() local phase=Duel.GetCurrentPhase()
......
...@@ -27,7 +27,7 @@ function c60530944.getattr(g) ...@@ -27,7 +27,7 @@ function c60530944.getattr(g)
return aat return aat
end end
function c60530944.rmfilter(c,at) function c60530944.rmfilter(c,at)
return not c:GetAttribute()~=at return c:GetAttribute()==at
end end
function c60530944.operation(e,tp,eg,ep,ev,re,r,rp) function c60530944.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
......
...@@ -33,5 +33,5 @@ function c73061465.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,5 +33,5 @@ function c73061465.operation(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c73061465.tgval(e,re,rp) function c73061465.tgval(e,re,rp)
return re:GetOwner():IsType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
...@@ -286,7 +286,17 @@ function Auxiliary.FConditionCode2(code1,code2,sub,insf) ...@@ -286,7 +286,17 @@ function Auxiliary.FConditionCode2(code1,code2,sub,insf)
--chkf: check field, default:PLAYER_NONE --chkf: check field, default:PLAYER_NONE
return function(e,g,gc,chkf) return function(e,g,gc,chkf)
if g==nil then return insf end if g==nil then return insf end
if gc then return g:IsExists(Auxiliary.FConditionFilter21,1,nil,code1,code2) end if gc then
if gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then
return g:IsExists(Auxiliary.FConditionFilter21,1,gc,code1,code2)
elseif gc:IsCode(code1) then
return g:IsExists(Card.IsCode,1,gc,code2)
elseif gc:IsCode(code2) then
return g:IsExists(Card.IsCode,1,gc,code1)
else
return false
end
end
local b1=0 local b2=0 local bs=0 local b1=0 local b2=0 local bs=0
local f1=false local f2=false local fs=false local f1=false local f2=false local fs=false
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -310,8 +320,15 @@ end ...@@ -310,8 +320,15 @@ end
function Auxiliary.FOperationCode2(code1,code2,sub,insf) function Auxiliary.FOperationCode2(code1,code2,sub,insf)
return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf) return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
if gc then if gc then
local g1=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=eg:FilterSelect(tp,Auxiliary.FConditionFilter21,1,1,nil,code1,code2) if gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then
g1=eg:FilterSelect(tp,Auxiliary.FConditionFilter21,1,1,gc,code1,code2)
elseif gc:IsCode(code1) then
g1=eg:FilterSelect(tp,Card.IsCode,1,1,gc,code2)
else
g1=eg:FilterSelect(tp,Card.IsCode,1,1,gc,code1)
end
Duel.SetFusionMaterial(g1) Duel.SetFusionMaterial(g1)
return return
end end
...@@ -366,7 +383,16 @@ function Auxiliary.FConditionCode3(code1,code2,code3,sub,insf) ...@@ -366,7 +383,16 @@ function Auxiliary.FConditionCode3(code1,code2,code3,sub,insf)
end end
tc=g:GetNext() tc=g:GetNext()
end end
return b1+b2+b3>1 if gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then
return b1+b2+b3>1
else
local code=gc:GetCode()
if code==code1 then b1=1
elseif code==code2 then b2=1
elseif code==code3 then b3=1
end
return b1+b2+b3>2
end
end end
local b1=0 local b2=0 local b3=0 local bs=0 local b1=0 local b2=0 local b3=0 local bs=0
local f1=false local f2=false local f3=false local fs=false local f1=false local f2=false local f3=false local fs=false
...@@ -394,7 +420,10 @@ end ...@@ -394,7 +420,10 @@ end
function Auxiliary.FOperationCode3(code1,code2,code3,sub,insf) function Auxiliary.FOperationCode3(code1,code2,code3,sub,insf)
return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf) return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
if gc then if gc then
local sg=eg:Filter(Auxiliary.FConditionFilter31,nil,code1,code2,code3) local sg=eg:Filter(Auxiliary.FConditionFilter31,gc,code1,code2,code3)
if not gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then
sg:Remove(Card.IsCode,nil,gc:GetCode())
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=sg:Select(tp,1,1,nil) local g1=sg:Select(tp,1,1,nil)
sg:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) sg:Remove(Card.IsCode,nil,g1:GetFirst():GetCode())
...@@ -462,7 +491,17 @@ function Auxiliary.FConditionCode4(code1,code2,code3,code4,sub,insf) ...@@ -462,7 +491,17 @@ function Auxiliary.FConditionCode4(code1,code2,code3,code4,sub,insf)
end end
tc=g:GetNext() tc=g:GetNext()
end end
return b1+b2+b3+b4>2 if gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then
return b1+b2+b3+b4>2
else
local code=gc:GetCode()
if code==code1 then b1=1
elseif code==code2 then b2=1
elseif code==code3 then b3=1
elseif code==code4 then b4=1
end
return b1+b2+b3+b4>3
end
end end
local b1=0 local b2=0 local b3=0 local b4=0 local bs=0 local b1=0 local b2=0 local b3=0 local b4=0 local bs=0
local f1=false local f2=false local f3=false local f4=false local fs=false local f1=false local f2=false local f3=false local f4=false local fs=false
...@@ -492,7 +531,10 @@ end ...@@ -492,7 +531,10 @@ end
function Auxiliary.FOperationCode4(code1,code2,code3,code4,sub,insf) function Auxiliary.FOperationCode4(code1,code2,code3,code4,sub,insf)
return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf) return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
if gc then if gc then
local sg=eg:Filter(Auxiliary.FConditionFilter41,nil,code1,code2,code3,code4) local sg=eg:Filter(Auxiliary.FConditionFilter41,gc,code1,code2,code3,code4)
if not gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then
sg:Remove(Card.IsCode,nil,gc:GetCode())
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=sg:Select(tp,1,1,nil) local g1=sg:Select(tp,1,1,nil)
sg:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) sg:Remove(Card.IsCode,nil,g1:GetFirst():GetCode())
......
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