Skip to content

Commit c97ca56

Browse files
authored
Update "Endless Traps"
Missing OPD flag
1 parent 5d154fe commit c97ca56

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

skill/c300303010.lua

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,34 @@ function s.initial_effect(c)
55
aux.AddSkillProcedure(c,1,false,s.flipcon,s.flipop)
66
end
77
function s.flipcon(e,tp,eg,ep,ev,re,r,rp)
8-
--opd check
9-
if Duel.GetFlagEffect(ep,id)>0 then return end
8+
--OPD check
9+
if Duel.HasFlagEffect(tp,id) then return end
1010
--condition
1111
return aux.CanActivateSkill(tp) and Duel.GetMatchingGroupCount(Card.IsTrap,tp,LOCATION_GRAVE,0,nil)==3
1212
end
1313
function s.flipop(e,tp,eg,ep,ev,re,r,rp)
1414
Duel.Hint(HINT_SKILL_FLIP,tp,id|(1<<32))
1515
Duel.Hint(HINT_CARD,tp,id)
16-
--opd register
16+
--OPD register
17+
Duel.RegisterFlagEffect(tp,id,0,0,0)
18+
--Trap movement
1719
local g=Duel.GetMatchingGroup(Card.IsTrap,tp,LOCATION_GRAVE,0,nil)
1820
local tc1=g:RandomSelect(tp,1):GetFirst()
21+
--Add 1 random Trap from your GY to your hand
1922
if tc1:IsAbleToHand() then
2023
g:RemoveCard(tc1)
2124
Duel.SendtoHand(tc1,tp,REASON_EFFECT)
2225
end
26+
--Shuffle 1 random trap from your GY into your Deck
2327
local tc2=g:RandomSelect(tp,1):GetFirst()
2428
if tc2:IsAbleToDeck() then
2529
g:RemoveCard(tc2)
2630
Duel.SendtoDeck(tc2,tp,SEQ_DECKSHUFFLE,REASON_EFFECT)
2731
end
2832
Duel.BreakEffect()
33+
--Banish 1 random Trap from your GY
2934
if g:GetFirst():IsAbleToRemove() then
3035
Duel.Remove(g:GetFirst(),POS_FACEUP,REASON_EFFECT)
3136
end
3237
end
33-
38+

0 commit comments

Comments
 (0)