Commit 647178c9 authored by salix5's avatar salix5

Merge pull request #344 from nekrozar/patch-2

fix Pseudo Space
parents 0978655a d726df10
...@@ -19,18 +19,19 @@ function c77584012.filter(c) ...@@ -19,18 +19,19 @@ function c77584012.filter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToRemoveAsCost() return c:IsType(TYPE_FIELD) and c:IsAbleToRemoveAsCost()
end end
function c77584012.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c77584012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c77584012.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return e:GetHandler():GetFlagEffect(77584012)==0
and Duel.IsExistingMatchingCard(c77584012.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c77584012.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c77584012.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local code=g:GetFirst():GetOriginalCode() local code=g:GetFirst():GetOriginalCode()
e:SetLabel(code) e:SetLabel(code)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
e:GetHandler():RegisterFlagEffect(77584012,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end end
function c77584012.operation(e,tp,eg,ep,ev,re,r,rp) function c77584012.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local code=e:GetLabel() local code=e:GetLabel()
c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
...@@ -38,4 +39,28 @@ function c77584012.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,4 +39,28 @@ function c77584012.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code) e1:SetValue(code)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local cid=c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(77584012,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_FZONE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetLabel(cid)
e2:SetLabelObject(e2)
e2:SetOperation(c77584012.rstop)
c:RegisterEffect(e2)
end
function c77584012.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
c:ResetEffect(cid,RESET_COPY)
local e2=e:GetLabelObject()
local e1=e2:GetLabelObject()
e1:Reset()
e2:Reset()
Duel.HintSelection(Group.FromCards(c))
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end 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