Skip to content

Commit ab4c771

Browse files
committed
fixed Machine Inspector
1 parent 20fe898 commit ab4c771

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

rush/c160016057.lua

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
3232
local sg=Group.CreateGroup()
3333
sg:AddCard(g)
3434
sg:AddCard(g2)
35+
local og=nil
3536
if sg:IsExists(s.filter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
3637
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
3738
local dg=sg:FilterSelect(tp,s.filter,1,2,nil)
@@ -43,22 +44,22 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
4344
end
4445
end
4546
Duel.SendtoGrave(dg,REASON_EFFECT)
46-
local og=Duel.GetOperatedGroup()
47+
og=Duel.GetOperatedGroup()
4748
Duel.BreakEffect()
48-
--Place on bottom of the Deck
49-
local ct1=#g
50-
if ct1>0 then
51-
Duel.MoveToDeckBottom(ct1,tp)
52-
Duel.SortDeckbottom(tp,tp,ct1)
53-
end
54-
local ct2=#g2
55-
if ct2>0 then
56-
Duel.MoveToDeckBottom(ct2,1-tp)
57-
Duel.SortDeckbottom(1-tp,1-tp,ct2)
58-
end
59-
--Draw 1 card
60-
if og:FilterCount(Card.IsTrap,nil)>0 then
61-
Duel.Draw(tp,1,REASON_EFFECT)
62-
end
49+
end
50+
--Place on bottom of the Deck
51+
local ct1=#g
52+
if ct1>0 then
53+
Duel.MoveToDeckBottom(ct1,tp)
54+
Duel.SortDeckbottom(tp,tp,ct1)
55+
end
56+
local ct2=#g2
57+
if ct2>0 then
58+
Duel.MoveToDeckBottom(ct2,1-tp)
59+
Duel.SortDeckbottom(1-tp,1-tp,ct2)
60+
end
61+
--Draw 1 card
62+
if og and og:FilterCount(Card.IsTrap,nil)>0 then
63+
Duel.Draw(tp,1,REASON_EFFECT)
6364
end
6465
end

0 commit comments

Comments
 (0)