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)
local fid,ct=e:GetLabel()
if Duel.GetTurnCount()<ct then return false end
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()
e:Reset()
return false
......
......@@ -48,52 +48,49 @@ function s.initial_effect(c)
end
if aux.GetValueType(targets)=="Group" then
local sg=targets
local tc=sg:GetFirst()
while tc do
for tc in aux.Next(sg) do
if tc:GetOriginalCode()==id and tc:GetOwner()~=player then
Duel.Hint(HINT_CARD,0,86541496)
Duel.Win(player,0x0)
end
tc=sg:GetNext()
end
end
end
local _SSet=Duel.SSet
function Duel.SSet(player,targets,tplayer,bool)
tplayer=tplayer or player
bool=bool~=false
local count=_SSet(player,targets,tplayer,bool)
if bool and bool==true and aux.GetValueType(targets)=="Card" then
local tc=targets
if tc:GetOriginalCode()==id then
Duel.Hint(HINT_CARD,0,86541496)
Duel.Win(tc:GetOwner(),0x0)
end
end
if bool and bool==true and aux.GetValueType(targets)=="Group" then
local sg=targets
local tc=sg:GetFirst()
while tc do
if tc:GetOriginalCode()==id then
Duel.Hint(HINT_CARD,0,86541496)
Duel.Win(tc:GetOwner(),0x0)
if not tplayer then tplayer=player end
local lost=false
if bool and bool==true then
if aux.GetValueType(targets)=="Card" then
local tc=targets
if tc:GetOriginalCode()==id and tc:GetOwner()==tplayer then
local lost=true
end
elseif aux.GetValueType(targets)=="Group" then
local sg=targets
for tc in aux.Next(sg) do
if tc:GetOriginalCode()==id and tc:GetOwner()==tplayer then
local lost=true
end
end
tc=sg:GetNext()
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
end
local _SortDecktop=Duel.SortDecktop
function Duel.SortDecktop(sort_player,target_player,count)
_SortDecktop(sort_player,target_player,count)
local sg=Duel.GetDecktopGroup(target_player,count)
local tc=sg:GetFirst()
while tc do
for tc in aux.Next(sg) do
if tc:GetOriginalCode()==id and tc:GetOwner()~=sort_player then
Duel.Hint(HINT_CARD,0,86541496)
Duel.Win(sort_player,0x0)
end
tc=sg:GetNext()
end
end
end
......
......@@ -50,7 +50,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c,atk)
--destroy
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
Duel.BreakEffect()
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