Commit 322e7d3b authored by wind2009's avatar wind2009

Fix tte==nil

parent 16e72509
...@@ -138,18 +138,24 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) ...@@ -138,18 +138,24 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
if et==0 or 2-et==ext then if et==0 or 2-et==ext then
for ttc in aux.Next(og) do for ttc in aux.Next(og) do
local tte=ttc:IsHasEffect(81096431,tp) local tte=ttc:IsHasEffect(81096431,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end
else else
local st=2-et local st=2-et
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(81096431,3)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(81096431,3))
local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp) local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp)
for ttc in aux.Next(reg) do for ttc in aux.Next(reg) do
local tte=ttc:IsHasEffect(81096431,tp) local tte=ttc:IsHasEffect(81096431,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end end
end end
end
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local tc=og:GetFirst() local tc=og:GetFirst()
while tc do while tc do
...@@ -169,18 +175,24 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) ...@@ -169,18 +175,24 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
if et==0 or 2-et==ext then if et==0 or 2-et==ext then
for ttc in aux.Next(exg) do for ttc in aux.Next(exg) do
local tte=ttc:IsHasEffect(81096431,tp) local tte=ttc:IsHasEffect(81096431,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end
else else
local st=2-et local st=2-et
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(81096431,3)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(81096431,3))
local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp) local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp)
for ttc in aux.Next(reg) do for ttc in aux.Next(reg) do
local tte=ttc:IsHasEffect(81096431,tp) local tte=ttc:IsHasEffect(81096431,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end end
end end
end
if e:GetLabel()==1 then if e:GetLabel()==1 then
local mg2=mg:GetFirst():GetOverlayGroup() local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then if mg2:GetCount()~=0 then
...@@ -216,18 +228,24 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) ...@@ -216,18 +228,24 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
if et==0 or 2-et==ext then if et==0 or 2-et==ext then
for ttc in aux.Next(exg) do for ttc in aux.Next(exg) do
local tte=ttc:IsHasEffect(81096431,tp) local tte=ttc:IsHasEffect(81096431,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end
else else
local st=2-et local st=2-et
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(81096431,3)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(81096431,3))
local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp) local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp)
for ttc in aux.Next(reg) do for ttc in aux.Next(reg) do
local tte=ttc:IsHasEffect(81096431,tp) local tte=ttc:IsHasEffect(81096431,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end end
end end
end
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local tc=og:GetFirst() local tc=og:GetFirst()
while tc do while tc do
...@@ -247,7 +265,10 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) ...@@ -247,7 +265,10 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
if (et==0 or 2-et==ext) and exg then if (et==0 or 2-et==ext) and exg then
for ttc in aux.Next(exg) do for ttc in aux.Next(exg) do
local tte=ttc:IsHasEffect(81096431,tp) local tte=ttc:IsHasEffect(81096431,tp)
if tte then tte:UseCountLimit(tp) end if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp)
end
end end
else else
local st=2-et local st=2-et
...@@ -255,10 +276,13 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) ...@@ -255,10 +276,13 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp) local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp)
for ttc in aux.Next(reg) do for ttc in aux.Next(reg) do
local tte=ttc:IsHasEffect(81096431,tp) local tte=ttc:IsHasEffect(81096431,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end end
end end
end
if e:GetLabel()==1 then if e:GetLabel()==1 then
local mg2=mg:GetFirst():GetOverlayGroup() local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then if mg2:GetCount()~=0 then
......
...@@ -98,18 +98,24 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,18 +98,24 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
if et==0 or 2-et==ext then if et==0 or 2-et==ext then
for ttc in aux.Next(exg) do for ttc in aux.Next(exg) do
local tte=ttc:IsHasEffect(id,tp) local tte=ttc:IsHasEffect(id,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end
else else
local st=2-et local st=2-et
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp) local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp)
for ttc in aux.Next(reg) do for ttc in aux.Next(reg) do
local tte=ttc:IsHasEffect(id,tp) local tte=ttc:IsHasEffect(id,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end end
end end
end
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local tc=og:GetFirst() local tc=og:GetFirst()
while tc do while tc do
...@@ -129,18 +135,24 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) ...@@ -129,18 +135,24 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
if et==0 or 2-et==ext then if et==0 or 2-et==ext then
for ttc in aux.Next(exg) do for ttc in aux.Next(exg) do
local tte=ttc:IsHasEffect(id,tp) local tte=ttc:IsHasEffect(id,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end
else else
local st=2-et local st=2-et
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp) local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp)
for ttc in aux.Next(reg) do for ttc in aux.Next(reg) do
local tte=ttc:IsHasEffect(id,tp) local tte=ttc:IsHasEffect(id,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end end
end end
end
if e:GetLabel()==1 then if e:GetLabel()==1 then
local mg2=mg:GetFirst():GetOverlayGroup() local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then if mg2:GetCount()~=0 then
...@@ -176,18 +188,24 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) ...@@ -176,18 +188,24 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
if et==0 or 2-et==ext then if et==0 or 2-et==ext then
for ttc in aux.Next(exg) do for ttc in aux.Next(exg) do
local tte=ttc:IsHasEffect(id,tp) local tte=ttc:IsHasEffect(id,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end
else else
local st=2-et local st=2-et
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp) local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp)
for ttc in aux.Next(reg) do for ttc in aux.Next(reg) do
local tte=ttc:IsHasEffect(id,tp) local tte=ttc:IsHasEffect(id,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end end
end end
end
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local tc=og:GetFirst() local tc=og:GetFirst()
while tc do while tc do
...@@ -207,18 +225,24 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) ...@@ -207,18 +225,24 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
if et==0 or 2-et==ext then if et==0 or 2-et==ext then
for ttc in aux.Next(exg) do for ttc in aux.Next(exg) do
local tte=ttc:IsHasEffect(id,tp) local tte=ttc:IsHasEffect(id,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end
else else
local st=2-et local st=2-et
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp) local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp)
for ttc in aux.Next(reg) do for ttc in aux.Next(reg) do
local tte=ttc:IsHasEffect(id,tp) local tte=ttc:IsHasEffect(id,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp) tte:UseCountLimit(tp)
end end
end end
end end
end
if e:GetLabel()==1 then if e:GetLabel()==1 then
local mg2=mg:GetFirst():GetOverlayGroup() local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then if mg2:GetCount()~=0 then
......
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