Commit b8c98835 authored by sidschingis's avatar sidschingis

fix

fixed interaction with DNA Surgery/ Zombie World
parent 29aafb37
......@@ -25,7 +25,7 @@ function c27770341.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_DISCARD)
e4:SetOperation(c27770341.addcount)
e4:SetOperation(c27770341.addcount1)
Duel.RegisterEffect(e4,0)
end
end
......@@ -37,30 +37,28 @@ function c27770341.addcount(e,tp,eg,ep,ev,re,r,rp)
local c=eg:GetFirst()
while c~=nil do
local p=c:GetControler()
if c:IsRace(RACE_DRAGON) then c27770341[p]=c27770341[p]+1 end
if c:GetPreviousRaceOnField()==RACE_DRAGON then c27770341[p]=c27770341[p]+1 end
c=eg:GetNext()
end
end
function c27770341.addcount1(e,tp,eg,ep,ev,re,r,rp)
local c=eg:GetFirst()
while c~=nil do
local p=c:GetControler()
if c:GetOriginalRace()==RACE_DRAGON then c27770341[p]=c27770341[p]+1 end
c=eg:GetNext()
end
end
function c27770341.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(7)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(0xff)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetTarget(c27770341.drtarget)
e1:SetOperation(c27770341.droperation)
c:RegisterEffect(e1)
end
function c27770341.drtarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(c27770341[tp])
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,c27770341[tp])
Duel.RegisterEffect(e1,tp)
end
function c27770341.droperation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Draw(p,c27770341[tp],REASON_EFFECT)
Duel.Hint(HINT_CARD,0,27770341)
Duel.Draw(tp,c27770341[tp],REASON_EFFECT)
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