Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix--S:Pリトルナイト #2552

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion c29301450.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ end
function s.retfilter(c,fid)
return c:GetFlagEffectLabel(id)==fid
end
function s.retchkfilter(c)
local tp=c:GetPreviousControler()
return Duel.GetMZoneCount(tp,nil,tp,LOCATION_REASON_TOFIELD)>0
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
if not e:GetLabelObject():IsExists(s.retfilter,1,nil,e:GetLabel()) then
e:GetLabelObject():DeleteGroup()
Expand All @@ -119,9 +123,11 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp)
local fid=e:GetLabel()
local g=e:GetLabelObject():Filter(s.retfilter,nil,fid)
if #g<=0 then return end
local g1=g:Filter(s.retchkfilter,nil)
local g2=g-g1
Duel.Hint(HINT_CARD,0,id)
for p in aux.TurnPlayers() do
local tg=g:Filter(Card.IsPreviousControler,nil,p)
local tg=g1:Filter(Card.IsPreviousControler,nil,p)
local ft=Duel.GetLocationCount(p,LOCATION_MZONE)
if #tg>1 and ft==1 then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TOFIELD)
Expand All @@ -133,5 +139,8 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(tc)
end
end
if #g2>0 then
Duel.SendtoGrave(g2,REASON_RETURN+REASON_RULE)
end
e:GetLabelObject():DeleteGroup()
end