Commit 4db918af authored by wind2009's avatar wind2009

Fix 百鬼羅刹大収監

parent ed50c676
Pipeline #28798 passed with stages
in 1 minute and 27 seconds
......@@ -55,7 +55,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
if l==100 then
e:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
end
end
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -54,8 +54,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
Duel.SpecialSummonComplete()
end
function s.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xac) and c:IsType(TYPE_XYZ)
end
function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(aux.AND(Card.IsSetCard,Card.IsFaceup),tp,LOCATION_MZONE,0,nil,0xac)
local mg=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_MZONE,0,nil)
local xg=Group.FromCards()
local cg=Group.FromCards()
for tc in aux.Next(mg) do
......@@ -70,8 +73,18 @@ function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return xg:GetCount()>0 and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) end
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=xg:FilterSelect(tp,aux.TRUE,1,xg:GetCount(),nil)
local at=Duel.SendtoGrave(sg,REASON_COST)
local tg=Group.CreateGroup()
for tc in aux.Next(cg) do
local vg=tc:GetOverlayGroup()
for c in aux.Next(sg) do
if vg:IsContains(c) then
tg:AddCard(tc)
break
end
end
end
local at=Duel.SendtoGrave(sg,REASON_COST)
for tc in aux.Next(tg) do
Duel.RaiseSingleEvent(tc,EVENT_DETACH_MATERIAL,e,0,0,0,0)
end
e:SetLabel(at)
......
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