Commit c06f8379 authored by POLYMER's avatar POLYMER

fix

parent 41c53ff7
...@@ -22,7 +22,10 @@ function cm.filter0(c) ...@@ -22,7 +22,10 @@ function cm.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end end
function cm.fcheck(tp,sg,fc) function cm.fcheck(tp,sg,fc)
return sg:GetClassCount(Card.GetCode)<=1 and #sg>1 return sg:GetClassCount(Card.GetCode)<=1
end
function cm.fgcheck(tp,sg,fc)
return #sg>1
end end
function cm.gcheck(sg) function cm.gcheck(sg)
return sg:GetClassCount(Card.GetCode)<=1 return sg:GetClassCount(Card.GetCode)<=1
...@@ -40,6 +43,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,6 +43,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local mg2=g:Filter(cm.filter0,nil) local mg2=g:Filter(cm.filter0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
aux.FCheckAdditional=cm.fcheck aux.FCheckAdditional=cm.fcheck
aux.FGoalCheckAdditional=cm.fgcheck
aux.GCheckAdditional=cm.gcheck aux.GCheckAdditional=cm.gcheck
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil local mg3=nil
...@@ -71,5 +75,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,5 +75,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
aux.FCheckAdditional=nil aux.FCheckAdditional=nil
aux.FGoalCheckAdditional=nil
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
end end
\ No newline at end of file
...@@ -101,7 +101,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -101,7 +101,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetDescription(aux.Stringid(11451731,ct)) e1:SetDescription(aux.Stringid(11451731,ct))
e1:SetLabel(flag) e1:SetLabel(flag)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(0x20000000+11451731) e1:SetCode(EFFECT_FLAG_EFFECT+11451731)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
...@@ -139,7 +139,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -139,7 +139,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
aux.FCheckAdditional=cm.fcheck aux.FGoalCheckAdditional=cm.fcheck
local res=Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,nil,chkf) local res=Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -150,7 +150,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -150,7 +150,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg4,mf,chkf) res=Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg4,mf,chkf)
end end
end end
aux.FCheckAdditional=nil aux.FGoalCheckAdditional=nil
return res return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......
...@@ -246,7 +246,7 @@ function cm.filter1(c,e) ...@@ -246,7 +246,7 @@ function cm.filter1(c,e)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
function cm.filter2(c,e,tp,mg,f,chkf) function cm.filter2(c,e,tp,mg,f,chkf)
if not (c:IsType(TYPE_FUSION) and c:IsHasEffect(m) and c:IsCode(m) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)) then return false end if not (c:IsType(TYPE_FUSION) and c:IsHasEffect(m) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)) then return false end
aux.FCheckAdditional=cm.fcheck aux.FCheckAdditional=cm.fcheck
local res=c:CheckFusionMaterial(mg,nil,chkf) local res=c:CheckFusionMaterial(mg,nil,chkf)
aux.FCheckAdditional=nil aux.FCheckAdditional=nil
...@@ -391,8 +391,10 @@ function cm.costop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -391,8 +391,10 @@ function cm.costop2(e,tp,eg,ep,ev,re,r,rp)
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
aux.FCheckAdditional=cm.fcheck aux.FCheckAdditional=cm.fcheck
aux.FGoalCheckAdditional=cm.fgcheck
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
aux.FCheckAdditional=nil aux.FCheckAdditional=nil
aux.FGoalCheckAdditional=nil
tc:SetMaterial(mat1) tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -86,7 +86,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,7 +86,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.spfilter2,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(cm.spfilter2,nil,e)
local mg2=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_DECK,0,nil) local mg2=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
aux.FCheckAdditional=cm.fcheck1(c:GetFieldID()) aux.FGoalCheckAdditional=cm.fcheck1(c:GetFieldID())
local sg1=Duel.GetMatchingGroup(cm.spfilter3,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(cm.spfilter3,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
...@@ -126,7 +126,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -126,7 +126,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
aux.FCheckAdditional=nil aux.FGoalCheckAdditional=nil
end end
re:SetOperation(op2) re:SetOperation(op2)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -29,7 +29,7 @@ function cm.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +29,7 @@ function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.IsChainNegatable(ev) return ep~=tp and Duel.IsChainNegatable(ev)
end end
function cm.costfilter1(c) function cm.costfilter1(c)
return c:IsPublic() and c:IsAbleToGraveAsCost() return c:IsPublic() and c:IsAbleToGraveAsCost() and c:IsType(TYPE_MONSTER)
end end
function cm.costfilter2(c) function cm.costfilter2(c)
return c:IsSetCard(0x3623) and c:IsAbleToGraveAsCost() return c:IsSetCard(0x3623) and c:IsAbleToGraveAsCost()
......
...@@ -6,6 +6,7 @@ function s.initial_effect(c) ...@@ -6,6 +6,7 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.spcon) e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
......
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