Commit def05b76 authored by mercury233's avatar mercury233 Committed by GitHub

workaround for 電脳堺姫-娘々 (#1476)

* workaround for 電脳堺姫-娘々

* other prefer changes (#1477)

* update
Co-authored-by: nanahira's avatarNanahira <78877@qq.com>
parent b2d146f2
--電脳堺姫-娘々 --電脳堺姫-娘々
function c8736823.initial_effect(c) function c8736823.initial_effect(c)
--same effect send this card to grave and spsummon another card check
--not fully implemented
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_TO_GRAVE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetOperation(c8736823.checkop)
c:RegisterEffect(e0)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8736823,0)) e1:SetDescription(aux.Stringid(8736823,0))
...@@ -9,6 +17,7 @@ function c8736823.initial_effect(c) ...@@ -9,6 +17,7 @@ function c8736823.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,8736823) e1:SetCountLimit(1,8736823)
e1:SetLabelObject(e0)
e1:SetCondition(c8736823.spcon) e1:SetCondition(c8736823.spcon)
e1:SetTarget(c8736823.sptg) e1:SetTarget(c8736823.sptg)
e1:SetOperation(c8736823.spop) e1:SetOperation(c8736823.spop)
...@@ -28,11 +37,29 @@ function c8736823.initial_effect(c) ...@@ -28,11 +37,29 @@ function c8736823.initial_effect(c)
e3:SetOperation(c8736823.tdop) e3:SetOperation(c8736823.tdop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c8736823.cfilter(c,tp) function c8736823.checkop(e,tp,eg,ep,ev,re,r,rp)
return c:IsFaceup() and c:IsLevel(3) and c:IsControler(tp) if (r&REASON_EFFECT)>0 then
e:SetLabelObject(re)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(c8736823.resetop)
e1:SetLabelObject(e)
Duel.RegisterEffect(e1,tp)
end
end
function c8736823.resetop(e,tp,eg,ep,ev,re,r,rp)
--this will run after EVENT_SPSUMMON_SUCCESS
e:GetLabelObject():SetLabelObject(nil)
e:Reset()
end
function c8736823.cfilter(c,tp,se)
return c:IsFaceup() and c:IsLevel(3) and c:IsControler(tp) and (se==nil or c:GetReasonEffect()~=se)
end end
function c8736823.spcon(e,tp,eg,ep,ev,re,r,rp) function c8736823.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c8736823.cfilter,1,nil,tp) local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(c8736823.cfilter,1,nil,tp,se)
end end
function c8736823.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c8736823.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) 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