Commit 634ff160 authored by POLYMER's avatar POLYMER

fix

parent dc44118a
...@@ -78,7 +78,7 @@ function c28321714.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,7 +78,7 @@ function c28321714.thcon(e,tp,eg,ep,ev,re,r,rp)
local fid,ct=e:GetLabel() local fid,ct=e:GetLabel()
if Duel.GetTurnCount()<ct then return false end if Duel.GetTurnCount()<ct then return false end
local g=e:GetLabelObject() local g=e:GetLabelObject()
if g:IsExists(c28321714.cfilter,1,nil,fid) then if not g:IsExists(c28321714.cfilter,1,nil,fid) then
g:DeleteGroup() g:DeleteGroup()
e:Reset() e:Reset()
return false return false
......
...@@ -48,52 +48,49 @@ function s.initial_effect(c) ...@@ -48,52 +48,49 @@ function s.initial_effect(c)
end end
if aux.GetValueType(targets)=="Group" then if aux.GetValueType(targets)=="Group" then
local sg=targets local sg=targets
local tc=sg:GetFirst() for tc in aux.Next(sg) do
while tc do
if tc:GetOriginalCode()==id and tc:GetOwner()~=player then if tc:GetOriginalCode()==id and tc:GetOwner()~=player then
Duel.Hint(HINT_CARD,0,86541496) Duel.Hint(HINT_CARD,0,86541496)
Duel.Win(player,0x0) Duel.Win(player,0x0)
end end
tc=sg:GetNext()
end end
end end
end end
local _SSet=Duel.SSet local _SSet=Duel.SSet
function Duel.SSet(player,targets,tplayer,bool) function Duel.SSet(player,targets,tplayer,bool)
tplayer=tplayer or player if not tplayer then tplayer=player end
bool=bool~=false local lost=false
local count=_SSet(player,targets,tplayer,bool) if bool and bool==true then
if bool and bool==true and aux.GetValueType(targets)=="Card" then if aux.GetValueType(targets)=="Card" then
local tc=targets local tc=targets
if tc:GetOriginalCode()==id then if tc:GetOriginalCode()==id and tc:GetOwner()==tplayer then
Duel.Hint(HINT_CARD,0,86541496) local lost=true
Duel.Win(tc:GetOwner(),0x0) end
end elseif aux.GetValueType(targets)=="Group" then
end local sg=targets
if bool and bool==true and aux.GetValueType(targets)=="Group" then for tc in aux.Next(sg) do
local sg=targets if tc:GetOriginalCode()==id and tc:GetOwner()==tplayer then
local tc=sg:GetFirst() local lost=true
while tc do end
if tc:GetOriginalCode()==id then
Duel.Hint(HINT_CARD,0,86541496)
Duel.Win(tc:GetOwner(),0x0)
end end
tc=sg:GetNext()
end end
end end
local count=_SSet(player,targets,tplayer,bool)
if lost then
Duel.Hint(HINT_CARD,0,86541496)
Duel.Win(1-tplayer,0x0)
end
return count return count
end end
local _SortDecktop=Duel.SortDecktop local _SortDecktop=Duel.SortDecktop
function Duel.SortDecktop(sort_player,target_player,count) function Duel.SortDecktop(sort_player,target_player,count)
_SortDecktop(sort_player,target_player,count) _SortDecktop(sort_player,target_player,count)
local sg=Duel.GetDecktopGroup(target_player,count) local sg=Duel.GetDecktopGroup(target_player,count)
local tc=sg:GetFirst() for tc in aux.Next(sg) do
while tc do
if tc:GetOriginalCode()==id and tc:GetOwner()~=sort_player then if tc:GetOriginalCode()==id and tc:GetOwner()~=sort_player then
Duel.Hint(HINT_CARD,0,86541496) Duel.Hint(HINT_CARD,0,86541496)
Duel.Win(sort_player,0x0) Duel.Win(sort_player,0x0)
end end
tc=sg:GetNext()
end end
end end
end end
......
...@@ -50,7 +50,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c,atk) ...@@ -50,7 +50,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c,atk)
--destroy --destroy
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if Duel.IsExistingMatchingCard(cm.mpfilter,tp,LOCATION_MZONE,0,1,nil) and sg:GetCount()>0 if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) and sg:GetCount()>=0
and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
......
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