Skip to content

Commit 4d89439

Browse files
committed
fixed cards that place cards on the opponent's field to the bottom of the Deck
fixed intraction with Maximum Mode mosters
1 parent d07e932 commit 4d89439

File tree

5 files changed

+35
-21
lines changed

5 files changed

+35
-21
lines changed

rush/c160011017.lua

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,28 @@ function s.tdfilter(c)
3434
return c:IsLevelBelow(8) and c:IsFaceup() and c:IsAbleToDeck()
3535
end
3636
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
37-
--requirement
37+
--Requirement
3838
local g=Duel.GetMatchingGroup(s.tdcostfilter,tp,LOCATION_GRAVE,0,nil)
3939
local cg=aux.SelectUnselectGroup(g,e,tp,2,2,s.tdcostrescon,1,tp,HINTMSG_TODECK)
40-
if Duel.SendtoDeck(cg,nil,SEQ_DECKSHUFFLE,REASON_COST)>0 then
41-
--Effect
42-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
43-
local g=Duel.SelectMatchingCard(tp,aux.FilterMaximumSideFunctionEx(s.tdfilter),tp,0,LOCATION_MZONE,1,1,nil)
44-
if #g==0 then return end
45-
g=g:AddMaximumCheck()
46-
Duel.HintSelection(g,true)
47-
if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then
48-
local c=e:GetHandler()
49-
--Cannot attack directly
50-
local e1=Effect.CreateEffect(c)
51-
e1:SetDescription(3207)
52-
e1:SetType(EFFECT_TYPE_SINGLE)
53-
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
54-
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
55-
e1:SetReset(RESETS_STANDARD_PHASE_END)
56-
c:RegisterEffect(e1)
40+
if Duel.SendtoDeck(cg,nil,SEQ_DECKSHUFFLE,REASON_COST)<1 then return end
41+
--Effect
42+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
43+
local g=Duel.SelectMatchingCard(tp,aux.FilterMaximumSideFunctionEx(s.tdfilter),tp,0,LOCATION_MZONE,1,1,nil)
44+
if #g==0 then return end
45+
g=g:AddMaximumCheck()
46+
Duel.HintSelection(g)
47+
if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then
48+
if #g>1 then
49+
Duel.SortDeckbottom(1-tp,1-tp,#g)
5750
end
51+
local c=e:GetHandler()
52+
--Cannot attack directly
53+
local e1=Effect.CreateEffect(c)
54+
e1:SetDescription(3207)
55+
e1:SetType(EFFECT_TYPE_SINGLE)
56+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
57+
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
58+
e1:SetReset(RESETS_STANDARD_PHASE_END)
59+
c:RegisterEffect(e1)
5860
end
5961
end

rush/c160015064.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
4444
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil)
4545
local rqg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetRace),1,tp,HINTMSG_TODECK)
4646
if #rqg==0 then return end
47-
Duel.HintSelection(rqg,true)
47+
Duel.HintSelection(rqg)
4848
if Duel.SendtoDeck(rqg,nil,SEQ_DECKTOP,REASON_COST)==0 then return end
4949
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_DECK)
5050
if #og>0 then Duel.SortDecktop(tp,tp,#og) end
@@ -53,8 +53,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
5353
local dg=Duel.SelectMatchingCard(tp,s.tdfilter,tp,0,LOCATION_MZONE,1,1,nil)
5454
if #dg==0 then return end
5555
dg=dg:AddMaximumCheck()
56-
Duel.HintSelection(dg,true)
56+
Duel.HintSelection(dg)
5757
if Duel.SendtoDeck(dg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)==0 then return end
58+
if #dg>1 then
59+
Duel.SortDeckbottom(1-tp,1-tp,#dg)
60+
end
5861
local stg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_GRAVE,0,nil)
5962
if #stg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
6063
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)

rush/c160210070.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
5252
local dg=Duel.SelectMatchingCard(tp,s.tdfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
5353
if #dg==0 then return end
5454
dg=dg:AddMaximumCheck()
55-
Duel.HintSelection(dg,true)
55+
Duel.HintSelection(dg)
5656
Duel.SendtoDeck(dg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
57+
if #dg>1 then
58+
Duel.SortDeckbottom(1-tp,1-tp,#dg)
59+
end
5760
end

rush/c160211049.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,8 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
3333
Duel.HintSelection(g,true)
3434
g=g:AddMaximumCheck()
3535
Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
36+
if #g>1 then
37+
Duel.SortDeckbottom(1-tp,1-tp,#g)
38+
end
3639
end
3740
end

rush/c160211067.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
4040
Duel.HintSelection(g)
4141
g=g:AddMaximumCheck()
4242
Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
43+
if #g>1 then
44+
Duel.SortDeckbottom(1-tp,1-tp,#g)
45+
end
4346
end
4447
elseif sum==2 or sum==3 or sum==12 then
4548
if Duel.IsExistingMatchingCard(Card.IsCanChangePositionRush,tp,LOCATION_MZONE,0,1,nil) then

0 commit comments

Comments
 (0)