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