Commit 96f1e410 authored by VanillaSalt's avatar VanillaSalt

fix

parent 1c0a25d9
......@@ -46,6 +46,7 @@ function c14001430.activate(e,tp,eg,ep,ev,re,r,rp)
end
function c14001430.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:GetDestination()==LOCATION_DECK and c:IsType(TYPE_MONSTER)
and c:IsAbleToHand()
end
function c14001430.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and re and re:IsActiveType(TYPE_MONSTER)
......@@ -57,11 +58,40 @@ function c14001430.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
g=g:Select(tp,1,ct,nil)
end
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TO_DECK_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(LOCATION_HAND)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(14001430,RESET_EVENT+0x1de0000+RESET_PHASE+PHASE_END,0,1)
tc=g:GetNext()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1)
e1:SetCondition(c14001430.thcon)
e1:SetOperation(c14001430.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
return true
else return false end
end
function c14001430.repval(e,c)
return c14001430.repfilter(c,e:GetHandlerPlayer())
return false
end
function c14001430.thfilter(c)
return c:GetFlagEffect(14001430)~=0
end
function c14001430.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c14001430.thfilter,1,nil)
end
function c14001430.thop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c14001430.thfilter,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
......@@ -598,7 +598,7 @@ function Auxiliary.FConditionCodeFun(code,f,cc,sub,insf)
return function(e,g,gc,chkf)
if g==nil then return insf end
if gc then
if gc:IsCode(code) or (sub and gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) and g:IsExists(f,cc,gc) then
if (gc:IsCode(code) or (sub and gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE))) and g:IsExists(f,cc,gc) then
return true
elseif f(gc) then
local g1=Group.CreateGroup() local g2=Group.CreateGroup()
......@@ -633,7 +633,7 @@ end
function Auxiliary.FOperationCodeFun(code,f,cc,sub,insf)
return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
if gc then
if gc:IsCode(code) or (sub and gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) and eg:IsExists(f,cc,gc) then
if (gc:IsCode(code) or (sub and gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE))) and eg:IsExists(f,cc,gc) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=eg:FilterSelect(tp,f,cc,cc,gc)
Duel.SetFusionMaterial(g1)
......
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