Commit 6ab87a22 authored by wyykak's avatar wyykak

fix

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent 92ed8224
This diff is collapsed.
--七色人形剧·法兰西人形
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
--七色人形剧·法兰西人形
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
......@@ -67,6 +67,6 @@ function c19500039.spcon(e,c)
end
function c19500039.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c19500039.spfilter,tp,LOCATION_GRAVE,0,1,1nil)
local g=Duel.SelectMatchingCard(tp,c19500039.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
--妬✿水桥帕露西
function c86379872.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(0x13)
e1:SetCondition(c86379872.spcon)
e1:SetOperation(c86379872.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379872,0))
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,86379872)
e2:SetCondition(c86379872.shcon)
e2:SetTarget(c86379872.shtg)
e2:SetOperation(c86379872.shop)
c:RegisterEffect(e2)
end
--
function c86379872.spfilter(c)
return c:IsSetCard(0x412) and not c:IsCode(86379872)
end
function c86379872.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c86379872.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c86379872.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c86379872.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,nil,REASON_COST)
end
--
function c86379872.shcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and Duel.GetTurnPlayer()~=tp
end
function c86379872.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 and (Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)-Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,0,nil))>0 end
local ct1=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)*2
local ct2=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local ct3=ct2-ct1
if ct3>0 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function c86379872.shfilter(c)
return c:IsSetCard(0x836) and c:IsAbleToHand()
end
function c86379872.shop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct1=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)
local ct2=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local ct3=ct2-ct1
local ct4=ct2-(ct1*2)
if Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 then
local t={86379873,86379874,86379875,86379876}
local mytable={}
local mygroup=Group.CreateGroup()
local allCardGroup=Duel.GetFieldGroup(0,0xff,0xff)
local seedCard=allCardGroup:GetFirst()
local count=1
while count<=4 and seedCard do
local seedCode=seedCard:GetOriginalCode()
if not mytable[seedCode] then
mytable[seedCode]=count
mygroup:AddCard(seedCard)
count=count+1
end
seedCard=allCardGroup:GetNext()
end
local rg=mygroup:RandomSelect(tp,1):GetFirst():GetOriginalCode()
local d=mytable[rg]
local tsz=Duel.CreateToken(tp,t[d])
Duel.MoveToField(tsz,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true)
local fid=e:GetHandler():GetFieldID()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1fe0000+EVENT_PHASE+PHASE_END,2)
e1:SetOperation(c86379872.desop)
e1:SetLabel(0)
tsz:RegisterEffect(e1,true)
if Duel.IsExistingMatchingCard(c86379872.shfilter,tp,LOCATION_DECK,0,1,nil) and ct4>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c86379872.shfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end
function c86379872.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
e:GetHandler():SetTurnCounter(ct+1)
if ct==1 then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
else e:SetLabel(1) end
end
--妬✿水桥帕露西
function c86379872.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(0x13)
e1:SetCondition(c86379872.spcon)
e1:SetOperation(c86379872.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379872,0))
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,86379872)
e2:SetCondition(c86379872.shcon)
e2:SetTarget(c86379872.shtg)
e2:SetOperation(c86379872.shop)
c:RegisterEffect(e2)
end
--
function c86379872.spfilter(c)
return c:IsSetCard(0x412) and not c:IsCode(86379872)
end
function c86379872.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c86379872.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c86379872.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c86379872.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,nil,REASON_COST)
end
--
function c86379872.shcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and Duel.GetTurnPlayer()~=tp
end
function c86379872.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 and (Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)-Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,0,nil))>0 end
local ct1=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)*2
local ct2=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local ct3=ct2-ct1
if ct3>0 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function c86379872.shfilter(c)
return c:IsSetCard(0x836) and c:IsAbleToHand()
end
function c86379872.shop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct1=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)
local ct2=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local ct3=ct2-ct1
local ct4=ct2-(ct1*2)
if Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 then
local t={86379873,86379874,86379875,86379876}
local mytable={}
local mygroup=Group.CreateGroup()
local allCardGroup=Duel.GetFieldGroup(0,0xff,0xff)
local seedCard=allCardGroup:GetFirst()
local count=1
while count<=4 and seedCard do
local seedCode=seedCard:GetOriginalCode()
if not mytable[seedCode] then
mytable[seedCode]=count
mygroup:AddCard(seedCard)
count=count+1
end
seedCard=allCardGroup:GetNext()
end
local rg=mygroup:RandomSelect(tp,1):GetFirst():GetOriginalCode()
local d=mytable[rg]
local tsz=Duel.CreateToken(tp,t[d])
Duel.MoveToField(tsz,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true)
local fid=e:GetHandler():GetFieldID()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1fe0000+EVENT_PHASE+PHASE_END,2)
e1:SetOperation(c86379872.desop)
e1:SetLabel(0)
tsz:RegisterEffect(e1,true)
if Duel.IsExistingMatchingCard(c86379872.shfilter,tp,LOCATION_DECK,0,1,nil) and ct4>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c86379872.shfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end
function c86379872.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
e:GetHandler():SetTurnCounter(ct+1)
if ct==1 then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
else e:SetLabel(1) end
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