Commit 0d564fc0 authored by VanillaSalt's avatar VanillaSalt

fix

parent 688aba26
......@@ -81,7 +81,7 @@ function c45803070.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCondition(c45803070.rmcon)
e1:SetOperation(c45803070.rmop)
Duel.RegisterEffect(e1,tp)
tc:CreateEffectRelation(e1)
tc:RegisterFlagEffect(45803070,RESET_EVENT+0x1fe0000,0,1)
end
end
function c45803070.rmcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -89,7 +89,7 @@ function c45803070.rmcon(e,tp,eg,ep,ev,re,r,rp)
end
function c45803070.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:IsRelateToEffect(e) then
if tc:GetFlagEffect(45803070)~=0 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
......@@ -80,13 +80,24 @@ function c56907986.spop2(e,tp,eg,ep,ev,re,r,rp)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetOperation(c56907986.desop)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e3:SetCountLimit(1)
tc:RegisterEffect(e3,true)
e3:SetCondition(c56907986.descon)
e3:SetOperation(c56907986.desop)
e3:SetLabelObject(tc)
Duel.RegisterEffect(e3,tp)
tc:RegisterFlagEffect(56907986,RESET_EVENT+0x1fe0000,0,1)
Duel.SpecialSummonComplete()
end
end
function c56907986.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(56907986)==0 then
e:Reset()
return false
end
return true
end
function c56907986.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
......@@ -28,13 +28,13 @@ function c56981417.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ShuffleHand(tp)
end
function c56981417.filter(c)
return c:IsSetCard(0x106e) and c:GetCode()~=56981417 and c:GetType()==TYPE_SPELL and c:CheckActivateEffect(true,true,false)~=nil
return c:IsSetCard(0x106e) and not c:IsCode(56981417) and c:GetType()==TYPE_SPELL and c:CheckActivateEffect(true,true,false)~=nil
end
function c56981417.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return tg and tg(te,tp,eg,ep,ev,re,r,rp,0,chkc)
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
if chk==0 then return Duel.IsExistingTarget(c56981417.filter,tp,LOCATION_GRAVE,0,1,nil) end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -42,30 +42,25 @@ function c56981417.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c56981417.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local te=g:GetFirst():CheckActivateEffect(true,true,false)
e:SetLabelObject(te)
Duel.ClearTargetCard()
g:GetFirst():CreateEffectRelation(e)
local tg=te:GetTarget()
e:SetCategory(te:GetCategory())
e:SetProperty(te:GetProperty())
if tg then tg(te,tp,eg,ep,ev,re,r,rp,1) end
local cg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=cg:GetFirst()
while tc do
tc:CreateEffectRelation(te)
tc=cg:GetNext()
end
e:SetLabel(te:GetLabel())
e:SetLabelObject(te:GetLabelObject())
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
te:SetLabel(e:GetLabel())
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
end
function c56981417.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te:GetHandler():IsRelateToEffect(e) then
e:SetLabel(te:GetLabel())
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(te,tp,eg,ep,ev,re,r,rp) end
local cg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=cg:GetFirst()
while tc do
tc:ReleaseEffectRelation(te)
tc=cg:GetNext()
end
if op then op(e,tp,eg,ep,ev,re,r,rp) end
te:SetLabel(e:GetLabel())
te:SetLabelObject(e:GetLabelObject())
end
end
......@@ -29,6 +29,7 @@ function c64043465.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,64043465)
e3:SetCondition(c64043465.thcon)
e3:SetCost(c64043465.cost)
e3:SetTarget(c64043465.thtg)
......
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