Commit 61cb7c84 authored by Nemo Ma's avatar Nemo Ma

Update 0621

Updated 500+ cards
parent 65237dfd
No preview for this file type
expansions/pics/190001.jpg

67.3 KB | W: | H:

expansions/pics/190001.jpg

62.5 KB | W: | H:

expansions/pics/190001.jpg
expansions/pics/190001.jpg
expansions/pics/190001.jpg
expansions/pics/190001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/190002.jpg

58.2 KB | W: | H:

expansions/pics/190002.jpg

54.9 KB | W: | H:

expansions/pics/190002.jpg
expansions/pics/190002.jpg
expansions/pics/190002.jpg
expansions/pics/190002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/190003.jpg

53.3 KB | W: | H:

expansions/pics/190003.jpg

53.8 KB | W: | H:

expansions/pics/190003.jpg
expansions/pics/190003.jpg
expansions/pics/190003.jpg
expansions/pics/190003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/190004.jpg

53 KB | W: | H:

expansions/pics/190004.jpg

53.4 KB | W: | H:

expansions/pics/190004.jpg
expansions/pics/190004.jpg
expansions/pics/190004.jpg
expansions/pics/190004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/190005.jpg

53.1 KB | W: | H:

expansions/pics/190005.jpg

52.2 KB | W: | H:

expansions/pics/190005.jpg
expansions/pics/190005.jpg
expansions/pics/190005.jpg
expansions/pics/190005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/190006.jpg

51.8 KB | W: | H:

expansions/pics/190006.jpg

51.2 KB | W: | H:

expansions/pics/190006.jpg
expansions/pics/190006.jpg
expansions/pics/190006.jpg
expansions/pics/190006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/190007.jpg

39.4 KB | W: | H:

expansions/pics/190007.jpg

44.6 KB | W: | H:

expansions/pics/190007.jpg
expansions/pics/190007.jpg
expansions/pics/190007.jpg
expansions/pics/190007.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/190008.jpg

59.8 KB | W: | H:

expansions/pics/190008.jpg

56.5 KB | W: | H:

expansions/pics/190008.jpg
expansions/pics/190008.jpg
expansions/pics/190008.jpg
expansions/pics/190008.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/190009.jpg

56.1 KB | W: | H:

expansions/pics/190009.jpg

55.4 KB | W: | H:

expansions/pics/190009.jpg
expansions/pics/190009.jpg
expansions/pics/190009.jpg
expansions/pics/190009.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/190010.jpg

46.4 KB | W: | H:

expansions/pics/190010.jpg

52.1 KB | W: | H:

expansions/pics/190010.jpg
expansions/pics/190010.jpg
expansions/pics/190010.jpg
expansions/pics/190010.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/190011.jpg

45.6 KB | W: | H:

expansions/pics/190011.jpg

48 KB | W: | H:

expansions/pics/190011.jpg
expansions/pics/190011.jpg
expansions/pics/190011.jpg
expansions/pics/190011.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/25000087.jpg

185 KB | W: | H:

expansions/pics/25000087.jpg

50.3 KB | W: | H:

expansions/pics/25000087.jpg
expansions/pics/25000087.jpg
expansions/pics/25000087.jpg
expansions/pics/25000087.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/25000088.jpg

180 KB | W: | H:

expansions/pics/25000088.jpg

41.4 KB | W: | H:

expansions/pics/25000088.jpg
expansions/pics/25000088.jpg
expansions/pics/25000088.jpg
expansions/pics/25000088.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/25000152.jpg

57.9 KB | W: | H:

expansions/pics/25000152.jpg

58 KB | W: | H:

expansions/pics/25000152.jpg
expansions/pics/25000152.jpg
expansions/pics/25000152.jpg
expansions/pics/25000152.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/25000158.jpg

46.8 KB | W: | H:

expansions/pics/25000158.jpg

156 KB | W: | H:

expansions/pics/25000158.jpg
expansions/pics/25000158.jpg
expansions/pics/25000158.jpg
expansions/pics/25000158.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/79029010.jpg

53.9 KB | W: | H:

expansions/pics/79029010.jpg

225 KB | W: | H:

expansions/pics/79029010.jpg
expansions/pics/79029010.jpg
expansions/pics/79029010.jpg
expansions/pics/79029010.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/79029355.jpg

48.7 KB | W: | H:

expansions/pics/79029355.jpg

218 KB | W: | H:

expansions/pics/79029355.jpg
expansions/pics/79029355.jpg
expansions/pics/79029355.jpg
expansions/pics/79029355.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/79029470.jpg

51.5 KB | W: | H:

expansions/pics/79029470.jpg

221 KB | W: | H:

expansions/pics/79029470.jpg
expansions/pics/79029470.jpg
expansions/pics/79029470.jpg
expansions/pics/79029470.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330001.jpg

381 KB | W: | H:

expansions/pics/9330001.jpg

380 KB | W: | H:

expansions/pics/9330001.jpg
expansions/pics/9330001.jpg
expansions/pics/9330001.jpg
expansions/pics/9330001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330002.jpg

343 KB | W: | H:

expansions/pics/9330002.jpg

385 KB | W: | H:

expansions/pics/9330002.jpg
expansions/pics/9330002.jpg
expansions/pics/9330002.jpg
expansions/pics/9330002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330003.jpg

364 KB | W: | H:

expansions/pics/9330003.jpg

366 KB | W: | H:

expansions/pics/9330003.jpg
expansions/pics/9330003.jpg
expansions/pics/9330003.jpg
expansions/pics/9330003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330004.jpg

369 KB | W: | H:

expansions/pics/9330004.jpg

363 KB | W: | H:

expansions/pics/9330004.jpg
expansions/pics/9330004.jpg
expansions/pics/9330004.jpg
expansions/pics/9330004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330005.jpg

363 KB | W: | H:

expansions/pics/9330005.jpg

351 KB | W: | H:

expansions/pics/9330005.jpg
expansions/pics/9330005.jpg
expansions/pics/9330005.jpg
expansions/pics/9330005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330007.jpg

380 KB | W: | H:

expansions/pics/9330007.jpg

372 KB | W: | H:

expansions/pics/9330007.jpg
expansions/pics/9330007.jpg
expansions/pics/9330007.jpg
expansions/pics/9330007.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330008.jpg

384 KB | W: | H:

expansions/pics/9330008.jpg

350 KB | W: | H:

expansions/pics/9330008.jpg
expansions/pics/9330008.jpg
expansions/pics/9330008.jpg
expansions/pics/9330008.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330009.jpg

370 KB | W: | H:

expansions/pics/9330009.jpg

370 KB | W: | H:

expansions/pics/9330009.jpg
expansions/pics/9330009.jpg
expansions/pics/9330009.jpg
expansions/pics/9330009.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330010.jpg

380 KB | W: | H:

expansions/pics/9330010.jpg

382 KB | W: | H:

expansions/pics/9330010.jpg
expansions/pics/9330010.jpg
expansions/pics/9330010.jpg
expansions/pics/9330010.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330011.jpg

371 KB | W: | H:

expansions/pics/9330011.jpg

370 KB | W: | H:

expansions/pics/9330011.jpg
expansions/pics/9330011.jpg
expansions/pics/9330011.jpg
expansions/pics/9330011.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330012.jpg

386 KB | W: | H:

expansions/pics/9330012.jpg

383 KB | W: | H:

expansions/pics/9330012.jpg
expansions/pics/9330012.jpg
expansions/pics/9330012.jpg
expansions/pics/9330012.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330013.jpg

380 KB | W: | H:

expansions/pics/9330013.jpg

378 KB | W: | H:

expansions/pics/9330013.jpg
expansions/pics/9330013.jpg
expansions/pics/9330013.jpg
expansions/pics/9330013.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330014.jpg

364 KB | W: | H:

expansions/pics/9330014.jpg

376 KB | W: | H:

expansions/pics/9330014.jpg
expansions/pics/9330014.jpg
expansions/pics/9330014.jpg
expansions/pics/9330014.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330015.jpg

365 KB | W: | H:

expansions/pics/9330015.jpg

367 KB | W: | H:

expansions/pics/9330015.jpg
expansions/pics/9330015.jpg
expansions/pics/9330015.jpg
expansions/pics/9330015.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330016.jpg

356 KB | W: | H:

expansions/pics/9330016.jpg

356 KB | W: | H:

expansions/pics/9330016.jpg
expansions/pics/9330016.jpg
expansions/pics/9330016.jpg
expansions/pics/9330016.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9330017.jpg

384 KB | W: | H:

expansions/pics/9330017.jpg

383 KB | W: | H:

expansions/pics/9330017.jpg
expansions/pics/9330017.jpg
expansions/pics/9330017.jpg
expansions/pics/9330017.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910001.jpg

51.1 KB | W: | H:

expansions/pics/9910001.jpg

51.2 KB | W: | H:

expansions/pics/9910001.jpg
expansions/pics/9910001.jpg
expansions/pics/9910001.jpg
expansions/pics/9910001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910030.jpg

53.1 KB | W: | H:

expansions/pics/9910030.jpg

53.6 KB | W: | H:

expansions/pics/9910030.jpg
expansions/pics/9910030.jpg
expansions/pics/9910030.jpg
expansions/pics/9910030.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910065.jpg

48.2 KB | W: | H:

expansions/pics/9910065.jpg

49.8 KB | W: | H:

expansions/pics/9910065.jpg
expansions/pics/9910065.jpg
expansions/pics/9910065.jpg
expansions/pics/9910065.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910141.jpg

41.1 KB | W: | H:

expansions/pics/9910141.jpg

48.3 KB | W: | H:

expansions/pics/9910141.jpg
expansions/pics/9910141.jpg
expansions/pics/9910141.jpg
expansions/pics/9910141.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910436.jpg

54.5 KB | W: | H:

expansions/pics/9910436.jpg

47.7 KB | W: | H:

expansions/pics/9910436.jpg
expansions/pics/9910436.jpg
expansions/pics/9910436.jpg
expansions/pics/9910436.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910440.jpg

47.3 KB | W: | H:

expansions/pics/9910440.jpg

47.4 KB | W: | H:

expansions/pics/9910440.jpg
expansions/pics/9910440.jpg
expansions/pics/9910440.jpg
expansions/pics/9910440.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910615.jpg

52.9 KB | W: | H:

expansions/pics/9910615.jpg

53.7 KB | W: | H:

expansions/pics/9910615.jpg
expansions/pics/9910615.jpg
expansions/pics/9910615.jpg
expansions/pics/9910615.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910621.jpg

54.8 KB | W: | H:

expansions/pics/9910621.jpg

54.9 KB | W: | H:

