Commit ca4a59a5 authored by Nemo Ma's avatar Nemo Ma

240211 std

parent 9a7b8835
......@@ -2321,12 +2321,6 @@
#230318
189122 0
14000371 0
53750001 0
53750003 0
53750005 0
53750007 0
53750009 0
53750018 0
67200604 0
82208105 0
98920114 0
......@@ -2369,7 +2363,7 @@
60001141 0
64800147 0
72100214 0
82206104 0
82206104 1
90700000 0
29010007 1
37629203 1
......@@ -2995,7 +2989,6 @@
31400053 0
33712019 0
40009788 0
72413450 0
40008677 1
40008688 1
#220821
......@@ -5603,7 +5596,7 @@
30000236 0
30000240 0
10105674 0
11451002 0
11451002 1
13000750 0
#limit
33403513 1
......
No preview for this file type
expansions/pics/11451002.jpg

178 KB | W: | H:

expansions/pics/11451002.jpg

41.4 KB | W: | H:

expansions/pics/11451002.jpg
expansions/pics/11451002.jpg
expansions/pics/11451002.jpg
expansions/pics/11451002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451428.jpg

11 KB | W: | H:

expansions/pics/11451428.jpg

47.8 KB | W: | H:

expansions/pics/11451428.jpg
expansions/pics/11451428.jpg
expansions/pics/11451428.jpg
expansions/pics/11451428.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451460.jpg

11.2 KB | W: | H:

expansions/pics/11451460.jpg

46.7 KB | W: | H:

expansions/pics/11451460.jpg
expansions/pics/11451460.jpg
expansions/pics/11451460.jpg
expansions/pics/11451460.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451461.jpg

12.5 KB | W: | H:

expansions/pics/11451461.jpg

51.6 KB | W: | H:

expansions/pics/11451461.jpg
expansions/pics/11451461.jpg
expansions/pics/11451461.jpg
expansions/pics/11451461.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451466.jpg

11.9 KB | W: | H:

expansions/pics/11451466.jpg

51.6 KB | W: | H:

expansions/pics/11451466.jpg
expansions/pics/11451466.jpg
expansions/pics/11451466.jpg
expansions/pics/11451466.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451467.jpg

12 KB | W: | H:

expansions/pics/11451467.jpg

52.4 KB | W: | H:

expansions/pics/11451467.jpg
expansions/pics/11451467.jpg
expansions/pics/11451467.jpg
expansions/pics/11451467.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451474.jpg

11.4 KB | W: | H:

expansions/pics/11451474.jpg

49.9 KB | W: | H:

expansions/pics/11451474.jpg
expansions/pics/11451474.jpg
expansions/pics/11451474.jpg
expansions/pics/11451474.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451488.jpg

13 KB | W: | H:

expansions/pics/11451488.jpg

54.5 KB | W: | H:

expansions/pics/11451488.jpg
expansions/pics/11451488.jpg
expansions/pics/11451488.jpg
expansions/pics/11451488.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451505.jpg

10.5 KB | W: | H:

expansions/pics/11451505.jpg

45.7 KB | W: | H:

expansions/pics/11451505.jpg
expansions/pics/11451505.jpg
expansions/pics/11451505.jpg
expansions/pics/11451505.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451506.jpg

10.4 KB | W: | H:

expansions/pics/11451506.jpg

43.4 KB | W: | H:

expansions/pics/11451506.jpg
expansions/pics/11451506.jpg
expansions/pics/11451506.jpg
expansions/pics/11451506.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451507.jpg

11.6 KB | W: | H:

expansions/pics/11451507.jpg

49.1 KB | W: | H:

expansions/pics/11451507.jpg
expansions/pics/11451507.jpg
expansions/pics/11451507.jpg
expansions/pics/11451507.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451533.jpg

187 KB | W: | H:

expansions/pics/11451533.jpg

15 KB | W: | H:

expansions/pics/11451533.jpg
expansions/pics/11451533.jpg
expansions/pics/11451533.jpg
expansions/pics/11451533.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451544.jpg

131 KB | W: | H:

expansions/pics/11451544.jpg

40.4 KB | W: | H:

expansions/pics/11451544.jpg
expansions/pics/11451544.jpg
expansions/pics/11451544.jpg
expansions/pics/11451544.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451547.jpg

10.6 KB | W: | H:

expansions/pics/11451547.jpg

15.1 KB | W: | H:

expansions/pics/11451547.jpg
expansions/pics/11451547.jpg
expansions/pics/11451547.jpg
expansions/pics/11451547.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451750.jpg

120 KB | W: | H:

expansions/pics/11451750.jpg

40.1 KB | W: | H:

expansions/pics/11451750.jpg
expansions/pics/11451750.jpg
expansions/pics/11451750.jpg
expansions/pics/11451750.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009178.jpg

200 KB | W: | H:

expansions/pics/40009178.jpg

16.2 KB | W: | H:

expansions/pics/40009178.jpg
expansions/pics/40009178.jpg
expansions/pics/40009178.jpg
expansions/pics/40009178.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009181.jpg

196 KB | W: | H:

expansions/pics/40009181.jpg

15.4 KB | W: | H:

expansions/pics/40009181.jpg
expansions/pics/40009181.jpg
expansions/pics/40009181.jpg
expansions/pics/40009181.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009184.jpg

205 KB | W: | H:

expansions/pics/40009184.jpg

16 KB | W: | H:

expansions/pics/40009184.jpg
expansions/pics/40009184.jpg
expansions/pics/40009184.jpg
expansions/pics/40009184.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009187.jpg

197 KB | W: | H:

expansions/pics/40009187.jpg

15.4 KB | W: | H:

expansions/pics/40009187.jpg
expansions/pics/40009187.jpg
expansions/pics/40009187.jpg
expansions/pics/40009187.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009190.jpg

203 KB | W: | H:

expansions/pics/40009190.jpg

16.5 KB | W: | H:

expansions/pics/40009190.jpg
expansions/pics/40009190.jpg
expansions/pics/40009190.jpg
expansions/pics/40009190.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009193.jpg

207 KB | W: | H:

expansions/pics/40009193.jpg

16.1 KB | W: | H:

expansions/pics/40009193.jpg
expansions/pics/40009193.jpg
expansions/pics/40009193.jpg
expansions/pics/40009193.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009196.jpg

191 KB | W: | H:

expansions/pics/40009196.jpg

14.7 KB | W: | H:

expansions/pics/40009196.jpg
expansions/pics/40009196.jpg
expansions/pics/40009196.jpg
expansions/pics/40009196.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009199.jpg

191 KB | W: | H:

expansions/pics/40009199.jpg

15.3 KB | W: | H:

expansions/pics/40009199.jpg
expansions/pics/40009199.jpg
expansions/pics/40009199.jpg
expansions/pics/40009199.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009202.jpg

48.4 KB | W: | H:

expansions/pics/40009202.jpg

16.8 KB | W: | H:

expansions/pics/40009202.jpg
expansions/pics/40009202.jpg
expansions/pics/40009202.jpg
expansions/pics/40009202.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009205.jpg

212 KB | W: | H:

expansions/pics/40009205.jpg

17 KB | W: | H:

expansions/pics/40009205.jpg
expansions/pics/40009205.jpg
expansions/pics/40009205.jpg
expansions/pics/40009205.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009207.jpg

183 KB | W: | H:

expansions/pics/40009207.jpg

14 KB | W: | H:

expansions/pics/40009207.jpg
expansions/pics/40009207.jpg
expansions/pics/40009207.jpg
expansions/pics/40009207.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009208.jpg

209 KB | W: | H:

expansions/pics/40009208.jpg

15.9 KB | W: | H:

expansions/pics/40009208.jpg
expansions/pics/40009208.jpg
expansions/pics/40009208.jpg
expansions/pics/40009208.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -7,13 +7,28 @@ function cm.initial_effect(c)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCost(cm.cost)
c:RegisterEffect(e0)
--remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_FZONE)
e3:SetCondition(cm.recon)
e3:SetOperation(cm.reop)
c:RegisterEffect(e3)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
for tc in aux.Next(g) do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -37,17 +52,10 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e2:SetLabelObject(e)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_NEGATED)
e3:SetOperation(cm.rsop2)
e3:SetLabelObject(e)
e3:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e3,tp)
end
function cm.aclimit(e,c)
local te=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT)
return c:GetFlagEffect(m)>0 and c:GetFlagEffect(m-1)==0 and (not te or te~=e:GetLabelObject() or te:GetFieldID()~=e:GetLabelObject():GetFieldID())
return c:GetFlagEffect(m)>0 and (not te or te~=e:GetLabelObject() or te:GetFieldID()~=e:GetLabelObject():GetFieldID())
end
function cm.aclimit2(e,c)
return c:GetFlagEffect(m)>0
......@@ -55,10 +63,146 @@ end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local te=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT)
if rc:IsOnField() and (te==e:GetLabelObject() or re:IsHasType(EFFECT_TYPE_QUICK_F)) then rc:RegisterFlagEffect(m-1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) end
if rc:IsOnField() and (te==e:GetLabelObject() or re:IsHasType(EFFECT_TYPE_QUICK_F)) then
rc:ResetFlagEffect(m)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetLabel(ev)
e2:SetLabelObject(e1)
e2:SetReset(RESET_CHAIN)
e2:SetOperation(cm.resetop)
Duel.RegisterEffect(e2,tp)
end
end
function cm.rsop2(e,tp,eg,ep,ev,re,r,rp)
function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local te=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT)
if rc:IsOnField() and (te==e:GetLabelObject() or re:IsHasType(EFFECT_TYPE_QUICK_F)) then rc:ResetFlagEffect(m-1) end
if ev==e:GetLabel() then rc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1)) end
end
function cm.recon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and e:GetHandler():GetFlagEffect(1)>0
end
function cm.retfilter2(c,p,loc)
if (c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousTypeOnField()&TYPE_EQUIP>0) or c:IsPreviousLocation(LOCATION_FZONE) then return false end
return c:IsPreviousControler(p) and c:IsPreviousLocation(loc)
end
function cm.rffilter(c)
return c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local tc=g:Select(1-tp,1,1,nil):GetFirst()
local b1=tc:IsFaceup() and not tc:IsStatus(STATUS_EFFECT_ENABLED)
if Duel.Remove(tc,nil,REASON_EFFECT+REASON_TEMPORARY)>0 then
local fid=c:GetFieldID()
if b1 then fid=m+fid end
local og1=Duel.GetOperatedGroup()
if og1:IsExists(cm.retfilter2,1,nil,tp,LOCATION_HAND) then Duel.ShuffleHand(tp) end
if og1:IsExists(cm.retfilter2,1,nil,1-tp,LOCATION_HAND) then Duel.ShuffleHand(1-tp) end
local og=og1:Filter(cm.rffilter,nil)
if og and #og>0 then
for oc in aux.Next(og) do
oc:RegisterFlagEffect(m-1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
end
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11451461,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(og)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e2,tp)
end
end
end
function cm.returntofield(tc)
if tc:IsPreviousLocation(LOCATION_FZONE) then
local p=tc:GetPreviousControler()
local gc=Duel.GetFieldCard(p,LOCATION_FZONE,0)
if gc then
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 or tc:GetFlagEffectLabel(m-1)>m then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else
Duel.ReturnToField(tc)
end
end
function cm.filter6(c,e)
return c:GetFlagEffectLabel(m-1)==e:GetLabel()
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(cm.filter6,1,nil,e) then
g:DeleteGroup()
e:Reset()
return false
else return Duel.GetCurrentChain()==1 end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(cm.filter6,nil,e)
g:DeleteGroup()
local ft,mg,pft,pmg={},{},{},{}
ft[1]=Duel.GetLocationCount(tp,LOCATION_MZONE)
ft[2]=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
ft[3]=Duel.GetLocationCount(tp,LOCATION_SZONE)
ft[4]=Duel.GetLocationCount(1-tp,LOCATION_SZONE)
pft[3],pft[4]=0,0
if Duel.CheckLocation(tp,LOCATION_PZONE,0) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(tp,LOCATION_PZONE,1) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,0) then pft[4]=pft[4]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,1) then pft[4]=pft[4]+1 end
mg[1]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_MZONE)
mg[2]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_MZONE)
mg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_SZONE)
mg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_SZONE)
pmg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_PZONE)
pmg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_PZONE)
for i=1,2 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=mg[i]:Select(tp,ft[i],ft[i],nil)
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
for i=3,4 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local ct=math.min(#(mg[i]-pmg[i])+pft[i],ft[i])
local tg=mg[i]:SelectSubGroup(tp,cm.fselect2,false,ct,ct,pft[i])
local ptg=tg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(ptg) do cm.returntofield(tc) end
for tc in aux.Next(tg-ptg) do cm.returntofield(tc) end
sg:Sub(tg)
elseif #pmg[i]>pft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=pmg[i]:Select(tp,pft[i],pft[i],nil)
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
local psg=sg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(psg) do cm.returntofield(tc) end
for tc in aux.Next(sg-psg) do
if tc:GetPreviousLocation()&LOCATION_ONFIELD>0 then
cm.returntofield(tc)
elseif tc:IsPreviousLocation(LOCATION_HAND) then
Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)
end
end
end
\ No newline at end of file
--镜影
--a(0)=1 a(1)=2 a(2)=8 a(3)=2048 a(4)=10^620
local cm,m=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
local KOISHI_CHECK=false
if Card.SetCardData then KOISHI_CHECK=true end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,nil) end
end
function cm.filter2(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.filter3(c,ct)
return c:GetFlagEffect(m)>ct
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_ONFIELD,0,nil,e)
if sg:IsExists(cm.filter3,1,nil,1) and not cm[1] then
cm[1]=true
if KOISHI_CHECK then
Duel.Hint(24,0,aux.Stringid(m,7))
Duel.Hint(24,0,aux.Stringid(m,8))
else
Debug.Message("A liar's song left all alone in fractals.")
Debug.Message("纷繁层叠的真实倏忽入梦。神圣的狂乱于分形之中诞生。")
end
elseif sg:IsExists(cm.filter3,1,nil,0) and not cm[0] then
cm[0]=true
if KOISHI_CHECK then
Duel.Hint(24,0,aux.Stringid(m,5))
Duel.Hint(24,0,aux.Stringid(m,6))
else
Debug.Message("Mirror on the wall, what fates do you see?")
Debug.Message("递归、反复、循环。镜中映照出的是另一面镜还是迷宫?")
end
end
local c=e:GetHandler()
local tc=sg:GetFirst()
while tc do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,1))
tc=sg:GetNext()
end
sg:KeepAlive()
local e1=Effect.CreateEffect(c)
local fid=e1:GetFieldID()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():GetFlagEffect(m)>0 and re:GetHandler():GetFlagEffectLabel(m)==fid end)
e1:SetOperation(cm.dsop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetLabel(fid)
e2:SetLabelObject(sg)
e2:SetCondition(cm.descon)
e2:SetOperation(cm.desop)
Duel.RegisterEffect(e2,tp)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local dg=g:Filter(cm.desfilter,nil,e:GetLabel())
g:DeleteGroup()
Duel.Destroy(dg,REASON_EFFECT)
end
function cm.desfilter(c,fid)
return c:GetFlagEffectLabel(m)==fid
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(cm.desfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsImmuneToEffect(e) then return end
local op=re:GetOperation()
local op2=function(e,...) e:SetOperation(op) op(e,...) op(e,...) end
re:SetOperation(op2)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetLabel(ev)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==e:GetLabel() end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) re:SetOperation(op) end)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--虚诞衍生物
--21.04.13
local m=11451461
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
......
......@@ -28,7 +28,7 @@ function cm.initial_effect(c)
--addition
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(cm.chcon)
e4:SetOperation(cm.chop)
......
......@@ -26,7 +26,7 @@ function cm.initial_effect(c)
--addition
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(cm.chcon)
e4:SetOperation(cm.chop)
......@@ -37,7 +37,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.filter(c)
return c:GetType()&0x100004==0x100004 and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and not c:IsCode(m) and c:CheckActivateEffect(false,true,false)~=nil
return c:GetType()&0x100004==0x100004 and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:CheckActivateEffect(false,true,false)~=nil --and not c:IsCode(m)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
......@@ -45,12 +45,12 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=te:GetTarget()
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler()) end
if chk==0 then return e:IsCostChecked() and Duel.IsExistingTarget(cm.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
local _GetCurrentChain=Duel.GetCurrentChain
Duel.GetCurrentChain=function() return _GetCurrentChain()-1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,e:GetHandler())
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.GetCurrentChain=_GetCurrentChain
Duel.ClearTargetCard()
......
......@@ -30,7 +30,7 @@ function cm.initial_effect(c)
--addition
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(cm.chcon)
e4:SetOperation(cm.chop)
......
......@@ -30,7 +30,7 @@ function cm.initial_effect(c)
--addition
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(cm.chcon)
e4:SetOperation(cm.chop)
......
......@@ -28,7 +28,7 @@ function cm.initial_effect(c)
--addition
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(cm.chcon)
e4:SetOperation(cm.chop)
......
......@@ -30,7 +30,7 @@ function cm.initial_effect(c)
--addition
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(cm.chcon)
e4:SetOperation(cm.chop)
......
--幻影骑士团 鬼魂长枪
local m=11451750
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--to grave or negate
local e1=Effect.CreateEffect(c)
......
--笑点解析
local cm,m=GetID()
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--reveal
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1)
e2:SetCondition(cm.regcon)
e2:SetOperation(cm.regop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_HAND)
e3:SetCode(EVENT_ADJUST)
e3:SetCondition(cm.adcon)
e3:SetOperation(cm.adop)
c:RegisterEffect(e3)
--immune
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_SINGLE)
ge2:SetCode(EFFECT_IMMUNE_EFFECT)
ge2:SetRange(LOCATION_ONFIELD)
ge2:SetLabelObject(c)
ge2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ge2:SetValue(cm.chkval0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ge3:SetTargetRange(LOCATION_ONFIELD,0)
ge3:SetRange(LOCATION_SZONE)
ge3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
ge3:SetLabelObject(ge2)
c:RegisterEffect(ge3)
end
function cm.chkval0(e,te)
local c=e:GetLabelObject()
local tp=e:GetHandlerPlayer()
if te and te:IsActivated() then
local attr=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_ATTRIBUTE) or 0
local typ=te:GetActiveType()
if typ&TYPE_SPELL>0 then attr=attr|0x80 end
if typ&TYPE_TRAP>0 then attr=attr|0x100 end
for i=0,8 do
if attr&(1<<i)>0 then
if c:IsLocation(LOCATION_HAND+LOCATION_SZONE) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,i))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(0)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetLabel(1<<i)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(cm.efilter)
Duel.RegisterEffect(e2,tp)
end
end
end
return false
end
function cm.efilter(e,te)
if not te:IsActivated() then return false end
local attr=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_ATTRIBUTE) or 0
local typ=te:GetActiveType()
if typ&TYPE_SPELL>0 then attr=attr|0x80 end
if typ&TYPE_TRAP>0 then attr=attr|0x100 end
if attr&e:GetLabel()>0 then
Duel.Hint(HINT_CARD,0,m)
return true
end
return false
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsPublic()
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(m,10)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,9))
end
end
function cm.adcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(m)==0
end
function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsPublic() and c:GetFlagEffect(m-1)==0 then
c:RegisterFlagEffect(m-1,RESET_EVENT+RESETS_STANDARD,0,1)
elseif c:GetFlagEffect(m-1)>0 then
c:ResetFlagEffect(m-1)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,11))
--immune
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD)
ge2:SetCode(EFFECT_IMMUNE_EFFECT)
ge2:SetLabelObject(c)
ge2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
ge2:SetValue(cm.chkval0)
ge2:SetTargetRange(LOCATION_ONFIELD,0)
ge2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(ge2,tp)
end
end
\ No newline at end of file
--炼狱之结界像
local cm,m=GetID()
function cm.initial_effect(c)
--disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(cm.sumlimit)
c:RegisterEffect(e1)
--remove
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,m)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(cm.recon)
e0:SetOperation(cm.reop)
c:RegisterEffect(e0)
local e2=e0:Clone()
e2:SetCondition(cm.recon2)
Duel.RegisterEffect(e2,0)
local e4=e2:Clone()
Duel.RegisterEffect(e4,1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CUSTOM+m)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
--replace
local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e5:SetCountLimit(1,11451896+EFFECT_COUNT_CODE_DUEL)
e5:SetRange(LOCATION_HAND+LOCATION_DECK)
e5:SetOperation(cm.rep)
c:RegisterEffect(e5)
end
function cm.rep(e,tp,eg,ep,ev,re,r,rp)
local table={19740112,10963799,47961808,73356503,46145256,84478195}
for i,code in ipairs(table) do
local cn=_G["c"..code]
if type(cn)=="table" and type(cn.sumlimit)=="function" then
cn.sumlimit=function(e,c,sump,sumtype,sumpos,targetp)
return not c:IsAttribute(1<<(i-1))
end
end
local g=Duel.GetMatchingGroup(aux.FilterEqualFunction(Card.GetOriginalCode,code),0,0xff,0xff,nil)
for tc in aux.Next(g) do tc:ReplaceEffect(code,0) end
end
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:GetAttribute()&(ATTRIBUTE_WATER+ATTRIBUTE_FIRE)==0
end
function cm.recon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil)
end
function cm.recon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsControler(1-tp) and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+m,e,0,0,0,sg:GetFirst():GetAttribute())
end
function cm.filter(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER)
end
function cm.cclfilter(c,tc)
local seq1=aux.GetColumn(c)
local seq2=aux.GetColumn(tc)
return math.abs(seq1-seq2)==1
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(cm.cclfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,cm.cclfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e:GetHandler())
if not g or #g==0 then return end
g:AddCard(c)
if Duel.Destroy(g,REASON_EFFECT)>0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ev)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function cm.spfilter(c,e,tp,attr)
return c:IsAttribute(attr) and c:IsAttack(1000) and c:IsDefense(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
\ No newline at end of file
--森罗之结界像
local cm,m=GetID()
function cm.initial_effect(c)
--disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(cm.sumlimit)
c:RegisterEffect(e1)
--remove
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,m)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(cm.recon)
e0:SetOperation(cm.reop)
c:RegisterEffect(e0)
local e2=e0:Clone()
e2:SetCondition(cm.recon2)
Duel.RegisterEffect(e2,0)
local e4=e2:Clone()
Duel.RegisterEffect(e4,1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CUSTOM+m)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
--replace
local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e5:SetCountLimit(1,11451896+EFFECT_COUNT_CODE_DUEL)
e5:SetRange(LOCATION_HAND+LOCATION_DECK)
e5:SetOperation(cm.rep)
c:RegisterEffect(e5)
end
function cm.rep(e,tp,eg,ep,ev,re,r,rp)
local table={19740112,10963799,47961808,73356503,46145256,84478195}
for i,code in ipairs(table) do
local cn=_G["c"..code]
if type(cn)=="table" and type(cn.sumlimit)=="function" then
cn.sumlimit=function(e,c,sump,sumtype,sumpos,targetp)
return not c:IsAttribute(1<<(i-1))
end
end
local g=Duel.GetMatchingGroup(aux.FilterEqualFunction(Card.GetOriginalCode,code),0,0xff,0xff,nil)
for tc in aux.Next(g) do tc:ReplaceEffect(code,0) end
end
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:GetAttribute()&(ATTRIBUTE_WIND+ATTRIBUTE_EARTH)==0
end
function cm.recon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil)
end
function cm.recon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsControler(1-tp) and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+m,e,0,0,0,sg:GetFirst():GetAttribute())
end
function cm.filter(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetDecktopGroup(tp,1)
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,tp,LOCATION_DECK+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetDecktopGroup(tp,1)
if not g or #g==0 then return end
g:AddCard(c)
if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ev)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function cm.spfilter(c,e,tp,attr)
return c:IsAttribute(attr) and c:IsAttack(1000) and c:IsDefense(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
\ No newline at end of file
--混沌之结界像
local cm,m=GetID()
function cm.initial_effect(c)
--disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(cm.sumlimit)
c:RegisterEffect(e1)
--remove
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,m)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(cm.recon)
e0:SetOperation(cm.reop)
c:RegisterEffect(e0)
local e2=e0:Clone()
e2:SetCondition(cm.recon2)
Duel.RegisterEffect(e2,0)
local e4=e2:Clone()
Duel.RegisterEffect(e4,1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CUSTOM+m)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
--replace
local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e5:SetCountLimit(1,11451896+EFFECT_COUNT_CODE_DUEL)
e5:SetRange(LOCATION_HAND+LOCATION_DECK)
e5:SetOperation(cm.rep)
c:RegisterEffect(e5)
end
function cm.rep(e,tp,eg,ep,ev,re,r,rp)
local table={19740112,10963799,47961808,73356503,46145256,84478195}
for i,code in ipairs(table) do
local cn=_G["c"..code]
if type(cn)=="table" and type(cn.sumlimit)=="function" then
cn.sumlimit=function(e,c,sump,sumtype,sumpos,targetp)
return not c:IsAttribute(1<<(i-1))
end
end
local g=Duel.GetMatchingGroup(aux.FilterEqualFunction(Card.GetOriginalCode,code),0,0xff,0xff,nil)
for tc in aux.Next(g) do tc:ReplaceEffect(code,0) end
end
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:GetAttribute()&(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)==0
end
function cm.recon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil)
end
function cm.recon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsControler(1-tp) and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+m,e,0,0,0,sg:GetFirst():GetAttribute())
end
function cm.filter(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil):RandomSelect(tp,1)
if not g or #g==0 then return end
g:AddCard(c)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)>0 then
local fid=c:GetFieldID()
local og1=Duel.GetOperatedGroup()
if og1:IsExists(cm.retfilter2,1,nil,tp,LOCATION_HAND) then Duel.ShuffleHand(tp) end
if og1:IsExists(cm.retfilter2,1,nil,1-tp,LOCATION_HAND) then Duel.ShuffleHand(1-tp) end
local og=og1:Filter(cm.rffilter,nil)
if og and #og>0 then
for oc in aux.Next(og) do
oc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
end
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11451461,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(og)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ev)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function cm.spfilter(c,e,tp,attr)
return c:IsAttribute(attr) and c:IsAttack(1000) and c:IsDefense(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.retfilter2(c,p,loc)
if (c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousTypeOnField()&TYPE_EQUIP>0) or c:IsPreviousLocation(LOCATION_FZONE) then return false end
return c:IsPreviousControler(p) and c:IsPreviousLocation(loc)
end
function cm.rffilter(c)
return c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT)
end
function cm.returntofield(tc)
if tc:IsPreviousLocation(LOCATION_FZONE) then
local p=tc:GetPreviousControler()
local gc=Duel.GetFieldCard(p,LOCATION_FZONE,0)
if gc then
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else
Duel.ReturnToField(tc)
end
end
function cm.filter6(c,e)
return c:GetFlagEffectLabel(m)==e:GetLabel()
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(cm.filter6,1,nil,e) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(cm.filter6,nil,e)
g:DeleteGroup()
local ft,mg,pft,pmg={},{},{},{}
ft[1]=Duel.GetLocationCount(tp,LOCATION_MZONE)
ft[2]=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
ft[3]=Duel.GetLocationCount(tp,LOCATION_SZONE)
ft[4]=Duel.GetLocationCount(1-tp,LOCATION_SZONE)
pft[3],pft[4]=0,0
if Duel.CheckLocation(tp,LOCATION_PZONE,0) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(tp,LOCATION_PZONE,1) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,0) then pft[4]=pft[4]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,1) then pft[4]=pft[4]+1 end
mg[1]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_MZONE)
mg[2]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_MZONE)
mg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_SZONE)
mg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_SZONE)
pmg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_PZONE)
pmg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_PZONE)
for i=1,2 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=mg[i]:Select(tp,ft[i],ft[i],nil)
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
for i=3,4 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local ct=math.min(#(mg[i]-pmg[i])+pft[i],ft[i])
local tg=mg[i]:SelectSubGroup(tp,cm.fselect2,false,ct,ct,pft[i])
local ptg=tg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(ptg) do cm.returntofield(tc) end
for tc in aux.Next(tg-ptg) do cm.returntofield(tc) end
sg:Sub(tg)
elseif #pmg[i]>pft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=pmg[i]:Select(tp,pft[i],pft[i],nil)
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
local psg=sg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(psg) do cm.returntofield(tc) end
for tc in aux.Next(sg-psg) do
if tc:GetPreviousLocation()&LOCATION_ONFIELD>0 then
cm.returntofield(tc)
elseif tc:IsPreviousLocation(LOCATION_HAND) then
Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -24,7 +24,6 @@ function c11621102.initial_effect(c)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
end
cm.SetCard_xxj_Mirror=true
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and ep~=tp
end
......
......@@ -42,7 +42,6 @@ function c11621103.initial_effect(c)
e3:SetOperation(cm.desrepop)
c:RegisterEffect(e3)
end
cm.SetCard_xxj_Mirror=true
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.IsCanAddCounter(tp,0x63,7,c) end
......
......@@ -20,7 +20,6 @@ function cm.initial_effect(c)
e2:SetOperation(cm.cdop)
c:RegisterEffect(e2)
end
cm.SetCard_xxj_Mirror=true
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0)
......@@ -37,7 +36,7 @@ end
-----------------------------------------------------------------------
function cm.cdfilter(c,typ)
return c:IsType(typ) and not c.SetCard_XWZL
return c:IsType(typ) and not c:IsSetCard(0x9220)
end
function cm.cdcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetMatchingGroup(cm.cdfilter,tp,LOCATION_HAND,0,nil,TYPE_MONSTER)
......
......@@ -4,5 +4,3 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
end
cm.SetCard_XWZL=true
\ No newline at end of file
......@@ -7,10 +7,9 @@ function cm.initial_effect(c)
--e1:SetType(EFFECT_TYPE_ACTIVATE)
--e1:SetCode(EVENT_FREE_CHAIN)
--e1:SetCondition(cm.condition)
--c:RegisterEffect(e1)
--c:RegisterEffect(e1)
end
cm.SetCard_XWZL=true
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsType(TYPE_SPELL) and e:GetHandler():GetType()-TYPE_SPELL~=0
......
......@@ -7,10 +7,9 @@ function cm.initial_effect(c)
--e1:SetType(EFFECT_TYPE_ACTIVATE)
--e1:SetCode(EVENT_FREE_CHAIN)
--e1:SetCondition(cm.condition)
--c:RegisterEffect(e1)
--c:RegisterEffect(e1)
end
cm.SetCard_XWZL=true
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsType(TYPE_TRAP) and e:GetHandler():GetType()-TYPE_TRAP~=0
......
......@@ -51,7 +51,6 @@ function cm.initial_effect(c)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
end
cm.SetCard_xxj_Mirror=true
function cm.eqtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsFaceup() and chkc:IsControler(tp) end
......
......@@ -19,7 +19,6 @@ function cm.initial_effect(c)
e2:SetValue(1)
c:RegisterEffect(e2)
end
cm.SetCard_XWZL=true
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -13,7 +13,6 @@ function c11630203.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
cm.SetCard_xxj_Mirror=true
function cm.copyfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_TOKEN)
end
......
......@@ -23,7 +23,6 @@ function c11630204.initial_effect(c)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
cm.SetCard_xxj_Mirror=true
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) --and c:IsLevelBelow(6)
end
......
......@@ -45,7 +45,6 @@ function c11630205.initial_effect(c)
e5:SetOperation(cm.thop)
c:RegisterEffect(e5)
end
cm.SetCard_xxj_Mirror=true
function cm.cfilter(c,tp)
return c:IsControler(tp)
end
......@@ -151,7 +150,7 @@ function cm.tkcop(e,tp,eg,ep,ev,re,r,rp)
end
--03
function cm.thfilter(c)
return c.SetCard_xxj_Mirror and not c:IsCode(m) and c:IsAbleToHand()
return c:IsSetCard(0x6220) and not c:IsCode(m) and c:IsAbleToHand()
end
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
......
......@@ -22,7 +22,6 @@ function c11630206.initial_effect(c)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
cm.SetCard_xxj_Mirror=true
function cm.filter(c)
return c:IsLevelAbove(1)
end
......@@ -54,9 +53,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if e:GetHandler():GetFlagEffect(m)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,code,0,TYPES_TOKEN_MONSTER,atk,def,lv,race,att) then
local token=Duel.CreateToken(tp,11630207)
local token=Duel.CreateToken(tp,11630207)
--e:GetLabelObject():GetLabel()
--Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
--Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......
......@@ -12,7 +12,6 @@ function c11630208.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
cm.SetCard_xxj_Mirror=true
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
......
......@@ -13,7 +13,6 @@ function c11630210.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
cm.SetCard_xxj_Mirror=true
--
function cm.copyfilter(c)
return c:IsFaceup()
......
......@@ -13,7 +13,6 @@ function c11630211.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
cm.SetCard_xxj_Mirror=true
function cm.cfilter(c,tp)
local zone=0
local seq=c:GetSequence()
......
......@@ -13,7 +13,6 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
cm.SetCard_xxj_Mirror=true
--
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
......
......@@ -17,7 +17,6 @@ function cm.initial_effect(c)
e2:SetCondition(cm.handcon)
c:RegisterEffect(e2)
end
cm.SetCard_xxj_Mirror=true
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
......
......@@ -33,7 +33,6 @@ function cm.initial_effect(c)
Duel.RegisterEffect(ge2,0)
end
end
cm.SetCard_xxj_Mirror=true
function cm.resetcount(e,tp,eg,ep,ev,re,r,rp)
cm[0]=0
cm[1]=0
......
......@@ -12,7 +12,6 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
cm.SetCard_xxj_Mirror=true
function cm.rmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
......@@ -69,7 +68,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSpecialSummonMonster(1-tp,code,0,TYPES_TOKEN_MONSTER,atk,def,lv,ra,att) then
ft2=0
end
for i=1,ft1 do
for i=1,ft1 do
local token=Duel.CreateToken(tp,11630217)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -110,7 +109,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
--
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
for i=1,ft2 do
for i=1,ft2 do
local token=Duel.CreateToken(1-tp,11630217)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -29,9 +29,8 @@ function cm.initial_effect(c)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
end
cm.SetCard_xxj_Mirror=true
function cm.thfilter(c)
return c.SetCard_xxj_Mirror and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
return c:IsSetCard(0x6220) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
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
......
......@@ -11,7 +11,6 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
cm.SetCard_xxj_Mirror=true
function cm.filter(c)
return c:IsFaceup()
end
......
......@@ -34,9 +34,8 @@ function cm.initial_effect(c)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
end
cm.SetCard_xxj_Mirror=true
function cm.filter(e,c)
return c.SetCard_xxj_Mirror
return c:IsSetCard(0x6220)
end
function cm.actfilter(c)
return c:IsFaceup() and c:IsOriginalCodeRule(11630218)
......@@ -49,7 +48,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function cm.thfilter(c)
return c.SetCard_xxj_Mirror and c:IsAbleToHand()
return c:IsSetCard(0x6220) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=eg:GetCount()
......
......@@ -30,7 +30,6 @@ function c11630221.initial_effect(c)
c:RegisterEffect(e3)
end
cm.SetCard_xxj_Mirror=true
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
......@@ -118,7 +117,7 @@ function cm.repop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_PHASE+PHASE_END,2)
e2:SetValue(val)
Duel.RegisterEffect(e2,tp)
end
end
end
tc=g:GetNext()
end
......
......@@ -12,7 +12,6 @@ function c11630222.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
cm.SetCard_xxj_Mirror=true
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
e:SetLabel(c:GetSequence())
......
......@@ -11,7 +11,6 @@ function c11630223.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
cm.SetCard_xxj_Mirror=true
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
......
......@@ -18,7 +18,6 @@ function cm.initial_effect(c)
e2:SetOperation(cm.activate2)
c:RegisterEffect(e2)
end
cm.SetCard_xxj_Mirror=true
function cm.cfilter(c)
return c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
......
local m=15005320
local cm=_G["c"..m]
cm.name="玛坎的哲学"
function cm.initial_effect(c)
aux.AddCodeList(c,15005130)
c:EnableReviveLimit()
--material
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),aux.NonTuner(Card.IsRace,RACE_MACHINE),nil,cm.mfilter,0,99)
--add ind
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.tncon)
e1:SetOperation(cm.tnop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(cm.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,15005320)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCondition(cm.tdcon)
e3:SetTarget(cm.tdtg)
e3:SetOperation(cm.tdop)
c:RegisterEffect(e3)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,15005321)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop)
c:RegisterEffect(e4)
end
function cm.mfilter(c,syncard)
return (c:IsTuner(syncard)) or (c:IsRace(RACE_MACHINE) and c:IsNotTuner(syncard))
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsCode,1,nil,15005130) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function cm.tncon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1
end
function cm.tnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1)
c:RegisterEffect(e1)
--must attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MUST_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
function cm.tdcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.tdfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_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:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
end
function cm.spfilter(c,e,tp,sc)
return (aux.IsCodeListed(c,15005130) or c:IsCode(15005130)) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp,sc)>=1
end
function cm.spgcheck(g)
return g:GetSum(Card.GetLevel)>=8
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp,c)
return e:GetHandler():IsReleasable() and Duel.IsPlayerCanSpecialSummon(tp) and g:CheckSubGroup(cm.spgcheck) and not Duel.IsPlayerAffectedByEffect(tp,63060238) and not Duel.IsPlayerAffectedByEffect(tp,97148796)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsRelateToEffect(e) and c:IsReleasable()) then return end
if Duel.Release(c,REASON_EFFECT)~=0 and Duel.IsPlayerCanSpecialSummon(tp) then
local ct=1
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local spg=Group.CreateGroup()
local check=0
while (ct<=dcount and check==0) do
local g=Duel.GetDecktopGroup(tp,ct)
local fg=g:Filter(cm.spfilter,nil,e,tp,c)
if fg:CheckSubGroup(cm.spgcheck) then
check=1
spg=fg
end
ct=ct+1
end
if check==0 then
Duel.ConfirmDecktop(tp,dcount)
Duel.ShuffleDeck(tp)
return
end
Duel.ConfirmDecktop(tp,ct-1)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 or spg:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if ft>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spcg=Group.CreateGroup()
if ft<=Duel.GetLocationCount(tp,LOCATION_MZONE) then
spcg=spg
else
spcg=spg:Select(tp,ft,ft,nil)
end
local tc=spcg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc=spcg:GetNext()
end
Duel.SpecialSummonComplete()
end
end
end
\ No newline at end of file
local m=15005322
local cm=_G["c"..m]
cm.name="廷达魔三角之跃迁原点"
function cm.initial_effect(c)
--link summon
local e0=aux.AddLinkProcedure(c,cm.matfilter,1,1)
e0:SetProperty(e0:GetProperty()|EFFECT_FLAG_SET_AVAILABLE)
c:EnableReviveLimit()
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCost(cm.retcost)
e2:SetTarget(cm.rettg)
e2:SetOperation(cm.retop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetTarget(cm.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
function cm.matfilter(c)
return (c:IsLinkSetCard(0x10b) and c:IsType(TYPE_FLIP) and c:IsFacedown()) or (c:IsType(TYPE_FLIP) and c:IsFaceup())
end
function cm.eftg(e,c)
return c:IsType(TYPE_FLIP) and c:IsFacedown()
end
function cm.retcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,15005322)<3 end
local b=true
if e:GetHandler():IsSetCard(0x10b) then b=false end
local pos=Duel.SelectPosition(tp,e:GetHandler(),POS_FACEUP_ATTACK+POS_FACEUP_DEFENSE)
Duel.ChangePosition(e:GetHandler(),pos,pos,pos,pos,b)
Duel.RegisterFlagEffect(tp,15005322,RESET_PHASE+PHASE_END,0,1)
end
function cm.get_zone(c,seq)
local zone=0
if seq<4 and c:IsLinkMarker(LINK_MARKER_LEFT) then zone=bit.replace(zone,0x1,seq+1) end
if seq>0 and seq<5 and c:IsLinkMarker(LINK_MARKER_RIGHT) then zone=bit.replace(zone,0x1,seq-1) end
if seq==5 and c:IsLinkMarker(LINK_MARKER_TOP_LEFT) then zone=bit.replace(zone,0x1,2) end
if seq==5 and c:IsLinkMarker(LINK_MARKER_TOP) then zone=bit.replace(zone,0x1,1) end
if seq==5 and c:IsLinkMarker(LINK_MARKER_TOP_RIGHT) then zone=bit.replace(zone,0x1,0) end
if seq==6 and c:IsLinkMarker(LINK_MARKER_TOP_LEFT) then zone=bit.replace(zone,0x1,4) end
if seq==6 and c:IsLinkMarker(LINK_MARKER_TOP) then zone=bit.replace(zone,0x1,3) end
if seq==6 and c:IsLinkMarker(LINK_MARKER_TOP_RIGHT) then zone=bit.replace(zone,0x1,2) end
return zone
end
function cm.movefilter(c,tp,seq)
if not (c:IsType(TYPE_LINK) and c:IsFaceup() and c:IsCode(15005322)) then return false end
local zone=cm.get_zone(c,seq)
return zone~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0,zone)>0
end
function cm.desfilter(c,e)
return c:IsFaceup() and c:IsCode(15005322) and c:IsDestructable(e)
end
function cm.desormovefilter(c,e,tp,seq)
return cm.desfilter(c,e) or cm.movefilter(c,tp,seq)
end
function cm.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence()
if chk==0 then return Duel.IsExistingMatchingCard(cm.desormovefilter,tp,LOCATION_MZONE,0,1,nil,e,tp,seq) end
local g=Duel.GetMatchingGroup(cm.desormovefilter,tp,LOCATION_MZONE,0,nil,e,tp,seq)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local g=Duel.GetMatchingGroup(cm.desormovefilter,tp,LOCATION_MZONE,0,nil,e,tp,seq)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local ag=g:Select(tp,1,1,nil)
if ag:GetCount()>0 then
local tc=ag:GetFirst()
if tc and cm.desfilter(tc,e) and (not cm.movefilter(tc,tp,seq) or Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))==0) then
Duel.Destroy(tc,REASON_EFFECT)
else
local zone=cm.get_zone(tc,seq)
local flag=bit.bxor(zone,0xff)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local nseq=0
if s==1 then nseq=0
elseif s==2 then nseq=1
elseif s==4 then nseq=2
elseif s==8 then nseq=3
else nseq=4 end
Duel.MoveSequence(tc,nseq)
end
end
end
\ No newline at end of file
......@@ -46,6 +46,18 @@ function cm.initial_effect(c)
e4:SetHintTiming(0,TIMING_END_PHASE)
e4:SetCondition(cm.spcon2)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetCondition(cm.condtion)
e5:SetValue(500)
c:RegisterEffect(e5)
end
function cm.condtion(e)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL)
and Duel.GetAttacker()==e:GetHandler()
end
function cm.hspcon(e,c)
if c==nil then return true end
......@@ -128,7 +140,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.spfilter(c,e,tp,mc)
return c:IsRank(9) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and aux.IsCodeListed(c,40009190)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
--蒸汽淑女 阿璐莉姆
local m=40011423
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,40009190)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(cm.hspcon)
c:RegisterEffect(e0)
--To grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.discon)
e1:SetCost(cm.discost)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
--Effect 1
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CHANGE_LEVEL)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.lvcon)
e2:SetValue(3)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m+100)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.hspcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsPlayerAffectedByEffect(tp,40009196)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(40009190)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e,false) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
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:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
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:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
function cm.lvcon(e)
return Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,40009190)
end
function cm.tdfilter(c)
return aux.IsCodeListed(c,40009190) and c:IsAbleToDeck()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.tdfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,1,c) and c:IsAbleToHand() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA)
and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--刻神龙·机妙
local m=40011425
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,40009190)
--xyz summon
aux.AddXyzProcedure(c,nil,9,3)
c:EnableReviveLimit()
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+100)
e3:SetCost(cm.tdcost)
e3:SetTarget(cm.tdtg)
e3:SetOperation(cm.tdop)
c:RegisterEffect(e3)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonLocation(LOCATION_EXTRA)
end
function cm.thfilter(c)
return (c:IsCode(40009190) or aux.IsCodeListed(c,40009190)) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
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
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
if tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) or (Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and Duel.IsPlayerAffectedByEffect(tp,40009196)) end
if (Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and Duel.IsPlayerAffectedByEffect(tp,40009196)) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
else
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.tg)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.tg)
e2:SetValue(900)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
end
function cm.tg(e,c)
return aux.IsCodeListed(c,40009190) or c:IsCode(40009190)
end
\ No newline at end of file
--时刻之足迹
local m=40011427
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,40009190)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--todeck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
end
function cm.setfilter(c)
return not c:IsCode(m) and aux.IsCodeListed(c,40009190) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.setfilter,tp,LOCATION_DECK,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
if tc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function cm.filter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and (c:IsCode(40009190) or aux.IsCodeListed(c,40009190))
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and cm.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler())
end
--local ct=1
--if Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then ct=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
--Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,1,nil,tp,LOCATION_HAND)
end
function cm.spfilter2(c,e,tp,clv)
local lv=c:GetLevel()
return (c:IsCode(40009190) or aux.IsCodeListed(c,40009190)) and math.abs(clv-lv)==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
--local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc=Duel.GetFirstTarget()
--if not tc:IsRelateToEffect(e) then return end
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
if tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and tc:GetOriginalLevel()>=1 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_DECK,0,nil,e,tp,tc:GetLevel())
local g=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_DECK,0,nil,e,tp,tc:GetLevel())
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
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
end
end
\ No newline at end of file
......@@ -32,7 +32,7 @@ function c9310055.initial_effect(c)
--addition
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c9310055.chcon)
e4:SetOperation(c9310055.chop)
......@@ -65,7 +65,7 @@ function c9310055.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
function c9310055.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c9310055.disfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.NegateActivation(ev)
......
--真帝王的邪怨
function c98920299.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetLabel(0)
e1:SetCountLimit(1,98920299+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c98920299.cost)
e1:SetTarget(c98920299.target)
e1:SetOperation(c98920299.activate)
c:RegisterEffect(e1)
end
function c98920299.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function c98920299.cfilter(c,tp)
return c:IsSummonType(SUMMON_TYPE_ADVANCE) and c:IsFaceup() and c:IsAttackAbove(2400) and c:IsDefense(1000)
end
function c98920299.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c98920299.cfilter,1,nil,tp)
end
local g=Duel.SelectReleaseGroup(tp,c98920299.cfilter,1,1,nil,tp)
e:SetLabelObject(g:GetFirst())
Duel.Release(g,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1)
end
function c98920299.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local mg=tc:GetMaterial()
local vg=mg:GetCount()
local att=tc:GetAttribute()
if Duel.IsPlayerCanDraw(tp,vg) and Duel.Draw(tp,vg,REASON_EFFECT)>0 then
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(c98920299.disfilter,tp,0,LOCATION_MZONE,nil,att)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
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(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
end
function c98920299.disfilter(c,att)
return not c:IsAttribute(att) and c:IsType(TYPE_EFFECT)
end
\ No newline at end of file
--机甲炮手
function c98920302.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c98920302.matfilter,1,2)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920302,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,98920302)
e1:SetCondition(c98920302.thcon)
e1:SetTarget(c98920302.thtg)
e1:SetOperation(c98920302.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920302,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,98930302)
e2:SetTarget(c98920302.sptg)
e2:SetOperation(c98920302.spop)
c:RegisterEffect(e2)
end
function c98920302.matfilter(c)
return c:IsRace(RACE_MACHINE) and not c:IsLinkType(TYPE_LINK)
end
function c98920302.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c98920302.thfilter(c)
return c:IsSetCard(0x36) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c98920302.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920302.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98920302.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98920302.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 c98920302.tgfilter(c,lg)
return lg:IsContains(c) and c:IsRace(RACE_MACHINE)
end
function c98920302.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lg=e:GetHandler():GetLinkedGroup()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c98920302.tgfilter(chkc,lg) end
if chk==0 then return Duel.IsExistingTarget(c98920302.tgfilter,tp,LOCATION_MZONE,0,1,nil,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c98920302.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,lg)
end
function c98920302.spop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetFirstTarget()
if a and a:IsControler(tp) then
local g=a:GetColumnGroup()
g:AddCard(a)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c98920302.atktg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c98920302.atktg(e,c)
return not c:IsSetCard(0x36)
end
\ No newline at end of file
--真红眼钢炎骑士-基亚·弗里德
function c98920396.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,{85651167,423705},aux.FilterBoolFunction(Card.IsSetCard,0x3b),1,true,true)
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920396,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c98920396.damcon)
e1:SetTarget(c98920396.damtg)
e1:SetOperation(c98920396.damop)
c:RegisterEffect(e1)
--destroy equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920396,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_EQUIP)
e1:SetTarget(c98920396.destg)
e1:SetOperation(c98920396.desop)
c:RegisterEffect(e1)
--negate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c98920396.discon)
e3:SetCost(c98920396.discost)
e3:SetTarget(c98920396.distg)
e3:SetOperation(c98920396.disop)
c:RegisterEffect(e3)
end
c98920396.material_setcode=0x3b
function c98920396.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c98920396.damfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToGrave()
end
function c98920396.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920396.damfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_SZONE,0,1,nil)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c98920396.damop(e,tp,eg,ep,ev,re,r,rp)
local ct1=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local rg=Duel.SelectMatchingCard(tp,c98920396.damfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_SZONE,0,1,ct1,nil)
local ct2=Duel.SendtoGrave(rg,REASON_EFFECT)
if ct2==0 then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct2,ct2,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
function c98920396.filter(c,ec)
return c:GetEquipTarget()==ec
end
function c98920396.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local dg=eg:Filter(c98920396.filter,nil,e:GetHandler())
Duel.SetTargetCard(dg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
end
function c98920396.desop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(tg,REASON_EFFECT)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c98920396.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c98920396.cfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToRemoveAsCost()
end
function c98920396.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920396.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98920396.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98920396.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
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
function c98920396.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
\ No newline at end of file
--五阵魔术少女
function c98920452.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep2(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),3,5,false)
--To hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetDescription(aux.Stringid(98920452,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c98920452.thcon)
e2:SetTarget(c98920452.thtg)
e2:SetOperation(c98920452.thop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920452,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c98920452.spcon)
e3:SetTarget(c98920452.sptg)
e3:SetOperation(c98920452.spop)
c:RegisterEffect(e3)
end
function c98920452.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c98920452.thfilter(c)
return c:IsAbleToHand()
end
function c98920452.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c98920452.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c98920452.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetMaterial():GetClassCount(Card.GetCode)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local hg=Duel.SelectMatchingCard(tp,c98920452.thfilter,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.HintSelection(hg)
Duel.SendtoHand(hg,nil,REASON_EFFECT)
end
function c98920452.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c98920452.spfilter(c,e,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920452.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetMaterial()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and g:IsExists(c98920452.spfilter,1,nil,e,tp) end
local sg=g:Filter(c98920452.spfilter,nil,e,tp)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,sg:GetCount(),0,0)
end
function c98920452.spop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if sg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,ft,ft,nil)
end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
--坏之卡组破坏病毒
function c98920504.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_TOHAND+TIMINGS_CHECK_MONSTER)
e1:SetCost(c98920504.cost)
e1:SetTarget(c98920504.target)
e1:SetOperation(c98920504.activate)
c:RegisterEffect(e1)
end
function c98920504.costfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsDefenseBelow(3000) and c:IsAttackAbove(1500)
end
function c98920504.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c98920504.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c98920504.costfilter,1,1,nil)
e:SetLabelObject(g:GetFirst())
Duel.Release(g,REASON_COST)
end
function c98920504.tgfilter(c)
return c:IsFaceup() and c:IsDefenseBelow(1500)
end
function c98920504.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c98920504.tgfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c98920504.filter(c)
return c:GetType()==TYPE_TRAP or c:GetType()==TYPE_SPELL
end
function c98920504.filter1(c)
return c:GetType()==TYPE_TRAP or c:GetType()==TYPE_TRAP+TYPE_COUNTER or c:GetType()==TYPE_SPELL or c:GetType()==TYPE_SPELL+TYPE_QUICKPLAY
end
function c98920504.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=e:GetLabelObject()
if sg:IsDefenseAbove(2000) then
local conf=Duel.GetFieldGroup(tp,0,LOCATION_SZONE+LOCATION_HAND)
if conf:GetCount()>0 then
Duel.ConfirmCards(tp,conf)
local dg=conf:Filter(c98920504.filter1,nil)
Duel.Remove(dg,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DRAW)
e1:SetOperation(c98920504.desop1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(c98920504.turncon1)
e2:SetOperation(c98920504.turnop1)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e2,tp)
e2:SetLabelObject(e1)
e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3)
c98920504[e:GetHandler()]=e2
else
local conf=Duel.GetFieldGroup(tp,0,LOCATION_SZONE+LOCATION_HAND)
if conf:GetCount()>0 then
Duel.ConfirmCards(tp,conf)
local dg=conf:Filter(c98920504.filter,nil)
Duel.Remove(dg,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DRAW)
e1:SetOperation(c98920504.desop)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(c98920504.turncon)
e2:SetOperation(c98920504.turnop)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e2,tp)
e2:SetLabelObject(e1)
e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3)
c98920504[e:GetHandler()]=e2
end
end
function c98920504.desop(e,tp,eg,ep,ev,re,r,rp)
if ep==e:GetOwnerPlayer() then return end
local hg=eg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if hg:GetCount()==0 then return end
Duel.ConfirmCards(1-ep,hg)
local dg=hg:Filter(c98920504.filter,nil)
Duel.Remove(dg,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleHand(ep)
end
function c98920504.turncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c98920504.turnop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
ct=ct+1
e:SetLabel(ct)
e:GetHandler():SetTurnCounter(ct)
if ct==3 then
e:GetLabelObject():Reset()
e:GetOwner():ResetFlagEffect(1082946)
end
end
function c98920504.desop1(e,tp,eg,ep,ev,re,r,rp)
if ep==e:GetOwnerPlayer() then return end
local hg=eg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if hg:GetCount()==0 then return end
Duel.ConfirmCards(1-ep,hg)
local dg=hg:Filter(c98920504.filter1,nil)
Duel.Remove(dg,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleHand(ep)
end
function c98920504.turncon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c98920504.turnop1(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
ct=ct+1
e:SetLabel(ct)
e:GetHandler():SetTurnCounter(ct)
if ct==3 then
e:GetLabelObject():Reset()
e:GetOwner():ResetFlagEffect(1082946)
end
end
\ No newline at end of file
--花园蔷薇千金
function c98920546.initial_effect(c)
--token
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,98920546)
e1:SetTarget(c98920546.tktg1)
e1:SetOperation(c98920546.tkop1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920546,2))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,98930546+EFFECT_COUNT_CODE_DUEL)
e3:SetCondition(c98920546.descon)
e3:SetTarget(c98920546.destg)
e3:SetOperation(c98920546.desop)
c:RegisterEffect(e3)
end
function c98920546.tktg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,TYPES_TOKEN_MONSTER,800,800,2,RACE_PLANT,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0)
end
function c98920546.tkop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,TYPES_TOKEN_MONSTER,800,800,2,RACE_PLANT,ATTRIBUTE_DARK) then
local tk=Duel.CreateToken(tp,71645243)
Duel.SpecialSummon(tk,0,tp,tp,false,false,POS_FACEUP)
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(c98920546.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c98920546.splimit(e,c)
return not c:IsRace(RACE_PLANT) and not (c:IsSetCard(0x123) and c:IsType(TYPE_SYNCHRO)) and c:IsLocation(LOCATION_EXTRA)
end
function c98920546.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and c:GetReasonCard():IsSetCard(0x123)
end
function c98920546.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp) end
end
function c98920546.desop(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard()
local atk=rc:GetBaseAttack()
if atk>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1)
if atk>799 then
Duel.Draw(tp,math.floor(atk/800),REASON_EFFECT)
end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
\ No newline at end of file
--混沌帝龙 -宵暗的使者-
function c98920566.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--attribute light
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_ADD_ATTRIBUTE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920566,0))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SPSUMMON_PROC)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_HAND)
e3:SetCondition(c98920566.spcon)
e3:SetOperation(c98920566.spop)
e3:SetLabel(ATTRIBUTE_LIGHT)
e3:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCondition(c98920566.spcon1)
e4:SetDescription(aux.Stringid(98920566,1))
e4:SetLabel(ATTRIBUTE_DARK)
c:RegisterEffect(e4)
--remove
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(98920566,2))
e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCondition(c98920566.rmcon)
e5:SetCost(c98920566.rmcost)
e5:SetTarget(c98920566.rmtg)
e5:SetOperation(c98920566.rmop)
c:RegisterEffect(e5)
e3:SetLabelObject(e5)
e4:SetLabelObject(e5)
end
function c98920566.spfilter(c,att)
return c:IsAttribute(att) and c:IsAbleToRemoveAsCost()
end
function c98920566.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ct=Duel.GetMatchingGroupCount(Card.IsAttribute,tp,LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and ct>Duel.GetMatchingGroupCount(Card.IsAttribute,tp,LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK)
and Duel.IsExistingMatchingCard(c98920566.spfilter,tp,LOCATION_GRAVE,0,ct,nil,e:GetLabel())
end
function c98920566.spcon1(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ct=Duel.GetMatchingGroupCount(Card.IsAttribute,tp,LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and ct<Duel.GetMatchingGroupCount(Card.IsAttribute,tp,LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK)
and Duel.IsExistingMatchingCard(c98920566.spfilter,tp,LOCATION_GRAVE,0,ct,nil,e:GetLabel())
end
function c98920566.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c98920566.spfilter,tp,LOCATION_GRAVE,0,nil,e:GetLabel())
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:GetLabelObject():SetLabel(e:GetLabel())
end
function c98920566.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
end
function c98920566.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c98920566.spfilter1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920566.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end
if chk==0 then
if e:GetLabel()==ATTRIBUTE_LIGHT then
return Duel.IsExistingMatchingCard(c98920566.spfilter1,tp,LOCATION_REMOVED,0,1,nil,e,tp)
else
return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil,tp)
end
end
if e:GetLabel()==ATTRIBUTE_LIGHT then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
else
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_MZONE)
end
e:SetProperty(0)
end
function c98920566.rmop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==ATTRIBUTE_LIGHT then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)-Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
if ft>0 and ct>0 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
ct=math.min(ct,ft)
local g=Duel.GetMatchingGroup(c98920566.spfilter1,tp,LOCATION_REMOVED,0,nil,e,tp)
local sf=g:GetCount()
ct=math.min(ct,sf)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,ct,ct,nil)
if sg then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
else
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
local ct=g:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
if ct>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY)
local sg=g:FilterSelect(1-tp,Card.IsAbleToRemove,ct,ct,nil,1-tp)
Duel.Remove(sg,POS_FACEUP,REASON_RULE)
end
end
end
\ No newline at end of file
--龙骑兵团-刺刀龙
function c98920649.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920649,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98920649)
e1:SetCondition(c98920649.condition)
e1:SetTarget(c98920649.sptg)
e1:SetOperation(c98920649.spop)
c:RegisterEffect(e1)
--cannot be target
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(98920649,1))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetOperation(c98920649.tgop)
c:RegisterEffect(e5)
end
function c98920649.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0
end
function c98920649.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c98920649.spfilter(c,e,tp)
return c:IsSetCard(0x29) and c:IsRace(RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920649.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920649.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c98920649.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,c98920649.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_HAND) or not c:IsRelateToEffect(e) or c:IsControler(1-tp)
or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.BreakEffect()
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c98920649.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
function c98920649.eqlimit(e,c)
return e:GetLabelObject()==c
end
function c98920649.tgop(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WIND))
e2:SetValue(1)
Duel.RegisterEffect(e2,tp)
end
\ No newline at end of file
--龙骑兵团骑士-重枪龙骑士
function c98920651.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_WINDBEAST),1)
c:EnableReviveLimit()
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(1)
e2:SetCondition(c98920651.actcon)
c:RegisterEffect(e2)
--attack all
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ATTACK_ALL)
e2:SetValue(c98920651.atkfilter)
c:RegisterEffect(e2)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920651,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c98920651.tgcon)
e2:SetOperation(c98920651.tgop)
c:RegisterEffect(e2)
end
function c98920651.actcon(e)
return Duel.GetAttacker()==e:GetHandler()
end
function c98920651.atkfilter(e,c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c98920651.tgcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c98920651.tgop(e,tp,eg,ep,ev,re,r,rp)
--negate
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetDescription(aux.Stringid(98920651,1))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_NO_TURN_RESET)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c98920651.discon)
e3:SetTarget(c98920651.distg)
e3:SetOperation(c98920651.disop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,2)
e:GetHandler():RegisterEffect(e3)
end
function c98920651.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and ep==1-tp
end
function c98920651.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
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
function c98920651.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
\ No newline at end of file
--绽放蔷薇龙
function c98920694.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--sp summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920694,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,98920694)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c98920694.spcost)
e1:SetTarget(c98920694.sptg)
e1:SetOperation(c98920694.spop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,98920694)
e2:SetCost(c98920694.decost)
e2:SetCondition(c98920694.descon)
e2:SetTarget(c98920694.destg)
e2:SetOperation(c98920694.desop)
c:RegisterEffect(e2)
end
function c98920694.costfilter(c)
return (c:IsRace(RACE_PLANT) or c:IsSetCard(0x1123)) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c98920694.decost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920694.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98920694.costfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c98920694.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c98920694.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_MZONE)
end
function c98920694.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
function c98920694.cfilter(c)
return c:IsSetCard(0x123) and c:IsType(TYPE_SYNCHRO) and not c:IsPublic()
end
function c98920694.cfilter1(c)
return c:IsAbleToRemove() and (c:IsRace(RACE_PLANT) or c:IsSetCard(0x1123)) and not c:IsType(TYPE_SYNCHRO)
end
function c98920694.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function c98920694.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
if not c:IsReleasable() then return false end
return Duel.IsExistingMatchingCard(c98920694.cfilter,tp,LOCATION_EXTRA,0,1,nil)
end
e:SetLabel(0)
Duel.Release(e:GetHandler(),REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c98920694.cfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0)
end
function c98920694.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local lv=tc:GetLevel()-c:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98920694.cfilter1,tp,LOCATION_GRAVE,0,lv,lv,nil)
if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
if Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
end
\ No newline at end of file
--英豪挑战者 继承之枪兵
function c98920698.initial_effect(c)
--material
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920698,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c98920698.thcost)
e1:SetTarget(c98920698.mattg)
e1:SetOperation(c98920698.matop)
c:RegisterEffect(e1)
--get effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_XMATERIAL)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetCondition(c98920698.condition)
e4:SetValue(1)
c:RegisterEffect(e4)
--get effect2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920698,1))
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c98920698.xcon)
e2:SetValue(c98920698.xval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--immune
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_XMATERIAL)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetValue(c98920698.efilter)
e5:SetCondition(c98920698.effcon)
--c:RegisterEffect(e5)?
--remove material
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(98920698,0))
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_XMATERIAL)
e6:SetCode(EVENT_PHASE+PHASE_END)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1)
e6:SetCondition(c98920698.rmcon)
e6:SetOperation(c98920698.rmop)
c:RegisterEffect(e6)
end
function c98920698.matfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6f) and c:IsType(TYPE_XYZ)
end
function c98920698.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c98920698.matfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c98920698.matfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c98920698.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function c98920698.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
function c98920698.cfilter(c)
return c:IsAbleToGraveAsCost() and c:IsFaceupEx()
end
function c98920698.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920698.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98920698.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c98920698.condition(e)
return e:GetHandler():GetOriginalRace()==RACE_WARRIOR
end
function c98920698.atkfilter(c)
return c:IsCode(98920698)
end
function c98920698.xcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=e:GetHandler():GetOverlayGroup():Filter(c98920698.atkfilter,nil)
return c:GetOriginalRace()==RACE_WARRIOR and g:GetCount()>=2
end
function c98920698.xval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c98920698.atkfilter,nil)
return 1500/g:GetCount()
end
function c98920698.effcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetOverlayGroup():Filter(c98920698.atkfilter,nil)
return e:GetHandler():GetOriginalRace()==RACE_WARRIOR and g:GetCount()>=3
end
function c98920698.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c98920698.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetOverlayGroup():Filter(c98920698.atkfilter,nil)
return Duel.GetTurnPlayer()~=tp and g:GetCount()>=3 and e:GetHandler():IsRace(RACE_WARRIOR)
end
function c98920698.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=c:GetOverlayGroup():Filter(Card.IsCode,nil,tp,98920698)
if mg:GetCount()>=3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local bc=mg:GetFirst()
Duel.SendtoGrave(bc,REASON_EFFECT)
end
end
\ No newline at end of file
--白帝 巴德尔
function c98920700.initial_effect(c)
--summon with s/t
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e0:SetTargetRange(LOCATION_SZONE,0)
e0:SetTarget(aux.TargetBoolFunction(c98920700.gfilter))
e0:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920700,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,98920700)
e1:SetTarget(c98920700.sptg)
e1:SetOperation(c98920700.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c98920700.gfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0xbe)
end
function c98920700.filter(c,e,tp,ft)
return c:IsAttack(800) and c:IsDefense(1000) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c98920700.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.IsExistingMatchingCard(c98920700.filter,tp,LOCATION_DECK,0,1,nil,e,tp,ft) end
end
function c98920700.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c98920700.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ft)
local tc=g:GetFirst()
if tc then
if ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local opt=Duel.SelectOption(tp,aux.Stringid(98920700,0),aux.Stringid(98920700,1))
if opt==0 then
Duel.Recover(tp,800,REASON_EFFECT)
else
if Duel.GetFlagEffect(tp,22404675)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(22404675,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetValue(0x1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_EXTRA_SET_COUNT)
Duel.RegisterEffect(e2,tp)
Duel.RegisterFlagEffect(tp,22404675,RESET_PHASE+PHASE_END,0,1)
end
end
end
\ No newline at end of file
--炽白帝 巴德尔
function c98920701.initial_effect(c)
--summon with s/t
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e0:SetTargetRange(LOCATION_SZONE,0)
e0:SetTarget(aux.TargetBoolFunction(c98920701.gfilter))
e0:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e0)
--summon with 1 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920701,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c98920701.otcon)
e1:SetOperation(c98920701.otop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920701,0))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCondition(c98920701.thcon)
e3:SetTarget(c98920701.thtg)
e3:SetOperation(c98920701.thop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c98920701.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c98920701.gfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0xbe)
end
function c98920701.otfilter(c)
return c:IsSummonType(SUMMON_TYPE_ADVANCE) and c:IsType(TYPE_MONSTER)
end
function c98920701.otcon(e,c,minc)
if c==nil then return true end
local mg=Duel.GetMatchingGroup(c98920701.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end
function c98920701.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c98920701.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c98920701.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c98920701.filter1(c,tp)
return c:IsAttack(800) and c:IsDefense(1000) and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c98920701.filter2,tp,LOCATION_DECK,0,1,c)
end
function c98920701.filter2(c)
return c:IsAttack(2400) and c:IsDefense(1000) and c:IsAbleToHand()
end
function c98920701.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920701.filter1,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c98920701.thop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c98920701.filter1,tp,LOCATION_DECK,0,nil,tp)
if g1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=Duel.SelectMatchingCard(tp,c98920701.filter2,tp,LOCATION_DECK,0,1,1,sg1:GetFirst())
sg1:Merge(sg2)
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
if e:GetLabel()==1 then
Duel.BreakEffect()
Duel.Recover(tp,1600,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c98920701.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(c98920701.vfilter,1,nil) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c98920701.vfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) or (c:IsPreviousLocation(LOCATION_SZONE) and c:IsType(TYPE_CONTINUOUS))
end
--白帝家臣 林霍尼
function c98920702.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920702,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,98920702)
e2:SetTarget(c98920702.sptg)
e2:SetOperation(c98920702.spop)
c:RegisterEffect(e2)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_RELEASE)
e2:SetCountLimit(1,98930702)
e2:SetCondition(c98920702.thcon)
e2:SetTarget(c98920702.thtg)
e2:SetOperation(c98920702.thop)
c:RegisterEffect(e2)
end
function c98920702.spfilter(c,ft)
return c:IsSetCard(0xbe) and c:IsAbleToDeck() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c98920702.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c98920702.spfilter(chkc,ft) end
if chk==0 then return Duel.IsExistingTarget(c98920702.spfilter,tp,LOCATION_GRAVE,0,1,nil,ft)
and ft>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c98920702.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ft)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c98920702.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c98920702.splimit)
Duel.RegisterEffect(e1,tp)
if not c:IsRelateToEffect(e) then return end
end
function c98920702.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c98920702.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_SUMMON)
end
function c98920702.filter(c)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c98920702.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920702.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c98920702.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c98920702.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
elseif tc:IsType(TYPE_TRAP) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
\ No newline at end of file
--废铁导引者
function c98920707.initial_effect(c)
c:SetSPSummonOnce(98920707)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH),4,2,c98920707.ovfilter,aux.Stringid(98920707,0))
c:EnableReviveLimit()
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920707,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetTarget(c98920707.destg)
e1:SetOperation(c98920707.desop)
c:RegisterEffect(e1)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c98920707.reptg)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(98920707,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c98920707.spcon)
e5:SetTarget(c98920707.sptg)
e5:SetOperation(c98920707.spop)
c:RegisterEffect(e5)
end
function c98920707.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x24)
end
function c98920707.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end
function c98920707.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local lc=tg:GetFirst()
if lc==tc then lc=tg:GetNext() end
if tc:IsRelateToEffect(e) and tc:IsControler(tp)
and Duel.Destroy(tc,REASON_EFFECT)~=0 then
local og=lc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(lc))
end
end
function c98920707.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
c:RegisterFlagEffect(98920707,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
return true
else return false end
end
function c98920707.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(98920707)~=0
end
function c98920707.filter(c,e,tp)
return c:IsSetCard(0x24) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920707.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98920707.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c98920707.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,c98920707.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
\ No newline at end of file
--狱火机·罗弗寇
local s,id,o=GetID()
function c98920715.initial_effect(c)
--set s/t
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,id+o)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920715,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,98920715)
e1:SetCondition(aux.exccon)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c98920715.sptg)
e1:SetOperation(c98920715.spop)
c:RegisterEffect(e1)
end
function s.filter(c)
return c:IsSetCard(0xc5) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then Duel.SSet(tp,tc) end
end
function c98920715.spfilter(c,e,tp)
return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_SPSUMMON)
and (c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false)))
end
function c98920715.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c98920715.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c98920715.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c98920715.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
end
function c98920715.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if aux.NecroValleyNegateCheck(tc) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,true,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
--邪遗式自我乌贼怪
function c98920716.initial_effect(c)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920716,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,98920716)
e1:SetCondition(c98920716.thcon)
e1:SetTarget(c98920716.thtg)
e1:SetOperation(c98920716.thop)
c:RegisterEffect(e1)
--copy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920716,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,98930716)
e2:SetCost(c98920716.cost)
e2:SetTarget(c98920716.target)
e2:SetOperation(c98920716.operation)
c:RegisterEffect(e2)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920716,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,98940716)
e2:SetCondition(c98920716.thcon1)
e2:SetTarget(c98920716.thtg1)
e2:SetOperation(c98920716.thop1)
c:RegisterEffect(e2)
end
function c98920716.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c98920716.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c98920716.thfilter(c)
return (c:IsSetCard(0x3a) and c:IsType(TYPE_MONSTER)) or (c:IsType(TYPE_SPELL) and c:IsType(TYPE_RITUAL)) and c:IsAbleToHand()
end
function c98920716.thop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.ConfirmDecktop(p,5)
local g=Duel.GetDecktopGroup(p,5)
if g:GetCount()>0 and g:IsExists(c98920716.thfilter,1,nil) and Duel.SelectYesNo(p,aux.Stringid(98920716,1)) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
local sg=g:FilterSelect(p,c98920716.thfilter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,sg)
Duel.ShuffleHand(p)
end
Duel.ShuffleDeck(p)
end
function c98920716.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c98920716.filter(c)
return c:IsSetCard(0x3a) and c:GetType()==TYPE_SPELL+TYPE_RITUAL
end
function c98920716.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
local loc1,loc2=LOCATION_GRAVE,0
if chk==0 then return Duel.IsExistingTarget(c98920716.filter,tp,loc1,loc2,1,nil) end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c98920716.filter,tp,loc1,loc2,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(true,true,true)
Duel.ClearTargetCard()
g:GetFirst():CreateEffectRelation(e)
local tg=te:GetTarget()
e:SetProperty(te:GetProperty())
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function c98920716.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
local tc=te:GetHandler()
if not (tc:IsRelateToEffect(e) and tc:GetType()==TYPE_SPELL+TYPE_RITUAL) then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
function c98920716.cfilter1(c,tp)
return c:IsSetCard(0x3a) and c:IsType(TYPE_MONSTER) and c:IsControler(tp)
end
function c98920716.thcon1(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c98920716.cfilter1,1,nil,tp)
end
function c98920716.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c98920716.thop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--铠虹龙-电子暗黑虹龙
function c98920723.initial_effect(c)
--fusion
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,{3019642,c98920723.afilter},aux.FilterBoolFunction(Card.IsFusionSetCard,0x4093),2,true,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920723,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c98920723.destg)
e1:SetOperation(c98920723.desop)
c:RegisterEffect(e1)
--dragon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetValue(RACE_DRAGON)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920723,1))
e3:SetCategory(CATEGORY_NEGATE)
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(c98920723.discon)
e3:SetTarget(c98920723.distg)
e3:SetOperation(c98920723.disop)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetTarget(c98920723.eftg)
e5:SetLabelObject(e3)
c:RegisterEffect(e5)
--todeck
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK)
e4:SetDescription(aux.Stringid(98920723,1))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c98920723.tdcost)
e4:SetTarget(c98920723.tdtg)
e4:SetOperation(c98920723.tdop)
c:RegisterEffect(e4)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetTarget(c98920723.eftg)
e6:SetLabelObject(e4)
c:RegisterEffect(e6)
end
function c98920723.eftg(e,c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x4093) and c:GetEquipGroup():IsContains(e:GetHandler())
end
function c98920723.afilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK)
end
function c98920723.filter(c)
return c:IsRace(RACE_DRAGON) and not c:IsForbidden()
end
function c98920723.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c98920723.filter,tp,LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
end
function c98920723.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c98920723.filter,tp,LOCATION_GRAVE,0,1,1,nil,c)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c98920723.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(tc)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function c98920723.eqlimit(e,c)
return e:GetOwner()==c
end
function c98920723.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and Duel.IsChainNegatable(ev)
end
function c98920723.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetCategory(CATEGORY_NEGATE)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE and re:GetHandler():IsRelateToEffect(re)
and not re:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then
e:SetCategory(CATEGORY_NEGATE+CATEGORY_CONTROL)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,eg,1,0,0)
end
end
function c98920723.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE
and re:GetHandler():IsRelateToEffect(re) and not re:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.BreakEffect()
local tc=re:GetHandler()
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c98920723.eqlimit)
tc:RegisterEffect(e1)
end
end
function c98920723.eqlimit(e,c)
return e:GetOwner()==c
end
function c98920723.cfilter(c)
return c:IsSetCard(0x4093) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c98920723.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920723.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.GetMatchingGroup(c98920723.cfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98920723.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c98920723.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
\ No newline at end of file
--混沌战士-混沌之剑士-
local s,id,o=GetID()
function c98920724.initial_effect(c)
--material
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(s.afilter),aux.NonTuner(nil),1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920724,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,98920724)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c98920724.spcon1)
e2:SetCost(c98920724.rmcost)
e2:SetTarget(c98920724.rmtg)
e2:SetOperation(c98920724.rmop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.rmcon)
e3:SetValue(c98920724.efilter)
c:RegisterEffect(e3)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920724,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,98920724)
e1:SetCondition(aux.exccon)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c98920724.sptg)
e1:SetOperation(c98920724.spop)
c:RegisterEffect(e1)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_REMOVE)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c98920724.spfilter(c,e,tp)
return c:IsSetCard(0xcf) and (c:IsType(TYPE_SYNCHRO) or c:IsSetCard(0x10cf)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c98920724.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98920724.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c98920724.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,c98920724.spfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
function c98920724.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function s.checkfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(s.checkfilter,1,nil) then
Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1)
end
end
function s.afilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) or c:IsAttribute(ATTRIBUTE_LIGHT)
end
function s.rmcon(e)
return Duel.GetFlagEffect(0,id)>0
end
function c98920724.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c98920724.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
function c98920724.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c98920724.rmfilter(c)
return c:IsAbleToRemove()
end
function c98920724.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c98920724.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c98920724.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c98920724.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c98920724.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local ct=Duel.GetCurrentPhase()<=PHASE_STANDBY and 2 or 1
tc:RegisterFlagEffect(98920724,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,ct)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetReset(RESET_PHASE+PHASE_STANDBY,ct)
e2:SetLabelObject(tc)
e2:SetCountLimit(1)
e2:SetCondition(c98920724.retcon)
e2:SetOperation(c98920724.retop)
e2:SetLabel(Duel.GetTurnCount())
Duel.RegisterEffect(e2,tp)
end
end
function c98920724.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(98920724)~=0
end
function c98920724.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
\ No newline at end of file
--私欲之壶
function c98920729.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,98920729+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c98920729.target)
e1:SetOperation(c98920729.activate)
c:RegisterEffect(e1)
end
function c98920729.thfilter(c)
return c:IsSetCard(0x2e) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c98920729.filter(c)
return c:IsSetCard(0x2e) and c:IsSummonable(true,nil)
end
function c98920729.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,3,nil)
local b2=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,2,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(98920729,0),aux.Stringid(98920729,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(98920729,0))
else
op=Duel.SelectOption(tp,aux.Stringid(98920729,1))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
else
e:SetCategory(CATEGORY_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
end
function c98920729.activate(e,tp,eg,ep,ev,re,r,rp)
local ct1=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
local ct2=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
if e:GetLabel()==0 then
Duel.Draw(tp,math.floor(ct1/3),REASON_EFFECT)
else
Duel.Draw(tp,math.floor(ct2/2),REASON_EFFECT)
end
end
\ No newline at end of file
--花开的少女
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.filter(c)
return c:IsLevelBelow(3) and c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_TUNER) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment