Commit 7dd8a199 authored by wind2009's avatar wind2009

Fix エターナル·フェイバリット

https://github.com/Fluorohydride/ygopro-pre-script/pull/1258
parent bfead73f
Pipeline #24231 passed with stages
in 38 seconds
--エターナル・フェイバリット
--Script by passingDio0
--Fixed by Lee
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,78371393)
......@@ -56,6 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetLabelObject(tc)
e1:SetCondition(s.sumcon)
e1:SetOperation(s.sumop)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
......@@ -66,19 +68,37 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp)
end
Duel.SpecialSummonComplete()
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
end
end
function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetLabelObject())
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsContains(e:GetLabelObject()) then
e:SetLabel(1)
e:Reset()
else e:SetLabel(0) end
e:SetLabel(1)
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(aux.FALSE)
elseif Duel.GetCurrentChain()==1 then
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(s.resetop)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_BREAK_EFFECT)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
end
function s.resetop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():ResetFlagEffect(id)
e:Reset()
end
function s.cedop(e,tp,eg,ep,ev,re,r,rp)
if Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS) and e:GetLabelObject():GetLabel()==1 then
if Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS) and e:GetLabelObject():GetLabel()==1 and e:GetHandler():GetFlagEffect(id)~=0 then
Duel.SetChainLimitTillChainEnd(aux.FALSE)
end
e:GetHandler():ResetFlagEffect(id)
e:Reset()
end
function s.fufilter(c,e,tp)
......
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