Commit 4fb4f107 authored by salix5's avatar salix5

fix 氷結界の神精霊

parent 1f45d40a
......@@ -26,15 +26,17 @@ function c44877690.retreg(e,tp,eg,ep,ev,re,r,rp)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(c44877690.retcon)
e1:SetTarget(c44877690.rettg)
e1:SetTarget(aux.SpiritReturnTargetForced)
e1:SetOperation(aux.SpiritReturnOperation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetTarget(aux.SpiritReturnTargetOptional)
c:RegisterEffect(e2)
--to hand, target version
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetDescription(1104)
......@@ -42,7 +44,7 @@ function c44877690.retreg(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e3:SetCondition(c44877690.retcon2)
e3:SetTarget(c44877690.rettg2)
......@@ -60,21 +62,15 @@ function c44877690.retcon(e,tp,eg,ep,ev,re,r,rp)
return aux.SpiritReturnConditionOptional(e,tp,eg,ep,ev,re,r,rp)
end
end
function c44877690.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(44877690)==0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(44877690,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c44877690.retcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c44877690.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function c44877690.rettg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end
if chk==0 then return e:GetHandler():GetFlagEffect(44877690)==0 end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
e:GetHandler():RegisterFlagEffect(44877690,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c44877690.retop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
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