Commit 732d1326 authored by wind2009's avatar wind2009

Fix 夙めてはしろ 二人ではしろ

parent 1fa936a8
Pipeline #32754 passed with stages
in 2 minutes and 13 seconds
...@@ -22,34 +22,27 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,34 +22,27 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST) Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end end
function s.gcheck(g,tp)
local ct=7-g:GetCount()
if ct>0 then
local g=Duel.GetDecktopGroup(1-tp,tc)
if g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)~=tc then
return false
end
end
return true
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetDecktopGroup(1-tp,7) local rg=Duel.GetDecktopGroup(1-tp,7)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil,POS_FACEDOWN) local ct1=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil,1-tp,POS_FACEDOWN,REASON_RULE)
if chk==0 then return g:CheckSubGroup(s.gcheck,1,7,tp) or rg:FilterCount(Card.IsAbleToRemove,nil,POS_FACEDOWN)==7 end local ct2=rg:FilterCount(Card.IsAbleToRemove,nil,1-tp,POS_FACEDOWN,REASON_RULE)==7
if chk==0 then return ct1+ct2>=7 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,7,0,LOCATION_EXTRA+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,7,0,LOCATION_EXTRA+LOCATION_DECK)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp,chk) function s.activate(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetDecktopGroup(1-tp,7) local dg=Duel.GetDecktopGroup(1-tp,7)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil,POS_FACEDOWN) local edg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil,1-tp,POS_FACEDOWN,REASON_RULE)
if not (g:CheckSubGroup(s.gcheck,1,7,tp) or rg:FilterCount(Card.IsAbleToRemove,nil,POS_FACEDOWN)==7) then return end local ct1=dg:FilterCount(Card.IsAbleToRemove,nil,1-tp,POS_FACEDOWN,REASON_RULE)
local ct2=edg:GetCount()
if ct1+ct2<7 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1))
local sg=g:SelectSubGroup(1-tp,s.gcheck,true,1,7,tp) local sg=edg:Select(1-tp,7-ct1,ct2,nil)
local ct=sg:GetCount() local ct=sg:GetCount()
if ct>0 then if ct>0 then
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(sg,POS_FACEDOWN,REASON_RULE,1-tp)
end end
if ct<7 then if ct<7 then
local rsg=Duel.GetDecktopGroup(1-tp,7-ct) local rsg=Duel.GetDecktopGroup(1-tp,7-ct)
Duel.Remove(rsg,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(rsg,POS_FACEDOWN,REASON_RULE,1-tp)
end end
end 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