Commit 73667087 authored by Tianchenglipu's avatar Tianchenglipu

Fix for Xyz Procedure

因为相克之魔术师的存在,使用超量怪兽为素材来超量召唤成为可能。
那么,如果相克之魔术师的效果选择了持有超量素材的超量怪兽,他所拥有的超量素材,在他自身被叠放后,不会被正确地送去墓地。
根据FNo.0的调整,持有超量素材的怪兽,作为超量召唤使用的素材的场合,他的素材全部送墓。
这里也应当作一样的调整。
parent c10c3e84
......@@ -204,10 +204,26 @@ end
function Auxiliary.XyzOperation(f,lv,minc,maxc)
return function(e,tp,eg,ep,ev,re,r,rp,c,og)
if og then
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=Duel.SelectXyzMaterial(tp,c,f,lv,minc,maxc)
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(mg)
Duel.Overlay(c,mg)
end
......@@ -230,6 +246,14 @@ end
function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
return function(e,tp,eg,ep,ev,re,r,rp,c,og)
if og then
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(og)
Duel.Overlay(c,og)
else
......@@ -250,6 +274,14 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
Duel.Overlay(c,mg)
else
local mg=Duel.SelectXyzMaterial(tp,c,f,lv,minc,maxc)
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(mg)
Duel.Overlay(c,mg)
end
......
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