Commit e8e0e18e authored by TanakaKotoha's avatar TanakaKotoha

Mercury233

parent ce988394
No preview for this file type
......@@ -5,15 +5,15 @@ function c26806060.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--search
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(c26806060.condition)
e2:SetTarget(c26806060.target)
e2:SetOperation(c26806060.operation)
e2:SetCondition(c26806060.thcon)
e2:SetTarget(c26806060.thtg)
e2:SetOperation(c26806060.thop)
c:RegisterEffect(e2)
--change
local e3=Effect.CreateEffect(c)
......@@ -36,14 +36,13 @@ function c26806060.initial_effect(c)
e4:SetOperation(c26806060.spop)
c:RegisterEffect(e4)
end
function c26806060.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetDrawCount(tp)>0
function c26806060.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetDrawCount(tp)>0
end
function c26806060.thfilter(c)
return c:IsAttack(2200) and c:IsDefense(600) and c:IsAbleToHand()
end
function c26806060.target(e,tp,eg,ep,ev,re,r,rp,chk)
function c26806060.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c26806060.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
......@@ -58,9 +57,9 @@ function c26806060.target(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK+LOCATION_GRAVE)
end
function c26806060.operation(e,tp,eg,ep,ev,re,r,rp)
function c26806060.thop(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1
if aux.DrawReplaceCount>aux.DrawReplaceMax or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
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