Commit b52bf155 authored by Tachibana's avatar Tachibana

ndyd

parent c30c024c
Pipeline #5086 passed with stages
in 21 minutes and 41 seconds
......@@ -105,8 +105,8 @@ function kh.filter1(c)
return c:IsFaceup()
end
function kh.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and kh.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(kh.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and kh.filter1(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(kh.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,kh.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
end
......
......@@ -36,7 +36,7 @@ function c19500003.initial_effect(c)
c:RegisterEffect(e4)
end
function c19500003.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3990) and c:IsRace(RACE_MACHINE)
return c:IsFaceup() and c:IsType((TYPE_MONSTER) or (TYPE_XYZ)) and c:IsSetCard(0x3990) and c:IsRace(RACE_MACHINE)
and c:GetCounter(0x1990)>0
end
function c19500003.xyzop(e,tp,chk)
......
......@@ -41,9 +41,8 @@ function c19500004.initial_effect(c)
c19500004[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(c19500004.clear)
ge2:SetCountLimit(1)
Duel.RegisterEffect(ge2,0)
end
end
......@@ -107,7 +106,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(19500004,2)) then
if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(8131171,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g1:Select(tp,1,1,nil)
......
......@@ -25,9 +25,8 @@ function c19500007.initial_effect(c)
c19500007[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(c19500007.clear)
ge2:SetCountLimit(1)
Duel.RegisterEffect(ge2,0)
end
end
......@@ -58,7 +57,7 @@ function c19500007.operation(e,tp,eg,ep,ev,re,r,rp)
local fid=c:GetFieldID()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE_START+PHASE_END)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
......
......@@ -24,15 +24,15 @@ function c19500011.initial_effect(c)
e2:SetTarget(c19500011.thtg)
e2:SetOperation(c19500011.thop)
c:RegisterEffect(e2)
-- if not c19500011.global_check then
-- c19500011.global_check=true
-- local ge1=Effect.CreateEffect(c)
-- ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
-- ge1:SetCode(EVENT_DESTROYED)
-- ge1:SetCondition(c19500011.regcon)
-- ge1:SetOperation(c19500011.regop)
-- Duel.RegisterEffect(ge1,0)
-- end
if not c19500011.global_check then
c19500011.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED)
ge1:SetCondition(c19500011.regcon)
ge1:SetOperation(c19500011.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c19500011.spcfilter(c,tp)
return c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND)
......
......@@ -72,9 +72,13 @@ function c19500028.desop2(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if #g1>0 then
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(16037007,1)) then
Duel.Destroy(g,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g1:Select(tp,1,1,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
......@@ -25,7 +25,7 @@ function c85400100.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_DESTROY)
e3:SetCode(EVENT_DESTROYED)
e3:SetTarget(c85400100.ff)
e3:SetOperation(c85400100.gg)
e3:SetRange(LOCATION_MZONE)
......@@ -80,46 +80,54 @@ function c85400100.zx(e,tp,eg,ep,ev,re,r,rp)
end
end
function c85400100.ff(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tp=c:GetPreviousControler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,85400300,0,0x4011,300,100,1,RACE_ZOMBIE,ATTRIBUTE_DARK) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil)end
and Duel.IsPlayerCanSpecialSummonMonster(tp,85400300,0,0x4011,300,100,1,RACE_ZOMBIE,ATTRIBUTE_DARK) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c85400100.gg(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,85400300,0,0x4011,300,100,1,RACE_ZOMBIE,ATTRIBUTE_DARK) then return end
local token=Duel.CreateToken(tp,85400300)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCategory(CATEGORY_SEARCH)
e1:SetCountLimit(1,85400300)
e1:SetCondition(c85400100.dd)
e1:SetTarget(c85400100.aa)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetTarget(c85400100.po)
e2:SetOperation(c85400100.bb)
token:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetCategory(CATEGORY_RELEASE)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c85400100.ee)
e3:SetTarget(c85400100.fb)
e3:SetOperation(c85400100.bf)
token:RegisterEffect(e3,true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil)
local tg=g:GetFirst()
if tg==nil then return end
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
local c=e:GetHandler()
local tp=c:GetPreviousControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,85400300,0,0x4011,300,100,1,RACE_ZOMBIE,ATTRIBUTE_DARK) then
local token=Duel.CreateToken(tp,85400300)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCategory(CATEGORY_SEARCH)
e1:SetCountLimit(1,85400300)
e1:SetCondition(c85400100.dd)
e1:SetTarget(c85400100.aa)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetTarget(c85400100.po)
e2:SetOperation(c85400100.bb)
token:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetCategory(CATEGORY_RELEASE)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c85400100.ee)
e3:SetTarget(c85400100.fb)
e3:SetOperation(c85400100.bf)
token:RegisterEffect(e3,true)
end
if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil)
local tg=g:GetFirst()
if tg==nil then return end
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
function c85400100.ggggg(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and c:IsCode(85400500)
......
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