Commit 9f0a7521 authored by wyykak's avatar wyykak

fix

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent 1cf0c144
Pipeline #13871 passed with stage
in 54 seconds
--七色人形剧·法兰西人形
function c19500019.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c19500019.sptg)
e1:SetOperation(c19500019.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19500019,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetCountLimit(1,19500019)
e2:SetCondition(c19500019.discon)
e2:SetCost(c19500019.discost)
e2:SetTarget(c19500019.distg)
e2:SetOperation(c19500019.disop)
c:RegisterEffect(e2)
end
function c19500019.spfilter(c,e,tp)
return c:IsSetCard(0x186) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c19500019.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,19500019)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c19500019.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.RegisterFlagEffect(tp,19500019,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c19500019.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c19500019.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c19500019.tfilter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0x186,0x3991) and c:IsOnField()
end
function c19500019.discon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainNegatable(ev) then return false end
if re:IsHasCategory(CATEGORY_NEGATE)
and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local ex1,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
local res1=ex1 and tg~=nil and tc+tg:FilterCount(c19500019.tfilter,1,nil,tp)-tg:GetCount()>0
local ex2,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_REMOVE)
local res2=ex2 and tg~=nil and tc+tg:FilterCount(c19500019.tfilter,1,nil,tp)-tg:GetCount()>0
return res1 or res2
end
function c19500019.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() or c.Mobius==999 end
if c.Mobius~=999 then Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) else end
end
function c19500019.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c19500019.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
......@@ -40,7 +40,7 @@ function c86379748.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
local tg=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379748,1)
e1:SetDescription(aux.Stringid(86379748,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
......@@ -56,7 +56,7 @@ function c86379748.activate(e,tp,eg,ep,ev,re,r,rp)
end
tg:KeepAlive()
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379748,0)
e2:SetDescription(aux.Stringid(86379748,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1)
......
......@@ -112,10 +112,12 @@ function c99999006.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
nc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
nc:RegisterEffect(e2)
nc=b2:GetNext()
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