Commit f343ba41 authored by GuGu's avatar GuGu

Update c10289.lua 1效果重写

parent 837e22ff
Pipeline #26728 passed with stage
in 7 seconds
......@@ -10,13 +10,13 @@ function c10289.initial_effect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCode(EVENT_CUSTOM+10289)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,10289)
e2:SetCondition(c10289.con2)
e2:SetTarget(c10289.tg2)
e2:SetOperation(c10289.op2)
c:RegisterEffect(e2)
aux.RegisterMergedDelayedEvent(c,10289,EVENT_TO_GRAVE)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
......@@ -41,18 +41,15 @@ function c10289.initial_effect(c)
end
--
function c10289.cfilter2(c,tp)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c:IsControler(tp)
end
function c10289.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10289.cfilter2,1,nil,tp)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c:IsControler(tp) and c:IsSetCard(0x1014)
and Duel.IsExistingMatchingCard(c10289.tfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
--
function c10289.tfilter2(c,code)
return c:IsAbleToHand() and c:IsCode(code)
end
function c10289.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:GetCount()==1 and eg:IsExists(c10289.cfilter2,1,nil,tp) and Duel.IsExistingMatchingCard(c10289.tfilter2,tp,LOCATION_DECK,0,1,nil,eg:GetFirst():GetCode()) end
Duel.SetTargetCard(eg:GetFirst())
if chk==0 then return eg:IsExists(c10289.cfilter2,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
--
......@@ -61,8 +58,12 @@ function c10289.ofilter2(c,code)
end
function c10289.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local code=tc:GetCode()
local tc=eg:Filter(c10289.cfilter2,nil)
if not tc then return end
if tc:GetCount()>1 then
tc=eg:FilterSelect(tp,c10289.cfilter2,1,1,nil)
end
local code=tc:GetFirst():GetCode()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c10289.ofilter2,tp,LOCATION_DECK,0,1,1,nil,code)
if sg:GetCount()<1 then return 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