Skip to content

Commit 3ae4b4e

Browse files
authored
"Odd-Eyes Rebellion Dragon (Anime)" fix
Should destroy the cards in your Pendulum Zones even if it's moved by the time the effect resolves.
1 parent 57e6002 commit 3ae4b4e

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

unofficial/c511001791.lua

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
local s,id=GetID()
44
function s.initial_effect(c)
55
c:EnableReviveLimit()
6+
Pendulum.AddProcedure(c,false)
67
--Xyz Summon procedure: 2 Level 7 Dragon monsters
78
Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),7,2)
8-
--Pendulum procedure
9-
Pendulum.AddProcedure(c,false)
109
--Place 1 Pendulum monster from your Deck in your other Pendulum Zone
1110
local e1=Effect.CreateEffect(c)
1211
e1:SetDescription(aux.Stringid(id,0))
@@ -50,7 +49,6 @@ function s.initial_effect(c)
5049
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
5150
e5:SetProperty(EFFECT_FLAG_DELAY)
5251
e5:SetCode(EVENT_LEAVE_FIELD)
53-
e5:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end)
5452
e5:SetTarget(s.pentg)
5553
e5:SetOperation(s.penop)
5654
c:RegisterEffect(e5)
@@ -140,13 +138,12 @@ end
140138
function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
141139
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
142140
if chk==0 then return #g>0 end
143-
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
141+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0)
144142
end
145143
function s.penop(e,tp,eg,ep,ev,re,r,rp)
146144
local c=e:GetHandler()
147-
if not c:IsRelateToEffect(e) then return end
148145
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
149-
if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.CheckPendulumZones(tp) then
146+
if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then
150147
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
151148
end
152149
end

0 commit comments

Comments
 (0)