Skip to content

Commit 56d7a36

Browse files
committed
fixed Shadow Flower Stance
1 parent 89e3bd4 commit 56d7a36

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

rush/c160005057.lua

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
-- 花牙踏み
1+
--花牙踏み
22
--Shadow Flower Stance
3-
43
local s,id=GetID()
54
function s.initial_effect(c)
65
--change pos
76
local e1=Effect.CreateEffect(c)
7+
e1:SetDescription(aux.Stringid(id,0))
88
e1:SetType(EFFECT_TYPE_ACTIVATE)
99
e1:SetCategory(CATEGORY_POSITION)
1010
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
@@ -29,20 +29,21 @@ end
2929
function s.tdfilter(c)
3030
return c:IsMonster() and c:IsRace(RACE_PLANT) and c:IsAbleToDeckOrExtraAsCost()
3131
end
32+
function s.posfilter(c)
33+
return c:IsAttackPos() and c:IsCanChangePositionRush()
34+
end
3235
function s.activate(e,tp,eg,ep,ev,re,r,rp)
3336
--Requirement
3437
local td=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,2,2,nil)
3538
Duel.HintSelection(td)
36-
if Duel.SendtoDeck(td,nil,SEQ_DECKBOTTOM,REASON_COST)~0 then
37-
Duel.SortDeckbottom(tp,tp,2)
38-
39-
local g=Duel.GetMatchingGroup(s.posfilter,tp,0,LOCATION_MZONE,nil)
40-
if #g>0 then
41-
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
42-
end
43-
39+
Duel.SendtoDeck(td,nil,SEQ_DECKBOTTOM,REASON_COST)
40+
local g2=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_DECK)
41+
if #g2>1 then
42+
Duel.SortDeckbottom(tp,tp,#g2)
4443
end
45-
end
46-
function s.posfilter(c)
47-
return c:IsAttackPos() and c:IsCanChangePositionRush()
48-
end
44+
--Effect
45+
local g=Duel.GetMatchingGroup(s.posfilter,tp,0,LOCATION_MZONE,nil)
46+
if #g>0 then
47+
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
48+
end
49+
end

0 commit comments

Comments
 (0)