Commit 223798d4 authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

fix Gravekeeper's Oracle (#1772)

parent ec37c6e8
...@@ -141,22 +141,28 @@ function c25524823.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -141,22 +141,28 @@ function c25524823.operation(e,tp,eg,ep,ev,re,r,rp)
end end
if bit.band(sel,2)~=0 then if bit.band(sel,2)~=0 then
local g=Duel.GetMatchingGroup(c25524823.filter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c25524823.filter,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT) if g:GetCount()>0 then
Duel.BreakEffect()
Duel.Destroy(g,REASON_EFFECT)
end
end end
if bit.band(sel,4)~=0 then if bit.band(sel,4)~=0 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do if tc then
local e1=Effect.CreateEffect(c) Duel.BreakEffect()
e1:SetType(EFFECT_TYPE_SINGLE) while tc do
e1:SetCode(EFFECT_UPDATE_ATTACK) local e1=Effect.CreateEffect(c)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetValue(-2000) e1:SetCode(EFFECT_UPDATE_ATTACK)
tc:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
local e2=e1:Clone() e1:SetValue(-2000)
e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e1)
tc:RegisterEffect(e2) local e2=e1:Clone()
tc=g:GetNext() e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end end
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment