Commit b52bf155 authored by Tachibana's avatar Tachibana

ndyd

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