expansions/pics/9910621.jpg
expansions/pics/9910621.jpg
expansions/pics/9910621.jpg
expansions/pics/9910621.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -58,6 +58,7 @@ function c11113127.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,6 +58,7 @@ function c11113127.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local ct=c11113127[tp] local ct=c11113127[tp]
if ct==0 then ct=1 end
if ct<5 then if ct<5 then
local t={} local t={}
for i=1,6-ct do t[i]=i+(ct-1) end for i=1,6-ct do t[i]=i+(ct-1) end
......
...@@ -64,6 +64,7 @@ function c11113131.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,6 +64,7 @@ function c11113131.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local ct=c11113131[tp] local ct=c11113131[tp]
if ct==0 then ct=1 end
if ct<5 then if ct<5 then
local t={} local t={}
for i=1,6-ct do t[i]=i+(ct-1) end for i=1,6-ct do t[i]=i+(ct-1) end
......
--电脑网断了
--21.06.18
local m=11451575
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_LIMIT_ZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
e1:SetValue(cm.zones)
c:RegisterEffect(e1)
--force mzone
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_MUST_USE_MZONE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0xff,0xff)
e2:SetValue(cm.frcval)
c:RegisterEffect(e2)
end
function cm.xylabel(c,tp)
local x=c:GetSequence()
local y=0
if c:GetControler()==tp then
if c:IsLocation(LOCATION_MZONE) and x<=4 then y=1
elseif c:IsLocation(LOCATION_MZONE) and x==5 then x,y=1,2
elseif c:IsLocation(LOCATION_MZONE) and x==6 then x,y=3,2
elseif c:IsLocation(LOCATION_SZONE) and x<=4 then y=0
else x,y=-1,0.5 end
elseif c:GetControler()==1-tp then
if c:IsLocation(LOCATION_MZONE) and x<=4 then x,y=4-x,3
elseif c:IsLocation(LOCATION_MZONE) and x==5 then x,y=3,2
elseif c:IsLocation(LOCATION_MZONE) and x==6 then x,y=1,2
elseif c:IsLocation(LOCATION_SZONE) and x<=4 then x,y=4-x,4
else x,y=5,3.5 end
end
return x,y
end
function cm.gradient(y,x)
if y>0 and x==0 then return 100 end
if y<0 and x==0 then return 110 end
if y>0 and x~=0 then return y/x end
if y<0 and x~=0 then return y/x+10 end
if y==0 and x>0 then return 0 end
if y==0 and x<0 then return 10 end
return 1000
end
function cm.fieldline(x1,y1,x2,y2,tp,...)
for _,k in pairs({...}) do
if cm.gradient(y2-y1,x2-x1)==k then return true end
end
return false
end
function cm.willbelinkdir(c,lc,x0,y0,tp,tgp)
if tp~=tgp then x0,y0=4-x0,4-y0 end
local x,y=cm.xylabel(c,tgp)
local list={11,110,9,10,1000,0,-1,100,1}
for i=0,8 do
if lc:IsLinkMarker(1<<i) and cm.fieldline(x0,y0,x,y,tgp,list[i+1]) then return true end
end
return false
end
function cm.islinkdir(lc,x,y,tp)
if lc:IsControler(1-tp) then x,y=4-x,4-y end
local x0,y0=cm.xylabel(lc,lc:GetControler())
local list={11,110,9,10,1000,0,-1,100,1}
for i=0,8 do
if lc:IsLinkMarker(1<<i) and cm.fieldline(x0,y0,x,y,lc:GetControler(),list[i+1]) then return true end
end
return false
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsAbleToRemove()
end
function cm.zones(e,tp,eg,ep,ev,re,r,rp)
local lg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local zone=0
for x=0,4 do
for lc in aux.Next(lg) do
local x,y=cm.xylabel(lc,tp)
if cm.islinkdir(lc,x,0,tp) then zone=zone|(1<<x) end
end
end
return zone
end
function cm.dfilter(lc,x,tp)
return cm.islinkdir(lc,x,0,tp) and Duel.CheckLocation(tp,LOCATION_SZONE,x)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local lg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then
if c:IsLocation(LOCATION_SZONE) then
local x,y=cm.xylabel(c,tp)
return lg:IsExists(cm.islinkdir,1,nil,x,y,tp)
else
for x=0,4 do
if lg:IsExists(cm.dfilter,1,nil,x,tp) then return true end
end
return false
end
end
local x,y=cm.xylabel(c,tp)
local g=lg:Filter(cm.islinkdir,nil,x,y,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or not c:IsLocation(LOCATION_SZONE) or not c:IsFaceup() then return end
local lg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local x,y=cm.xylabel(c,tp)
local g=lg:Filter(cm.islinkdir,nil,x,y,tp)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)>0 then
local og=Duel.GetOperatedGroup()
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetLabelObject(og)
e1:SetOperation(cm.retop)
c:RegisterEffect(e1,true)
end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetLabelObject()
for tc in aux.Next(tg) do Duel.ReturnToField(tc) end
e:Reset()
end
function cm.frcval(e,c,fp,rp,r)
if not c:IsType(TYPE_LINK) then return 0xff00ff end
local zone=0
for x=0,4 do
if not Duel.IsExistingMatchingCard(cm.willbelinkdir,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c,x,1,fp,fp) then zone=zone|(1<<x) end
if not Duel.IsExistingMatchingCard(cm.willbelinkdir,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c,x,3,fp,1-fp) then zone=zone|(1<<(16+x)) end
end
if not Duel.IsExistingMatchingCard(cm.willbelinkdir,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c,1,2,fp,fp) then zone=zone|0x400020 end
if not Duel.IsExistingMatchingCard(cm.willbelinkdir,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c,3,2,fp,fp) then zone=zone|0x200040 end
return zone
end
\ No newline at end of file
local m=15000059
local cm=_G["c"..m]
cm.name="色带神·犹格索托斯"
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x1f33),1)
c:EnableReviveLimit()
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.srcon)
e1:SetTarget(cm.srtg)
e1:SetOperation(cm.srop)
c:RegisterEffect(e1)
end
function cm.srcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tp=c:GetControler()
if chk==0 then return c:IsDestructable(e) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0)
end
function cm.srop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
if Duel.Destroy(c,REASON_EFFECT)~=0 then
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
if #g>0 and #g==Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,1,nil) then
Duel.BreakEffect()
Debug.Message("Ia,Ia,Y’ghaa,y’gai,gai!")
Debug.Message("由虚构深渊降临之人啊。镇座于梦之长廊彼方穷极之门的神啊。")
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0xf33)
end
function cm.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_HAND
end
\ No newline at end of file
...@@ -73,9 +73,22 @@ function cm.atkfilter(c) ...@@ -73,9 +73,22 @@ function cm.atkfilter(c)
return c:IsFaceup() and c:GetRace()~=0 return c:IsFaceup() and c:GetRace()~=0
end end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
local g=Duel.GetMatchingGroup(cm.atkfilter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,nil)
local att=0
local tc=g:GetFirst()
while tc do
att=bit.bor(att,tc:GetRace())
tc=g:GetNext()
end
local ct=0
while att~=0 do
if bit.band(att,0x1)~=0 then ct=ct+1 end
att=bit.rshift(att,1)
end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,ct*800)
end end
function cm.damop(e,tp,eg,ep,ev,re,r,rp) function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -92,5 +105,5 @@ function cm.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,5 +105,5 @@ function cm.damop(e,tp,eg,ep,ev,re,r,rp)
att=bit.rshift(att,1) att=bit.rshift(att,1)
end end
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Damage(p,ct*200,REASON_EFFECT) Duel.Damage(p,ct*800,REASON_EFFECT)
end end
\ No newline at end of file
local m=15000708
local cm=_G["c"..m]
cm.name="盖理的诗歌"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,15000708+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:GetClassCount(Card.GetRace)>=4
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tp=c:GetControler()
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
if chk==0 then return g:FilterCount(Card.IsAbleToGrave,nil)~=0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.filter2(c,e,tp,mc)
return c:IsSetCard(0x3f38) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
g=g:Filter(Card.IsAbleToGrave,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:Select(tp,1,99,nil)
if tg:GetCount()~=0 and Duel.SendtoGrave(tg,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local ag=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
local tc=ag:GetFirst()
if tc then
if Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECKBOT)
tc:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
end
end
\ No newline at end of file
local m=15000709
local cm=_G["c"..m]
cm.name="盖理的远客·沙利叶&伊诺兹"
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2,cm.lcheck)
--effect gain
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(cm.retcon)
e1:SetCost(cm.retcost)
e1:SetTarget(cm.rettg)
e1:SetOperation(cm.retop)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(cm.efcon)
e2:SetTarget(cm.eftg)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
function cm.lcheck(g)
return g:GetClassCount(Card.GetLinkRace)==g:GetCount() and g:IsExists(Card.IsLinkSetCard,1,nil,0x3f38)
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
if Duel.GetFlagEffect(tp,15000709)~=0 then
for _,i in ipairs{Duel.GetFlagEffectLabel(tp,15000709)} do
if i==c:GetOriginalCodeRule() then return false end
end
end
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
local tc=g:GetFirst()
while tc do
if Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_MZONE,0,1,tc,tc:GetRace()) then return false end
tc=g:GetNext()
end
return true
end
function cm.retcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tp=c:GetControler()
if chk==0 then return true end
Duel.RegisterFlagEffect(tp,15000709,RESET_PHASE+PHASE_END,0,1,c:GetOriginalCodeRule())
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(cm.regop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function cm.swfilter(c)
return c:IsSetCard(0x3f38) and (c:IsAbleToHand() or c:IsAbleToDeck())
end
function cm.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tp=c:GetControler()
if chk==0 then return Duel.IsExistingTarget(cm.swfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.swfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
local ag=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
local ac=ag:GetFirst()
while ac do
if Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_MZONE,0,1,ac,ac:GetRace()) then return end
ac=ag:GetNext()
end
local tc=Duel.GetFirstTarget()
local b1=tc:IsAbleToHand()
local b2=tc:IsAbleToDeck()
if not (b1 or b2) then return end
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,2))
else op=Duel.SelectOption(tp,aux.Stringid(m,3))+1 end
if op==0 then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
local tg=Duel.GetOperatedGroup()
tg=tg:Filter(Card.IsLocation,nil,LOCATION_DECK)
tg=tg:Filter(Card.IsControler,nil,tp)
if tg:GetCount()~=0 then
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.Draw(tp,tg:GetCount(),REASON_EFFECT)
end
end
end
if op==1 then
if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then
local tg=Duel.GetOperatedGroup()
tg=tg:Filter(Card.IsLocation,nil,LOCATION_DECK)
tg=tg:Filter(Card.IsControler,nil,tp)
if tg:GetCount()~=0 then
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.Draw(tp,tg:GetCount(),REASON_EFFECT)
end
end
end
end
function cm.efcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
return c:IsSummonType(SUMMON_TYPE_LINK)
end
function cm.eftg(e,c)
return c:IsSetCard(0x3f38) and c:IsType(TYPE_MONSTER)
end
\ No newline at end of file
...@@ -51,11 +51,9 @@ function cm.initial_effect(c) ...@@ -51,11 +51,9 @@ function cm.initial_effect(c)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--search --search
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_TODECK)
e7:SetType(EFFECT_TYPE_QUICK_O) e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_FREE_CHAIN) e7:SetCode(EVENT_FREE_CHAIN)
e7:SetRange(LOCATION_HAND) e7:SetRange(LOCATION_HAND)
e7:SetCountLimit(1,190001)
e7:SetCost(cm.efcost) e7:SetCost(cm.efcost)
e7:SetTarget(cm.eftg) e7:SetTarget(cm.eftg)
e7:SetOperation(cm.efop) e7:SetOperation(cm.efop)
...@@ -127,8 +125,6 @@ function cm.efop(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -127,8 +125,6 @@ function cm.efop(e,tp,eg,ep,ev,re,r,rp,chk)
e4:SetValue(1) e4:SetValue(1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4,true) tc:RegisterEffect(e4,true)
Duel.BreakEffect()
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end end
end end
function cm.e2filter(e,re) function cm.e2filter(e,re)
......
...@@ -50,7 +50,7 @@ function cm.initial_effect(c) ...@@ -50,7 +50,7 @@ function cm.initial_effect(c)
--lv up --lv up
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,3)) e6:SetDescription(aux.Stringid(m,3))
e6:SetCategory(CATEGORY_TODECK) e6:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e6:SetType(EFFECT_TYPE_IGNITION) e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_HAND) e6:SetRange(LOCATION_HAND)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET) e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
...@@ -63,7 +63,7 @@ function cm.atkval(e,c) ...@@ -63,7 +63,7 @@ function cm.atkval(e,c)
return c:GetLevel()*100 return c:GetLevel()*100
end end
function cm.spfilter(c,lv,e,tp) function cm.spfilter(c,lv,e,tp)
return c:IsSetCard(0xca4) and c:GetLevel()<=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xca5) and c:GetLevel()<=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=e:GetHandler():GetLevel() local lv=e:GetHandler():GetLevel()
...@@ -81,7 +81,7 @@ function cm.sp2cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -81,7 +81,7 @@ function cm.sp2cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function cm.banfilter(c) function cm.banfilter(c)
return c:IsSetCard(0xca4) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xca5) and c:IsAbleToRemoveAsCost()
end end
function cm.sp3cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sp3cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=e:GetHandler():GetLevel() local lv=e:GetHandler():GetLevel()
...@@ -114,30 +114,28 @@ function cm.sp2op(e,tp,eg,ep,ev,re,r,rp) ...@@ -114,30 +114,28 @@ function cm.sp2op(e,tp,eg,ep,ev,re,r,rp)
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end end
function cm.lufilter(c) function cm.thfilter(c,lv)
return c:IsSetCard(0x41) and not c:IsPublic() return c:IsSetCard(0xca5) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:GetLevel()<=lv
end
function cm.lufilter(c,lv)
return c:IsSetCard(0x41) and not c:IsPublic() and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,lv+c:GetLevel())
end end
function cm.lutg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.lutg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x41) if chk==0 then return Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x41)
and not c:IsPublic() and not c:IsPublic()
and Duel.IsExistingMatchingCard(cm.lufilter,tp,LOCATION_HAND,0,1,c) end and Duel.IsExistingMatchingCard(cm.lufilter,tp,LOCATION_HAND,0,1,c,c:GetLevel()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,cm.lufilter,tp,LOCATION_HAND,0,1,1,c) local g=Duel.SelectMatchingCard(tp,cm.lufilter,tp,LOCATION_HAND,0,1,1,c,c:GetLevel())
local tc=g:GetFirst() local tc=g:GetFirst()
g:AddCard(c) g:AddCard(c)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
local lv=c:GetLevel()+tc:GetLevel() local lv=c:GetLevel()+tc:GetLevel()
local num1,num2=math.modf(lv/2)--返回整数和小数部分
if(num2==0)then
lv=lv/2
else
lv=(lv/2)+0.5
end
Duel.SetTargetParam(lv) Duel.SetTargetParam(lv)
local lvg=Duel.SelectTarget(tp,Card.IsSetCard,tp,LOCATION_MZONE,0,1,1,nil,0x41) local lvg=Duel.SelectTarget(tp,Card.IsSetCard,tp,LOCATION_MZONE,0,1,1,nil,0x41)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.luop(e,tp,eg,ep,ev,re,r,rp) function cm.luop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -151,6 +149,11 @@ function cm.luop(e,tp,eg,ep,ev,re,r,rp) ...@@ -151,6 +149,11 @@ function cm.luop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(lv) e1:SetValue(lv)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SendtoDeck(c,nil,2,REASON_EFFECT) if Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,lv) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,lv)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end end
end end
\ No newline at end of file
...@@ -66,7 +66,7 @@ function cm.atkval(e,c) ...@@ -66,7 +66,7 @@ function cm.atkval(e,c)
return c:GetLevel()*100 return c:GetLevel()*100
end end
function cm.spfilter(c,lv,e,tp) function cm.spfilter(c,lv,e,tp)
return c:IsSetCard(0xca4) and c:GetLevel()<=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xca5) and c:GetLevel()<=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=e:GetHandler():GetLevel() local lv=e:GetHandler():GetLevel()
...@@ -84,7 +84,7 @@ function cm.sp2cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -84,7 +84,7 @@ function cm.sp2cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function cm.banfilter(c) function cm.banfilter(c)
return c:IsSetCard(0xca4) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xca5) and c:IsAbleToRemoveAsCost()
end end
function cm.sp3cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sp3cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=e:GetHandler():GetLevel() local lv=e:GetHandler():GetLevel()
...@@ -117,7 +117,7 @@ function cm.sp2op(e,tp,eg,ep,ev,re,r,rp) ...@@ -117,7 +117,7 @@ function cm.sp2op(e,tp,eg,ep,ev,re,r,rp)
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsSetCard(0xca4) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsSetCard(0xca5) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -63,7 +63,7 @@ function cm.atkval(e,c) ...@@ -63,7 +63,7 @@ function cm.atkval(e,c)
return c:GetLevel()*100 return c:GetLevel()*100
end end
function cm.spfilter(c,lv,e,tp) function cm.spfilter(c,lv,e,tp)
return c:IsSetCard(0xca4) and c:GetLevel()<=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xca5) and c:GetLevel()<=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=e:GetHandler():GetLevel() local lv=e:GetHandler():GetLevel()
...@@ -81,7 +81,7 @@ function cm.sp2cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -81,7 +81,7 @@ function cm.sp2cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function cm.banfilter(c) function cm.banfilter(c)
return c:IsSetCard(0xca4) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xca5) and c:IsAbleToRemoveAsCost()
end end
function cm.sp3cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sp3cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=e:GetHandler():GetLevel() local lv=e:GetHandler():GetLevel()
......
...@@ -65,7 +65,7 @@ function cm.atkval(e,c) ...@@ -65,7 +65,7 @@ function cm.atkval(e,c)
return c:GetLevel()*100 return c:GetLevel()*100
end end
function cm.spfilter(c,lv,e,tp) function cm.spfilter(c,lv,e,tp)
return c:IsSetCard(0xca4) and c:GetLevel()<=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xca5) and c:GetLevel()<=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=e:GetHandler():GetLevel() local lv=e:GetHandler():GetLevel()
...@@ -83,7 +83,7 @@ function cm.sp2cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -83,7 +83,7 @@ function cm.sp2cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function cm.banfilter(c) function cm.banfilter(c)
return c:IsSetCard(0xca4) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xca5) and c:IsAbleToRemoveAsCost()
end end
function cm.sp3cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sp3cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=e:GetHandler():GetLevel() local lv=e:GetHandler():GetLevel()
...@@ -116,17 +116,17 @@ function cm.sp2op(e,tp,eg,ep,ev,re,r,rp) ...@@ -116,17 +116,17 @@ function cm.sp2op(e,tp,eg,ep,ev,re,r,rp)
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end end
function cm.ssfilter(c,tp) function cm.ssfilter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0xca4) and c:IsFaceup() return c:IsControler(tp) and c:IsSetCard(0xca5) and c:IsFaceup()
end end
function cm.llvfilter(c,tp) function cm.llvfilter(c,tp)
return c:IsSetCard(0xca4) and c:IsFaceup() and c:IsLevelAbove(1) return c:IsSetCard(0xca5) and c:IsFaceup() and c:IsLevelAbove(1)
end end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp) function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.ssfilter,1,nil,tp) return eg:IsExists(cm.ssfilter,1,nil,tp)
end end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():IsSetCard(0xca4) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0xca4) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():IsSetCard(0xca5) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0xca5) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp) function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -13,15 +13,16 @@ function cm.initial_effect(c) ...@@ -13,15 +13,16 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0xca4) return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0xca5)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
--atk up --atk up
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(4000) e1:SetValue(4000)
...@@ -37,6 +38,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,6 +38,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(cm.lvcon2)
e3:SetTarget(cm.target) e3:SetTarget(cm.target)
e3:SetOperation(cm.operation) e3:SetOperation(cm.operation)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
...@@ -48,11 +50,15 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,11 +50,15 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetCondition(cm.lvcon3)
e4:SetTarget(cm.destarget) e4:SetTarget(cm.destarget)
e4:SetOperation(cm.desoperation) e4:SetOperation(cm.desoperation)
e4:SetReset(RESET_EVENT+RESETS_STANDARD) e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function cm.lvcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()>=5
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
...@@ -76,6 +82,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,6 +82,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
function cm.lvcon3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()>=12
end
function cm.desfilter(c,tp) function cm.desfilter(c,tp)
return c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>=1 return c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>=1
end end
......
...@@ -65,7 +65,7 @@ function cm.atkval(e,c) ...@@ -65,7 +65,7 @@ function cm.atkval(e,c)
return c:GetLevel()*100 return c:GetLevel()*100
end end
function cm.spfilter(c,lv,e,tp) function cm.spfilter(c,lv,e,tp)
return c:IsSetCard(0xca4) and c:GetLevel()<=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xca5) and c:GetLevel()<=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=e:GetHandler():GetLevel() local lv=e:GetHandler():GetLevel()
...@@ -83,7 +83,7 @@ function cm.sp2cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -83,7 +83,7 @@ function cm.sp2cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function cm.banfilter(c) function cm.banfilter(c)
return c:IsSetCard(0xca4) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xca5) and c:IsAbleToRemoveAsCost()
end end
function cm.sp3cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sp3cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=e:GetHandler():GetLevel() local lv=e:GetHandler():GetLevel()
......
...@@ -50,7 +50,7 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +50,7 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local p1=false local p1=false
local p2=false local p2=false
while tc do while tc do
if ((tc:GetReasonCard() and tc:GetReasonCard():IsSetCard(0xca4) and tc:GetReasonCard():IsType(TYPE_MONSTER)) or (tc:GetReasonEffect() and tc:GetReasonEffect():GetHandler():IsSetCard(0xca4) and tc:GetReasonEffect():GetHandler():IsType(TYPE_MONSTER))) if ((tc:GetReasonCard() and tc:GetReasonCard():IsSetCard(0xca5) and tc:GetReasonCard():IsType(TYPE_MONSTER)) or (tc:GetReasonEffect() and tc:GetReasonEffect():GetHandler():IsSetCard(0xca5) and tc:GetReasonEffect():GetHandler():IsType(TYPE_MONSTER)))
and (tc:IsReason(REASON_BATTLE) or tc:IsReason(REASON_EFFECT)) and (tc:IsReason(REASON_BATTLE) or tc:IsReason(REASON_EFFECT))
and tc:IsType(TYPE_MONSTER) then and tc:IsType(TYPE_MONSTER) then
if tc:GetReasonPlayer()==0 then p1=true else p2=true end if tc:GetReasonPlayer()==0 then p1=true else p2=true end
...@@ -72,7 +72,7 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +72,7 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end end
function cm.rmfilter(c) function cm.rmfilter(c)
return c:IsSetCard(0xca4) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xca5) and c:IsAbleToRemoveAsCost()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
...@@ -24,7 +24,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -24,7 +24,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0xca4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsSetCard(0xca5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -37,10 +37,10 @@ function cm.initial_effect(c) ...@@ -37,10 +37,10 @@ function cm.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function cm.eqlimit(e,c) function cm.eqlimit(e,c)
return c:IsSetCard(0xca4) and c:IsLevelBelow(5) return c:IsSetCard(0xca5) and c:IsLevelBelow(5)
end end
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0xca4) and c:IsLevelBelow(5) return c:IsFaceup() and c:IsSetCard(0xca5) and c:IsLevelBelow(5)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
......
--机车玩家lazerturbo lv0
local m=190012
local cm=_G["c"..m]
cm.name="机车玩家lazerturbo lv0"
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.matfilter,1,1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--LV UP
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(cm.cost1)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
end
function cm.matfilter(c)
return c:IsLinkSetCard(0xca5)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.filter(c,e,tp,zone)
return c:IsSetCard(0xca5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local zone=e:GetHandler():GetLinkedZone(tp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp,zone)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone(tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,zone)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
end
function cm.costfilter1(c)
return c:IsSetCard(0x41) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter1,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,cm.costfilter1,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xca5) and c:IsType(TYPE_MONSTER) and c:GetLevel()>0
end
function cm.tgfilter(c,race)
return c:IsAbleToGrave() and c:GetOriginalRace()==race
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.cfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--模拟玩家snipe lv50
local m=190013
local cm=_G["c"..m]
cm.name="模拟玩家snipe lv50"
function cm.initial_effect(c)
c:SetUniqueOnField(1,1,m)
--discard oppo deck
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0xca5)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--atk up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(4000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1)
e3:SetCondition(cm.lvcon2)
e3:SetCost(cm.descost)
e3:SetTarget(cm.destarget)
e3:SetOperation(cm.desoperation)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
--to grave
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCondition(cm.lvcon3)
e4:SetTarget(cm.tgtg)
e4:SetOperation(cm.tgop)
c:RegisterEffect(e4)
end
function cm.lvcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()>=5
end
function cm.costfilter2(c)
return c:IsSetCard(0x41) and not c:IsPublic()
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.costfilter2,tp,LOCATION_HAND,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter2,tp,LOCATION_HAND,0,1,g:GetCount(),nil)
Duel.ConfirmCards(1-tp,g1)
Duel.ShuffleHand(tp)
e:SetLabel(g1:GetCount())
end
function cm.destarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_ONFIELD)
end
function cm.desoperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ds=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ds,nil)
if tg:GetCount()~=0 then
Duel.Destroy(tg,REASON_EFFECT)
end
end
function cm.lvcon3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()>=12
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--假面骑士 克洛诺斯
local m=190014
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,cm.auxfilter,nil,3,3)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(cm.discost)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
end
function cm.auxfilter(c,xyzc)
return c:IsSetCard(0x7fa)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local tc=g:GetFirst()
local ss=0
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
if tc:IsSetCard(0x7fa) then ss=ss+1 end
tc=g:GetNext()
end
if ss>0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(ss*1000)
c:RegisterEffect(e2)
end
end
--我的等级是!十亿!
local m=190015
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.confilter(c)
return c:IsFaceup() and c:IsSetCard(0x7fa) and c:GetLevel()>0 and c:GetLevel()~=c:GetOriginalLevel()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil) then return end
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.confilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.confilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,cm.confilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
local ss
if tc:GetLevel()>tc:GetOriginalLevel() then
ss=tc:GetLevel()-tc:GetOriginalLevel()
else
ss=tc:GetOriginalLevel()-tc:GetLevel()
end
local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,ss,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:GetLevel()~=tc:GetOriginalLevel() and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) then
local ss
if tc:GetLevel()>tc:GetOriginalLevel() then
ss=tc:GetLevel()-tc:GetOriginalLevel()
else
ss=tc:GetOriginalLevel()-tc:GetLevel()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,ss,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--往复交织而无法离舍的奇迹 --阿克西斯的奇迹
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end local m=25000087
local m,cm=rscf.DefineCard(25000087) local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
local e1=rsef.ACT(c,EVENT_CHAINING,nil,{1,m,1},"td,con","tg",cm.con,nil,rstg.target(cm.tfilter,nil,LOCATION_MZONE),cm.act) --tohand
local e2=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e1:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(cm.actcon) e1:SetCondition(cm.condition)
c:RegisterEffect(e2) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end end
function cm.actcon(e) function cm.filter(c,rlv)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==1 return c:IsFaceup() and c:GetLevel()<rlv
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return rp~=tp and rc:IsLevelAbove(1) local rlv=rc:GetLevel()
return rc:IsType(TYPE_MONSTER) and rlv>0 and Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil,rlv)
end end
function cm.tfilter(c,e,tp,eg,ep,ev,re,r,rp) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local rc=re:GetHandler() local rc=re:GetHandler()
return c:IsLevelAbove(1) and rc:IsLevelAbove(c:GetLevel()) local rlv=rc:GetLevel()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil,rlv) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,rlv)
end end
function cm.act(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=rscf.GetTargetCard() local tc=Duel.GetFirstTarget()
if not tc then return end if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local rc=re:GetHandler() local e1=Effect.CreateEffect(c)
local lv=rc:GetLevel() e1:SetType(EFFECT_TYPE_SINGLE)
local e1=rsef.SV_IMMUNE_EFFECT({c,tc},rsval.imes,nil,rsreset.est_pend) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
local e2=rsef.FV_LIMIT_PLAYER({c,tp},"sp",nil,cm.limittg,{0,1},nil,rsreset.pend) e1:SetRange(LOCATION_MZONE)
e2:SetLabel(lv) e1:SetCode(EFFECT_IMMUNE_EFFECT)
local tg1=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,nil) e1:SetValue(cm.imfilter)
local cg1=Duel.GetMatchingGroup(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,nil) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL) tc:RegisterEffect(e1)
if ft1>0 and #cg1>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then --cannot be target
Duel.BreakEffect() local e4=Effect.CreateEffect(c)
local ct,og=rsgf.SelectToDeck(tg1,tp,aux.TRUE,1,math.min(ft1,#cg1),nil) e4:SetType(EFFECT_TYPE_SINGLE)
if ct<=0 then return end e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
rshint.Select(tp,"ctrl") e4:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
local cg2=cg1:Select(tp,ct,ct,nil) e4:SetRange(LOCATION_MZONE)
Duel.HintSelection(cg2) e4:SetValue(aux.imval1)
Duel.GetControl(cg2,tp,PHASE_END,1) e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(0,1)
e2:SetLabel(tc:GetLevel())
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTarget(cm.val)
Duel.RegisterEffect(e2,tp)
end end
end end
function cm.limittg(e,c) function cm.imfilter(e,te)
return c:IsLevelAbove(e:GetLabel()) return te:GetOwner()~=e:GetOwner()
end end
function cm.tdfilter(c) function cm.val(e,c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsLevelAbove(e:GetLabel()+1)
end end
\ No newline at end of file
--雪之圆舞曲 --雪之圆舞曲
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end local m=25000088
local m,cm=rscf.DefineCard(25000088) local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,{m,0},{3,m,1},"td,se,th,dr",nil,nil,nil,cm.tg,cm.act) --Activate
local e2=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e1:SetType(EFFECT_TYPE_ACTIVATE)
c:RegisterEffect(e2) e1:SetCode(EVENT_FREE_CHAIN)
local e3=rsef.FC({c,0},EVENT_CHAIN_SOLVING) e1:SetTarget(cm.tg)
e3:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetOperation(cm.op)
e3:SetOperation(cm.chop) c:RegisterEffect(e1)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetCondition(cm.handcon)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVING)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.chainfilter(re,tp,cid)
return not re:IsActiveType(TYPE_MONSTER)
end
function cm.handcon(e)
return Duel.GetCustomActivityCount(m,1-e:GetHandlerPlayer(),ACTIVITY_CHAIN)~=0
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local dg=Duel.GetDecktopGroup(tp,8) local dg=Duel.GetDecktopGroup(tp,12)
if chk==0 then return e:GetHandler():IsAbleToDeck() and dg:GetCount()==8 and Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return e:GetHandler():IsAbleToDeck() and dg:GetCount()==12 and Duel.IsPlayerCanDraw(tp,3) end
local ect=Duel.GetChainInfo(ev,CHAININFO_CHAIN_COUNT)
if Duel.GetFlagEffect(tp,m)==0 then
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1,ect)
Duel.RegisterFlagEffect(1-tp,m,RESET_CHAIN,0,1,ect)
end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end end
function cm.act(e,tp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=rscf.GetSelf(e) local c=e:GetHandler()
if not c or not aux.TRUE(c:CancelToGrave()) or Duel.SendtoDeck(c,nil,2,REASON_EFFECT)<=0 or not c:IsLocation(LOCATION_DECK) then return end if not c or not aux.TRUE(c:CancelToGrave()) or Duel.SendtoDeck(c,nil,2,REASON_EFFECT)<=0 or not c:IsLocation(LOCATION_DECK) then return end
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
Duel.ConfirmDecktop(tp,8) Duel.ConfirmDecktop(tp,12)
local g=Duel.GetDecktopGroup(tp,8) local g=Duel.GetDecktopGroup(tp,12)
if #g<=0 then return end if #g<=0 then return end
local ct=g:FilterCount(Card.IsCode,nil,m) local ct=g:FilterCount(Card.IsCode,nil,m)
Duel.BreakEffect() Duel.BreakEffect()
if ct==0 then if ct==1 then
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{}) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
elseif ct==1 then local g1=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.Draw(tp,1,REASON_EFFECT) Duel.SendtoHand(g1,nil,REASON_EFFECT)
elseif ct==2 then elseif ct==2 then
local g2=Duel.GetFieldGroup(tp,LOCATION_DECK,0) Duel.Draw(tp,3,REASON_EFFECT)
if #g2>=2 then
local tc1=g2:GetMaxGroup(Card.GetSequence):GetFirst()
local tc2=g2:GetMinGroup(Card.GetSequence):GetFirst()
Duel.SendtoHand(rsgf.Mix2(tc1,tc2),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,rsgf.Mix2(tc1,tc2))
end
elseif ct==3 then elseif ct==3 then
rsop.SelectToHand(tp,Card.IsAbleToHand,tp,LOCATION_DECK,0,1,1,nil,{}) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g3,nil,REASON_EFFECT)
end end
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsAbleToHand() and c:IsCode(m) return c:IsAbleToHand() and c:IsCode(m)
end end
function cm.chop(e,tp,eg,ep,ev,re,r,rp) function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if ev<=1 then return end local lab=Duel.GetFlagEffectLabel(tp,m)
local te=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT) if not lab then return end
if te:GetHandler()==e:GetHandler() then local ect=Duel.GetChainInfo(ev,CHAININFO_CHAIN_COUNT)
rshint.Card(m) if ect>lab then
Duel.ChangeTargetCard(ev,Group.CreateGroup()) local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.rep_op) Duel.ChangeChainOperation(ev,cm.rep_op)
end end
end end
function cm.rep_op(e,tp) function cm.rep_op(e,tp)
Duel.Hint(HINT_CARD,0,m)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
...@@ -4,107 +4,130 @@ cm.name="究极合体怪兽 基伽奇美拉" ...@@ -4,107 +4,130 @@ cm.name="究极合体怪兽 基伽奇美拉"
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,5,false) aux.AddFusionProcFunRep(c,cm.ffilter,5,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_GRAVE,0,cm.sprop(c)) --mat check
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(cm.matcheck)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetDescription(aux.Stringid(m,5))
e2:SetCode(EFFECT_CANNOT_TO_DECK) 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) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCondition(cm.negcon)
e2:SetTargetRange(0,1) e2:SetTarget(cm.negtg)
e2:SetOperation(cm.negop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e_org=Effect.CreateEffect(c) --remove
e_org:SetType(EFFECT_TYPE_FIELD) local e3=Effect.CreateEffect(c)
e_org:SetRange(LOCATION_MZONE) e3:SetDescription(aux.Stringid(m,6))
e_org:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetCategory(CATEGORY_REMOVE)
e_org:SetTargetRange(0,1) e3:SetType(EFFECT_TYPE_QUICK_O)
e_org:SetCondition(cm.con) e3:SetCode(EVENT_FREE_CHAIN)
local e3=e_org:Clone() e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e3:SetCountLimit(1)
e3:SetTarget(cm.risplimit) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetLabel(1) e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
e3:SetLabelObject(e1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e_org:Clone() --client hint
e4:SetCode(EFFECT_DISABLE) local e4=Effect.CreateEffect(c)
e4:SetProperty(nil) e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e4:SetTargetRange(0,LOCATION_MZONE) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetLabel(2) e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(cm.regcon)
e4:SetOperation(cm.regop)
e4:SetLabelObject(e1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=e_org:Clone()
e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e5:SetTarget(cm.sysplimit)
e5:SetLabel(4)
c:RegisterEffect(e5)
local e6=e_org:Clone()
e6:SetCode(EFFECT_CANNOT_ACTIVATE)
e6:SetValue(cm.xyzplimit)
e6:SetLabel(8)
c:RegisterEffect(e6)
local e7=e_org:Clone()
e7:SetCode(EFFECT_SET_ATTACK)
e7:SetProperty(nil)
e7:SetTargetRange(0,LOCATION_MZONE)
e7:SetValue(0)
e7:SetLabel(16)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e8)
local e9=e_org:Clone()
e9:SetCode(63060238)
e9:SetLabel(4)
c:RegisterEffect(e9)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function cm.ffilter(c,fc,sub,mg,sg) function cm.ffilter(c,fc,sub,mg,sg)
return (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode())) and c:IsType(TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) return (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode())) and c:IsType(TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.matcheck(e,c)
local lab=e:GetHandler():GetFlagEffectLabel(m) local g=c:GetMaterial():Filter(Card.IsType,nil,TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
if not lab then return false end local type1=0
return bit.band(lab,e:GetLabel())~=0 local tc=g:GetFirst()
while tc do
type1=bit.bor(type1,tc:GetType())
tc=g:GetNext()
end
e:SetLabel(type1)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local type1=e:GetLabelObject():GetLabel()
local type2=re:GetActiveType()-33
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and Duel.IsChainNegatable(ev)
and bit.band(type1,type2)~=0
end end
function cm.risplimit(e,c) function cm.rmfilter(c,tp,type2)
return c:IsLocation(LOCATION_EXTRA) return c:IsType(type2) and c:IsAbleToRemove(tp,POS_FACEDOWN)
end end
function cm.sysplimit(e,c) function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
return not c:IsLocation(LOCATION_EXTRA) local type2=re:GetActiveType()-33
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,0,LOCATION_MZONE,nil,tp,type2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function cm.xyzplimit(e,te,tp) function cm.negop(e,tp,eg,ep,ev,re,r,rp)
return te:IsActiveType(TYPE_MONSTER) and not te:GetHandler():IsLocation(LOCATION_ONFIELD) local type2=re:GetActiveType()-33
Duel.NegateActivation(ev)
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,0,LOCATION_MZONE,nil,tp,type2)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end end
function cm.sprop(c) function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
return function(g) local type1=e:GetLabelObject():GetLabel()
Duel.Remove(g,POS_FACEUP,REASON_COST) local tct=0
local lab=0 if bit.band(type1,TYPE_RITUAL)~=0 then tct=tct+1 end
local res=RESET_EVENT+0xff0000 if bit.band(type1,TYPE_FUSION)~=0 then tct=tct+1 end
if g:IsExists(Card.IsType,1,nil,TYPE_RITUAL) then if bit.band(type1,TYPE_SYNCHRO)~=0 then tct=tct+1 end
lab=lab+1 if bit.band(type1,TYPE_XYZ)~=0 then tct=tct+1 end
c:RegisterFlagEffect(0,res,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0)) if bit.band(type1,TYPE_LINK)~=0 then tct=tct+1 end
end local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil,tp,POS_FACEDOWN)
if g:IsExists(Card.IsType,1,nil,TYPE_FUSION) then if chk==0 then return tct>0 and g:GetCount()>=tct end
lab=lab+2 Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,tct,0,0)
c:RegisterFlagEffect(0,res,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1)) end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local type1=e:GetLabelObject():GetLabel()
local tct=0
if bit.band(type1,TYPE_RITUAL)~=0 then tct=tct+1 end
if bit.band(type1,TYPE_FUSION)~=0 then tct=tct+1 end
if bit.band(type1,TYPE_SYNCHRO)~=0 then tct=tct+1 end
if bit.band(type1,TYPE_XYZ)~=0 then tct=tct+1 end
if bit.band(type1,TYPE_LINK)~=0 then tct=tct+1 end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil,tp,POS_FACEDOWN)
if tct==0 or g:GetCount()<tct then return end
local sg=g:Select(tp,tct,tct,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_REMOVED)
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-ct*1000)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local type1=e:GetLabelObject():GetLabel()
if bit.band(type1,TYPE_RITUAL)~=0 then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end end
if g:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO) then if bit.band(type1,TYPE_FUSION)~=0 then
lab=lab+4 c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
c:RegisterFlagEffect(0,res,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end end
if g:IsExists(Card.IsType,1,nil,TYPE_XYZ) then if bit.band(type1,TYPE_SYNCHRO)~=0 then
lab=lab+8 c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
c:RegisterFlagEffect(0,res,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end end
if g:IsExists(Card.IsType,1,nil,TYPE_LINK) then if bit.band(type1,TYPE_XYZ)~=0 then
lab=lab+16 c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
c:RegisterFlagEffect(0,res,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,4))
end end
c:RegisterFlagEffect(m,res,0,1,lab) if bit.band(type1,TYPE_LINK)~=0 then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,4))
end end
end end
...@@ -86,12 +86,17 @@ function cm.thop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,12 +86,17 @@ function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.cfilter(c)
return c:IsRace(RACE_WYRM) and c:IsAbleToRemoveAsCost()
end
function cm.check(g,rs) function cm.check(g,rs)
if g:IsExists(Card.IsCode,1,nil,25000157) then return true end if g:IsExists(Card.IsCode,1,nil,25000157) then return true end
return g:GetCount()<=rs local ct=g:FilterCount(Card.IsRace,nil,RACE_WYRM)
return ct>0 and ct<=rs
end end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
local hg=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,c) local hg=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,c)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,c) local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,c)
local hs=hg:GetCount() local hs=hg:GetCount()
...@@ -100,12 +105,12 @@ function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -100,12 +105,12 @@ function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=hg:SelectSubGroup(tp,cm.check,false,1,hs,rs) local g=hg:SelectSubGroup(tp,cm.check,false,1,hs,rs)
local ss=Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY) local ss=Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)
local tg=Duel.GetOperatedGroup() local tg=Duel.GetOperatedGroup()
local ts=tg:FilterCount(Card.IsRace,nil,RACE_WYRM)
tg:KeepAlive() tg:KeepAlive()
if ss~=0 then if ss~=0 then
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
...@@ -115,9 +120,9 @@ function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -115,9 +120,9 @@ function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetOperation(cm.retop) e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
if tg:IsExists(Card.IsCode,1,nil,25000157) then if tg:IsExists(Card.IsCode,1,nil,25000157) then
e:SetLabel(0) e:SetLabel(64)
else else
e:SetLabel(ss) e:SetLabel(ts)
end end
end end
end end
...@@ -125,7 +130,7 @@ function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -125,7 +130,7 @@ function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ss=e:GetLabel() local ss=e:GetLabel()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
if ss==0 then if ss==64 then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,LOCATION_ONFIELD)
else else
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,ss,0,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,ss,0,LOCATION_ONFIELD)
...@@ -135,11 +140,12 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -135,11 +140,12 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local ss=e:GetLabel() local ss=e:GetLabel()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
local gc=g:GetCount() local gc=g:GetCount()
if ss==0 and gc>0 then if ss==64 and gc>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
elseif ss<=gc then elseif ss<=gc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,ss,ss,nil) local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,ss,ss,nil)
Duel.HintSelection(rg)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end end
end end
......
--邪神魔兽 格里姆德
local m=25000159
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(cm.splimit)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(cm.efilter1)
c:RegisterEffect(e2)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_MOVE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.atkcon)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,1)
e4:SetCondition(cm.con4)
e4:SetValue(cm.actlimit)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(cm.tgcon)
e5:SetOperation(cm.tgop)
c:RegisterEffect(e5)
end
function cm.splimit(e,se,sp,st)
return se:GetHandler()==e:GetHandler()
end
function cm.cfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function cm.cfilter2(c)
return c:IsLevelAbove(1) and c:IsAbleToRemove()
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=eg:Filter(cm.cfilter2,nil)
return eg:IsExists(cm.cfilter,1,nil) and tg:CheckWithSumGreater(Card.GetLevel,12)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_PZONE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
local c=e:GetHandler()
local tg=eg:Filter(cm.cfilter2,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local mat=tg:SelectWithSumGreater(tp,Card.GetLevel,12)
Duel.Remove(mat,POS_FACEUP,REASON_EFFECT)
c:SetMaterial(nil)
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
c:CompleteProcedure()
end
function cm.efilter1(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function cm.filter(c,tp)
return not c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetControler()==1-tp
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,tp)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
c:RegisterEffect(e1)
end
function cm.con4(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetAttack()>=10000
end
function cm.actlimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetAttack()>=1000 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsFaceup() or not c:IsRelateToEffect(e) or c:GetAttack()<1000
or c:IsStatus(STATUS_BATTLE_DESTROYED) then
return
end
local atk=c:GetAttack()
local max=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
local t={}
local l=1
while l<=max and l*1000<=atk do
t[l]=l*1000
l=l+1
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local anatk=Duel.AnnounceNumber(tp,table.unpack(t))
local ss=anatk/1000
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-anatk)
c:RegisterEffect(e1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local dg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,ss,ss,nil)
if dg:GetCount()>0 then
Duel.HintSelection(dg)
Duel.SendtoGrave(dg,REASON_EFFECT)
end
end
\ No newline at end of file
...@@ -94,16 +94,22 @@ function cm.sprcon(e,c) ...@@ -94,16 +94,22 @@ function cm.sprcon(e,c)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
mg:Merge(tc:GetOverlayGroup()) mg:Merge(tc:GetOverlayGroup())
tc:GetNext() tc=g:GetNext()
end end
return g:CheckSubGroup(cm.fselect,3,3,tp,c) return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and mg:CheckSubGroup(cm.fselect,3,3,tp,c)
end end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c) function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_MZONE,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_MZONE,LOCATION_MZONE,0,nil)
local mg=Group.CreateGroup()
local tc=g:GetFirst()
while tc do
mg:Merge(tc:GetOverlayGroup())
tc=g:GetNext()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local mg=g:SelectSubGroup(tp,cm.fselect,false,3,3,tp,c) local sg=mg:SelectSubGroup(tp,cm.fselect,false,3,3,tp,c)
c:SetMaterial(mg) c:SetMaterial(sg)
Duel.SendtoGrave(mg,REASON_MATERIAL) Duel.SendtoGrave(sg,REASON_COST+REASON_MATERIAL)
end end
function cm.atop(e,tp,eg,ep,ev,re,r,rp,c) function cm.atop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -15,15 +15,14 @@ function cm.initial_effect(c) ...@@ -15,15 +15,14 @@ function cm.initial_effect(c)
local e12=e1:Clone() local e12=e1:Clone()
e12:SetType(EFFECT_TYPE_QUICK_O) e12:SetType(EFFECT_TYPE_QUICK_O)
e12:SetRange(LOCATION_HAND) e12:SetRange(LOCATION_HAND)
e12:SetCode(EVENT_FREE_CHAIN)
e12:SetLabel(2) e12:SetLabel(2)
e12:SetCost(cm.cost) e12:SetCost(cm.cost)
c:RegisterEffect(e12) c:RegisterEffect(e12)
local e13=e1:Clone() local e13=e1:Clone()
e13:SetType(EFFECT_TYPE_QUICK_O)
e13:SetRange(LOCATION_GRAVE) e13:SetRange(LOCATION_GRAVE)
e13:SetType(EFFECT_TYPE_ACTIVATE+EFFECT_TYPE_QUICK_O)
e13:SetCost(cm.cost)
e13:SetLabel(3) e13:SetLabel(3)
e13:SetCost(cm.cost)
c:RegisterEffect(e13) c:RegisterEffect(e13)
--disable --disable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -33,6 +32,15 @@ function cm.initial_effect(c) ...@@ -33,6 +32,15 @@ function cm.initial_effect(c)
e2:SetTarget(cm.disable) e2:SetTarget(cm.disable)
e2:SetCode(EFFECT_DISABLE) e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--act limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
e3:SetValue(aux.TRUE)
c:RegisterEffect(e3)
--maintain --maintain
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -42,62 +50,63 @@ function cm.initial_effect(c) ...@@ -42,62 +50,63 @@ function cm.initial_effect(c)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetOperation(cm.mtop) e4:SetOperation(cm.mtop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--leave
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_LEAVE_FIELD_P)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetOperation(cm.regop)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetCondition(cm.leacon)
e6:SetOperation(cm.leaop)
e6:SetLabelObject(e5)
c:RegisterEffect(e6)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end if chk==0 then return c:IsLocation(LOCATION_HAND+LOCATION_GRAVE)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
c:CreateEffectRelation(e) c:CreateEffectRelation(e)
end end
function cm.mtop(e,tp,eg,ep,ev,re,r,rp) function cm.mtop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsCanRemoveCounter(tp,0x1442,1,REASON_COST) then if e:GetHandler():IsCanRemoveCounter(tp,0x1442,1,REASON_COST) then
e:GetHandler():RemoveCounter(tp,1,1,REASON_COST) e:GetHandler():RemoveCounter(tp,0x1442,1,REASON_COST)
else else
Duel.Destroy(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
if Duel.GetTurnPlayer()==1-tp then
local disg=Duel.GetMatchingGroup(cm.disfilter,1-tp,LOCATION_HAND,0,c)
local b1=( true )
local b2=( Duel.IsExistingMatchingCard(Card.IsAbleToRemove,1-tp,LOCATION_DECK,0,31,nil,1-tp,POS_FACEDOWN,REASON_COST) )
local b3=( disg:GetClassCount(Card.GetCode)>3 )
local op1=0
if b1 and b2 and b3 then op1=Duel.SelectOption(1-tp,aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,3))
elseif b1 and b2 then op1=Duel.SelectOption(1-tp,aux.Stringid(m,1),aux.Stringid(m,2))
elseif b1 then op1=Duel.SelectOption(1-tp,aux.Stringid(m,1))
elseif b2 then op1=Duel.SelectOption(1-tp,aux.Stringid(m,2))+1
else return end
if op1==0 or op2==0 or op3==0 then cm.selop1(e,1-tp,eg,ep,ev,re,r,rp) end
if op1==1 or op2==1 or op3==1 then cm.selop2(e,1-tp,eg,ep,ev,re,r,rp) end
if op1==2 or op2==2 or op3==2 then cm.selop3(e,1-tp,eg,ep,ev,re,r,rp) end
end
end end
end end
function cm.disable(e,c) function cm.disable(e,c)
return c~=e:GetHandler() and c:IsFaceup() return c~=e:GetHandler() and c:IsFaceup()
end end
function cm.disfilter(c) function cm.disfilter(c)
return c:IsAbleToGrave() return c:IsDiscardable()
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local disg=Duel.GetMatchingGroup(cm.disfilter,tp,LOCATION_HAND,0,c) local disg=Duel.GetMatchingGroup(cm.disfilter,tp,LOCATION_HAND,0,c)
local c=e:GetHandler() local c=e:GetHandler()
local el=e:GetLabel() local el=e:GetLabel()
local b1=( true ) local b1=( true )
local b2=( Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,31,nil,tp,POS_FACEDOWN,REASON_COST) ) local b2=( Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,31,nil,tp,POS_FACEDOWN,REASON_EFFECT) )
local b3=( disg:GetClassCount(Card.GetCode)>3 ) local b3=( disg:GetClassCount(Card.GetCode)>3 )
if chk==0 then if chk==0 then
if el==1 then if el==1 then
return b1 or b2 or b3 return true
elseif el==2 then elseif el==2 then
return ( b1 and b2 ) or ( b2 and b3 ) or ( b1 and b3 ) return b2 or b3
elseif el==3 then elseif el==3 then
return b1 and b2 and b3 return b2 and b3
end end
end end
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp,chk) function cm.activate(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local el=e:GetLabel() local el=e:GetLabel()
local disg=Duel.GetMatchingGroup(cm.disfilter,tp,LOCATION_HAND,0,c) local disg=Duel.GetMatchingGroup(cm.disfilter,tp,LOCATION_HAND,0,c)
local c=e:GetHandler()
local el=e:GetLabel() local el=e:GetLabel()
local b1=( true ) local b1=( true )
local b2=( Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,31,nil,tp,POS_FACEDOWN,REASON_COST) ) local b2=( Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,31,nil,tp,POS_FACEDOWN,REASON_COST) )
...@@ -107,48 +116,69 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -107,48 +116,69 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp,chk)
local op3=-1 local op3=-1
local tt={aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,3)} local tt={aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,3)}
if el==1 then if el==1 then
if b1 and b2 and b3 then op1=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,3)) if b2 and b3 then op1=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,3))
elseif b1 and b2 then op1=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2)) elseif b2 then op1=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
elseif b1 then op1=Duel.SelectOption(tp,aux.Stringid(m,1)) elseif b3 then op1=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,3))*2
elseif b2 then op1=Duel.SelectOption(tp,aux.Stringid(m,2))+1 else op1=0 end
else return end
end end
if el==2 then if el==2 then
if b1 and b2 and b3 then if b2 and b3 then
op1=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,3)) op1=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,3))
table.remove(tt,op1+1) table.remove(tt,op1+1)
op2=Duel.SelectOption(tp,table.unpack(tt)) op2=Duel.SelectOption(tp,table.unpack(tt))
if op1==0 then op2=op1+1 end if op1==0 then op2=op2+1 end
if op1==1 and op2==0 then op2=1 end if op1==1 and op2==1 then op2=2 end
elseif b1 then op1=0 elseif b2 then op1=0 op2=1
if b2 then op2=1 elseif b3 then op1=0 op2=2
elseif b3 then op2=2 else return end
end
elseif b2 and b3 then op1=1 op2=2
end
end end
if el==3 and b1 and b2 and b3 then op1=0 op2=1 op3=2 end if el==3 and b1 and b2 and b3 then op1=0 op2=1 op3=2 end
if op1==0 or op2==0 or op3==0 then cm.selop1(e,tp,eg,ep,ev,re,r,rp) end local ct=-1
if op1==1 or op2==1 or op3==1 then cm.selop2(e,tp,eg,ep,ev,re,r,rp) end if (op1==0 or op2==0 or op3==0) and cm.selop1(e,tp,eg,ep,ev,re,r,rp) then ct=ct+1 end
if op1==2 or op2==2 or op3==2 then cm.selop3(e,tp,eg,ep,ev,re,r,rp) end if (op1==1 or op2==1 or op3==1) and cm.selop2(e,tp,eg,ep,ev,re,r,rp) then ct=ct+1 end
if (op1==2 or op2==2 or op3==2) and cm.selop3(e,tp,eg,ep,ev,re,r,rp) then ct=ct+1 end
if ct>0 then c:AddCounter(0x1442,ct) end
end end
function cm.selop3(e,tp,eg,ep,ev,re,r,rp) function cm.selop3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local disg=Duel.GetMatchingGroup(cm.disfilter,tp,LOCATION_HAND,0,c) local disg=Duel.GetMatchingGroup(cm.disfilter,tp,LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g1=disg:SelectSubGroup(tp,aux.dncheck,true,4,4) local g1=disg:SelectSubGroup(tp,aux.dncheck,false,4,4)
Duel.ConfirmCards(1-tp,g1) Duel.ConfirmCards(1-tp,g1)
Duel.SendtoGrave(g1,REASON_EFFECT) return Duel.SendtoGrave(g1,REASON_EFFECT+REASON_DISCARD)~=0
c:AddCounter(0x1442,1)
end end
function cm.selop1(e,tp,eg,ep,ev,re,r,rp) function cm.selop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Damage(tp,4200,REASON_EFFECT) return Duel.Damage(tp,4200,REASON_EFFECT)~=0
c:AddCounter(0x1442,1)
end end
function cm.selop2(e,tp,eg,ep,ev,re,r,rp) function cm.selop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rm=Duel.GetDecktopGroup(tp,31) local rm=Duel.GetDecktopGroup(tp,31)
Duel.Remove(rm,POS_FACEDOWN,REASON_EFFECT) return Duel.Remove(rm,POS_FACEDOWN,REASON_EFFECT)~=0
c:AddCounter(0x1442,1) end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetCounter(0x1442)>0 then
e:SetLabel(1)
else
e:SetLabel(0)
end
end
function cm.leacon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetTurnPlayer()~=tp and e:GetLabelObject():GetLabel()==1
end
function cm.leaop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local disg=Duel.GetMatchingGroup(cm.disfilter,1-tp,LOCATION_HAND,0,c)
local b1=( true )
local b2=( Duel.IsExistingMatchingCard(Card.IsAbleToRemove,1-tp,LOCATION_DECK,0,31,nil,1-tp,POS_FACEDOWN,REASON_EFFECT) )
local b3=( disg:GetClassCount(Card.GetCode)>3 )
local op1=-1
if b2 and b3 then op1=Duel.SelectOption(1-tp,aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,3))
elseif b2 then op1=Duel.SelectOption(1-tp,aux.Stringid(m,1),aux.Stringid(m,2))
elseif b3 then op1=Duel.SelectOption(1-tp,aux.Stringid(m,1),aux.Stringid(m,3))*2
else op1=0 end
if op1==0 then cm.selop1(e,1-tp,eg,ep,ev,re,r,rp) end
if op1==1 then cm.selop2(e,1-tp,eg,ep,ev,re,r,rp) end
if op1==2 then cm.selop3(e,1-tp,eg,ep,ev,re,r,rp) end
end end
...@@ -5,7 +5,6 @@ function c60000103.initial_effect(c) ...@@ -5,7 +5,6 @@ function c60000103.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c60000103.accon)
e1:SetTarget(c60000103.actg) e1:SetTarget(c60000103.actg)
e1:SetOperation(c60000103.acop) e1:SetOperation(c60000103.acop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -21,16 +20,6 @@ function c60000103.initial_effect(c) ...@@ -21,16 +20,6 @@ function c60000103.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c60000103.ahcon(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler())
end
function c60000103.cfilter(c)
return true
end
function c60000103.accon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c60000103.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c60000103.actg(e,tp,eg,ep,ev,re,r,rp,chk) function c60000103.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) and Duel.GetTurnPlayer()~=tp then if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) and Duel.GetTurnPlayer()~=tp then
......
...@@ -5,7 +5,6 @@ function c60000108.initial_effect(c) ...@@ -5,7 +5,6 @@ function c60000108.initial_effect(c)
e1:SetCategory(CATEGORY_CONTROL) e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c60000108.accon)
e1:SetTarget(c60000108.actg) e1:SetTarget(c60000108.actg)
e1:SetOperation(c60000108.acop) e1:SetOperation(c60000108.acop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -21,16 +20,6 @@ function c60000108.initial_effect(c) ...@@ -21,16 +20,6 @@ function c60000108.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c60000108.ahcon(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler())
end
function c60000108.cfilter(c)
return true
end
function c60000108.accon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c60000108.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c60000108.actg(e,tp,eg,ep,ev,re,r,rp,chk) function c60000108.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
......
--リンクロス
function c60001010.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c60001010.mfilter,1)
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001010,0))
e1:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,60001010)
e1:SetCondition(c60001010.tkcon)
e1:SetTarget(c60001010.tktg)
e1:SetOperation(c60001010.tkop)
c:RegisterEffect(e1)
end
function c60001010.mfilter(c)
return c:IsLinkType(TYPE_LINK) and c:GetLink()>=2
end
function c60001010.tkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c60001010.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=e:GetHandler():GetMaterial()
if mg:GetCount()~=1 then return false end
if chk==0 then return mg:IsExists(Card.IsType,1,nil,TYPE_LINK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,48068379,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_CYBERSE,ATTRIBUTE_LIGHT) end
e:SetLabel(mg:GetFirst():GetLink())
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c60001010.tkop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=e:GetLabel()
if ft>0 and ct>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,48068379,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_CYBERSE,ATTRIBUTE_LIGHT) then
local count=math.min(ft,ct)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then count=1 end
if count>1 then
local num={}
local i=1
while i<=count do
num[i]=i
i=i+1
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60001010,1))
count=Duel.AnnounceNumber(tp,table.unpack(num))
end
repeat
local token=Duel.CreateToken(tp,85243785)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
count=0
until count==0
Duel.SpecialSummonComplete()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(0xff,0xff)
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,48068379))
e1:SetValue(c60001010.lklimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c60001010.lklimit(e,c)
if not c then return false end
return c:IsControler(e:GetHandlerPlayer())
end
--是一只路过的竹子
function c60002001.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,60002001)
e1:SetCost(c60002001.thcost)
e1:SetTarget(c60002001.thtg)
e1:SetOperation(c60002001.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--to hand and to deck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,00002001)
e3:SetCost(c60002001.ttcost)
e3:SetTarget(c60002001.tttg)
e3:SetOperation(c60002001.ttop)
c:RegisterEffect(e3)
end
function c60002001.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SelectOption(tp,aux.Stringid(60002001,0))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(60002001,0))
end
function c60002001.thfil(c)
return c:IsSetCard(0x623) and c:IsAbleToHand()
end
function c60002001.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(98818516)
end
function c60002001.cfilter(c)
return c:IsFacedown() or not c:IsRace(RACE_PLANT)
end
function c60002001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c60002001.thfil,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 and not Duel.IsExistingMatchingCard(c60002001.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c60002001.spfil,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return b1 or b2 end
e:SetLabel(0)
if b1 and b2 then
if Duel.SelectYesNo(tp,aux.Stringid(60002001,1)) then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
elseif b1 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
elseif b2 then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
end
function c60002001.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op=e:GetLabel()
if op==0 then
local g=Duel.GetMatchingGroup(c60002001.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
else
local g=Duel.GetMatchingGroup(c60002001.spfil,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c60002001.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c60002001.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_EARTH)
end
function c60002001.ttcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SelectOption(tp,aux.Stringid(60002001,2))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(60002001,2))
end
function c60002001.tttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c60002001.ttop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.BreakEffect()
if sg:GetFirst():IsSetCard(0x623) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,sg:GetFirst()) and Duel.SelectYesNo(tp,aux.Stringid(60002001,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,sg:GetFirst())
Duel.SendtoDeck(dg,tp,2,REASON_EFFECT)
else
Duel.SendtoDeck(sg,tp,2,REASON_EFFECT)
end
end
--喜欢恰糕点的竹子
function c60002002.initial_effect(c)
--Recover
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c60002002.rccon)
e1:SetCost(c60002002.rccost)
e1:SetTarget(c60002002.rctg)
e1:SetOperation(c60002002.rcop)
c:RegisterEffect(e1)
--to hand and to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c60002002.ttcost)
e2:SetTarget(c60002002.tttg)
e2:SetOperation(c60002002.ttop)
c:RegisterEffect(e2)
end
function c60002002.cfilter1(c)
return not c:IsRace(RACE_PLANT) and not c:IsRace(RACE_BEAST)
end
function c60002002.rccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 and not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil) and not Duel.IsExistingMatchingCard(c60002002.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
function c60002002.rccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SelectOption(tp,aux.Stringid(60002002,0))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(60002002,0))
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c60002002.rctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(6230130)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,6230130)
end
function c60002002.rcop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-6298763)
end
function c60002002.ctfil(c)
return c:IsAbleToRemoveAsCost() and c:IsCode(98818516)
end
function c60002002.ttcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c60002002.ctfil,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SelectOption(tp,aux.Stringid(60002002,0))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(60002002,0))
local g=Duel.SelectMatchingCard(tp,c60002002.ctfil,tp,LOCATION_GRAVE,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c60002002.thfil(c)
return c:IsAbleToHand() and c:IsType(TYPE_SPELL) and c:IsSetCard(0x623)
end
function c60002002.tttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60002002.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c60002002.ttop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c60002002.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.BreakEffect()
local dg=Duel.SelectMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil)
Duel.SendtoDeck(dg,tp,2,REASON_EFFECT)
end
--有一点害羞的竹子
function c60002003.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,60002003)
e1:SetCondition(c60002003.spcon)
e1:SetCost(c60002003.spcost)
e1:SetTarget(c60002003.sptg)
e1:SetOperation(c60002003.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60002003,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,10002003)
e2:SetCondition(c60002003.sccon)
e2:SetCost(c60002003.sccost)
e2:SetTarget(c60002003.sctarg)
e2:SetOperation(c60002003.scop)
c:RegisterEffect(e2)
--link summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60002003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,60002003)
e1:SetCondition(c60002003.lkcon)
e1:SetTarget(c60002003.lktg)
e1:SetOperation(c60002003.lkop)
c:RegisterEffect(e1)
end
function c60002003.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK
end
function c60002003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SelectOption(tp,aux.Stringid(60002003,0))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(60002003,0))
end
function c60002003.spfil(c,e,tp)
return c:IsSetCard(0x623) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
end
function c60002003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c60002003.spfil,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c60002003.xspfil(c,e,tp)
return c:IsCode(98818516) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60002003.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60002003.spfil,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,1-tp,false,false,POS_FACEUP)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 and not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil) and not Duel.IsExistingMatchingCard(c60002003.cfilter1,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c60002003.xspfil,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(60002003,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local dg=Duel.SelectMatchingCard(tp,c60002003.xspfil,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(dg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c60002003.sccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c60002003.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SelectOption(tp,aux.Stringid(60002003,0))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(60002003,0))
end
function c60002003.syrfil(c,e,tp)
return c:IsSynchroSummonable(e:GetHandler()) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c60002003.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c60002003.syrfil,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60002003.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
function c60002003.lkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c60002003.lkfil(c,e,tp)
return c:IsLinkSummonable(nil,e:GetHandler()) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c60002003.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60002003.lkfil,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60002003.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c60002003.lkfil,tp,LOCATION_EXTRA,0,nil,e,tp)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
--爱吃小竹子的熊猫
function c60002004.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c60002004.matfilter,1,1)
--code
aux.EnableChangeCode(c,98818516,LOCATION_MZONE+LOCATION_GRAVE)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,60002004)
e1:SetCost(c60002004.spcost)
e1:SetTarget(c60002004.sptg)
e1:SetOperation(c60002004.spop)
--immunity
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60303245,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c60002004.immtg)
e2:SetOperation(c60002004.immop)
c:RegisterEffect(e2)
end
function c60002004.matfilter(c)
return c:IsCode(98818516) and not c:IsType(TYPE_LINK)
end
function c60002004.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SelectOption(tp,aux.Stringid(60002004,0))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(60002004,0))
end
function c60002004.spfil(c,e,tp)
return c:IsCode(98818516) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60002004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60002004.spfil,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c60002004.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c60002004.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local g=Duel.GetMatchingGroup(c60002004.spfil,tp,LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
function c60002004.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_EARTH)
end
function c60002004.immtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,0,1,1,nil)
end
function c60002004.immop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(aux.indoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(300)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
--竹子 临冰的决意
function c60002005.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3,99,c60002005.lcheck)
c:EnableReviveLimit()
--immuse
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetCondition(c60002005.econ)
e1:SetValue(c60002005.efilter)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,60002005)
e2:SetCost(c60002005.cncost)
e2:SetTarget(c60002005.cntg)
e2:SetOperation(c60002005.cnop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,10002005)
e3:SetCost(c60002005.cxcost)
e3:SetTarget(c60002005.cxtg)
e3:SetOperation(c60002005.cxop)
c:RegisterEffect(e3)
end
function c60002005.lcheck(g)
return g:IsExists(Card.IsLinkRace,1,nil,RACE_PLANT)
end
function c60002005.econ(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c60002005.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
function c60002005.cncost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SelectOption(tp,aux.Stringid(60002005,0))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(60002005,0))
end
function c60002005.cntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c60002005.cnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,1)
e1:SetValue(c60002005.actfilter)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c60002005.actfilter(e,c)
return not c:IsLevelAbove(1)
end
function c60002005.cxcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SelectOption(tp,aux.Stringid(60002005,1))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(60002005,1))
end
function c60002005.cxtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsLevelAbove,tp,LOCATION_MZONE,0,1,nil,1) and Duel.IsExistingTarget(Card.IsLevelAbove,tp,0,LOCATION_MZONE,1,nil,1) end
local tc1=Duel.SelectTarget(tp,Card.IsLevelAbove,tp,LOCATION_MZONE,0,1,1,nil,1)
local tc2=Duel.SelectTarget(tp,Card.IsLevelAbove,tp,0,LOCATION_MZONE,1,1,nil,1)
local g=Group.FromCards(tc1,tc2)
Duel.SetTargetCard(g)
end
function c60002005.cxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
while tc do
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c60002005.discon)
e2:SetOperation(c60002005.disop)
e2:SetLabelObject(tc)
Duel.RegisterEffect(e2,tp)
tc=g:GetNext()
end
end
function c60002005.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetOriginalCodeRule())
end
function c60002005.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,60002005)
Duel.ChangeChainOperation(ev,c60002005.repop)
end
function c60002005.repop(e,tp,eg,ep,ev,re,r,rp)
end
--竹子 无声的画卷
function c60002006.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,60002007+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetCost(c60002006.accost)
e1:SetTarget(c60002006.actg)
e1:SetOperation(c60002006.acop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c60002006.spcost)
e2:SetTarget(c60002006.sptg)
e2:SetOperation(c60002006.spop)
c:RegisterEffect(e2)
end
function c60002006.tgfil(c)
return c:IsCode(98818516) and c:IsAbleToGrave()
end
function c60002006.accost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SelectOption(tp,aux.Stringid(60002006,0))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(60002006,0))
end
function c60002006.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x623) and Duel.IsExistingMatchingCard(c60002006.thfil,tp,LOCATION_DECK,0,1,nil) end
local tc=Duel.SelectTarget(tp,Card.IsSetCard,tp,LOCATION_MZONE,0,1,1,nil,0x623)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c60002006.thfil(c,code)
return c:IsAbleToHand() and c:IsSetCard(0x623) and not c:IsCode(code)
end
function c60002006.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(c60002006.tgfil,tp,LOCATION_DECK,0,1,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
local code=sg:GetFirst():GetCode()
if Duel.IsExistingMatchingCard(c60002006.thfil,tp,LOCATION_DECK,0,1,nil,code) and Duel.SelectYesNo(tp,aux.Stringid(60002006,2)) then
local dg=Duel.SelectMatchingCard(tp,c60002006.thfil,tp,LOCATION_DECK,0,1,1,nil,code)
Duel.SendtoHand(dg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,dg)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c60002006.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c60002006.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_EARTH)
end
function c60002006.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SelectOption(tp,aux.Stringid(60002006,0))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(60002006,0))
Duel.SendtoDeck(e:GetHandler(),nil,REASON_COST)
end
function c60002006.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(98818516)
end
function c60002006.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60002006.spfil,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c60002006.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c60002006.spfil,tp,LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sg:GetFirst():RegisterEffect(e1)
end
end
--竹子 画上句号
function c60002007.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,60002007+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60002007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCost(c60002007.spcost)
e1:SetTarget(c60002007.sptg)
e1:SetOperation(c60002007.spop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c60002007.spcost1)
e2:SetTarget(c60002007.sptg1)
e2:SetOperation(c60002007.spop1)
c:RegisterEffect(e2)
end
function c60002007.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.SelectOption(tp,aux.Stringid(60002007,0))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(60002007,0))
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST,nil)
end
function c60002007.spfilter(c,e,tp)
return c:IsSetCard(0xa903) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60002007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c60002007.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c60002007.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,c60002007.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c60002007.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c60002007.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_EARTH)
end
function c60002007.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SelectOption(tp,aux.Stringid(60002007,1))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(60002007,1))
Duel.SendtoDeck(e:GetHandler(),nil,REASON_COST)
end
function c60002007.spfil1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x623)
end
function c60002007.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60002007.spfil1,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c60002007.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60002007.spfil1,tp,LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60002007,2))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_CLIENT_HINT)
e1:SetCondition(c60002007.thcon)
e1:SetTarget(c60002007.thtg)
e1:SetOperation(c60002007.thop)
tc:RegisterEffect(e1)
end
end
function c60002007.thfil(c)
return c:IsSetCard(0x623) and c:IsAbleToHand()
end
function c60002007.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK
end
function c60002007.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60002007.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_DECK)
end
function c60002007.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60002007.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
--正展露本我的竹子
function c60002008.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c60002008.matfilter,2,2)
--th
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,60002008)
e1:SetTarget(c60002008.thtg)
e1:SetOperation(c60002008.thop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,60002008)
e2:SetCost(c60002008.spcost)
e2:SetTarget(c60002008.sptg)
e2:SetOperation(c60002008.spop)
c:RegisterEffect(e2)
end
function c60002008.matfilter(c)
return c:IsLinkRace(RACE_PLANT) or c:IsLinkRace(RACE_CYBERSE)
end
function c60002008.thfil(c)
return c:IsAbleToHand() and c:IsSetCard(0xa9e1)
end
function c60002008.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60002008.thfil,tp,LOCATION_DECK,0,1,nil) and e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_DECK)
end
function c60002008.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60002008.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
if (tc:IsSummonable(true,nil) or tc:IsMSetable(true,nil)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(60002008,2)) then
local s1=tc:IsSummonable(true,nil)
local s2=tc:IsMSetable(true,nil)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil)
else
Duel.MSet(tp,tc,true,nil)
end
end
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(60002008,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c60002008.descon)
e1:SetOperation(c60002008.desop)
Duel.RegisterEffect(e1,tp)
end
function c60002008.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(60002008)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c60002008.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT)
end
function c60002008.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SelectOption(tp,aux.Stringid(60002008,1))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(60002008,1))
end
function c60002008.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,28062326,0,0x4011,800,500,1,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c60002008.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c60002008.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<2 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,28062326,0,0x4011,800,500,1,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP,tp) then return end
for i=1,2 do
local token=Duel.CreateToken(tp,28062326)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
function c60002008.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_EARTH)
end
...@@ -56,7 +56,7 @@ function c79029025.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c79029025.thop(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT) Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
if Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(79029025,0)) then if Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) and c:GetMaterialCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(79029025,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,c:GetMaterialCount(),nil) dg=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,c:GetMaterialCount(),nil)
Debug.Message("闪!") Debug.Message("闪!")
......
...@@ -39,8 +39,9 @@ function c79029129.initial_effect(c) ...@@ -39,8 +39,9 @@ function c79029129.initial_effect(c)
e5:SetType(EFFECT_TYPE_IGNITION) e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,09029129+EFFECT_COUNT_CODE_DUEL) e5:SetCountLimit(1,09029129+EFFECT_COUNT_CODE_DUEL)
e5:SetTarget(c79029129.target) e5:SetCost(aux.bfgcost)
e5:SetOperation(c79029129.activate) e5:SetTarget(c79029129.srtg)
e5:SetOperation(c79029129.srop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c79029129.splimit(e,c,tp,sumtp,sumpos) function c79029129.splimit(e,c,tp,sumtp,sumpos)
...@@ -70,25 +71,16 @@ function c79029129.pcfilter(c) ...@@ -70,25 +71,16 @@ function c79029129.pcfilter(c)
return c:IsSetCard(0x1901) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() return c:IsSetCard(0x1901) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end end
function c79029129.pctg(e,tp,eg,ep,ev,re,r,rp,chk) function c79029129.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and Duel.IsExistingMatchingCard(c79029129.pcfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
and Duel.IsExistingMatchingCard(c79029129.pcfilter,tp,LOCATION_DECK,0,1,nil) end
end end
function c79029129.pcop(e,tp,eg,ep,ev,re,r,rp) function c79029129.pcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c79029128.splimit1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Debug.Message("医生就在这里呢,看这边!") Debug.Message("医生就在这里呢,看这边!")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029129,1)) Duel.Hint(HINT_SOUND,0,aux.Stringid(79029129,1))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c79029128.pcfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c79029128.pcfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
...@@ -97,25 +89,22 @@ end ...@@ -97,25 +89,22 @@ end
function c79029129.filter(c,e,tp) function c79029129.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xa900) and Duel.GetMZoneCount(tp,e:GetHandler(),tp)>0 return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xa900) and Duel.GetMZoneCount(tp,e:GetHandler(),tp)>0
end end
function c79029129.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c79029129.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c79029129.filter(chkc,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c79029129.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c79029129.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end
function c79029129.srop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c79029129.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Debug.Message("疼就喊出来,别忍着啊!") Debug.Message("疼就喊出来,别忍着啊!")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029129,2)) Duel.Hint(HINT_SOUND,0,aux.Stringid(79029129,2))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c79029129.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=Duel.SelectMatchingCard(tp,c79029129.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c79029129.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~0 then if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~0 then
local x=tc:GetAttack() Duel.BreakEffect()
Duel.Recover(tp,x,REASON_EFFECT) Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT)
end end
end end
end
......
...@@ -19,17 +19,17 @@ function c79029137.filter1(c,e,tp) ...@@ -19,17 +19,17 @@ function c79029137.filter1(c,e,tp)
return c:IsSetCard(0xa900) and Duel.GetMZoneCount(tp,c)>0 return c:IsSetCard(0xa900) and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c79029137.filter2,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode()) and Duel.IsExistingMatchingCard(c79029137.filter2,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode())
end end
function c79029137.filter2(c,e,tp,tcode) function c79029137.filter2(c,e,tp,tc)
return c:IsSetCard(0xd90c) and c.assault_name==tcode and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsSetCard(0xd90c) and tc:IsCode(c.assault_name) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function c79029137.target(e,tp,eg,ep,ev,re,r,rp,chk) function c79029137.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if e:GetLabel()~=1 then return false end if e:GetLabel()~=1 then return false end
e:SetLabel(0) e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c79029137.filter1,1,nil,e,tp) return Duel.CheckReleaseGroup(tp,c79029450.filter1,1,nil,e,tp)
end end
local rg=Duel.SelectReleaseGroup(tp,c79029137.filter1,1,1,nil,e,tp) local rg=Duel.SelectReleaseGroup(tp,c79029450.filter1,1,1,nil,e,tp)
e:SetLabel(rg:GetFirst():GetCode()) e:SetLabelObject(rg:GetFirst())
Duel.Remove(rg,POS_FACEUP,REASON_COST) Duel.Remove(rg,POS_FACEUP,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA)
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c79029468.initial_effect(c) function c79029468.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--fusion material --fusion material
aux.AddFusionProcCodeFunRep(c,79029010,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),1,99,true,true) aux.AddFusionProcCodeFunRep(c,79029010,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),2,99,true,true)
--cannot target --cannot target
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -6,7 +6,8 @@ function c79029470.initial_effect(c) ...@@ -6,7 +6,8 @@ function c79029470.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c79029470.bgmop) e1:SetTarget(c79029470.actg)
e1:SetOperation(c79029470.acop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--race --race
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -35,8 +36,49 @@ function c79029470.initial_effect(c) ...@@ -35,8 +36,49 @@ function c79029470.initial_effect(c)
e4:SetTarget(c79029470.detg) e4:SetTarget(c79029470.detg)
e4:SetOperation(c79029470.deop) e4:SetOperation(c79029470.deop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_CANNOT_SSET)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e8:SetRange(LOCATION_FZONE)
e8:SetTargetRange(1,0)
e8:SetTarget(c79029470.setlimit)
c:RegisterEffect(e8)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD)
e9:SetCode(EFFECT_CANNOT_ACTIVATE)
e9:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e9:SetRange(LOCATION_FZONE)
e9:SetTargetRange(1,0)
e9:SetTarget(c79029470.actlimit)
c:RegisterEffect(e9)
end end
function c79029470.bgmop(e,tp,eg,ep,ev,re,r,rp) function c79029470.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetOperation(c79029470.tgop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,10)
c:SetTurnCounter(0)
c:RegisterEffect(e1)
end
function c79029470.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==5 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c79029470.acop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(79029470,0)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(79029470,0))
end end
function c79029470.actcon(e) function c79029470.actcon(e)
...@@ -58,7 +100,12 @@ function c79029470.deop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +100,12 @@ function c79029470.deop(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,1,x,nil) local sg=g:Select(tp,1,x,nil)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
function c79029470.setlimit(e,c,tp)
return c:IsType(TYPE_FIELD)
end
function c79029470.actlimit(e,re,tp)
return re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
......
...@@ -27,6 +27,7 @@ function c79029471.initial_effect(c) ...@@ -27,6 +27,7 @@ function c79029471.initial_effect(c)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,19029471) e2:SetCountLimit(1,19029471)
e2:SetCost(c79029471.spcost)
e2:SetTarget(c79029471.sptg) e2:SetTarget(c79029471.sptg)
e2:SetOperation(c79029471.spop) e2:SetOperation(c79029471.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -67,15 +68,19 @@ function c79029471.psop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,15 +68,19 @@ function c79029471.psop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end end
end end
function c79029471.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c79029471.spfil(c,e,tp) function c79029471.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x1907) return (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ((Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and not c:IsLocation(LOCATION_EXTRA)) or (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0))) and c:IsSetCard(0x1907)
end end
function c79029471.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c79029471.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029471.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c79029471.spfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_EXTRA)
end end
function c79029471.spop(e,tp,eg,ep,ev,re,r,rp) function c79029471.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c79029471.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(c79029471.spfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_EXTRA,0,nil,e,tp)
if g:GetCount()<=0 then return end if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
......
--个人行动·如你所愿
function c79029472.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,79029472)
e1:SetCost(c79029472.thcost)
e1:SetTarget(c79029472.thtg)
e1:SetOperation(c79029472.thop)
c:RegisterEffect(e1)
--Damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,79029472)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c79029472.datg)
e2:SetOperation(c79029472.daop)
c:RegisterEffect(e2)
end
function c79029472.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) end
Duel.PayLPCost(tp,2000)
end
function c79029472.thfil1(c)
return c:IsCode(79029347) and c:IsAbleToHand()
end
function c79029472.thfil2(c)
return c:IsCode(79029346) and c:IsAbleToHand()
end
function c79029472.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029472.thfil1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c79029472.thfil2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c79029472.thop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c79029472.thfil1,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(c79029472.thfil2,tp,LOCATION_DECK,0,nil)
if g1:GetCount()<=0 or g2:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Debug.Message("你们站远一些好了,不喜欢接下来的事情的话,就不要看这边。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029472,0))
Duel.SendtoHand(sg1,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
function c79029472.datg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:GetFirst():IsSetCard(0xa900) and eg:GetFirst():IsType(TYPE_RITUAL) and eg:GetFirst():IsType(TYPE_MONSTER) end
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,eg:GetFirst():GetBaseAttack())
end
function c79029472.daop(e,tp,eg,ep,ev,re,r,rp,chk)
Debug.Message("痛的话就叫出来,会好受些的。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029472,1))
Duel.Damage(1-tp,eg:GetFirst():GetBaseAttack(),REASON_EFFECT)
end
--罗德岛·近卫干员-刻刀·红移
function c79029473.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xa900),4,2)
c:EnableReviveLimit()
--to hand or grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79029473,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,79029473)
e1:SetCost(c79029473.cost)
e1:SetTarget(c79029473.target)
e1:SetOperation(c79029473.operation)
c:RegisterEffect(e1)
--xyz
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(79029473,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,19029473)
e2:SetCondition(c79029473.xycon)
e2:SetTarget(c79029473.xytg)
e2:SetOperation(c79029473.xyop)
c:RegisterEffect(e2)
end
function c79029473.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa900) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c79029473.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c79029473.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029473.cfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c79029473.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c79029473.cfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Debug.Message("我可以等待。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029473,0))
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Debug.Message("战场就是坟场。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029473,1))
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
function c79029473.xycon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=a:GetBattleTarget()
if not d then return false end
if a:IsControler(1-tp) then a,d=d,a end
e:SetLabelObject(d)
return a:IsFaceup() and a:IsControler(tp) and a:IsSetCard(0xa900) and d:IsFaceup() and d:IsControler(1-tp)
end
function c79029473.xytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end
end
function c79029473.xyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsCanOverlay,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil)
if c:IsRelateToEffect(e) and g:GetCount()>0 then
Debug.Message("或许总有一天,会出现我的刀斩不断的东西。但,看来不是现在,不是你们。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029473,2))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:Select(tp,1,1,nil)
Duel.Overlay(c,sg)
end
end
--松果·瑟谣浮收藏-圣诞老人
function c79029474.initial_effect(c)
--add code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_ADD_CODE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(79029364)
c:RegisterEffect(e0)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,79029474)
e1:SetCost(c79029474.thcost)
e1:SetTarget(c79029474.thtg)
e1:SetOperation(c79029474.thop)
c:RegisterEffect(e1)
--place
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,19029474)
e2:SetTarget(c79029474.pltg)
e2:SetOperation(c79029474.plop)
c:RegisterEffect(e2)
end
function c79029474.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable()
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c79029474.thfilter(c)
return c:IsSetCard(0xa90f) and c:IsAbleToHand()
end
function c79029474.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029474.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c79029474.thop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("轮到我啦。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029474,0))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c79029474.thfilter,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
function c79029474.xfilter(c)
return c:IsSetCard(0xa90f) and not c:IsForbidden() and c:IsType(TYPE_EQUIP)
end
function c79029474.pltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029474.xfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c79029474.plop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c79029474.xfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Debug.Message("电量储备还很充足!")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029474,1))
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
--萨尔贡·术士干员-卡涅利安
function c79029475.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH),10,2,c79029475.ovfilter,aux.Stringid(79029475,0),99)
c:EnableReviveLimit()
--cannot atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCondition(c79029475.cncon)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetCondition(c79029475.cncon)
e2:SetValue(c79029475.efilter)
c:RegisterEffect(e2)
--xxx
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DAMAGE+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,79029475)
e3:SetCost(c79029475.xxcost)
e3:SetTarget(c79029475.xxtg)
e3:SetOperation(c79029475.xxop)
c:RegisterEffect(e3)
--xyz
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_RECOVER)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,19029475)
e4:SetTarget(c79029475.xyztg)
e4:SetOperation(c79029475.xyzop)
c:RegisterEffect(e4)
end
function c79029475.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa900) and c:IsLevel(10) and c:IsType(TYPE_SYNCHRO)
end
function c79029475.cncon(e)
return e:GetHandler():GetFlagEffect(79029475)==0
end
function c79029475.efilter(e,te)
return te:GetOwner():GetControler()~=e:GetOwner():GetControler()
end
function c79029475.xxcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
local x=e:GetHandler():GetOverlayCount()
local d=e:GetHandler():RemoveOverlayCard(tp,x,x,REASON_COST)
e:SetLabel(d)
end
function c79029475.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
local d=e:GetLabel()
if chk==0 then return true end
if d==1 then
Debug.Message("全员,按计划行动!")
elseif d==2 then
Debug.Message("优雅,礼貌,那是贵族的做法。不是我的。")
elseif d==3 then
Debug.Message("你喜欢文雅点的战斗方式,还是直接点的?")
elseif d==4 then
Debug.Message("日安,各位。......让我们省略掉麻烦的步骤,直接开始吧。")
end
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029475,d+2))
if d>=3 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
end
function c79029475.xfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK)
end
function c79029475.xxop(e,tp,eg,ep,ev,re,r,rp)
local d=e:GetLabel()
local c=e:GetHandler()
if d>=1 then
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(d*1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ATTACK_ALL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetCondition(c79029475.atkcon)
e1:SetOwnerPlayer(tp)
c:RegisterEffect(e1)
c:RegisterFlagEffect(79029475,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(79029475,1))
end
if d>=2 then
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
tc=g:GetNext()
end
end
if d>=3 then
Duel.Damage(1-tp,2000,REASON_EFFECT)
end
if d>=4 then
local g=Duel.GetMatchingGroup(c79029475.xfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(79029475,2))
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e4:SetValue(c79029475.efilter2)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e4:SetOwnerPlayer(tp)
tc:RegisterEffect(e4)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_PIERCE)
e4:SetValue(DOUBLE_DAMAGE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
tc=g:GetNext()
end
end
end
function c79029475.atkcon(e)
return e:GetHandlerPlayer()==e:GetOwnerPlayer()
end
function c79029475.efilter2(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c79029475.ckfil(c)
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c79029475.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c79029475.ckfil,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,eg:FilterCount(c79029475.ckfil,nil)*1000)
end
function c79029475.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(c79029475.ckfil,nil)
Debug.Message("放心,我会把所有人都好好带回来的。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029475,7))
Duel.Overlay(c,g)
Duel.BreakEffect()
Duel.Recover(tp,g:GetCount()*1000,REASON_EFFECT)
end
--阿戈尔·术士干员-深靛
function c79029476.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xa900),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--th
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,79029476)
e1:SetTarget(c79029476.thtg)
e1:SetOperation(c79029476.thop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_RELEASE)
e2:SetCountLimit(1,19029476)
e2:SetCondition(c79029476.spcon)
e2:SetTarget(c79029476.sptg)
e2:SetOperation(c79029476.spop)
c:RegisterEffect(e2)
end
function c79029476.thfil(c)
return c:IsAbleToHand() and c:IsRace(RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_WATER)
end
function c79029476.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029476.thfil,tp,LOCATION_DECK,0,1,nil) and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_DECK)
end
function c79029476.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c79029476.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Debug.Message("跟着光走。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029476,3))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
if Duel.SendtoHand(sg,tp,REASON_EFFECT) then
Duel.ConfirmCards(1-tp,sg)
if Duel.CheckLPCost(tp,2000) and Duel.SelectYesNo(tp,aux.Stringid(79029476,0)) then
Duel.BreakEffect()
Debug.Message("好的......我会维持这光亮,大家不要走散。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029476,4))
--extra summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(79029476,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTarget(c79029476.exstg)
Duel.RegisterEffect(e2,tp)
end
end
end
function c79029476.exstg(e,c)
return c:IsSetCard(0xa900)
end
function c79029476.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_SUMMON)
end
function c79029476.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c79029476.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE) then
Debug.Message("我准备好了。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029476,5))
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if c:GetReasonCard():IsSetCard(0xa900) and c:GetReasonCard():IsAttribute(ATTRIBUTE_WATER) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(79029476,2)) then
Debug.Message("海面不太平静。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029476,6))
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
--维多利亚·特种干员-贝娜
function c79029477.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,79029477)
e1:SetCondition(c79029477.tgcon)
e1:SetTarget(c79029477.tgtg)
e1:SetOperation(c79029477.tgop)
c:RegisterEffect(e1)
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79029477,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCountLimit(1,19029477)
e1:SetCondition(c79029477.condition)
e1:SetTarget(c79029477.target)
e1:SetOperation(c79029477.operation)
c:RegisterEffect(e1)
end
function c79029477.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c79029477.tgfil(c)
return c:IsAbleToGrave() and c:IsSetCard(0xa900) and c:IsType(TYPE_MONSTER)
end
function c79029477.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029477.tgfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c79029477.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c79029477.tgfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Debug.Message("哼哼。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029477,2))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.SendtoGrave(tc,REASON_EFFECT)
if tc:IsSetCard(0xa904) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(79029477,0)) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsCode(79029477) then
Debug.Message("安妮有些想法,我来说给大家听。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029477,4))
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79029477,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(c79029477.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
else
Debug.Message("你也想拆这些玩具吗?")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029477,3))
end
end
end
function c79029477.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c79029477.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c79029477.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local atk=e:GetHandler():GetAttack()
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(atk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function c79029477.operation(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("咔嚓咔嚓。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029477,4))
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Damage(p,e:GetHandler():GetAttack(),REASON_EFFECT)
end
--东国·特种干员-绮良
function c79029478.initial_effect(c)
--fusion procedure
c:EnableReviveLimit()
aux.AddFusionProcMix(c,false,true,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa900),c79029478.matfilter1,c79029478.matfilter2,nil)
--defense attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DEFENSE_ATTACK)
e1:SetValue(1)
c:RegisterEffect(e1)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c79029478.rccon)
e2:SetOperation(c79029478.rcop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,79029478)
e3:SetCost(c79029478.stcost)
e3:SetTarget(c79029478.sttg)
e3:SetOperation(c79029478.stop)
c:RegisterEffect(e3)
end
function c79029478.matfilter1(c)
return c:IsFusionAttribute(ATTRIBUTE_WATER)
end
function c79029478.matfilter2(c)
return c:IsRace(RACE_CYBERSE)
end
function c79029478.rccon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp
end
function c79029478.rcop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,79029478)
if Duel.GetFlagEffect(tp,79029478)==0 then
Debug.Message("辅助的话,我大概能帮上点忙......吧。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029478,1))
end
Duel.RegisterFlagEffect(tp,79029478,RESET_PHASE+PHASE_END,0,1,0)
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-400)
Duel.Recover(tp,400,REASON_EFFECT)
end
function c79029478.ctfil(c)
return c:IsSetCard(0xa900) and c:IsAbleToGraveAsCost()
end
function c79029478.stcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029478.ctfil,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c79029478.ctfil,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c79029478.stfil(c)
return c:IsSetCard(0xa900) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c79029478.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029478.stfil,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil) and Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 end
end
function c79029478.stop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c79029478.stfil,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
Debug.Message("这样就行了吧?明白了。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029478,2))
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(79029478,0))
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(tc)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c79029478.xxtg)
e2:SetOperation(c79029478.xxop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
tc:RegisterEffect(e3)
end
end
function c79029478.xxfil(c,e,tp)
return e:GetHandler():GetColumnGroup():IsContains(c) and c:GetSummonPlayer()==tp
end
function c79029478.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c79029478.xxfil,1,nil,e,tp) end
local atk=eg:Filter(c79029478.xxfil,nil,e,tp):GetSum(Card.GetAttack)
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,atk)
end
function c79029478.xxop(e,tp,eg,ep,ev,re,r,rp)
local atk=eg:Filter(c79029478.xxfil,nil,e,tp):GetSum(Card.GetAttack)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Recover(p,atk,REASON_EFFECT)
end
--个人行动-青色怒火
function c79029479.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c79029479.activate)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,79029479)
e2:SetCost(c79029479.spcost)
e2:SetTarget(c79029479.sptg)
e2:SetOperation(c79029479.spop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c79029479.negcon)
e3:SetOperation(c79029479.negop)
c:RegisterEffect(e3)
end
function c79029479.thfilter(c)
return c:IsCode(29065574) and c:IsAbleToHand()
end
function c79029479.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c79029479.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.CheckLPCost(tp,2000) and Duel.SelectYesNo(tp,aux.Stringid(79029479,0)) then
Debug.Message("“如果战斗不可避免......”这是以前我最信任的人教给我的话。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029479,2))
Duel.PayLPCost(tp,2000)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c79029479.ctfil(c)
return c:IsCode(29065574) and c:IsAbleToGraveAsCost()
end
function c79029479.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029479.ctfil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c79029479.ctfil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c79029479.xxfil(c,e,tp)
local lk=c:GetLink()
return Duel.IsExistingMatchingCard(c79029479.spfil,tp,LOCATION_EXTRA,0,1,nil,e,tp,lk)
end
function c79029479.spfil(c,e,tp,lk)
return c:IsLinkBelow(lk) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c79029479.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029479.xxfil,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c79029479.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c79029479.xxfil,tp,LOCATION_MZONE,0,nil,e,tp)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c79029479.xxfil,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
local lk=tc:GetLink()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc1=Duel.SelectMatchingCard(tp,c79029479.spfil,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk):GetFirst()
Duel.SpecialSummonStep(tc1,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
tc1:CompleteProcedure()
Duel.SpecialSummonComplete()
if tc1:IsCode(79029359) then
Debug.Message("这里是阿米娅。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029479,4))
elseif tc1:IsCode(79029480) then
Debug.Message("这里是陈。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029479,5))
else
Debug.Message("行动开始。我们走!")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029479,3))
end
end
function c79029479.cfilter(c)
return c:IsLinkAbove(6) and c:IsSetCard(0xa900)
end
function c79029479.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c79029479.cfilter,tp,LOCATION_MZONE,0,1,nil)
and rp==1-tp and Duel.IsChainDisablable(ev)
and e:GetHandler():GetFlagEffect(79029479)<=0
end
function c79029479.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(79029479,1)) then
Debug.Message("不要......不要惹恼我。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029479,6))
Duel.Hint(HINT_CARD,0,79029479)
Duel.NegateEffect(ev)
e:GetHandler():RegisterFlagEffect(79029479,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
--龙门·近卫干员-陈·赤霄·绝影
function c79029480.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,99,c79029480.lcheck)
c:EnableReviveLimit()
--code
aux.EnableChangeCode(c,79029025,LOCATION_MZONE+LOCATION_GRAVE)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.linklimit)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,79029480)
e2:SetCost(c79029480.discost)
e2:SetTarget(c79029480.distg)
e2:SetOperation(c79029480.disop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,19029480)
e3:SetCost(c79029480.spcost)
e3:SetTarget(c79029480.sptg)
e3:SetOperation(c79029480.spop)
c:RegisterEffect(e3)
end
function c79029480.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xa900)
end
function c79029480.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1500) end
Duel.PayLPCost(tp,1500)
end
function c79029480.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
end
function c79029480.disop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("放下你的武器!")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029480,0))
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
tc=g:GetNext()
end
end
function c79029480.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c79029480.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c79029480.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function c79029480.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsSetCard(0xa900) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c79029480.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c79029480.spfil,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=eg:Filter(c79029480.spfil,nil,e,tp):GetCount() and (eg:Filter(c79029480.spfil,nil,e,tp):GetCount()==1 or not Duel.IsPlayerAffectedByEffect(tp,59822133)) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,eg:Filter(c79029480.spfil,nil,e,tp):GetCount(),tp,LOCATION_REMOVED)
end
function c79029480.spop(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(c79029480.spfil,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<sg:GetCount() or (sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end
if Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)~=0 then
if sg:IsExists(Card.IsCode,1,nil,79029359) then
Debug.Message("这里是阿米娅。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029480,2))
Debug.Message("这里是陈。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029480,3))
else
Debug.Message("准备好了吗?那么,一切按照计划进行。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029480,1))
end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
end
...@@ -59,6 +59,7 @@ function c79029534.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,6 +59,7 @@ function c79029534.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end
end end
function c79029534.distg(e,c) function c79029534.distg(e,c)
return c:IsType(e:GetLabel()) return c:IsType(e:GetLabel())
......
...@@ -62,10 +62,10 @@ function c9330001.initial_effect(c) ...@@ -62,10 +62,10 @@ function c9330001.initial_effect(c)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c9330001.efilter(e,te) function c9330001.efilter(e,te)
return te:IsActiveType(TYPE_TRAP) and not te:GetOwner():IsSetCard(0xf9c) return te:IsActiveType(TYPE_TRAP) and not te:GetOwner():IsSetCard(0xaf93)
end end
function c9330001.filter1(e,c) function c9330001.filter1(e,c)
return c:IsSetCard(0xf9c) and not c:IsCode(9330001) return c:IsSetCard(0xaf93) and not c:IsCode(9330001)
end end
function c9330001.spcon(e,tp,eg,ep,ev,re,r,rp) function c9330001.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
...@@ -81,7 +81,7 @@ local rc=re:GetHandler() ...@@ -81,7 +81,7 @@ local rc=re:GetHandler()
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if rc:IsSetCard(0xf9c) if rc:IsSetCard(0xaf93)
and Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(9330001,1)) then and Duel.SelectYesNo(tp,aux.Stringid(9330001,1)) then
Duel.BreakEffect() Duel.BreakEffect()
...@@ -115,7 +115,7 @@ local c=e:GetHandler() ...@@ -115,7 +115,7 @@ local c=e:GetHandler()
end end
function c9330001.effcon(e,tp,eg,ep,ev,re,r,rp) function c9330001.effcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_FUSION+REASON_SYNCHRO+REASON_XYZ+REASON_LINK+REASON_RITUAL)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return bit.band(r,REASON_FUSION+REASON_SYNCHRO+REASON_XYZ+REASON_LINK+REASON_RITUAL)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and e:GetHandler():GetReasonCard():IsSetCard(0xf9c) and e:GetHandler():GetReasonCard():IsSetCard(0xaf93)
end end
function c9330001.effop(e,tp,eg,ep,ev,re,r,rp) function c9330001.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -143,10 +143,11 @@ function c9330001.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -143,10 +143,11 @@ function c9330001.effop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c9330001.thfilter(c) function c9330001.thfilter(c)
return c:IsSetCard(0xf9c) and not c:IsCode(9330001) and c:IsAbleToHand() return c:IsSetCard(0xaf93) and not c:IsCode(9330001) and c:IsAbleToHand()
end end
function c9330001.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9330001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9330001.thfilter,tp,LOCATION_DECK+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c9330001.thfilter,tp,LOCATION_DECK+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(9330001,2))
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_ONFIELD+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_ONFIELD+LOCATION_GRAVE)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9330001,3)) e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9330001,3))
end end
......
...@@ -13,18 +13,16 @@ function c9330002.initial_effect(c) ...@@ -13,18 +13,16 @@ function c9330002.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9330002,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,9330002) e2:SetCountLimit(1,9331002)
e2:SetTarget(c9330002.sptg) e2:SetTarget(c9330002.sptg)
e2:SetOperation(c9330002.spop) e2:SetOperation(c9330002.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--control --control
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9330002,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCategory(CATEGORY_CONTROL) e3:SetCategory(CATEGORY_CONTROL)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCode(EVENT_PHASE+PHASE_END)
...@@ -39,7 +37,7 @@ function c9330002.cfilter(c) ...@@ -39,7 +37,7 @@ function c9330002.cfilter(c)
return c:IsFaceup() and c:IsCode(9330001) return c:IsFaceup() and c:IsCode(9330001)
end end
function c9330002.sprfilter(c) function c9330002.sprfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf9c) return c:IsFaceup() and c:IsSetCard(0xaf93)
end end
function c9330002.sprcon(e,c) function c9330002.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
...@@ -93,13 +91,3 @@ function c9330002.ctlop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,13 +91,3 @@ function c9330002.ctlop(e,tp,eg,ep,ev,re,r,rp)
end end
--陷阵营统帅 高顺 --陷阵营统帅
function c9330003.initial_effect(c) function c9330003.initial_effect(c)
aux.AddCodeList(c,9330001) aux.AddCodeList(c,9330001)
--synchro summon --synchro summon
...@@ -28,55 +28,34 @@ function c9330003.initial_effect(c) ...@@ -28,55 +28,34 @@ function c9330003.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk & def --activate limit
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetDescription(aux.Stringid(9330003,0))
e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0) e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetTarget(c9330003.filter1) e3:SetCountLimit(1)
e3:SetValue(500) e3:SetCondition(c9330003.actcon)
e3:SetOperation(c9330003.actop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--immune effect
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_ONFIELD,0)
e5:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_COUNTER))
e5:SetValue(c9330003.efilter2)
c:RegisterEffect(e5)
--activate limit
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(9330003,0))
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_MZONE)
e6:SetHintTiming(0,TIMING_MAIN_END)
e6:SetCountLimit(1)
e6:SetCondition(c9330003.actcon)
e6:SetOperation(c9330003.actop)
c:RegisterEffect(e6)
--effect gain --effect gain
local e7=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_BE_MATERIAL) e4:SetCode(EVENT_BE_MATERIAL)
e7:SetProperty(EFFECT_FLAG_EVENT_PLAYER) e4:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e7:SetCondition(c9330003.effcon) e4:SetCondition(c9330003.effcon)
e7:SetOperation(c9330003.effop) e4:SetOperation(c9330003.effop)
c:RegisterEffect(e7) c:RegisterEffect(e4)
end end
function c9330003.splimit(e,se,sp,st) function c9330003.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end end
function c9330003.efilter(e,te) function c9330003.efilter(e,te)
return te:IsActiveType(TYPE_TRAP) and not te:GetOwner():IsSetCard(0xf9c) return te:IsActiveType(TYPE_TRAP) and not te:GetOwner():IsSetCard(0xaf93)
end end
function c9330003.filter1(e,c) function c9330003.filter1(e,c)
return c:IsSetCard(0xf9c) and not c:IsCode(9330001) return c:IsSetCard(0xaf93) and not c:IsCode(9330001)
end end
function c9330003.efilter2(e,re) function c9330003.efilter2(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer() return re:GetOwnerPlayer()~=e:GetHandlerPlayer()
...@@ -87,6 +66,7 @@ end ...@@ -87,6 +66,7 @@ end
function c9330003.actop(e,tp,eg,ep,ev,re,r,rp) function c9330003.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or c:IsLevelBelow(6) then return end if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or c:IsLevelBelow(6) then return end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(9330003,0))
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
...@@ -94,36 +74,39 @@ function c9330003.actop(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,36 +74,39 @@ function c9330003.actop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(-3) e1:SetValue(-3)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetOperation(c9330003.disop)
e2:SetTargetRange(0,1)
e2:SetValue(c9330003.aclimit)
e2:SetReset(RESET_PHASE+Duel.GetCurrentPhase()) e2:SetReset(RESET_PHASE+Duel.GetCurrentPhase())
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c9330003.aclimit(e,re,tp) function c9330003.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return not re:IsActiveType(TYPE_TRAP) if tl==LOCATION_MZONE and not re:IsActiveType(TYPE_TRAP) and not re:GetHandler():IsCode(9330001) then
Duel.NegateEffect(ev)
end
if tl==LOCATION_SZONE and not re:IsActiveType(TYPE_TRAP) and not re:GetHandler():IsCode(9330001) then
Duel.NegateEffect(ev)
end
end end
function c9330003.effcon(e,tp,eg,ep,ev,re,r,rp) function c9330003.effcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_FUSION+REASON_RITUAL)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return bit.band(r,REASON_FUSION+REASON_RITUAL)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and e:GetHandler():GetReasonCard():IsSetCard(0xf9c) and e:GetHandler():GetReasonCard():IsSetCard(0xaf93)
end end
function c9330003.effop(e,tp,eg,ep,ev,re,r,rp) function c9330003.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=c:GetReasonCard() local rc=c:GetReasonCard()
local e6=Effect.CreateEffect(rc) local e1=Effect.CreateEffect(rc)
e6:SetDescription(aux.Stringid(9330003,0)) e1:SetDescription(aux.Stringid(9330003,0))
e6:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e6:SetHintTiming(0,TIMING_MAIN_END) e1:SetHintTiming(0,TIMING_MAIN_END)
e6:SetCountLimit(1) e1:SetCountLimit(1)
e6:SetCondition(c9330003.actcon) e1:SetCondition(c9330003.actcon)
e6:SetOperation(c9330003.actop) e1:SetOperation(c9330003.actop)
e6:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e6,true) rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
...@@ -134,11 +117,3 @@ function c9330003.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -134,11 +117,3 @@ function c9330003.effop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
--陷阵营将军 高顺 --陷阵营将军
function c9330004.initial_effect(c) function c9330004.initial_effect(c)
aux.AddCodeList(c,9330001) aux.AddCodeList(c,9330001)
--xyz summon --xyz summon
...@@ -21,56 +21,36 @@ function c9330004.initial_effect(c) ...@@ -21,56 +21,36 @@ function c9330004.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk & def --cannot be target
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0) e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(c9330004.filter1) e3:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_SPELL+TYPE_TRAP))
e3:SetValue(500) e3:SetValue(aux.indoval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--immune effect
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_ONFIELD,0)
e5:SetTarget(c9330004.etarget)
e5:SetValue(c9330004.efilter2)
c:RegisterEffect(e5)
--Negate --Negate
local e6=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(9330004,0)) e4:SetDescription(aux.Stringid(9330004,0))
e6:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e6:SetType(EFFECT_TYPE_QUICK_O) e4:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_CHAINING) e4:SetCode(EVENT_CHAINING)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e6:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1) e4:SetCountLimit(1)
e6:SetCondition(c9330004.discon) e4:SetCondition(c9330004.discon)
e6:SetCost(c9330004.discost) e4:SetCost(c9330004.discost)
e6:SetTarget(c9330004.distg) e4:SetTarget(c9330004.distg)
e6:SetOperation(c9330004.disop) e4:SetOperation(c9330004.disop)
c:RegisterEffect(e6) c:RegisterEffect(e4)
end end
function c9330004.efilter(e,te) function c9330004.efilter(e,te)
return te:IsActiveType(TYPE_TRAP) and not te:GetOwner():IsSetCard(0xf9c) return te:IsActiveType(TYPE_TRAP) and not te:GetOwner():IsSetCard(0xaf93)
end
function c9330004.filter1(e,c)
return c:IsSetCard(0xf9c) and not c:IsCode(9330001)
end
function c9330004.etarget(e,c)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsSetCard(0xf9c)
end
function c9330004.efilter2(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer()
end end
function c9330004.cfilter(c) function c9330004.cfilter(c)
return (c:IsType(TYPE_TUNER) and c:IsSetCard(0xf9c)) or c:IsType(TYPE_TRAP) return (c:IsType(TYPE_TUNER) and c:IsSetCard(0xaf93)) or c:IsType(TYPE_TRAP)
end end
function c9330004.discon(e,tp,eg,ep,ev,re,r,rp) function c9330004.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -21,27 +21,6 @@ function c9330005.initial_effect(c) ...@@ -21,27 +21,6 @@ function c9330005.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk & def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c9330005.filter1)
e3:SetValue(500)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--immune effect
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_ONFIELD,0)
e5:SetTarget(c9330005.etarget)
e5:SetValue(c9330005.efilter2)
c:RegisterEffect(e5)
--to deck --to deck
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(9330005,0)) e6:SetDescription(aux.Stringid(9330005,0))
...@@ -64,19 +43,7 @@ function c9330005.initial_effect(c) ...@@ -64,19 +43,7 @@ function c9330005.initial_effect(c)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c9330005.efilter(e,te) function c9330005.efilter(e,te)
return te:IsActiveType(TYPE_TRAP) and not te:GetOwner():IsSetCard(0xf9c) return te:IsActiveType(TYPE_TRAP) and not te:GetOwner():IsSetCard(0xaf93)
end
function c9330005.filter1(e,c)
return c:IsSetCard(0xf9c) and not c:IsCode(9330001)
end
function c9330005.etarget(e,c)
return c:GetType()==TYPE_TRAP
end
function c9330005.efilter2(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c9330005.cfilter(c)
return (c:IsSetCard(0xf9c) and c:IsType(TYPE_TUNER)) or c:IsType(TYPE_TRAP)
end end
function c9330005.actcon(e,tp,eg,ep,ev,re,r,rp) function c9330005.actcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLevelAbove(7) return e:GetHandler():IsLevelAbove(7)
...@@ -86,6 +53,7 @@ function c9330005.tdfilter(c) ...@@ -86,6 +53,7 @@ function c9330005.tdfilter(c)
end end
function c9330005.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function c9330005.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9330005.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c9330005.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(9330005,0))
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
end end
function c9330005.tdop(e,tp,eg,ep,ev,re,r,rp) function c9330005.tdop(e,tp,eg,ep,ev,re,r,rp)
...@@ -101,13 +69,13 @@ function c9330005.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,13 +69,13 @@ function c9330005.tdop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()<=0 then return end if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,3,nil) local sg=g:Select(tp,1,3,nil)
if Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)>0 then if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)>0 then
local sg2=Duel.GetOperatedGroup() local sg2=Duel.GetOperatedGroup()
if sg2:IsExists(c9330005.tdfilter,1,nil,tp) then Duel.ShuffleDeck(tp) end if sg2:IsExists(c9330005.tdfilter,1,nil,tp) then Duel.ShuffleDeck(tp) end
if sg2:IsExists(c9330005.tdfilter,1,nil,1-tp) then Duel.ShuffleDeck(1-tp) end if sg2:IsExists(c9330005.tdfilter,1,nil,1-tp) then Duel.ShuffleDeck(1-tp) end
if sg:GetCount()==3 then Duel.Draw(tp,1,REASON_EFFECT) end local ct=sg2:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if not sg2:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then return end if not sg2:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then return end
local tc=g:GetFirst() local tc=sg:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -133,8 +101,11 @@ function c9330005.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -133,8 +101,11 @@ function c9330005.tdop(e,tp,eg,ep,ev,re,r,rp)
e3:SetLabelObject(tc) e3:SetLabelObject(tc)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
tc=g:GetNext() tc=sg:GetNext()
end end
if ct==3 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) end
end end
end end
function c9330005.distg(e,c) function c9330005.distg(e,c)
...@@ -150,7 +121,7 @@ function c9330005.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -150,7 +121,7 @@ function c9330005.disop(e,tp,eg,ep,ev,re,r,rp)
end end
function c9330005.effcon(e,tp,eg,ep,ev,re,r,rp) function c9330005.effcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_SYNCHRO+REASON_RITUAL)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return bit.band(r,REASON_SYNCHRO+REASON_RITUAL)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and e:GetHandler():GetReasonCard():IsSetCard(0xf9c) and e:GetHandler():GetReasonCard():IsSetCard(0xaf93)
end end
function c9330005.effop(e,tp,eg,ep,ev,re,r,rp) function c9330005.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
--陷阵营首领 高顺 --陷阵营首领
function c9330007.initial_effect(c) function c9330007.initial_effect(c)
aux.AddCodeList(c,9330001) aux.AddCodeList(c,9330001)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -19,18 +19,6 @@ function c9330007.initial_effect(c) ...@@ -19,18 +19,6 @@ function c9330007.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk & def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c9330007.filter1)
e3:SetValue(500)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--can not be Negate --can not be Negate
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD) e5:SetType(EFFECT_TYPE_FIELD)
...@@ -58,15 +46,12 @@ function c9330007.initial_effect(c) ...@@ -58,15 +46,12 @@ function c9330007.initial_effect(c)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c9330007.efilter(e,te) function c9330007.efilter(e,te)
return te:IsActiveType(TYPE_TRAP) and not te:GetOwner():IsSetCard(0xf9c) return te:IsActiveType(TYPE_TRAP) and not te:GetOwner():IsSetCard(0xaf93)
end
function c9330007.filter1(e,c)
return c:IsSetCard(0xf9c) and not c:IsCode(9330001)
end end
function c9330007.effectfilter(e,ct) function c9330007.effectfilter(e,ct)
local p=e:GetHandler():GetControler() local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION) local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return p==tp and te:GetHandler():IsSetCard(0xf9c) return p==tp and te:GetHandler():IsSetCard(0xaf93)
end end
function c9330007.actcon(e,tp,eg,ep,ev,re,r,rp) function c9330007.actcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLevelAbove(7) return e:GetHandler():IsLevelAbove(7)
...@@ -77,6 +62,7 @@ end ...@@ -77,6 +62,7 @@ end
function c9330007.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9330007.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(c9330007.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c9330007.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(9330007,0))
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c9330007.actop(e,tp,eg,ep,ev,re,r,rp) function c9330007.actop(e,tp,eg,ep,ev,re,r,rp)
...@@ -93,7 +79,7 @@ function c9330007.actop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,7 +79,7 @@ function c9330007.actop(e,tp,eg,ep,ev,re,r,rp)
end end
function c9330007.effcon(e,tp,eg,ep,ev,re,r,rp) function c9330007.effcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_FUSION+REASON_SYNCHRO)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return bit.band(r,REASON_FUSION+REASON_SYNCHRO)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and e:GetHandler():GetReasonCard():IsSetCard(0xf9c) and e:GetHandler():GetReasonCard():IsSetCard(0xaf93)
end end
function c9330007.effop(e,tp,eg,ep,ev,re,r,rp) function c9330007.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -16,7 +16,8 @@ function c9330008.initial_effect(c) ...@@ -16,7 +16,8 @@ function c9330008.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_SZONE,0) e2:SetTargetRange(LOCATION_SZONE,0)
e2:SetCountLimit(1,9330008) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaf93))
e2:SetCountLimit(1,9331008)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--inactivatable --inactivatable
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -31,15 +32,15 @@ function c9330008.initial_effect(c) ...@@ -31,15 +32,15 @@ function c9330008.initial_effect(c)
e4:SetCode(EFFECT_UPDATE_ATTACK) e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_FZONE) e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_MZONE,0) e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xf9c)) e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaf93))
e4:SetValue(300) e4:SetValue(500)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=e4:Clone() local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE) e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c9330008.thfilter(c) function c9330008.thfilter(c)
return (c:IsSetCard(0xf9c) and c:IsType(TYPE_TRAP) or c:IsCode(9330001)) and c:IsAbleToHand() return ((c:IsSetCard(0xaf93) and c:IsType(TYPE_TRAP)) or c:IsCode(9330001)) and c:IsAbleToHand()
end end
function c9330008.activate(e,tp,eg,ep,ev,re,r,rp) function c9330008.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
...@@ -54,7 +55,7 @@ end ...@@ -54,7 +55,7 @@ end
function c9330008.effectfilter(e,ct) function c9330008.effectfilter(e,ct)
local p=e:GetHandlerPlayer() local p=e:GetHandlerPlayer()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return p==tp and te:IsActiveType(TYPE_TRAP) and te:GetHandler():IsSetCard(0xf9c) return p==tp and te:IsActiveType(TYPE_TRAP) and te:GetHandler():IsSetCard(0xaf93)
end end
......
...@@ -11,6 +11,13 @@ function c9330009.initial_effect(c) ...@@ -11,6 +11,13 @@ function c9330009.initial_effect(c)
e1:SetTarget(c9330009.target) e1:SetTarget(c9330009.target)
e1:SetOperation(c9330009.activate) e1:SetOperation(c9330009.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in set turn
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e0:SetCondition(c9330009.actcon)
c:RegisterEffect(e0)
--atklimit --atklimit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
...@@ -37,9 +44,13 @@ function c9330009.initial_effect(c) ...@@ -37,9 +44,13 @@ function c9330009.initial_effect(c)
e4:SetOperation(c9330009.setop) e4:SetOperation(c9330009.setop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c9330009.actcon(e,tp,eg,ep,ev,re,r,rp)
local k=e:GetHandler():GetControler()
return Duel.GetFieldGroupCount(k,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(k,LOCATION_ONFIELD,0)
end
function c9330009.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9330009.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,9330009,0xf9c,0x21,3000,1500,6,RACE_WARRIOR,ATTRIBUTE_DARK) end Duel.IsPlayerCanSpecialSummonMonster(tp,9330009,0xaf93,0x21,3000,1500,6,RACE_WARRIOR,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c9330009.filter(c) function c9330009.filter(c)
...@@ -55,7 +66,7 @@ function c9330009.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +66,7 @@ function c9330009.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,9330009,0xf9c,0x21,3000,1500,6,RACE_WARRIOR,ATTRIBUTE_DARK) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,9330009,0xaf93,0x21,3000,1500,6,RACE_WARRIOR,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
if Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)~=0 if Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(c9330009.filter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c9330009.filter,tp,LOCATION_ONFIELD,0,1,nil)
...@@ -90,7 +101,7 @@ function c9330009.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -90,7 +101,7 @@ function c9330009.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end end
function c9330009.setfilter(c) function c9330009.setfilter(c)
if not (c:IsSetCard(0xf9c) and c:IsType(TYPE_TRAP+TYPE_SPELL) and not c:IsCode(9330009)) then return false end if not (c:IsSetCard(0xaf93) and c:IsType(TYPE_TRAP+TYPE_SPELL) and not c:IsCode(9330009)) then return false end
return c:IsAbleToHand() or c:IsSSetable() return c:IsAbleToHand() or c:IsSSetable()
end end
function c9330009.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c9330009.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
--白马义从·轻骑兵 --陷阵营防
function c9330010.initial_effect(c) function c9330010.initial_effect(c)
aux.AddCodeList(c,9330001) aux.AddCodeList(c,9330001)
--Activate --Activate
...@@ -10,6 +10,13 @@ function c9330010.initial_effect(c) ...@@ -10,6 +10,13 @@ function c9330010.initial_effect(c)
e1:SetTarget(c9330010.target) e1:SetTarget(c9330010.target)
e1:SetOperation(c9330010.activate) e1:SetOperation(c9330010.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in set turn
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e0:SetCondition(c9330010.actcon)
c:RegisterEffect(e0)
--can't be target --can't be target
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
...@@ -41,9 +48,13 @@ function c9330010.initial_effect(c) ...@@ -41,9 +48,13 @@ function c9330010.initial_effect(c)
e4:SetOperation(c9330010.setop) e4:SetOperation(c9330010.setop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c9330010.actcon(e,tp,eg,ep,ev,re,r,rp)
local k=e:GetHandler():GetControler()
return Duel.GetFieldGroupCount(k,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(k,LOCATION_ONFIELD,0)
end
function c9330010.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9330010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,9330010,0xf9c,0x21,1000,3000,6,RACE_WARRIOR,ATTRIBUTE_EARTH) end Duel.IsPlayerCanSpecialSummonMonster(tp,9330010,0xaf93,0x21,1000,3000,6,RACE_WARRIOR,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c9330010.filter(c) function c9330010.filter(c)
...@@ -59,7 +70,7 @@ function c9330010.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +70,7 @@ function c9330010.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,9330010,0xf9c,0x21,1000,3000,6,RACE_WARRIOR,ATTRIBUTE_EARTH) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,9330010,0xaf93,0x21,1000,3000,6,RACE_WARRIOR,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
if Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP_DEFENSE)~=0 if Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(c9330010.filter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c9330010.filter,tp,LOCATION_ONFIELD,0,1,nil)
...@@ -79,14 +90,14 @@ function c9330010.condition(e) ...@@ -79,14 +90,14 @@ function c9330010.condition(e)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end end
function c9330010.etarget(e,c) function c9330010.etarget(e,c)
return c:IsFaceup() and c:IsSetCard(0xf9c) and not c:IsCode(9330010) return c:IsFaceup() and c:IsSetCard(0xaf93) and not c:IsCode(9330010)
end end
function c9330010.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c9330010.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end end
function c9330010.setfilter(c) function c9330010.setfilter(c)
if not (c:IsSetCard(0xf9c) and c:IsType(TYPE_TRAP+TYPE_SPELL) and not c:IsCode(9330010)) then return false end if not (c:IsSetCard(0xaf93) and c:IsType(TYPE_TRAP+TYPE_SPELL) and not c:IsCode(9330010)) then return false end
return c:IsAbleToHand() or c:IsSSetable() return c:IsAbleToHand() or c:IsSSetable()
end end
function c9330010.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c9330010.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
--白马义从·轻骑兵 --陷阵营救
function c9330011.initial_effect(c) function c9330011.initial_effect(c)
aux.AddCodeList(c,9330001) aux.AddCodeList(c,9330001)
--Activate --Activate
...@@ -43,7 +43,7 @@ function c9330011.initial_effect(c) ...@@ -43,7 +43,7 @@ function c9330011.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c9330011.target(e,c) function c9330011.target(e,c)
return c:IsSetCard(0xf9c) and not c:IsCode(9330011) return c:IsSetCard(0xaf93) and not c:IsCode(9330011)
end end
function c9330011.indct(e,re,r,rp) function c9330011.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
...@@ -54,7 +54,7 @@ function c9330011.filter(c) ...@@ -54,7 +54,7 @@ function c9330011.filter(c)
return c:IsCode(9330001) and c:IsFaceup() return c:IsCode(9330001) and c:IsFaceup()
end end
function c9330011.spfilter(c,e,tp,check,tid) function c9330011.spfilter(c,e,tp,check,tid)
return c:IsSetCard(0xf9c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetTurnID()==tid return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetTurnID()==tid and c:IsSetCard(0xaf93)
and (check or c:IsCode(9330001)) and (check or c:IsCode(9330001))
end end
function c9330011.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c9330011.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -63,6 +63,7 @@ function c9330011.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,6 +63,7 @@ function c9330011.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9330011.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,chk1,Duel.GetTurnCount()) and Duel.IsExistingMatchingCard(c9330011.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,chk1,Duel.GetTurnCount())
end end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(9330011,0))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function c9330011.spop1(e,tp,eg,ep,ev,re,r,rp) function c9330011.spop1(e,tp,eg,ep,ev,re,r,rp)
...@@ -75,12 +76,13 @@ function c9330011.spop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,12 +76,13 @@ function c9330011.spop1(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c9330011.tdfilter(c) function c9330011.tdfilter(c)
return c:IsSetCard(0xf9c) and c:IsAbleToDeck() return c:IsSetCard(0xaf93) and c:IsAbleToDeck()
end end
function c9330011.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9330011.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9330011.tdfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9330011.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c9330011.tdfilter,tp,LOCATION_GRAVE,0,3,nil) end and Duel.IsExistingTarget(c9330011.tdfilter,tp,LOCATION_GRAVE,0,3,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(9330011,1))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c9330011.tdfilter,tp,LOCATION_GRAVE,0,3,3,nil) local g=Duel.SelectTarget(tp,c9330011.tdfilter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
......
--黒魔術のカーテン --陷阵营·奔袭!
function c9330012.initial_effect(c) function c9330012.initial_effect(c)
aux.AddCodeList(c,9330001) aux.AddCodeList(c,9330001)
--Activate --Activate
...@@ -33,7 +33,7 @@ function c9330012.initial_effect(c) ...@@ -33,7 +33,7 @@ function c9330012.initial_effect(c)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(aux.exccon) e4:SetCondition(aux.exccon)
e4:SetCountLimit(1,9330112+EFFECT_COUNT_CODE_DUEL) e4:SetCountLimit(1,9331012+EFFECT_COUNT_CODE_DUEL)
e4:SetCost(c9330012.thcost) e4:SetCost(c9330012.thcost)
e4:SetTarget(c9330012.settg) e4:SetTarget(c9330012.settg)
e4:SetOperation(c9330012.setop) e4:SetOperation(c9330012.setop)
...@@ -46,6 +46,7 @@ function c9330012.target1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -46,6 +46,7 @@ function c9330012.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9330012.filter1,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c9330012.filter1,tp,LOCATION_DECK,0,1,nil,e,tp)
end end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(9330012,0))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c9330012.activate1(e,tp,eg,ep,ev,re,r,rp) function c9330012.activate1(e,tp,eg,ep,ev,re,r,rp)
...@@ -68,7 +69,7 @@ function c9330012.splimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -68,7 +69,7 @@ function c9330012.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (se:IsActiveType(TYPE_TRAP) or c:IsLocation(LOCATION_EXTRA)) return not (se:IsActiveType(TYPE_TRAP) or c:IsLocation(LOCATION_EXTRA))
end end
function c9330012.filter(c,e,tp) function c9330012.filter(c,e,tp)
return c:IsSetCard(0xf9c) return c:IsSetCard(0xaf93)
end end
function c9330012.mfilter(c) function c9330012.mfilter(c)
return c:GetLevel()>0 and c:IsRace(RACE_WARRIOR) and c:IsAbleToDeck() return c:GetLevel()>0 and c:IsRace(RACE_WARRIOR) and c:IsAbleToDeck()
...@@ -79,6 +80,7 @@ function c9330012.target2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -79,6 +80,7 @@ function c9330012.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local mg2=Duel.GetMatchingGroup(c9330012.mfilter,tp,LOCATION_GRAVE,0,nil) local mg2=Duel.GetMatchingGroup(c9330012.mfilter,tp,LOCATION_GRAVE,0,nil)
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_DECK,0,1,nil,c9330012.filter,e,tp,mg1,mg2,Card.GetLevel,"Equal") return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_DECK,0,1,nil,c9330012.filter,e,tp,mg1,mg2,Card.GetLevel,"Equal")
end end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(9330012,1))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_GRAVE)
end end
...@@ -131,7 +133,7 @@ function c9330012.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -131,7 +133,7 @@ function c9330012.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end end
function c9330012.setfilter(c) function c9330012.setfilter(c)
if not (c:IsSetCard(0xf9c) and c:IsType(TYPE_TRAP) and not c:IsCode(9330012)) then return false end if not (c:IsSetCard(0xaf93) and c:IsType(TYPE_TRAP) and not c:IsCode(9330012)) then return false end
return c:IsAbleToHand() or c:IsSSetable() return c:IsAbleToHand() or c:IsSSetable()
end end
function c9330012.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c9330012.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -22,7 +22,7 @@ function c9330013.initial_effect(c) ...@@ -22,7 +22,7 @@ function c9330013.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(aux.exccon) e3:SetCondition(aux.exccon)
e3:SetCountLimit(1,9330113+EFFECT_COUNT_CODE_DUEL) e3:SetCountLimit(1,9331013+EFFECT_COUNT_CODE_DUEL)
e3:SetCost(c9330013.thcost) e3:SetCost(c9330013.thcost)
e3:SetTarget(c9330013.settg) e3:SetTarget(c9330013.settg)
e3:SetOperation(c9330013.setop) e3:SetOperation(c9330013.setop)
...@@ -35,7 +35,7 @@ function c9330013.handcon(e) ...@@ -35,7 +35,7 @@ function c9330013.handcon(e)
return Duel.IsExistingMatchingCard(c9330013.filter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(c9330013.filter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end end
function c9330013.cfilter(c) function c9330013.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf9c) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsSetCard(0xaf93) and c:IsType(TYPE_MONSTER)
end end
function c9330013.discon(e,tp,eg,ep,ev,re,r,rp) function c9330013.discon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainDisablable(ev) then return false end if not Duel.IsChainDisablable(ev) then return false end
...@@ -80,7 +80,7 @@ function c9330013.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -80,7 +80,7 @@ function c9330013.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end end
function c9330013.setfilter(c) function c9330013.setfilter(c)
if not (c:IsSetCard(0xf9c) and c:IsType(TYPE_TRAP) and not c:IsCode(9330013)) then return false end if not (c:IsSetCard(0xaf93) and c:IsType(TYPE_TRAP) and not c:IsCode(9330013)) then return false end
return c:IsAbleToHand() or c:IsSSetable() return c:IsAbleToHand() or c:IsSSetable()
end end
function c9330013.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c9330013.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -11,7 +11,6 @@ function c9330014.initial_effect(c) ...@@ -11,7 +11,6 @@ function c9330014.initial_effect(c)
e2:SetCategory(CATEGORY_NEGATE) e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCountLimit(1,9330014+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c9330014.condition) e2:SetCondition(c9330014.condition)
e2:SetTarget(c9330014.target) e2:SetTarget(c9330014.target)
e2:SetOperation(c9330014.activate) e2:SetOperation(c9330014.activate)
...@@ -22,7 +21,7 @@ function c9330014.initial_effect(c) ...@@ -22,7 +21,7 @@ function c9330014.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(aux.exccon) e3:SetCondition(aux.exccon)
e3:SetCountLimit(1,9330114+EFFECT_COUNT_CODE_DUEL) e3:SetCountLimit(1,9330014+EFFECT_COUNT_CODE_DUEL)
e3:SetCost(c9330014.thcost) e3:SetCost(c9330014.thcost)
e3:SetTarget(c9330014.settg) e3:SetTarget(c9330014.settg)
e3:SetOperation(c9330014.setop) e3:SetOperation(c9330014.setop)
...@@ -34,16 +33,24 @@ end ...@@ -34,16 +33,24 @@ end
function c9330014.handcon(e) function c9330014.handcon(e)
return Duel.IsExistingMatchingCard(c9330014.filter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(c9330014.filter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end end
function c9330014.filter2(c)
return c:IsFaceup() and c:IsType(TYPE_TRAP) and c:IsSetCard(0xaf93)
end
function c9330014.condition(e,tp,eg,ep,ev,re,r,rp) function c9330014.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp and
(Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>1
or Duel.IsExistingMatchingCard(c9330014.filter2,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil))
end end
function c9330014.filter1(c) function c9330014.filter1(c)
return c:IsAttackPos() return c:IsAttackPos()
end end
function c9330014.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9330014.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c9330014.filter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c9330014.filter1,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c9330014.filter1,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c9330014.filter1,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,g,g:GetCount(),0,0)
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) then
and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c9330014.chlimit) Duel.SetChainLimit(c9330014.chlimit)
end end
function c9330014.chlimit(e,ep,tp) function c9330014.chlimit(e,ep,tp)
...@@ -90,26 +97,19 @@ function c9330014.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,26 +97,19 @@ function c9330014.activate(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e8) tc:RegisterEffect(e8)
tc=g:GetNext() tc=g:GetNext()
end end
local e9=Effect.CreateEffect(e:GetHandler())
e9:SetType(EFFECT_TYPE_FIELD)
e9:SetCode(EFFECT_EXTRA_RELEASE_SUM)
e9:SetTargetRange(0,LOCATION_MZONE)
e9:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e9:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e9,tp)
end end
end end
end end
function c9330014.synlimit(e,c) function c9330014.synlimit(e,c)
if not c then return false end if not c then return false end
return not c:IsSetCard(0xf9c) return not c:IsSetCard(0xaf93)
end end
function c9330014.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c9330014.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end end
function c9330014.setfilter(c) function c9330014.setfilter(c)
if not (c:IsSetCard(0xf9c) and c:IsType(TYPE_TRAP) and not c:IsCode(9330014)) then return false end if not (c:IsSetCard(0xaf93) and c:IsType(TYPE_TRAP) and not c:IsCode(9330014)) then return false end
return c:IsAbleToHand() or c:IsSSetable() return c:IsAbleToHand() or c:IsSSetable()
end end
function c9330014.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c9330014.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -13,8 +13,8 @@ function c9330015.initial_effect(c) ...@@ -13,8 +13,8 @@ function c9330015.initial_effect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,9330015+EFFECT_COUNT_CODE_OATH) e2:SetCountLimit(1,9330015+EFFECT_COUNT_CODE_OATH)
e2:SetCost(c9330015.cost)
e2:SetCondition(c9330015.condition) e2:SetCondition(c9330015.condition)
e2:SetTarget(c9330015.target)
e2:SetOperation(c9330015.activate) e2:SetOperation(c9330015.activate)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--set/to hand --set/to hand
...@@ -33,95 +33,103 @@ function c9330015.filter(c) ...@@ -33,95 +33,103 @@ function c9330015.filter(c)
return c:IsFaceup() and c:IsCode(9330001) return c:IsFaceup() and c:IsCode(9330001)
end end
function c9330015.handcon(e) function c9330015.handcon(e)
return Duel.IsExistingMatchingCard(c9330015.filter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0
end or Duel.IsExistingMatchingCard(c9330015.filter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
function c9330015.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_MUST_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end end
function c9330015.condition(e,tp,eg,ep,ev,re,r,rp) function c9330015.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
end end
function c9330015.filter2(c) function c9330015.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xf9c) return c:IsCode(9330001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c9330015.posfilter(c) function c9330015.target(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsDefensePos() or c:IsFacedown() if chk==0 then return true end
if Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==1 then
e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
else
e:SetProperty(0)
end
end end
function c9330015.activate(e,tp,eg,ep,ev,re,r,rp) function c9330015.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local sg=Duel.GetMatchingGroup(c9330015.posfilter,tp,LOCATION_MZONE,0,nil) local p=e:GetHandler():GetControler()
if sg:GetCount()>0 then local t=Duel.GetFieldGroupCount(p,0,LOCATION_ONFIELD)
Duel.ChangePosition(sg,POS_FACEUP_ATTACK) local s=Duel.GetFieldGroupCount(p,LOCATION_ONFIELD,0)
local tc=sg:GetFirst() local ct=t-s
while tc do
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e0:SetCode(EFFECT_MUST_ATTACK)
e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e0:SetTargetRange(LOCATION_MZONE,0)
tc:RegisterEffect(e0) e0:SetReset(RESET_PHASE+PHASE_END)
tc:RegisterFlagEffect(31245780,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) Duel.RegisterEffect(e0,tp)
tc=sg:GetNext() if ct>=1 then
end
end
--atk & def
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xf9c)) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaf93))
e1:SetValue(1800) e1:SetValue(1500)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
--level end
if ct>=4 then
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_LEVEL) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTarget(c9330015.distg) e2:SetTargetRange(0,1)
e2:SetValue(12) e2:SetValue(c9330015.aclimit)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
--can not xyz end
if ct>=5 then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaf93))
e3:SetTargetRange(1,1) e3:SetValue(1)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetTarget(c9330015.splimit)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
Duel.BreakEffect() local e4=e3:Clone()
if Duel.IsExistingMatchingCard(c9330015.filter2,tp,LOCATION_MZONE,0,1,nil) and e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
Duel.SelectYesNo(tp,aux.Stringid(9330015,0)) then Duel.RegisterEffect(e4,tp)
local xyzg=Duel.GetMatchingGroup(c9330015.filter2,tp,LOCATION_MZONE,0,nil,g)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
c:CancelToGrave()
Duel.Overlay(xyz,c)
end end
if ct>=6 then
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e5:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e5:SetTargetRange(LOCATION_SZONE,0)
e5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaf93))
e5:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e5,tp)
end
if ct>=7 then
local e6=Effect.CreateEffect(e:GetHandler())
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_IMMUNE_EFFECT)
e6:SetTargetRange(LOCATION_ONFIELD,0)
e6:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaf93))
e6:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e6,tp)
end
local g=Duel.SelectMatchingCard(tp,c9330015.filter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if ct>=3 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c9330015.distg(e,c) function c9330015.aclimit(e,re,tp)
return not c:IsOriginalCodeRule(9330001) local c=re:GetHandler()
end return re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
function c9330015.splimit(e,c,tp,sumtp,sumpos)
return bit.band(sumtp,SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ
end end
function c9330015.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c9330015.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end end
function c9330015.setfilter(c) function c9330015.setfilter(c)
if not (c:IsSetCard(0xf9c) and c:IsType(TYPE_TRAP) and not c:IsCode(9330015)) then return false end if not (c:IsSetCard(0xaf93) and c:IsType(TYPE_TRAP) and not c:IsCode(9330015)) then return false end
return c:IsAbleToHand() or c:IsSSetable() return c:IsAbleToHand() or c:IsSSetable()
end end
function c9330015.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c9330015.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -11,6 +11,13 @@ function c9330016.initial_effect(c) ...@@ -11,6 +11,13 @@ function c9330016.initial_effect(c)
e1:SetTarget(c9330016.target) e1:SetTarget(c9330016.target)
e1:SetOperation(c9330016.activate) e1:SetOperation(c9330016.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in set turn
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e0:SetCondition(c9330016.actcon)
c:RegisterEffect(e0)
--atk & def --atk & def
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
...@@ -18,7 +25,7 @@ function c9330016.initial_effect(c) ...@@ -18,7 +25,7 @@ function c9330016.initial_effect(c)
e2:SetRange(LOCATION_ONFIELD) e2:SetRange(LOCATION_ONFIELD)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c9330016.condition1) e2:SetCondition(c9330016.condition1)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xf9c)) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaf93))
e2:SetValue(1000) e2:SetValue(1000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -34,8 +41,11 @@ function c9330016.initial_effect(c) ...@@ -34,8 +41,11 @@ function c9330016.initial_effect(c)
e4:SetValue(c9330016.aclimit) e4:SetValue(c9330016.aclimit)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--cannot remove --cannot remove
local e5=e4:Clone() local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_REMOVE) e5:SetCode(EFFECT_CANNOT_REMOVE)
e5:SetRange(LOCATION_ONFIELD)
e5:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
e5:SetValue(c9330016.aclimit2) e5:SetValue(c9330016.aclimit2)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--set/to hand --set/to hand
...@@ -50,9 +60,13 @@ function c9330016.initial_effect(c) ...@@ -50,9 +60,13 @@ function c9330016.initial_effect(c)
e6:SetOperation(c9330016.setop) e6:SetOperation(c9330016.setop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
function c9330016.actcon(e,tp,eg,ep,ev,re,r,rp)
local k=e:GetHandler():GetControler()
return Duel.GetFieldGroupCount(k,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(k,LOCATION_ONFIELD,0)
end
function c9330016.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9330016.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,9330016,0xf9c,0x21,2400,1000,6,RACE_WARRIOR,ATTRIBUTE_LIGHT) end Duel.IsPlayerCanSpecialSummonMonster(tp,9330016,0xaf93,0x21,2400,1000,6,RACE_WARRIOR,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c9330016.filter(c) function c9330016.filter(c)
...@@ -62,13 +76,13 @@ function c9330016.mfilter(c,e) ...@@ -62,13 +76,13 @@ function c9330016.mfilter(c,e)
return c:IsFaceup() and c:GetLevel()>0 and not c:IsImmuneToEffect(e) and c:IsReleasable() return c:IsFaceup() and c:GetLevel()>0 and not c:IsImmuneToEffect(e) and c:IsReleasable()
end end
function c9330016.filter1(c,e,tp) function c9330016.filter1(c,e,tp)
return c:IsSetCard(0xf9c) return c:IsSetCard(0xaf93)
end end
function c9330016.activate(e,tp,eg,ep,ev,re,r,rp) function c9330016.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,9330016,0xf9c,0x21,2400,1000,6,RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,9330016,0xaf93,0x21,2400,1000,6,RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
if Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
...@@ -111,7 +125,7 @@ function c9330016.condition2(e) ...@@ -111,7 +125,7 @@ function c9330016.condition2(e)
return ph==PHASE_STANDBY or ph==PHASE_MAIN1 return ph==PHASE_STANDBY or ph==PHASE_MAIN1
end end
function c9330016.etarget(e,c) function c9330016.etarget(e,c)
return c:IsFaceup() and c:IsSetCard(0xf9c) and not c:IsCode(9330016) return c:IsFaceup() and c:IsSetCard(0xaf93) and not c:IsCode(9330016)
end end
function c9330016.aclimit(e,re,tp) function c9330016.aclimit(e,re,tp)
local loc=re:GetActivateLocation() local loc=re:GetActivateLocation()
...@@ -125,7 +139,7 @@ function c9330016.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -125,7 +139,7 @@ function c9330016.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end end
function c9330016.setfilter(c) function c9330016.setfilter(c)
if not (c:IsSetCard(0xf9c) and c:IsType(TYPE_TRAP+TYPE_SPELL) and not c:IsCode(9330016)) then return false end if not (c:IsSetCard(0xaf93) and c:IsType(TYPE_TRAP+TYPE_SPELL) and not c:IsCode(9330016)) then return false end
return c:IsAbleToHand() or c:IsSSetable() return c:IsAbleToHand() or c:IsSSetable()
end end
function c9330016.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c9330016.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
--与陷阵营的交锋 --与陷阵营的交锋
function c9330017.initial_effect(c) function c9330017.initial_effect(c)
aux.AddCodeList(c,9330001) aux.AddCodeList(c,9330001)
--act in set turn
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e0:SetCondition(c9330017.actcon)
c:RegisterEffect(e0)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -37,15 +44,19 @@ function c9330017.initial_effect(c) ...@@ -37,15 +44,19 @@ function c9330017.initial_effect(c)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(aux.exccon) e4:SetCondition(aux.exccon)
e4:SetCountLimit(1,9330117+EFFECT_COUNT_CODE_DUEL) e4:SetCountLimit(1,9331017+EFFECT_COUNT_CODE_DUEL)
e4:SetCost(c9330017.thcost) e4:SetCost(c9330017.thcost)
e4:SetTarget(c9330017.settg) e4:SetTarget(c9330017.settg)
e4:SetOperation(c9330017.setop) e4:SetOperation(c9330017.setop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c9330017.actcon(e,tp,eg,ep,ev,re,r,rp)
local k=e:GetHandler():GetControler()
return Duel.GetFieldGroupCount(k,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(k,LOCATION_ONFIELD,0)
end
function c9330017.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9330017.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,9330017,0xf9c,0x21,2200,600,6,RACE_WARRIOR,ATTRIBUTE_WATER) end Duel.IsPlayerCanSpecialSummonMonster(tp,9330017,0xaf93,0x21,2200,600,6,RACE_WARRIOR,ATTRIBUTE_WATER) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c9330017.filter(c) function c9330017.filter(c)
...@@ -65,14 +76,14 @@ function c9330017.filter3(c,e) ...@@ -65,14 +76,14 @@ function c9330017.filter3(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e) return c:IsOnField() and not c:IsImmuneToEffect(e)
end end
function c9330017.fcheck(tp,sg,fc) function c9330017.fcheck(tp,sg,fc)
return sg:IsExists(Card.IsFusionSetCard,1,nil,0xf9c) return sg:IsExists(Card.IsFusionSetCard,1,nil,0xaf93)
end end
function c9330017.activate(e,tp,eg,ep,ev,re,r,rp) function c9330017.activate(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,9330017,0xf9c,0x21,2200,600,6,RACE_WARRIOR,ATTRIBUTE_WATER) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,9330017,0xaf93,0x21,2200,600,6,RACE_WARRIOR,ATTRIBUTE_WATER) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
if Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP_ATTACK)~=0 if Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP_ATTACK)~=0
and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
...@@ -120,7 +131,7 @@ function c9330017.condition(e) ...@@ -120,7 +131,7 @@ function c9330017.condition(e)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end end
function c9330017.etarget(e,c) function c9330017.etarget(e,c)
return c:IsFaceup() and c:IsSetCard(0xf9c) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsSetCard(0xaf93) and c:IsType(TYPE_MONSTER)
end end
function c9330017.imfilter(e,re,rp) function c9330017.imfilter(e,re,rp)
return re:IsActiveType(TYPE_MONSTER) and e:GetOwnerPlayer()~=re:GetOwnerPlayer() return re:IsActiveType(TYPE_MONSTER) and e:GetOwnerPlayer()~=re:GetOwnerPlayer()
...@@ -133,14 +144,14 @@ function c9330017.attg(e,c) ...@@ -133,14 +144,14 @@ function c9330017.attg(e,c)
end end
function c9330017.atlimit(e,c) function c9330017.atlimit(e,c)
local lc=e:GetLabelObject() local lc=e:GetLabelObject()
return c:IsFaceup() and c:IsSetCard(0xf9c) and not lc:GetColumnGroup():IsContains(c) return c:IsFaceup() and c:IsSetCard(0xaf93) and not lc:GetColumnGroup():IsContains(c)
end end
function c9330017.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c9330017.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end end
function c9330017.setfilter(c) function c9330017.setfilter(c)
if not (c:IsSetCard(0xf9c) and c:IsType(TYPE_TRAP+TYPE_SPELL) and not c:IsCode(9330017)) then return false end if not (c:IsSetCard(0xaf93) and c:IsType(TYPE_TRAP+TYPE_SPELL) and not c:IsCode(9330017)) then return false end
return c:IsAbleToHand() or c:IsSSetable() return c:IsAbleToHand() or c:IsSSetable()
end end
function c9330017.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c9330017.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
--陷阵营帐
function c9330018.initial_effect(c)
c:EnableCounterPermit(0x2c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--act in set turn
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCondition(c9330018.actcon)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaf93))
e2:SetValue(c9330018.efilter)
c:RegisterEffect(e2)
--add counter
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_TO_DECK)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c9330018.accon)
e3:SetOperation(c9330018.acop)
c:RegisterEffect(e3)
--activate field
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(9330018,0))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1,9330018)
e4:SetCondition(c9330018.accon2)
e4:SetTarget(c9330018.actg2)
e4:SetOperation(c9330018.acop2)
c:RegisterEffect(e4)
--to deck
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(9330018,1))
e5:SetCategory(CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_SZONE)
e5:SetHintTiming(0,TIMING_END_PHASE)
e5:SetCountLimit(1,9330018)
e5:SetCost(c9330018.thcost)
e5:SetTarget(c9330018.tdtg)
e5:SetOperation(c9330018.tdop)
c:RegisterEffect(e5)
end
function c9330018.actcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==1
end
function c9330018.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_FIELD)
end
function c9330018.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsSetCard(0xaf93)
end
function c9330018.accon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9330018.cfilter,1,nil,tp)
end
function c9330018.acop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c9330018.cfilter,1,nil) then
e:GetHandler():AddCounter(0x2c,1)
end
end
function c9330018.accon2(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c9330018.filter(c,tp)
return c:IsSetCard(0xaf93) and c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c9330018.thfilter(c,tp)
return c:IsSetCard(0xaf93) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c9330018.actg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(c9330018.filter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,tp)
or Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c9330018.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(9330018,0))
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c9330018.acop2(e,tp,eg,ep,ev,re,r,rp)
b=Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,0,1,nil)
if b and Duel.IsExistingMatchingCard(c9330018.thfilter,tp,LOCATION_DECK,0,1,nil,tp) and (not Duel.IsExistingMatchingCard(c9330018.filter,tp,LOCATION_DECK,0,1,nil) or Duel.SelectYesNo(tp,aux.Stringid(9330018,2))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9330018.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9330018.filter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c9330018.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x2c,2,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x2c,2,REASON_COST)
end
function c9330018.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(9330018,1))
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c9330018.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
...@@ -41,28 +41,22 @@ end ...@@ -41,28 +41,22 @@ end
function c9910001.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9910001.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c9910001.desfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c9910001.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9910001.desfilter,tp,LOCATION_SZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c9910001.desfilter,tp,LOCATION_SZONE,0,1,nil) end
local ct=1
if Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) then ct=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c9910001.desfilter,tp,LOCATION_SZONE,0,1,ct,nil) local g=Duel.SelectTarget(tp,c9910001.desfilter,tp,LOCATION_SZONE,0,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c9910001.desop(e,tp,eg,ep,ev,re,r,rp) function c9910001.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.Destroy(g,REASON_EFFECT)~=2 then return end if Duel.Destroy(g,REASON_EFFECT)~=2 then return end
local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g2:GetFirst()
while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(tc:GetAttack()*2) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3950))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetValue(1000)
tc:RegisterEffect(e1) e1:SetReset(RESET_PHASE+PHASE_END)
tc=g2:GetNext() Duel.RegisterEffect(e1,tp)
end
end end
function c9910001.spfilter(c,ft) function c9910001.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0x3950) and c:IsType(TYPE_PENDULUM) and not c:IsCode(9910001) return c:IsFaceup() and c:IsSetCard(0x3950) and c:IsType(TYPE_PENDULUM) and not c:IsCode(9910001)
......
...@@ -16,11 +16,8 @@ function c9910024.initial_effect(c) ...@@ -16,11 +16,8 @@ function c9910024.initial_effect(c)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c9910024.confilter(c)
return c:IsFaceup() and c:IsSetCard(0x3950)
end
function c9910024.condition(e,tp,eg,ep,ev,re,r,rp) function c9910024.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9910024.confilter,tp,LOCATION_PZONE,0,1,nil) return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,nil,0x3950)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end end
function c9910024.cosfilter(c) function c9910024.cosfilter(c)
......
...@@ -20,7 +20,7 @@ function c9910052.initial_effect(c) ...@@ -20,7 +20,7 @@ function c9910052.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c9910052.thfilter(c) function c9910052.thfilter(c)
return c:IsAttack(0) and c:IsDefense(1000) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() return c:IsSetCard(0x9951) and c:IsType(TYPE_TUNER) and c:IsAbleToHand()
end end
function c9910052.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c9910052.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910052.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c9910052.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
--樱公馆 --星辉之星蝶
function c9910065.initial_effect(c) function c9910065.initial_effect(c)
c:SetUniqueOnField(1,0,9910239)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c9910065.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to deck --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910065,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCategory(CATEGORY_TODECK) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,9910065) e2:SetCondition(c9910065.descon1)
e2:SetCondition(c9910065.tdcon1) e2:SetOperation(c9910065.desop1)
e2:SetCost(c9910065.tdcost)
e2:SetTarget(c9910065.tdtg)
e2:SetOperation(c9910065.tdop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(c9910065.tdcon2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e4)
local e5=e2:Clone()
e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetCondition(c9910065.descon2)
e5:SetOperation(c9910065.desop2)
c:RegisterEffect(e5)
--destroy replace
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_DESTROY_REPLACE)
e6:SetRange(LOCATION_SZONE)
e6:SetTarget(c9910065.desreptg)
e6:SetValue(c9910065.desrepval)
e6:SetOperation(c9910065.desrepop)
c:RegisterEffect(e6)
end end
function c9910065.filter(c) function c9910065.descon1(e,tp,eg,ep,ev,re,r,rp)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck() return eg:GetCount()==1
end end
function c9910065.activate(e,tp,eg,ep,ev,re,r,rp) function c9910065.desfilter(c,tc)
if not e:GetHandler():IsRelateToEffect(e) then return end local seq=tc:GetSequence()
local g=Duel.GetMatchingGroup(c9910065.filter,tp,0,LOCATION_ONFIELD,nil) local loc=tc:GetLocation()
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910065,0)) then local cseq=c:GetSequence()
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) local cloc=c:GetLocation()
local lg=tc:GetColumnGroup()
local mg=Duel.GetFieldGroup(tc:GetControler(),LOCATION_MZONE,0)
local sg=Duel.GetFieldGroup(tc:GetControler(),LOCATION_SZONE,0)
if cloc==LOCATION_SZONE and cseq>=5 then return false end
if loc==LOCATION_SZONE and seq>=5 then return false end
if loc==LOCATION_MZONE and seq>=5 then return c:IsLocation(LOCATION_MZONE) and lg:IsContains(c) end
if loc==LOCATION_SZONE and seq<=4 then
return (mg:IsContains(c) and lg:IsContains(c) and cseq<=4)
or (sg:IsContains(c) and math.abs(cseq-seq)==1)
end end
if loc==LOCATION_MZONE and seq<=4 then
return (sg:IsContains(c) and lg:IsContains(c)) or (cseq>=5 and lg:IsContains(c))
or (mg:IsContains(c) and math.abs(cseq-seq)==1 and cseq<=4)
end
return false
end end
function c9910065.checkfilter(c) function c9910065.desop1(e,tp,eg,ep,ev,re,r,rp)
return c:IsFaceup() and c:IsRace(RACE_FAIRY) and c:IsType(TYPE_MONSTER) local tc=eg:GetFirst()
if not tc:IsOnField() then return end
local g=Duel.GetMatchingGroup(c9910065.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tc)
if g:GetCount()==0 then return end
Duel.Hint(HINT_CARD,0,9910065)
Duel.HintSelection(g)
local oc=Duel.Destroy(g,REASON_EFFECT)
if oc==0 or not tc:IsCanAddCounter(0x1951,oc) then return end
tc:AddCounter(0x1951,oc)
end end
function c9910065.tdcon1(e,tp,eg,ep,ev,re,r,rp) function c9910065.descon2(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c9910065.checkfilter,tp,LOCATION_REMOVED,0,1,nil) local rc=re:GetHandler()
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and rc and rc:GetSequence()<=4
end end
function c9910065.tdcon2(e,tp,eg,ep,ev,re,r,rp) function c9910065.desop2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9910065.checkfilter,tp,LOCATION_REMOVED,0,1,nil) local tc=re:GetHandler()
if not tc:IsOnField() then return end
local g=Duel.GetMatchingGroup(c9910065.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tc)
if g:GetCount()==0 then return end
Duel.Hint(HINT_CARD,0,9910065)
Duel.HintSelection(g)
local oc=Duel.Destroy(g,REASON_EFFECT)
if oc==0 or not tc:IsCanAddCounter(0x1951,oc) then return end
tc:AddCounter(0x1951,oc)
end end
function c9910065.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) function c9910065.repfilter(c,tp)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end return c:IsOnField() and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) and c:IsCanRemoveCounter(tp,0x1951,1,REASON_EFFECT)
end end
function c9910065.tdfilter(c) function c9910065.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsFaceup() and c:IsAbleToDeck() local g=eg:Filter(c9910065.repfilter,nil,tp)
if chk==0 then return g:GetCount()>0 end
e:SetLabelObject(g)
return true
end end
function c9910065.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function c9910065.desrepval(e,c)
if chk==0 then return Duel.IsExistingMatchingCard(c9910065.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,e:GetHandler()) end return c9910065.repfilter(c,e:GetHandlerPlayer())
local g=Duel.GetMatchingGroup(c9910065.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
function c9910065.tdop(e,tp,eg,ep,ev,re,r,rp) function c9910065.desrepop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_CARD,0,9910065)
local g=Duel.GetMatchingGroup(c9910065.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil) local g=e:GetLabelObject()
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) local tc=g:GetFirst()
while tc do
tc:RemoveCounter(tp,0x1951,1,REASON_EFFECT)
Duel.BreakEffect()
Duel.Draw(tc:GetControler(),1,REASON_EFFECT)
tc=g:GetNext()
end
end end
...@@ -136,16 +136,3 @@ end ...@@ -136,16 +136,3 @@ end
function Zcd.MFilter2(c,xyzc,tp) function Zcd.MFilter2(c,xyzc,tp)
return Duel.GetLocationCountFromEx(tp,tp,c,xyzc)>0 return Duel.GetLocationCountFromEx(tp,tp,c,xyzc)>0
end end
--is able to set
function Zcd.SetFilter(c,e)
if c:IsType(TYPE_TOKEN) then return false end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MONSTER_SSET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
c:RegisterEffect(e1,true)
local res=c:IsSSetable()
e1:Reset()
return res
end
...@@ -19,7 +19,6 @@ function c9910141.initial_effect(c) ...@@ -19,7 +19,6 @@ function c9910141.initial_effect(c)
--immune --immune
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910141,2)) e2:SetDescription(aux.Stringid(9910141,2))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
...@@ -34,7 +33,7 @@ function c9910141.xyzfilter(c) ...@@ -34,7 +33,7 @@ function c9910141.xyzfilter(c)
and c:IsRace(RACE_MACHINE) and c:IsRace(RACE_MACHINE)
end end
function c9910141.cfilter(c) function c9910141.cfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsAbleToRemoveAsCost() return c:IsRace(RACE_MACHINE) and c:IsAbleToRemoveAsCost()
end end
function c9910141.xmcost(e,tp,eg,ep,ev,re,r,rp,chk) function c9910141.xmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910141.cfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c9910141.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
...@@ -47,14 +46,12 @@ function c9910141.xmfilter(c,tp) ...@@ -47,14 +46,12 @@ function c9910141.xmfilter(c,tp)
end end
function c9910141.xmtarget(e,tp,eg,ep,ev,re,r,rp,chk) function c9910141.xmtarget(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(9910141)<=1 if chk==0 then returnDuel.IsExistingMatchingCard(c9910141.xmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,tp) end
and Duel.IsExistingMatchingCard(c9910141.xmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
c:RegisterFlagEffect(9910141,RESET_CHAIN,0,1)
end end
function c9910141.xmoperation(e,tp,eg,ep,ev,re,r,rp) function c9910141.xmoperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RESOLVECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c9910141.xmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c,tp) local g=Duel.SelectMatchingCard(tp,c9910141.xmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
...@@ -75,10 +72,8 @@ function c9910141.imcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -75,10 +72,8 @@ function c9910141.imcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c9910141.imtg(e,tp,eg,ep,ev,re,r,rp,chk) function c9910141.imtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then return true end
if chk==0 then return c:GetFlagEffect(9910141)<=1 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
c:RegisterFlagEffect(9910141,RESET_CHAIN,0,1)
end end
function c9910141.imop(e,tp,eg,ep,ev,re,r,rp) function c9910141.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -87,11 +82,11 @@ function c9910141.imop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,11 +82,11 @@ function c9910141.imop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c9910141.efilter) e1:SetValue(c9910141.efilter)
e1:SetLabelObject(re)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
Duel.Damage(1-tp,1000,REASON_EFFECT)
end end
end end
function c9910141.efilter(e,re) function c9910141.efilter(e,re)
return re:GetOwner()~=e:GetOwner() return re==e:GetLabelObject()
end end
--神树精灵 先代化身
function c9910352.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910352)
e1:SetCondition(c9910352.spcon)
e1:SetTarget(c9910352.sptg)
e1:SetOperation(c9910352.spop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,9910353)
e2:SetTarget(c9910352.tgtg)
e2:SetOperation(c9910352.tgop)
c:RegisterEffect(e2)
end
function c9910352.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(9910307,PLAYER_ALL,LOCATION_FZONE)
end
function c9910352.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c9910352.sumfilter(c)
return c:IsSetCard(0x956) and c:IsSummonable(true,nil)
end
function c9910352.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if Duel.IsExistingMatchingCard(c9910352.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(9910352,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c9910352.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
function c9910352.tgfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGrave()
end
function c9910352.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910352.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c9910352.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR+RACE_PLANT)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910352.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c9910352.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and tc:IsPreviousLocation(LOCATION_HAND) then
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9910352.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910352,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g2:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c9910352.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c9910352.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_PLANT)) and c:IsLocation(LOCATION_EXTRA)
end
--星极 --双影杀手-穿心者
function c9910436.initial_effect(c) function c9910436.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,nil,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--destroy replace aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
--atk
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_DESTROY_REPLACE) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE) e1:SetCondition(c9910436.atkcon)
e1:SetCountLimit(1,9910436) e1:SetOperation(c9910436.atkop)
e1:SetTarget(c9910436.desreptg)
e1:SetValue(c9910436.desrepval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--negate --damage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_NEGATE+CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,9910437) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCondition(c9910436.discon) e2:SetTargetRange(0,1)
e2:SetTarget(c9910436.distg) e2:SetCondition(c9910436.rfcon)
e2:SetOperation(c9910436.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local ng=Group.CreateGroup()
ng:KeepAlive()
e2:SetLabelObject(ng)
e1:SetLabelObject(e2)
--spsummon bgm
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_SPSUMMON_SUCCESS)
e8:SetOperation(c9910436.sumsuc)
c:RegisterEffect(e8)
end end
function c9910436.sumsuc(e,tp,eg,ep,ev,re,r,rp) function c9910436.atkcon(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SOUND,0,aux.Stringid(9910436,0)) return e:GetHandler():GetSummonType()==SUMMON_TYPE_LINK
end end
function c9910436.repfilter(c,tp) function c9910436.cfilter(c,e)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) return c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end end
function c9910436.filter(c) function c9910436.atkop(e,tp,eg,ep,ev,re,r,rp)
return c:GetFlagEffect(9910436)~=0
end
function c9910436.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetDecktopGroup(tp,2) if Duel.IsExistingMatchingCard(c9910436.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c,e)
if chk==0 then return eg:IsExists(c9910436.repfilter,1,nil,tp) and c:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(9910436,0)) then
and g:FilterCount(Card.IsAbleToRemove,nil)==2 end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_CARD,0,9910436) Duel.Hint(HINT_CARD,0,9910436)
Duel.Hint(HINT_SOUND,0,aux.Stringid(9910436,1)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.DisableShuffleCheck() local cg=Duel.SelectMatchingCard(tp,c9910436.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,63,c,e)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.SendtoGrave(cg,REASON_EFFECT)
local rg=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED) local e1=Effect.CreateEffect(c)
if rg:GetCount()>0 then e1:SetType(EFFECT_TYPE_SINGLE)
local sc=rg:GetFirst() e1:SetCode(EFFECT_UPDATE_ATTACK)
while sc do e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
sc:RegisterFlagEffect(9910436,RESET_EVENT+RESETS_STANDARD,0,0) e1:SetValue(cg:GetCount()*1500)
e:GetLabelObject():SetLabel(1) c:RegisterEffect(e1)
if c:GetFlagEffect(9910436)==0 then local e2=Effect.CreateEffect(c)
c:RegisterFlagEffect(9910436,RESET_EVENT+RESETS_STANDARD,0,0) e2:SetType(EFFECT_TYPE_FIELD)
e:GetLabelObject():GetLabelObject():Clear() e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
end e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e:GetLabelObject():GetLabelObject():AddCard(sc) e2:SetTargetRange(1,0)
sc=rg:GetNext() e2:SetValue(DOUBLE_DAMAGE)
end e2:SetReset(RESET_PHASE+PHASE_END)
end Duel.RegisterEffect(e2,tp)
return true
else return false end
end
function c9910436.desrepval(e,c)
return c9910436.repfilter(c,e:GetHandlerPlayer())
end
function c9910436.tfilter(c,tp)
return c:IsOnField() and c:IsControler(tp)
end
function c9910436.discon(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(c9910436.tfilter,1,nil,tp) and Duel.IsChainNegatable(ev)
and e:GetLabel()==1 and e:GetHandler():GetFlagEffect(9910436)
end
function c9910436.thfilter(c)
return c:GetFlagEffect(9910436)~=0 and c:IsAbleToHand()
end
function c9910436.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=e:GetLabelObject()
if chk==0 then return rg:IsExists(c9910436.thfilter,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,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
end end
function c9910436.disop(e,tp,eg,ep,ev,re,r,rp) function c9910436.rfcon(e)
local rg=e:GetLabelObject() return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=rg:FilterSelect(tp,c9910436.thfilter,1,1,nil)
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_SOUND,0,aux.Stringid(9910436,2))
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end end
--穿杨天马 --穿杨天马
function c9910440.initial_effect(c) function c9910440.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,nil,5,2) aux.AddXyzProcedure(c,nil,5,3)
c:EnableReviveLimit() c:EnableReviveLimit()
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -31,7 +31,7 @@ function c9910440.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function c9910440.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function c9910440.spfilter(c,e,tp) function c9910440.spfilter(c,e,tp)
return c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c9910440.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c9910440.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -43,7 +43,7 @@ function c9910440.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function c9910440.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9910440.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c9910440.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c9910440.discost(e,tp,eg,ep,ev,re,r,rp,chk) function c9910440.discost(e,tp,eg,ep,ev,re,r,rp,chk)
......
--夜魔 --双影杀手-布梦者
function c9910442.initial_effect(c) function c9910442.initial_effect(c)
--link summon --link summon
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -20,14 +20,17 @@ end ...@@ -20,14 +20,17 @@ end
function c9910442.discon(e,tp,eg,ep,ev,re,r,rp) function c9910442.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_LINK return e:GetHandler():GetSummonType()==SUMMON_TYPE_LINK
end end
function c9910442.cfilter(c,e)
return c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function c9910442.disop(e,tp,eg,ep,ev,re,r,rp) function c9910442.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local dg=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil) local dg=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil)
if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c) if Duel.IsExistingMatchingCard(c9910442.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c,e)
and dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910442,0)) then and dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910442,0)) then
Duel.Hint(HINT_CARD,0,9910442) Duel.Hint(HINT_CARD,0,9910442)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local cg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,dg:GetCount(),c) local cg=Duel.SelectMatchingCard(tp,c9910442.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,dg:GetCount(),c,e)
if Duel.SendtoGrave(cg,REASON_EFFECT)==0 then return end if Duel.SendtoGrave(cg,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910442,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910442,1))
local sg=dg:Select(tp,cg:GetCount(),cg:GetCount(),nil) local sg=dg:Select(tp,cg:GetCount(),cg:GetCount(),nil)
......
...@@ -88,6 +88,7 @@ function c9910457.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,6 +88,7 @@ function c9910457.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainDisablable(ev) and Duel.GetFlagEffect(tp,9910457)<e:GetLabel() return rp==1-tp and Duel.IsChainDisablable(ev) and Duel.GetFlagEffect(tp,9910457)<e:GetLabel()
end end
function c9910457.negop(e,tp,eg,ep,ev,re,r,rp) function c9910457.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON) then return end
if not Duel.SelectYesNo(tp,aux.Stringid(9910457,0)) then return end if not Duel.SelectYesNo(tp,aux.Stringid(9910457,0)) then return end
Duel.Hint(HINT_CARD,0,9910457) Duel.Hint(HINT_CARD,0,9910457)
Duel.RegisterFlagEffect(tp,9910457,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,9910457,RESET_PHASE+PHASE_END,0,1)
......
...@@ -64,6 +64,7 @@ end ...@@ -64,6 +64,7 @@ end
function c9910460.negop(e,tp,eg,ep,ev,re,r,rp) function c9910460.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re:GetHandler() local rc=re:GetHandler()
if Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON) then return end
if not rc:IsCanRemoveCounter(tp,0x1950,1,REASON_EFFECT) then return end if not rc:IsCanRemoveCounter(tp,0x1950,1,REASON_EFFECT) then return end
Duel.HintSelection(Group.FromCards(c)) Duel.HintSelection(Group.FromCards(c))
if Duel.SelectYesNo(tp,aux.Stringid(9910460,1)) then if Duel.SelectYesNo(tp,aux.Stringid(9910460,1)) then
......
...@@ -71,6 +71,7 @@ end ...@@ -71,6 +71,7 @@ end
function c9910462.negop(e,tp,eg,ep,ev,re,r,rp) function c9910462.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re:GetHandler() local rc=re:GetHandler()
if Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON) then return end
if not rc:IsCanRemoveCounter(tp,0x1950,1,REASON_EFFECT) then return end if not rc:IsCanRemoveCounter(tp,0x1950,1,REASON_EFFECT) then return end
Duel.HintSelection(Group.FromCards(c)) Duel.HintSelection(Group.FromCards(c))
if Duel.SelectYesNo(tp,aux.Stringid(9910462,1)) then if Duel.SelectYesNo(tp,aux.Stringid(9910462,1)) then
......
...@@ -28,17 +28,20 @@ end ...@@ -28,17 +28,20 @@ end
function c9910614.filter2(c,check) function c9910614.filter2(c,check)
return check and c:IsFacedown() and c:IsAbleToDeck() return check and c:IsFacedown() and c:IsAbleToDeck()
end end
function c9910614.cfilter(c,e)
return c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function c9910614.thop(e,tp,eg,ep,ev,re,r,rp) function c9910614.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local check=Duel.IsExistingMatchingCard(Card.IsSummonType,tp,0,LOCATION_MZONE,1,nil,SUMMON_TYPE_NORMAL) local check=Duel.IsExistingMatchingCard(Card.IsSummonType,tp,0,LOCATION_MZONE,1,nil,SUMMON_TYPE_NORMAL)
local g1=Duel.GetMatchingGroup(c9910614.filter1,tp,0,LOCATION_ONFIELD,nil) local g1=Duel.GetMatchingGroup(c9910614.filter1,tp,0,LOCATION_ONFIELD,nil)
local g2=Duel.GetMatchingGroup(c9910614.filter2,tp,0,LOCATION_ONFIELD,nil,check) local g2=Duel.GetMatchingGroup(c9910614.filter2,tp,0,LOCATION_ONFIELD,nil,check)
if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c) if Duel.IsExistingMatchingCard(c9910614.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c,e)
and (g1:GetCount()>0 or g2:GetCount()>0) and Duel.SelectYesNo(tp,aux.Stringid(9910614,0)) then and (g1:GetCount()>0 or g2:GetCount()>0) and Duel.SelectYesNo(tp,aux.Stringid(9910614,0)) then
Duel.Hint(HINT_CARD,0,9910614) Duel.Hint(HINT_CARD,0,9910614)
if g1:GetCount()>0 and (g2:GetCount()==0 or Duel.SelectOption(tp,1104,1105)==0) then if g1:GetCount()>0 and (g2:GetCount()==0 or Duel.SelectOption(tp,1104,1105)==0) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local cg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,g1:GetCount(),c) local cg=Duel.SelectMatchingCard(tp,c9910614.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,g1:GetCount(),c,e)
if Duel.SendtoGrave(cg,REASON_EFFECT)==0 then return end if Duel.SendtoGrave(cg,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g1:Select(tp,cg:GetCount(),cg:GetCount(),nil) local sg=g1:Select(tp,cg:GetCount(),cg:GetCount(),nil)
...@@ -46,7 +49,7 @@ function c9910614.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +49,7 @@ function c9910614.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local cg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,g2:GetCount(),c) local cg=Duel.SelectMatchingCard(tp,c9910614.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,g2:GetCount(),c,e)
if Duel.SendtoGrave(cg,REASON_EFFECT)==0 then return end if Duel.SendtoGrave(cg,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g2:Select(tp,cg:GetCount(),cg:GetCount(),nil) local sg=g2:Select(tp,cg:GetCount(),cg:GetCount(),nil)
......
...@@ -58,12 +58,21 @@ function c9910621.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,12 +58,21 @@ function c9910621.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c9910621.splimit) e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetValue(c9910621.actlimit)
e2:SetLabel(c:GetFieldID())
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end end
function c9910621.splimit(e,c) function c9910621.actlimit(e,re,rp)
return c:IsLocation(LOCATION_EXTRA) local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and e:GetLabel()~=rc:GetFieldID()
end end
function c9910621.atkcon(e,tp,eg,ep,ev,re,r,rp) function c9910621.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
......
...@@ -30,6 +30,7 @@ end ...@@ -30,6 +30,7 @@ end
function c9910624.negop(e,tp,eg,ep,ev,re,r,rp) function c9910624.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re:GetHandler() local rc=re:GetHandler()
if Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON) then return end
if not Duel.SelectYesNo(tp,aux.Stringid(9910624,0)) then return end if not Duel.SelectYesNo(tp,aux.Stringid(9910624,0)) then return end
Duel.Hint(HINT_CARD,0,9910624) Duel.Hint(HINT_CARD,0,9910624)
if Duel.NegateEffect(ev) then if Duel.NegateEffect(ev) then
......
--千恋 丛雨
function c9910850.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCost(c9910850.imcost)
e2:SetOperation(c9910850.imop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c9910850.negcon)
e3:SetTarget(c9910850.negtg)
e3:SetOperation(c9910850.negop)
c:RegisterEffect(e3)
end
function c9910850.imcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAttackPos() end
Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE)
end
function c9910850.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c9910850.efilter)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE_START then
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE_START+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE_START+RESET_SELF_TURN)
end
c:RegisterEffect(e1)
end
end
function c9910850.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c9910850.negcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLevelBelow(7) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and rp==1-tp and Duel.IsChainNegatable(ev)
end
function c9910850.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c9910850.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(3)
c:RegisterEffect(e1)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
--千恋 朝武芳乃
function c9910851.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,9910851)
e1:SetTarget(c9910851.thtg)
e1:SetOperation(c9910851.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910851,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,9910851)
e2:SetCondition(c9910851.spcon)
e2:SetTarget(c9910851.sptg)
e2:SetOperation(c9910851.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c9910851.retcon)
e3:SetCost(c9910851.retcost)
e3:SetTarget(c9910851.rettg)
e3:SetOperation(c9910851.retop)
c:RegisterEffect(e3)
end
function c9910851.thfilter(c)
return c:IsSetCard(0xa951) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c9910851.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910851.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c9910851.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910851.thfilter,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
function c9910851.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xa951) and c:IsSummonPlayer(tp)
end
function c9910851.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9910851.cfilter,1,nil,tp)
end
function c9910851.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c9910851.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetTargetRange(0xff,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,9910850))
e1:SetValue(-1)
Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c9910851.retcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c9910851.retcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function c9910851.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_ONFIELD)
end
function c9910851.retop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSendtoDeck(1-tp) then return end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,1-tp,LOCATION_ONFIELD,0,nil)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK)
local sg=g:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoDeck(sg,nil,0,REASON_RULE)
end
--千恋 常陆茉子
function c9910852.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,9910852)
e1:SetTarget(c9910852.sptg0)
e1:SetOperation(c9910852.spop0)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910852,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,9910852)
e2:SetCondition(c9910852.spcon)
e2:SetTarget(c9910852.sptg)
e2:SetOperation(c9910852.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c9910852.retcon)
e3:SetCost(c9910852.retcost)
e3:SetTarget(c9910852.rettg)
e3:SetOperation(c9910852.retop)
c:RegisterEffect(e3)
end
function c9910852.spfilter(c,e,tp)
return c:IsSetCard(0xa951) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910852.sptg0(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9910852.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c9910852.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c9910852.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c9910852.spop0(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c9910852.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xa951) and c:IsSummonPlayer(tp)
end
function c9910852.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9910852.cfilter,1,nil,tp)
end
function c9910852.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c9910852.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetTargetRange(0xff,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,9910850))
e1:SetValue(-1)
Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c9910852.retcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c9910852.retcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function c9910852.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_HAND)
end
function c9910852.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsCanBeSpecialSummoned,1-tp,LOCATION_HAND,0,nil,e,0,1-tp,false,false)
if g:GetCount()>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local tc=g:Select(1-tp,1,1,nil):GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,1-tp,1-tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3,true)
Duel.SpecialSummonComplete()
end
end
end
--千恋 蕾娜·莉希特娜瓦
function c9910853.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,9910853)
e1:SetTarget(c9910853.thtg)
e1:SetOperation(c9910853.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910853,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,9910853)
e2:SetCondition(c9910853.spcon)
e2:SetTarget(c9910853.sptg)
e2:SetOperation(c9910853.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c9910853.retcon)
e3:SetCost(c9910853.retcost)
e3:SetOperation(c9910853.retop)
c:RegisterEffect(e3)
end
function c9910853.thfilter(c)
return c:IsSetCard(0xa951) and c:IsAbleToHand()
end
function c9910853.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9910853.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9910853.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c9910853.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c9910853.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c9910853.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xa951) and c:IsSummonPlayer(tp)
end
function c9910853.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9910853.cfilter,1,nil,tp)
end
function c9910853.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c9910853.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetTargetRange(0xff,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,9910850))
e1:SetValue(-1)
Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c9910853.retcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c9910853.retcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function c9910853.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
if mg:GetCount()==0 then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,1-tp,LOCATION_EXTRA,0,nil,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local tc=g:Select(1-tp,1,1,nil):GetFirst()
if tc then
Duel.LinkSummon(1-tp,tc,mg)
end
end
end
--千恋 有地将臣
function c9910854.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,9910854)
e1:SetTarget(c9910854.thtg)
e1:SetOperation(c9910854.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910854,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,9910854)
e2:SetCondition(c9910854.spcon)
e2:SetTarget(c9910854.sptg)
e2:SetOperation(c9910854.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c9910854.retcon)
e3:SetCost(c9910854.retcost)
e3:SetOperation(c9910854.retop)
c:RegisterEffect(e3)
end
function c9910854.thfilter(c)
return c:IsSetCard(0xa951) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c9910854.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910854.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c9910854.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910854.thfilter,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
function c9910854.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xa951) and c:IsSummonPlayer(tp)
end
function c9910854.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9910854.cfilter,1,nil,tp)
end
function c9910854.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c9910854.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetTargetRange(0xff,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,9910850))
e1:SetValue(-1)
Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c9910854.retcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c9910854.retcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function c9910854.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsSSetable,1-tp,LOCATION_HAND,0,nil)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SET)
local tc=g:Select(1-tp,1,1,nil):GetFirst()
if tc and Duel.SSet(1-tp,tc,1-tp,false)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local fid=c:GetFieldID()
tc:RegisterFlagEffect(9910854,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabel(fid)
e2:SetLabelObject(tc)
e2:SetCondition(c9910854.thcon2)
e2:SetOperation(c9910854.thop2)
Duel.RegisterEffect(e2,tp)
end
end
function c9910854.thcon2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return false end
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(9910854)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c9910854.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT)
end
--千恋觅星
function c9910855.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c9910855.target)
e1:SetOperation(c9910855.activate)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_BATTLE_START)
e2:SetCondition(c9910855.sumcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c9910855.sumtg)
e2:SetOperation(c9910855.sumop)
c:RegisterEffect(e2)
end
function c9910855.cfilter1(c)
return c:IsSetCard(0xa951) and c:IsType(TYPE_MONSTER)
and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToGrave()
end
function c9910855.cfilter2(c)
return c:IsSetCard(0xa951) and c:IsSummonable(true,nil) and not c:IsPublic()
end
function c9910855.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsAbleToRemove() end
local b1=Duel.IsExistingMatchingCard(c9910855.cfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.IsPlayerCanDraw(tp,2)
local b2=Duel.IsExistingMatchingCard(c9910855.cfilter2,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
if Duel.GetTurnPlayer()==tp then
op=Duel.SelectOption(tp,aux.Stringid(9910855,0),aux.Stringid(9910855,1),aux.Stringid(9910855,2))
else
op=Duel.SelectOption(tp,aux.Stringid(9910855,0),aux.Stringid(9910855,1))
end
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(9910855,0))
else
op=Duel.SelectOption(tp,aux.Stringid(9910855,1))+1
end
e:SetLabel(op)
if op~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g1=Duel.SelectMatchingCard(tp,c9910855.cfilter2,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g1)
Duel.ShuffleHand(tp)
Duel.SetTargetCard(g1)
g1:GetFirst():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910855,3))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,2,nil)
Duel.HintSelection(g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g2,g2:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
if op==1 then
e:SetCategory(CATEGORY_REMOVE+CATEGORY_SUMMON)
else
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW+CATEGORY_REMOVE+CATEGORY_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
else
e:SetProperty(0)
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
end
function c9910855.activate(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
if op~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c9910855.cfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then
Duel.Draw(tp,2,REASON_EFFECT)
end
end
if op~=0 then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local rg=g:Filter(Card.IsOnField,nil)
local tc=g:Filter(Card.IsLocation,nil,LOCATION_HAND):GetFirst()
if rg:GetCount()>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)~=0 and tc then
Duel.Summon(tp,tc,true,nil)
end
end
if op==2 and Duel.GetTurnPlayer()==tp then
Duel.BreakEffect()
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
end
end
function c9910855.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c9910855.sumfilter(c)
return c:IsSetCard(0xa951) and c:IsSummonable(true,nil)
end
function c9910855.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910855.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c9910855.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c9910855.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
--千恋触雪
function c9910856.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c9910856.target)
e1:SetOperation(c9910856.activate)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_BATTLE_START)
e2:SetCondition(c9910856.sumcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c9910856.sumtg)
e2:SetOperation(c9910856.sumop)
c:RegisterEffect(e2)
end
function c9910856.cfilter1(c,dg)
if not c:IsSetCard(0xa951) or not c:IsAbleToGrave() or dg:GetCount()==0 then return false end
local res=true
if c:IsType(TYPE_MONSTER) then res=dg:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE)
elseif c:IsType(TYPE_SPELL) then res=dg:IsExists(Card.IsType,1,nil,TYPE_SPELL)
else res=dg:IsExists(Card.IsType,1,nil,TYPE_TRAP) end
return res
end
function c9910856.cfilter2(c)
return c:IsSetCard(0xa951) and c:IsAbleToHand()
end
function c9910856.target(e,tp,eg,ep,ev,re,r,rp,chk)
local dg=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil)
local b1=Duel.IsExistingMatchingCard(c9910856.cfilter1,tp,LOCATION_DECK,0,1,nil,dg)
local b2=Duel.IsExistingMatchingCard(c9910856.cfilter2,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
if Duel.GetTurnPlayer()==tp then
op=Duel.SelectOption(tp,aux.Stringid(9910856,0),aux.Stringid(9910856,1),aux.Stringid(9910856,2))
else
op=Duel.SelectOption(tp,aux.Stringid(9910856,0),aux.Stringid(9910856,1))
end
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(9910856,0))
else
op=Duel.SelectOption(tp,aux.Stringid(9910856,1))+1
end
e:SetLabel(op)
if op~=0 then
if op==1 then
e:SetCategory(CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
else
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DISABLE+CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,dg,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
else
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DISABLE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,dg,0,0,0)
end
end
function c9910856.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dg=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil)
local op=e:GetLabel()
if op~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c9910856.cfilter1,tp,LOCATION_DECK,0,1,1,nil,dg)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then
local sg=Group.CreateGroup()
if tc:IsType(TYPE_MONSTER) then sg=dg:Filter(Card.IsLocation,nil,LOCATION_MZONE)
elseif tc:IsType(TYPE_SPELL) then sg=dg:Filter(Card.IsType,nil,TYPE_SPELL)
else sg=dg:Filter(Card.IsType,nil,TYPE_TRAP) end
local sc=sg:GetFirst()
while sc do
Duel.NegateRelatedChain(sc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e2)
if sc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e3)
end
sc=sg:GetNext()
end
end
end
if op~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9910856.cfilter2),tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
local type1=tc:GetType()&0x7
--inactivatable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetValue(c9910856.effectfilter)
e1:SetLabel(type1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetValue(c9910856.effectfilter)
e2:SetLabel(type1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local d=math.log(type1,2)+3
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9910856,d))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e3:SetTargetRange(1,1)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
end
if op==2 and Duel.GetTurnPlayer()==tp then
Duel.BreakEffect()
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
end
end
function c9910856.effectfilter(e,ct)
local p=e:GetHandlerPlayer()
local type1=e:GetLabel()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return p==tp and te:IsActiveType(type1)
end
function c9910856.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c9910856.sumfilter(c)
return c:IsSetCard(0xa951) and c:IsSummonable(true,nil)
end
function c9910856.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910856.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c9910856.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c9910856.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
--千恋起舞
function c9910857.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--must attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_MUST_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c9910857.effcon)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_MUST_ATTACK_MONSTER)
e3:SetValue(c9910857.atklimit)
c:RegisterEffect(e3)
--remove
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(9910857,0))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,9910857)
e4:SetCondition(c9910857.rmcon)
e4:SetTarget(c9910857.rmtg)
e4:SetOperation(c9910857.rmop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
--set
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetCode(EVENT_PHASE+PHASE_END)
e6:SetRange(LOCATION_SZONE)
e6:SetCountLimit(1,9910858)
e6:SetCondition(c9910857.setcon)
e6:SetCost(c9910857.setcost)
e6:SetTarget(c9910857.settg)
e6:SetOperation(c9910857.setop)
c:RegisterEffect(e6)
end
function c9910857.effcon(e)
return Duel.IsExistingMatchingCard(Card.IsDefensePos,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c9910857.atklimit(e,c)
return c:IsDefensePos()
end
function c9910857.cfilter(c,tp)
return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(0xa951)
end
function c9910857.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9910857.cfilter,1,nil,tp)
end
function c9910857.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()~=tp and chkc:GetLocation()==LOCATION_GRAVE and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)
end
function c9910857.rmop(e,tp,eg,ep,ev,re,r,rp,chk)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c9910857.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c9910857.tdfilter(c)
return c:IsSetCard(0xa951) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
end
function c9910857.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910857.tdfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c9910857.tdfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c9910857.setfilter(c)
return c:IsSetCard(0xa951) and c:IsFaceup() and c:IsSSetable()
and (c:GetType()==TYPE_SPELL or c:GetType()==TYPE_TRAP)
end
function c9910857.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c9910857.setfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c9910857.setfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectTarget(tp,c9910857.setfilter,tp,LOCATION_REMOVED,0,1,1,nil)
end
function c9910857.setop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end
...@@ -603,6 +603,7 @@ ...@@ -603,6 +603,7 @@
!setname 0x2f99 替身箭 !setname 0x2f99 替身箭
!counter 0x1f93 猜拳指示物 !counter 0x1f93 猜拳指示物
!setname 0xf9c 陷阵营 !setname 0xf9c 陷阵营
!setname 0xaf93 陷阵营
#Alley 落 707 #Alley 落 707
!setname 0x901 沃伊 !setname 0x901 沃伊
...@@ -701,6 +702,8 @@ ...@@ -701,6 +702,8 @@
!setname 0x6311 异界兽 !setname 0x6311 异界兽
!setname 0x9311 死棱黑镜 !setname 0x9311 死棱黑镜
!setname 0x7cc 刹那芳华 !setname 0x7cc 刹那芳华
!setname 0x623 TUB
#竹子 #竹子
!setname 0x6b02 空中连接 !setname 0x6b02 空中连接
......
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