Commit d9b3253c authored by wyykak's avatar wyykak

fix 24137

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent 075a0204
......@@ -60,6 +60,7 @@ function c24137.activate(e,tp,eg,ep,ev,re,r,rp)
sg2=Duel.GetMatchingGroup(c24137.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 canDraw = true
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......@@ -68,20 +69,23 @@ function c24137.activate(e,tp,eg,ep,ev,re,r,rp)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
canDraw = canDraw and mat1:GetCount()==mat1:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_FIRE)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
if mat1:GetCount()==mat1:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_FIRE) and tc:IsAttribute(ATTRIBUTE_FIRE) then
if Duel.Draw(tp,3,REASON_EFFECT)>2 then
Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT+REASON_DISCARD)
end
end
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
canDraw = canDraw and mat2:GetCount()==mat2:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_FIRE)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
canDraw = canDraw and tc:IsAttribute(ATTRIBUTE_FIRE)
if canDraw then
if Duel.Draw(tp,3,REASON_EFFECT)>2 then
Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT+REASON_DISCARD)
end
end
end
end
function c24137.thcon(e,tp,eg,ep,ev,re,r,rp)
......
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