Commit 478b8397 authored by Tachibana's avatar Tachibana

ndyd

parent 5293b9a9
Pipeline #5110 passed with stages
in 21 minutes and 2 seconds
......@@ -53,20 +53,28 @@ function c19500004.ctfilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x1990,1)
end
function c19500004.ctop(e,tp,eg,ep,ev,re,r,rp)
if c19500004[0]>2 then return end
local g=Duel.GetMatchingGroup(c19500004.ctfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if #g>0 and c19500004[0]<3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local sg=g:Select(tp,1,1,nil)
sg:GetFirst():AddCounter(0x1990,1)
c19500004[0]=c19500004[0]+1
end
if Duel.GetFlagEffect(tp,19500004)==3 then return end
Duel.Hint(HINT_CARD,0,19500004)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
g:GetFirst():AddCounter(0x1990,1)
Duel.RegisterFlagEffect(tp,19500004,RESET_PHASE+PHASE_END,0,1)
end
--function c19500004.ctop(e,tp,eg,ep,ev,re,r,rp)
-- if c19500004[0]>2 then return end
-- local g=Duel.GetMatchingGroup(c19500004.ctfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
-- if #g>0 and c19500004[0]<3 then
-- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
-- local sg=g:Select(tp,1,1,nil)
-- sg:GetFirst():AddCounter(0x1990,1)
-- c19500004[0]=c19500004[0]+1
-- end
--end
function c19500004.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
e:SetLabelObject(tc)
return tc and tc:IsFaceup() and tc:IsSetCard(0x3991)
return tc and tc:IsFaceup() and tc:IsSetCard(0x3990)
end
function c19500004.desfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3990)
......@@ -106,7 +114,7 @@ function c19500004.thop(e,tp,eg,ep,ev,re,r,rp)
end
Duel.BreakEffect()
local g1=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND,0,nil,0x3990)
if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(8131171,1)) then
if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(19500004,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g1:Select(tp,1,1,nil)
......
......@@ -34,7 +34,7 @@ function c19500007.clear(e,tp,eg,ep,ev,re,r,rp)
c19500007[0]=0
end
function c19500007.filter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3990) and c:IsAbleToRemove() and Duel.GetMZoneCount(tp,c)>0
return c:IsFaceup() and c:IsType((TYPE_MONSTER) or (TYPE_XYZ)) and c:IsSetCard(0x3990) and c:IsAbleToRemove() and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c19500007.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end
function c19500007.spfilter(c,e,tp,code)
......
......@@ -6,6 +6,7 @@ function c19500023.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,19500023)
e1:SetCost(c19500023.spcost)
e1:SetTarget(c19500023.sptg)
e1:SetOperation(c19500023.spop)
......@@ -14,23 +15,10 @@ function c19500023.initial_effect(c)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(19500023,1))
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,19500023+100)
e2:SetTarget(c19500023.sptg2)
e2:SetOperation(c19500023.spop2)
c:RegisterEffect(e2)
if not c19500023.global_check then
c19500023.global_check=true
c19500023[0]=0
c19500023[1]=0
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_END)
ge2:SetOperation(c19500023.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c19500023.clear(e,tp,eg,ep,ev,re,r,rp)
c19500023[0]=0
c19500023[1]=0
end
function c19500023.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -44,12 +32,11 @@ function c19500023.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c19500023.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if chk==0 then return c19500023[0]==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,e:GetHandler())
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(c19500023.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and g:CheckWithSumEqual(Card.GetLevel,2,1,ft) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,e:GetHandler())
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND,0,e:GetHandler(),0x3990)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
c19500023[0]=c19500023[0]+1
end
function c19500023.spcheck(g)
return g:GetSum(Card.GetLevel)==2
......@@ -57,7 +44,7 @@ end
function c19500023.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,1,aux.ExceptThisCard(e))
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND,0,1,1,aux.ExceptThisCard(e),0x3990)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
local tg=Duel.GetMatchingGroup(c19500023.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
......@@ -88,13 +75,12 @@ function c19500023.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=LOCATION_ONFIELD
if c.Mobius==999 then homo=e:GetHandler() end
if ft==0 then loc=LOCATION_MZONE end
if chk==0 then return c19500023[1]==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(nil,tp,loc,0,1,homo)
and Duel.IsExistingMatchingCard(c19500023.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and g:CheckWithSumEqual(Card.GetLevel,2,1,ft) end
local g=Duel.GetMatchingGroup(nil,tp,loc,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
c19500023[1]=c19500023[1]+1
end
function c19500023.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -2,7 +2,7 @@
function c19500034.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c19500034.cost)
......
......@@ -20,8 +20,8 @@ function c19500039.initial_effect(c)
e2:SetOperation(c19500039.scop)
c:RegisterEffect(e2)
if not c19500039.global_check then
c19500039.global_check=true
c19500039[0]=0
c19500039.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ge1:SetCode(EVENT_DESTROYED)
......@@ -29,8 +29,7 @@ function c19500039.initial_effect(c)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_END)
ge2:SetCountLimit(1)
ge2:SetCode(EVENT_TURN_END+PHASE_END)
ge2:SetOperation(c19500039.clear)
Duel.RegisterEffect(ge2,0)
end
......@@ -50,7 +49,7 @@ end
function c19500039.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c19500039[0]>2
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c19500039[0]>6
end
function c19500039.fselect(g)
return g:GetClassCount(Card.GetOriginalCode)==g:GetCount()
......
......@@ -46,9 +46,8 @@ function c19500043.initial_effect(c)
c19500043[0]=0
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_END)
ge2:SetCode(EVENT_TURN_END+PHASE_END)
ge2:SetOperation(c19500043.clear)
ge2:SetCountLimit(1)
Duel.RegisterEffect(ge2,0)
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