Commit 02848de8 authored by Nemo Ma's avatar Nemo Ma

std 1217

parent 9157aaef
No preview for this file type
expansions/pics/11451509.jpg

10.7 KB | W: | H:

expansions/pics/11451509.jpg

46.1 KB | W: | H:

expansions/pics/11451509.jpg
expansions/pics/11451509.jpg
expansions/pics/11451509.jpg
expansions/pics/11451509.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451679.jpg

53.4 KB | W: | H:

expansions/pics/11451679.jpg

52.2 KB | W: | H:

expansions/pics/11451679.jpg
expansions/pics/11451679.jpg
expansions/pics/11451679.jpg
expansions/pics/11451679.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451851.jpg

210 KB | W: | H:

expansions/pics/11451851.jpg

17.1 KB | W: | H:

expansions/pics/11451851.jpg
expansions/pics/11451851.jpg
expansions/pics/11451851.jpg
expansions/pics/11451851.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451852.jpg

208 KB | W: | H:

expansions/pics/11451852.jpg

16.9 KB | W: | H:

expansions/pics/11451852.jpg
expansions/pics/11451852.jpg
expansions/pics/11451852.jpg
expansions/pics/11451852.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451853.jpg

218 KB | W: | H:

expansions/pics/11451853.jpg

17.8 KB | W: | H:

expansions/pics/11451853.jpg
expansions/pics/11451853.jpg
expansions/pics/11451853.jpg
expansions/pics/11451853.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451854.jpg

200 KB | W: | H:

expansions/pics/11451854.jpg

16.4 KB | W: | H:

expansions/pics/11451854.jpg
expansions/pics/11451854.jpg
expansions/pics/11451854.jpg
expansions/pics/11451854.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53752007.jpg

52.1 KB | W: | H:

expansions/pics/53752007.jpg

17.5 KB | W: | H:

expansions/pics/53752007.jpg
expansions/pics/53752007.jpg
expansions/pics/53752007.jpg
expansions/pics/53752007.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71401010.jpg

56.7 KB | W: | H:

expansions/pics/71401010.jpg

46.8 KB | W: | H:

expansions/pics/71401010.jpg
expansions/pics/71401010.jpg
expansions/pics/71401010.jpg
expansions/pics/71401010.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71401014.jpg

56.8 KB | W: | H:

expansions/pics/71401014.jpg

46.9 KB | W: | H:

expansions/pics/71401014.jpg
expansions/pics/71401014.jpg
expansions/pics/71401014.jpg
expansions/pics/71401014.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71401016.jpg

55 KB | W: | H:

expansions/pics/71401016.jpg

45.7 KB | W: | H:

expansions/pics/71401016.jpg
expansions/pics/71401016.jpg
expansions/pics/71401016.jpg
expansions/pics/71401016.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71401019.jpg

43.6 KB | W: | H:

expansions/pics/71401019.jpg

44.1 KB | W: | H:

expansions/pics/71401019.jpg
expansions/pics/71401019.jpg
expansions/pics/71401019.jpg
expansions/pics/71401019.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/98920232.jpg

65.5 KB | W: | H:

expansions/pics/98920232.jpg

64.8 KB | W: | H:

expansions/pics/98920232.jpg
expansions/pics/98920232.jpg
expansions/pics/98920232.jpg
expansions/pics/98920232.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910365.jpg

11.5 KB | W: | H:

expansions/pics/9910365.jpg

49.1 KB | W: | H:

expansions/pics/9910365.jpg
expansions/pics/9910365.jpg
expansions/pics/9910365.jpg
expansions/pics/9910365.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910380.jpg

13.4 KB | W: | H:

expansions/pics/9910380.jpg

55.5 KB | W: | H:

expansions/pics/9910380.jpg
expansions/pics/9910380.jpg
expansions/pics/9910380.jpg
expansions/pics/9910380.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910391.jpg

11.1 KB | W: | H:

expansions/pics/9910391.jpg

47.3 KB | W: | H:

expansions/pics/9910391.jpg
expansions/pics/9910391.jpg
expansions/pics/9910391.jpg
expansions/pics/9910391.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910393.jpg

12.1 KB | W: | H:

expansions/pics/9910393.jpg

52.2 KB | W: | H:

expansions/pics/9910393.jpg
expansions/pics/9910393.jpg
expansions/pics/9910393.jpg
expansions/pics/9910393.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910718.jpg

11.8 KB | W: | H:

expansions/pics/9910718.jpg

50.4 KB | W: | H:

expansions/pics/9910718.jpg
expansions/pics/9910718.jpg
expansions/pics/9910718.jpg
expansions/pics/9910718.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -64,7 +64,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_SEND_REPLACE)
e1:SetTarget(cm.reptg)
e1:SetValue(function(e,c) e:SetLabel(100) return false end)
e1:SetReset(RESET_PHASE+PHASE_END)
--e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.filter(c,tp)
......
--秘仪伊甸
local m=11451679
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
......@@ -60,12 +59,12 @@ function cm.coinop(e,tp,eg,ep,ev,re,r,rp)
local ct2=c:GetFlagEffect(m+1)
c:ResetFlagEffect(m)
c:ResetFlagEffect(m+1)
if ct1>0 or ct2>0 then
if ct1>1 or ct2>1 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(m)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetLabel(ct1,ct2)
e2:SetLabel(math.max(ct1,1)-1,math.max(ct2,1)-1)
e2:SetOperation(cm.drop)
Duel.RegisterEffect(e2,0)
Duel.RaiseEvent(c,m,e,0,0,0,0)
......@@ -93,7 +92,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,c)
local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToHand),tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,c)
local res=Duel.TossCoin(tp,1)
if res and #tg>0 then
local sg=tg:Select(tp,1,1,nil)
......
......@@ -8,6 +8,87 @@ function pnfl_prophecy_flight_initial(c)
PNFL_PROPHECY_FLIGHT_STONE_HAIL=false
pnflpf[0]=0
pnflpf[1]=0
pnflpf.coinsequence={}
_TossCoin=Duel.TossCoin
function Duel.TossCoin(p,ct)
local dic={}
local ct0=#pnflpf.coinsequence
for i=1,ct do table.insert(pnflpf.coinsequence,2) end
local res={_TossCoin(p,ct)}
local bool1,bool2=true,true
while bool1 or bool2 do
local s0,s1=false,false
for _,r in ipairs(res) do if r==0 then s0=true end end
for _,r in ipairs(res) do if r==1 then s1=true end end
local b1=Duel.IsCanRemoveCounter(p,1,0,0x1972,1,REASON_EFFECT) and s0
local b2=Duel.IsCanRemoveCounter(p,1,0,0x1971,1,REASON_EFFECT) and s1
local off=1
local ops,opval={},{}
if b1 then
ops[off]=aux.Stringid(11451856,0)
opval[off]=0
off=off+1
end
if b2 then
ops[off]=aux.Stringid(11451856,1)
opval[off]=1
off=off+1
end
ops[off]=aux.Stringid(11451856,2)
opval[off]=2
if off==1 then
bool1=false
else
local op=Duel.SelectOption(p,table.unpack(ops))+1
local sel=opval[op]
if sel==0 then
Duel.RemoveCounter(p,1,0,0x1972,1,REASON_EFFECT)
for i,r in ipairs(res) do res[i]=1 end
elseif sel==1 then
Duel.RemoveCounter(p,1,0,0x1971,1,REASON_EFFECT)
for i,r in ipairs(res) do res[i]=0 end
else
bool1=false
end
end
local s0,s1=false,false
for _,r in ipairs(res) do if r==0 then s0=true end end
for _,r in ipairs(res) do if r==1 then s1=true end end
local b1=Duel.IsCanRemoveCounter(1-p,1,0,0x1972,1,REASON_EFFECT) and s0
local b2=Duel.IsCanRemoveCounter(1-p,1,0,0x1971,1,REASON_EFFECT) and s1
local off=1
local ops,opval={},{}
if b1 then
ops[off]=aux.Stringid(11451856,0)
opval[off]=0
off=off+1
end
if b2 then
ops[off]=aux.Stringid(11451856,1)
opval[off]=1
off=off+1
end
ops[off]=aux.Stringid(11451856,2)
opval[off]=2
if off==1 then
bool2=false
else
local op=Duel.SelectOption(1-p,table.unpack(ops))+1
local sel=opval[op]
if sel==0 then
Duel.RemoveCounter(1-p,1,0,0x1972,1,REASON_EFFECT)
for i,r in ipairs(res) do res[i]=1 end
elseif sel==1 then
Duel.RemoveCounter(1-p,1,0,0x1971,1,REASON_EFFECT)
for i,r in ipairs(res) do res[i]=0 end
else
bool2=false
end
end
end
for i=1,ct do pnflpf.coinsequence[ct0+i]=res[i] end
return table.unpack(res)
end
--increase by Card.ReverseInDeck
local ge0=Effect.CreateEffect(c)
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -56,10 +137,12 @@ function pnflpf.resetop(e,tp,eg,ep,ev,re,r,rp)
end
end
function pnflpf.chkval(e,te)
if te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) and e:GetHandler():GetFlagEffect(11451854)==0 then
local prop=0
if PNFL_PROPHECY_FLIGHT_STONE_HAIL then prop=EFFECT_FLAG_CLIENT_HINT end
e:GetHandler():RegisterFlagEffect(11451854,RESET_EVENT+RESETS_STANDARD,prop,1,0,aux.Stringid(11451854,2))
if te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) then
if e:GetHandler():GetFlagEffect(11451854)==0 then
local prop=0
if PNFL_PROPHECY_FLIGHT_STONE_HAIL then prop=EFFECT_FLAG_CLIENT_HINT end
e:GetHandler():RegisterFlagEffect(11451854,RESET_EVENT+RESETS_STANDARD,prop,1,0,aux.Stringid(11451854,2))
end
end
return false
end
......@@ -130,7 +213,6 @@ function cm.initial_effect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(11451851)
--e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetRange(LOCATION_DECK)
e3:SetCondition(function(e) return e:GetHandler():IsFaceup() end)
c:RegisterEffect(e3)
......@@ -142,6 +224,7 @@ function cm.initial_effect(c)
e4:SetCondition(function(e,tp) return e:GetHandler():IsFaceup() and Duel.GetDecktopGroup(tp,1):IsContains(e:GetHandler()) end)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
cm.highground=e4
local e5=e4:Clone()
e5:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e5:SetCountLimit(1)
......@@ -192,6 +275,8 @@ function cm.labseqfilter(c,ct)
return c:GetFlagEffectLabel(11451851)+c:GetSequence()~=ct
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return end
pnfl_adjusting=true
local c=e:GetHandler()
if PNFL_PROPHECY_FLIGHT_DEBUG then Debug.Message("adjust"..c:GetCode()) end
c:ReverseInDeck()
......@@ -249,6 +334,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
tc:ReverseInDeck()
end
end
pnfl_adjusting=false
--[[if tc~=c and sg:IsContains(c) then
if PNFL_PROPHECY_FLIGHT_DEBUG then Debug.Message("move"..c:GetCode()) end
Duel.MoveSequence(c,0)
......
......@@ -95,6 +95,8 @@ function cm.labseqfilter(c,ct)
return c:GetFlagEffectLabel(11451851)+c:GetSequence()~=ct
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return end
pnfl_adjusting=true
local c=e:GetHandler()
if PNFL_PROPHECY_FLIGHT_DEBUG then Debug.Message("adjust"..c:GetCode()) end
c:ReverseInDeck()
......@@ -152,6 +154,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
tc:ReverseInDeck()
end
end
pnfl_adjusting=false
end
function cm.tgfilter(c,e)
return c:IsRelateToEffect(e) and c:IsOnField()
......
......@@ -114,6 +114,8 @@ function cm.labseqfilter(c,ct)
return c:GetFlagEffectLabel(11451851)+c:GetSequence()~=ct
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return end
pnfl_adjusting=true
local c=e:GetHandler()
if PNFL_PROPHECY_FLIGHT_DEBUG then Debug.Message("adjust"..c:GetCode()) end
c:ReverseInDeck()
......@@ -166,11 +168,12 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
elseif tg:IsExists(cm.labseqfilter,1,nil,ct) then
if PNFL_PROPHECY_FLIGHT_DEBUG then Debug.Message("move"..c:GetCode()) end
for i=#tg,1,-1 do
local tc=tg:Filter(cm.labfilter,nil,ct-i):GetFirst()
local tc=tg:Filter(cm.labfilter,nil,i):GetFirst()
Duel.MoveSequence(tc,0)
tc:ReverseInDeck()
end
end
pnfl_adjusting=false
end
function cm.tgfilter(c,e)
return c:IsRelateToEffect(e) and c:IsOnField()
......
......@@ -101,6 +101,8 @@ function cm.labseqfilter(c,ct)
return c:GetFlagEffectLabel(11451851)+c:GetSequence()~=ct
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return end
pnfl_adjusting=true
if not PNFL_PROPHECY_FLIGHT_STONE_HAIL then
PNFL_PROPHECY_FLIGHT_STONE_HAIL=true
local shg=Duel.GetMatchingGroup(cm.shfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
......@@ -160,11 +162,12 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
elseif tg:IsExists(cm.labseqfilter,1,nil,ct) then
if PNFL_PROPHECY_FLIGHT_DEBUG then Debug.Message("move"..c:GetCode()) end
for i=#tg,1,-1 do
local tc=tg:Filter(cm.labfilter,nil,ct-i):GetFirst()
local tc=tg:Filter(cm.labfilter,nil,i):GetFirst()
Duel.MoveSequence(tc,0)
tc:ReverseInDeck()
end
end
pnfl_adjusting=false
end
function cm.shfilter(c)
return c:GetFlagEffect(11451854)>0
......
--魔导空港 迦南
local cm,m=GetID()
function cm.initial_effect(c)
if not PNFL_PROPHECY_FLIGHT_CHECK then
dofile("expansions/script/c11451851.lua")
pnfl_prophecy_flight_initial(c)
end
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--act
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_FZONE)
e2:SetOperation(cm.efop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(m)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetRange(LOCATION_FZONE)
e3:SetCondition(cm.con)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_ACTIVATE_COST)
e4:SetRange(LOCATION_FZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetCost(cm.costchk)
e4:SetTarget(cm.actarget)
e4:SetOperation(cm.costop)
c:RegisterEffect(e4)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e6:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e6:SetRange(LOCATION_FZONE)
e6:SetTargetRange(LOCATION_SZONE,0)
e6:SetCondition(cm.con)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e7:SetCode(m)
--c:RegisterEffect(e7)
--replace
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_FZONE)
e5:SetCode(EFFECT_SEND_REPLACE)
e5:SetTarget(cm.reptg)
e5:SetValue(function(e,c) return e:GetLabelObject()==c end)
c:RegisterEffect(e5)
end
function cm.filter(c)
return c:IsType(TYPE_SPELL) and not c:IsType(TYPE_QUICKPLAY) and c:IsFacedown() and c:GetFlagEffect(m)==0
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local og=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_SZONE,0,nil)
for oc in aux.Next(og) do
oc:RegisterFlagEffect(m,0,0,1)
local teset={oc:GetActivateEffect()}
for _,te in pairs(teset) do
local prop1,prop2=te:GetProperty()
if not prop2 or prop2&EFFECT_FLAG2_COF==0 then
local cost=te:GetCost() or aux.TRUE
local cost1=function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerAffectedByEffect(tp,m) and Duel.GetCurrentChain()==0 and cost(e,tp,eg,ep,ev,re,r,rp,0) end
cost(e,tp,eg,ep,ev,re,r,rp,1)
end
local e1=te:Clone()
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(prop1,prop2|EFFECT_FLAG2_COF)
e1:SetRange(LOCATION_SZONE)
e1:SetCost(cost1)
oc:RegisterEffect(e1,true)
end
end
end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m+1)==0
end
function cm.costchk(e,te,tp)
local tc=te:GetHandler()
local prop1,prop2=te:GetProperty()
local eset={Duel.IsPlayerAffectedByEffect(tp,m)}
if (tc:GetFlagEffect(m)>0 and prop2 and prop2&EFFECT_FLAG2_COF>0) or (tc:IsLocation(LOCATION_SZONE) and tc:IsType(TYPE_QUICKPLAY) and #eset>0 and tc:IsStatus(STATUS_SET_TURN) and tc:GetEffectCount(EFFECT_QP_ACT_IN_SET_TURN)<=#eset) then
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0
else return true end
end
function cm.actarget(e,te,tp)
e:SetLabelObject(te)
return true
end
function cm.thfilter(c)
return c:IsSetCard(0x6e) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
local tc=te:GetHandler()
local prop1,prop2=te:GetProperty()
local eset={Duel.IsPlayerAffectedByEffect(tp,m)}
if (tc:GetFlagEffect(m)>0 and prop2 and prop2&EFFECT_FLAG2_COF>0) or (tc:IsLocation(LOCATION_SZONE) and tc:IsType(TYPE_QUICKPLAY) and ((#eset>0 and tc:IsStatus(STATUS_SET_TURN) and tc:GetEffectCount(EFFECT_QP_ACT_IN_SET_TURN)<=#eset) or Duel.SelectYesNo(tp,aux.Stringid(m,3)))) then
local ph=Duel.GetCurrentPhase()
if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end
e:GetHandler():RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+ph,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,15))
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)~=0 and e:GetHandler():GetFlagEffect(m+2)==0 then
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
g=g:Select(tp,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
e:GetHandler():RegisterFlagEffect(m+2,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,4))
end
end
end
end
function cm.sfilter(c,e,tp)
return c:IsControler(tp) and c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_MZONE+LOCATION_HAND) and c:IsAbleToRemove() and not c:IsHasEffect(EFFECT_TO_DECK_REDIRECT) and c:GetLeaveFieldDest()==0 and c:GetDestination()==LOCATION_DECK
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
return eg:IsExists(cm.sfilter,1,c,e,tp)
end
local g=eg:Filter(cm.sfilter,c,e,tp)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
local flag=c:GetFlagEffectLabel(m+3)
if not flag or flag<=0 then
flag=1
c:RegisterFlagEffect(m+3,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,1,aux.Stringid(m,5))
else
flag=flag+1
c:ResetFlagEffect(m+3)
c:RegisterFlagEffect(m+3,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,flag,aux.Stringid(m,math.min(14,4+flag)))
end
if #g>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=g:Select(tp,1,1,nil)
end
local sc=g:GetFirst()
e:SetLabelObject(sc)
local ct=0
if sc:IsOnField() then
ct=Duel.Remove(sc,nil,REASON_EFFECT+REASON_TEMPORARY)
else
ct=Duel.Remove(sc,POS_FACEUP,REASON_EFFECT)
end
if ct~=0 and sc:IsLocation(LOCATION_REMOVED) then
sc:RegisterFlagEffect(m+4,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,8-flag,aux.Stringid(m+4,math.max(0,8-flag)))
local rc=c
if re and re:GetHandler() then rc=re:GetHandler() end
local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetLabel(sc:GetFieldID())
e1:SetLabelObject(sc)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e2,tp)
end
return true
else return false end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==1
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
c:SetReason(c:GetReason()|REASON_TEMPORARY)
local flag=c:GetFlagEffectLabel(m+4)
if not flag or e:GetLabel()~=c:GetFieldID() then
e:Reset()
elseif flag>=9 then
c:ResetFlagEffect(m+4)
if c:IsPreviousLocation(LOCATION_ONFIELD) then
--Duel.MoveToField(c,tp,c:GetPreviousControler(),c:GetPreviousLocation(),c:GetPreviousPosition(),true)
--if c:IsFacedown() then Duel.RaiseEvent(c,EVENT_MSET,e,REASON_EFFECT,tp,tp,0) end
Duel.ReturnToField(c)
else
Duel.SendtoHand(c,c:GetPreviousControler(),REASON_EFFECT)
end
e:Reset()
else
Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)
flag=flag+1
c:ResetFlagEffect(m+4)
c:RegisterFlagEffect(m+4,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,flag,aux.Stringid(m+4,flag))
end
end
\ No newline at end of file
--魔导探机 鹰眼MkII
local cm,m=GetID()
function cm.initial_effect(c)
if not PNFL_PROPHECY_FLIGHT_CHECK then
dofile("expansions/script/c11451851.lua")
pnfl_prophecy_flight_initial(c)
end
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.spcost2)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--move
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCost(cm.discost)
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
end
function cm.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tg=Duel.SelectMatchingCard(1-tp,Card.IsSSetable,tp,0,LOCATION_HAND,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SET)
if #tg>0 then Duel.SSet(1-tp,tg,1-tp,false) end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x6e,0x21,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x6e,0x21,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_EFFECT)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)
end
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tab=pnflpf.coinsequence
if chk==0 then return #tab>0 and ((tab[#tab]==0 and c:IsCanAddCounter(0x1972,1)) or (tab[#tab]==1 and c:IsCanAddCounter(0x1971,1))) end
if tab[#tab]==0 then c:AddCounter(0x1972,1) end
if tab[#tab]==1 then c:AddCounter(0x1971,1) end
e:SetLabel(tab[#tab])
tab[#tab]=2
end
function cm.posfilter(c,pos)
local seq=c:GetSequence()
local p=c:GetControler()
local loc=c:GetLocation()
if c:IsLocation(LOCATION_FZONE) or c:IsLocation(LOCATION_PZONE) or not c:IsPosition(pos) then return false end
if not c:IsOnField() then return Duel.IsExistingMatchingCard(nil,c:GetControler(),c:GetLocation(),0,1,c) end
if seq>4 then return false end
return (seq>0 and Duel.CheckLocation(p,loc,seq-1)) or (seq<4 and Duel.CheckLocation(p,loc,seq+1))
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return cm.posfilter(chkc) end
if chk==0 then
local tab=pnflpf.coinsequence
local pos=POS_FACEUP
if tab[#tab]==0 then pos=POS_FACEDOWN end
return e:IsCostChecked() and Duel.IsExistingTarget(cm.posfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,nil,pos)
end
local pos=POS_FACEUP
if e:GetLabel()==0 then pos=POS_FACEDOWN end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.posfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil,pos)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if not tc:IsOnField() then
if 1==1 then return end
local tg=Duel.GetMatchingGroup(nil,tc:GetControler(),tc:GetLocation(),0,nil)
local b1=tc:GetSequence()~=0
local b2=tc:GetSequence()~=#tg-1
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,3),aux.Stringid(m,4))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(m,4))+1
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,3))
else
return
end
if op==0 then Duel.MoveSequence(tc,tc:GetSequence()+1) end
if op==1 then Duel.MoveSequence(tc,tc:GetSequence()-1) end
end
local seq=tc:GetSequence()
local p=tc:GetControler()
local b1=0
if p~=tp then b1=1 end
local loc=tc:GetLocation()
local b2=0
if loc==LOCATION_SZONE then b2=1 end
if seq>4 then return end
local flag=0
if seq>0 and Duel.CheckLocation(p,loc,seq-1) then flag=flag|(1<<(seq-1+16*b1+8*b2)) end
if seq<4 and Duel.CheckLocation(p,loc,seq+1) then flag=flag|(1<<(seq+1+16*b1+8*b2)) end
if flag==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_ONFIELD,LOCATION_ONFIELD,~flag)
local nseq=math.log(s,2)-16*b1-8*b2
Duel.MoveSequence(tc,nseq)
end
end
\ No newline at end of file
--魔导喷气背包 训练型
local cm,m=GetID()
function cm.initial_effect(c)
if not PNFL_PROPHECY_FLIGHT_CHECK then
dofile("expansions/script/c11451851.lua")
pnfl_prophecy_flight_initial(c)
end
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_ACTIVATING)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
--faceup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(function() return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 end)
e3:SetOperation(cm.operation1)
c:RegisterEffect(e3)
--Equip limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetEquipTarget()
if tc and tc:IsAbleToDeck() and c:IsAbleToHand() and Duel.SelectEffectYesNo(tp,c) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
if tc:IsLocation(LOCATION_MZONE) then
local res1,res2=Duel.TossCoin(tp,2)
if res1~=res2 then res1=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,0)) end
if tc:IsLocation(LOCATION_MZONE) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) and tc:IsLocation(LOCATION_DECK) and res1==1 then
Duel.ShuffleDeck(tc:GetControler())
tc:ReverseInDeck()
end
end
end
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_DECK,0,1,1,nil,TYPE_MONSTER):Filter(Card.IsFacedown,nil)
if #g>0 then
local tc=g:GetFirst()
tc:ReverseInDeck()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,c:GetFieldID())
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1,c:GetFieldID())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(cm.fop)
e1:SetLabel(c:GetFieldID())
e1:SetLabelObject(tc)
Duel.RegisterEffect(e1,tp)
end
end
function cm.fop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if not (c:GetFlagEffect(m)>0 and c:GetFlagEffectLabel(m)==e:GetLabel() and tc:GetFlagEffect(m)>0 and tc:GetFlagEffectLabel(m)==e:GetLabel()) then e:Reset() return end
if eg:IsContains(tc) and tc:IsPreviousLocation(LOCATION_DECK) then
e:Reset()
if tc:IsFaceup() then Duel.Equip(tp,c,tc) end
end
end
\ No newline at end of file
--魔导指挥中心 晶核塔
local cm,m=GetID()
function cm.initial_effect(c)
if not PNFL_PROPHECY_FLIGHT_CHECK then
dofile("expansions/script/c11451851.lua")
pnfl_prophecy_flight_initial(c)
end
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--act
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CHAINING)
c:RegisterEffect(e3)
--replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(cm.imop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_SZONE)
e5:SetCode(EVENT_ADJUST)
e5:SetCondition(function() return not pnfl_adjusting end)
e5:SetOperation(cm.acop)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetRange(LOCATION_SZONE)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_CUSTOM+m)
e6:SetOperation(cm.spop)
c:RegisterEffect(e6)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()==e:GetHandler() or (e:GetCode()==EVENT_CHAINING and rp==1-tp)
end
function cm.filter(c)
return c:IsSetCard(0x6e) and c:GetType()&0x10002==0x10002 and c:IsFaceup()
end
function cm.refilter(c)
return c:IsSetCard(0x6e) and c:GetType()&0x10002==0x10002 and c:IsAbleToRemove()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
local g2=Duel.GetMatchingGroup(cm.refilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return g2:GetClassCount(Card.GetCode)>=3 and #g1<3 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3-#g1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
local g2=Duel.GetMatchingGroup(cm.refilter,tp,LOCATION_DECK,0,nil)
if g2:GetClassCount(Card.GetCode)<3 or #g1>=3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g2:SelectSubGroup(tp,aux.dncheck,false,3,3)
if sg then
Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
if #g1>0 then
sg=sg:Select(1-tp,3-#g1,3-#g1,nil)
end
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
g1=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
if #g1==3 then
g1=g1:Select(tp,1,1,nil)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
end
end
function cm.filter1(c)
local eset={c:IsHasEffect(0x20000000+m)}
if #eset>0 then return eset[1]:GetLabelObject() end
return false
end
function cm.imop(e,te)
if te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) then
if te:GetHandler():IsLocation(LOCATION_DECK) then
local e1=te:GetHandler():RegisterFlagEffect(11451858,RESET_EVENT+RESETS_STANDARD,0,1)
e1:SetLabelObject(te)
end
end
return false
end
function cm.acop(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return end
pnfl_adjusting=true
local g=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_DECK,0,nil)
for tc in aux.Next(g) do
Duel.RaiseEvent(tc,EVENT_CUSTOM+m,cm.filter1(tc),0,0,0,0)
tc:ResetFlagEffect(m)
end
pnfl_adjusting=false
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsControler(tp) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(m,1)) then
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local te1=re:Clone()
if re:GetOwner():GetOriginalCode()==11451851 then te1=c11451851.highground:Clone() end
te1:SetDescription(aux.Stringid(m,2))
te1:SetProperty(te1:GetProperty()|EFFECT_FLAG_CLIENT_HINT)
te1:SetRange(LOCATION_MZONE)
te1:SetCondition(aux.TRUE)
te1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
tc:RegisterEffect(te1,true)
Duel.SpecialSummonComplete()
end
end
end
\ No newline at end of file
......@@ -70,7 +70,7 @@ function c11570001.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,eg:GetCount(),0,0)
-- Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg,eg:GetCount(),0,0)
-- Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg,eg:GetCount(),0,0)
end
function c11570001.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -86,9 +86,11 @@ function c11570001.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(eg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local tg=Duel.GetOperatedGroup()
if tg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(1-tp) end
local sg=tg:Filter(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
local ssg=tg:Filter(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
local sg=ssg:Filter(Card.IsCanBeSpecialSummoned,nil,e,0,tp,true,false)
if sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if sg:GetCount()>ft and Duel.SelectYesNo(tp,aux.Stringid(11570001,3)) then
if Duel.SelectYesNo(tp,aux.Stringid(11570001,3)) then
if sg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,ft,ft,nil)
end
......@@ -104,12 +106,24 @@ function c11570001.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(0x810)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_DRAGON)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(ATTRIBUTE_DARK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e3)
sc:SetStatus(STATUS_SUMMON_DISABLED,false)
sc:SetStatus(STATUS_SUMMONING,true)
sc=sg:GetNext()
end
Duel.SpecialSummonComplete()
end
end end
end
function c11570001.cfilter2(c,tp)
return c:IsFaceup() and c:IsSetCard(0x810) and c:IsControler(tp)
......
......@@ -46,7 +46,7 @@ function c11570005.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11570005.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_REMOVED,0,1,nil,tp) and (b1 or b2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c11570005.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_REMOVED,0,1,1,nil,tp)
local b3=g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
local b3=g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if not g:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then
Duel.SendtoGrave(g,REASON_COST)
else
......@@ -99,6 +99,18 @@ function c11570005.effop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(0x810)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_RACE)
e4:SetValue(RACE_DRAGON)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(ATTRIBUTE_DARK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(11570005,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e2=Effect.CreateEffect(e:GetHandler())
......
--教导唱诗班 浮尔
function c11634014.initial_effect(c)
--to grave and hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11634014)
e1:SetCondition(function(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsSetCard(0x145) end,tp,LOCATION_MZONE,0,1,nil) end)
e1:SetCost(c11634014.tghcost)
e1:SetTarget(c11634014.tghtg)
e1:SetOperation(c11634014.tghop)
c:RegisterEffect(e1)
--tohand and ex
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,21634014)
e2:SetCondition(c11634014.tehcon)
e2:SetCost(c11634014.tehcost)
e2:SetTarget(c11634014.tehtg)
e2:SetOperation(c11634014.tehop)
c:RegisterEffect(e2)
end
function c11634014.tghcost(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 c11634014.tghfilter(c)
return c:IsSetCard(0x145) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c11634014.tghtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,1,nil) and Duel.IsExistingMatchingCard(c11634014.tghfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11634014.tghop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then
if not Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,0,LOCATION_MZONE,1,nil,LOCATION_EXTRA) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11634014.tghfilter,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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(function(e,c)
return c:IsLocation(LOCATION_EXTRA) end)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(function(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x145) and sumtype&SUMMON_TYPE_PENDULUM==SUMMON_TYPE_PENDULUM end)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c11634014.tehckfil(c)
local rc=nil
if c:IsReason(REASON_BATTLE) then
rc=c:GetReasonCard()
elseif c:IsReason(REASON_EFFECT) then
rc=c:GetReasonEffect():GetHandler()
end
if not (rc and rc:IsSummonLocation(LOCATION_EXTRA)) then return false end
if c:IsReason(REASON_BATTLE) then
local bc=Duel.GetAttacker()
return bc and bc==rc
elseif c:IsReason(REASON_EFFECT) then
return true
end
end
function c11634014.tehcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11634014.tehckfil,1,nil)
end
function c11634014.tehcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c11634014.tehtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(function(c) return c:IsAbleToHand() and c:IsSetCard(0x145) and c:IsType(TYPE_MONSTER) end,tp,LOCATION_GRAVE,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(function(c) return c:IsAbleToExtra() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) end,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c11634014.tehop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,function(c) return c:IsAbleToHand() and c:IsSetCard(0x145) and c:IsType(TYPE_MONSTER) end,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tc)
local sg=Duel.SelectMatchingCard(tp,function(c) return c:IsAbleToExtra() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) end,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
--凶导的异教审判官
function c11634015.initial_effect(c)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,11634015)
e1:SetCondition(c11634015.tgcon)
e1:SetTarget(c11634015.tgtg)
e1:SetOperation(c11634015.tgop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(function(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroupCount(function(c) return c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) end,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)*300 end)
c:RegisterEffect(e2)
--to grave and hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(function(e)
local tp=e:GetHandlerPlayer()
return e:GetHandler():GetReasonPlayer()==1-tp end)
e3:SetTarget(c11634015.tghtg)
e3:SetOperation(c11634015.tghop)
c:RegisterEffect(e3)
end
function c11634015.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c11634015.tgck(g,tp)
return g:GetClassCount(Card.GetControler)==g:GetCount()
end
function c11634015.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_EXTRA,LOCATION_EXTRA,nil)
if chk==0 then return g:CheckSubGroup(c11634015.tgck,1,2,tp) and Duel.IsExistingMatchingCard(nil,1-tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_EXTRA)
end
function c11634015.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rg=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if #rg>0 then
Duel.ConfirmCards(tp,rg)
end
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_EXTRA,LOCATION_EXTRA,nil)
if g:CheckSubGroup(c11634015.tgck,1,2,tp) then
local sg=g:SelectSubGroup(tp,c11634015.tgck,false,1,2,tp)
local atk=0
if Duel.SendtoGrave(sg,REASON_EFFECT)~=0 then atk=sg:GetSum(Card.GetAttack) end
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(math.floor(atk/2))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
end
function c11634015.tghfilter(c)
return c:IsSetCard(0x145) and not c:IsCode(11634015) and c:IsAbleToHand()
end
function c11634015.tghtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,1,nil) and Duel.IsExistingMatchingCard(c11634015.tghfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c11634015.tghop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11634015.tghfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--教导祈祷
function c11634016.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,11634016)
e1:SetCost(c11634016.cost)
e1:SetTarget(c11634016.target)
e1:SetOperation(c11634016.activate)
c:RegisterEffect(e1)
--copy spell
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11634016)
e2:SetTarget(c11634016.cptg)
e2:SetOperation(c11634016.cpop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(11634016,ACTIVITY_SPSUMMON,c11634016.counterfilter)
end
function c11634016.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
function c11634016.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(11634016,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(function(e,c)
return c:IsLocation(LOCATION_EXTRA) end)
Duel.RegisterEffect(e1,tp)
end
function c11634016.filter(c)
return c:IsFaceup() and (c:IsSetCard(0x145) or c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)) and not c:IsCode(11634016) and c:IsAbleToDeck()
end
function c11634016.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.IsExistingTarget(c11634016.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,5,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c11634016.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,5,5,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c11634016.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==5 then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(function(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) end)
Duel.RegisterEffect(e1,tp)
end
function c11634016.cpfil(c)
return c:IsSetCard(0x145) and c:IsType(TYPE_SPELL) and c:IsAbleToDeckAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function c11634016.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11634016.cpfil,tp,LOCATION_GRAVE,0,1,nil) and e:GetHandler():IsAbleToDeckAsCost() end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetCategory(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=Duel.SelectMatchingCard(tp,c11634016.cpfil,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst()
local sg=Group.FromCards(e:GetHandler(),tc)
Duel.SendtoDeck(sg,nil,2,REASON_COST)
local te=tc:CheckActivateEffect(true,true,false)
Duel.ClearTargetCard()
e:SetProperty(te:GetProperty())
e:SetLabel(te:GetLabel())
e:SetLabelObject(te:GetLabelObject())
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
te:SetLabel(e:GetLabel())
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function c11634016.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local te=e:GetLabelObject()
e:SetLabel(te:GetLabel())
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
te:SetLabel(e:GetLabel())
te:SetLabelObject(e:GetLabelObject())
end
--教导雷怒
function c11634017.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,11634017+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c11634017.actg)
e1:SetOperation(c11634017.acop)
c:RegisterEffect(e1)
end
function c11634017.tarfil1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsSetCard(0x145) and Duel.IsExistingTarget(c11634017.tarfil2,tp,0,LOCATION_MZONE,1,nil,e,tp,c)
end
function c11634017.tarfil2(c,e,tp,sc)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_EXTRA,LOCATION_EXTRA,nil)
local cg=Group.FromCards(sc,c)
return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) and g:CheckSubGroup(c11634017.tgck,1,2,cg)
end
function c11634017.tgck(g,cg)
return g:GetSum(Card.GetAttack)<=cg:GetSum(Card.GetAttack) and g:GetClassCount(Card.GetCode)==g:GetCount()
end
function c11634017.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c11634017.tarfil1,tp,LOCATION_MZONE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(nil,1-tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local tc=Duel.SelectTarget(tp,c11634017.tarfil1,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
Duel.SelectTarget(tp,c11634017.tarfil2,tp,0,LOCATION_MZONE,1,1,nil,e,tp,tc)
end
function c11634017.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local rg=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if #rg>0 then
Duel.ConfirmCards(tp,rg)
end
if cg:GetCount()==2 then
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_EXTRA,LOCATION_EXTRA,nil)
if g:CheckSubGroup(c11634017.tgck,1,2,cg) then
local sg=g:SelectSubGroup(tp,c11634017.tgck,false,1,2,cg)
if Duel.SendtoGrave(sg,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Release(cg,REASON_EFFECT)
end
end
end
end
......@@ -23,7 +23,7 @@ function c13015714.initial_effect(c)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCountLimit(1,23015714)
e2:SetTarget(c13015714.rdsptg)
e2:SetOperation(c13015714.rdspop)
c:RegisterEffect(e2)
......@@ -36,7 +36,7 @@ function c13015714.tddtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,g:GetCount())
Duel.SetChainLimit(c13015714.chlimit)
end
function c13015714.tddop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -53,7 +53,7 @@ function c13015714.rdsptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectTarget(tp,function(c) return c:IsAbleToRemove() and c:IsSetCard(0xe01) end,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD)
Duel.SetChainLimit(c13015714.chlimit)
end
function c13015714.chlimit(e,ep,tp)
return tp==ep
......
......@@ -13,7 +13,7 @@ function c13015715.initial_effect(c)
c13015715.tdr_effect=e1
c:RegisterEffect(e1)
--splimit
--draw
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
......@@ -42,8 +42,7 @@ local lv=c:GetLevel()
function c13015715.tdrcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.ShuffleHand(tp)
end
function c13015715.tdrtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) or Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsCanChangePosition() end,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) or Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
......@@ -57,7 +56,7 @@ return not (c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_WATER))
end
function c13015715.tdrop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SendtoGrave(c,REASON_EFFECT+REASON_DISCARD)
Duel.SendtoGrave(c,REASON_EFFECT)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
......@@ -2,6 +2,7 @@
function c13015719.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,99,c13015719.lcheck)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE)
......@@ -13,25 +14,6 @@ function c13015719.initial_effect(c)
e1:SetOperation(c13015719.thop)
c:RegisterEffect(e1)
--link summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SET_AVAILABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c13015719.LinkCondition(nil,2,2,c13015719.lcheck))
e0:SetTarget(c13015719.LinkTarget(nil,2,2,c13015719.lcheck))
e0:SetOperation(c13015719.LinkOperation(nil,2,2,c13015719.lcheck))
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e4:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e4:SetRange(LOCATION_EXTRA)
e4:SetTargetRange(LOCATION_SZONE,0)
e4:SetValue(c13015719.matval)
e4:SetTarget(c13015719.mattg)
c:RegisterEffect(e4)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(13015719,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -44,98 +26,9 @@ local e4=Effect.CreateEffect(c)
e2:SetOperation(c13015719.lkop)
c:RegisterEffect(e2)
end
function c13015719.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
return true,true
end
function c13015719.mattg(e,c)
return not c:IsSetCard(0xe01)
end
function c13015719.lcheckfilter(c)
return c:IsSetCard(0xe01)
end
function c13015719.lcheck(g)
return g:IsExists(c13015719.lcheckfilter,1,nil)
end
function c13015719.matf(c,lc)
return not c:IsSetCard(0xe01)
end
function c13015719.LinkCondition(f,minc,maxc,gf)
return function(e,c,og,lmat,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(aux.LConditionFilter,nil,f,c,e)
else
mg=aux.GetLinkMaterials(tp,f,c,e)
end
if Duel.IsExistingMatchingCard(c13015719.matf,tp,LOCATION_SZONE,0,1,nil) then
local m1=Duel.GetMatchingGroup(c13015719.matf,tp,LOCATION_SZONE,0,c,c)
mg:Merge(m1)
end
if lmat~=nil then
if not aux.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(aux.LCheckGoal,minc,maxc,tp,c,gf,lmat)
end
end
function c13015719.LinkTarget(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local mg=nil
if og then
mg=og:Filter(aux.LConditionFilter,nil,f,c,e)
else
mg=aux.GetLinkMaterials(tp,f,c,e)
end
if Duel.IsExistingMatchingCard(c13015719.matf,tp,LOCATION_SZONE,0,1,nil) then
local m1=Duel.GetMatchingGroup(c13015719.matf,tp,LOCATION_SZONE,0,c,c)
mg:Merge(m1)
end
if lmat~=nil then
if not aux.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,aux.LCheckGoal,cancel,minc,maxc,tp,c,gf,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function c13015719.LinkOperation(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max)
local g=e:GetLabelObject()
c:SetMaterial(g)
aux.LExtraMaterialCount(g,c,tp)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_LINK)
g:DeleteGroup()
end
end
return g:IsExists(Card.IsLinkSetCard,1,nil,0xe01)
end
function c13015719.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(function(c) return c:IsSetCard(0xe01) and c:IsAbleToGraveAsCost() end,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,function(c) return c:IsSetCard(0xe01) and c:IsAbleToGraveAsCost() end,tp,LOCATION_HAND,0,1,1,nil)
......
......@@ -11,17 +11,7 @@ function c13015721.initial_effect(c)
e1:SetOperation(c13015721.acop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,23015721)
e2:SetCondition(function(e)
return e:GetHandler():IsReason(REASON_EFFECT) end)
e2:SetTarget(c13015721.srtg)
e2:SetOperation(c13015721.srop)
c:RegisterEffect(e2)
end
function c13015721.espfil(c,e,tp,mg)
return c:IsType(TYPE_SYNCHRO) and mg:FilterCount(Card.IsType,nil,TYPE_TUNER)==1 and mg:FilterCount(function(c) return not c:IsType(TYPE_TUNER) end,nil)>=1 and c:GetLevel()==mg:GetSum(Card.GetLevel) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SPECIAL,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
......@@ -37,7 +27,7 @@ end
function c13015721.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(function(c) return c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemove() and c:IsCanBeSynchroMaterial() end,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local g=Duel.GetMatchingGroup(function(c) return c:IsSetCard(0xe01) and c:IsAbleToRemove() and c:IsCanBeSynchroMaterial() end,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and g:CheckSubGroup(c13015721.matgck,1,99,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(13015721,0)) then
local mg=g:SelectSubGroup(tp,c13015721.matgck,false,1,99,e,tp)
local sc=Duel.SelectMatchingCard(tp,c13015721.espfil,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg):GetFirst()
......
......@@ -24,6 +24,7 @@ c13090011.star_knight_spsummon_effect=e3
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,23090011)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.setcon)
e1:SetOperation(cm.setop)
......@@ -60,20 +61,17 @@ end
function cm.f2(c)
return c:IsType(TYPE_MONSTER) end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 or Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then return end
local g1
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 or Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
if Duel.IsExistingMatchingCard(cm.f2,tp,LOCATION_HAND,0,1,nil) then
g1=Duel.SelectMatchingCard(tp,cm.f2,tp,LOCATION_HAND,0,1,1,nil)
else
g1=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,1,nil)
end
local g1=Duel.GetDecktopGroup(tp,1)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM)
local g2=Duel.SelectMatchingCard(1-tp,nil,1-tp,LOCATION_HAND,0,1,1,nil)
local g2=Duel.GetDecktopGroup(1-tp,1)
local atpsl=g1:GetFirst()
local ntpsl=g2:GetFirst()
Duel.ConfirmCards(1-tp,atpsl)
Duel.ConfirmCards(tp,atpsl)
Duel.ConfirmCards(tp,ntpsl)
Duel.ConfirmCards(1-tp,ntpsl)
local atplv=atpsl:IsType(TYPE_MONSTER) and atpsl:GetAttack() or 0
local ntplv=ntpsl:IsType(TYPE_MONSTER) and ntpsl:GetAttack() or 0
if atplv<=ntplv then
......
......@@ -32,6 +32,7 @@ local e1=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1,23090012)
e2:SetCondition(c13090012.espcon)
e2:SetOperation(c13090012.espop)
c:RegisterEffect(e2)
......@@ -133,10 +134,26 @@ function cm.splimit1(e,c,sump,sumtype,sumpos,targetp,se)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g1=Duel.GetDecktopGroup(tp,1)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM)
local g2=Duel.GetDecktopGroup(1-tp,1)
local atpsl=g1:GetFirst()
local ntpsl=g2:GetFirst()
Duel.ConfirmCards(1-tp,atpsl)
Duel.ConfirmCards(tp,atpsl)
Duel.ConfirmCards(tp,ntpsl)
Duel.ConfirmCards(1-tp,ntpsl)
local atplv=atpsl:IsType(TYPE_MONSTER) and atpsl:GetAttack() or 0
local ntplv=ntpsl:IsType(TYPE_MONSTER) and ntpsl:GetAttack() or 0
if atplv<=ntplv then
local tc=Duel.GetAttacker()
if tc:IsAbleToDeck() then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
end
function cm.espcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
......
......@@ -13,6 +13,7 @@ function c13090013.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1,23090013)
e2:SetCondition(cm.espcon)
e2:SetOperation(cm.espop)
c:RegisterEffect(e2)
......
--额外爆破
local m=13090030
local cm=_G["c"..m]
function c13090030.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.extg)
e1:SetOperation(cm.exop)
c:RegisterEffect(e1)
end
function cm.extg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_EXTRA)
end
function cm.exop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
g:RemoveCard(sg:GetFirst())
Duel.ShuffleExtra(1-tp)
local lg=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0)
Duel.ConfirmCards(1-tp,lg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local lsg=lg:FilterSelect(1-tp,Card.IsAbleToRemove,1,1,nil)
Duel.Remove(lsg,POS_FACEUP,REASON_EFFECT)
lg:RemoveCard(lsg:GetFirst())
Duel.ShuffleExtra(tp)
if Duel.SelectYesNo(tp,aux.Stringid(13090030,0)) then
local ta=Duel.GetMatchingGroup(nil,tp,LOCATION_EXTRA,0,nil)
local b1=Duel.IsExistingMatchingCard(function(c) return c:IsAbleToRemove() and c:IsFaceup() and c:IsType(TYPE_PENDULUM) end,tp,0,LOCATION_EXTRA,1,nil)
local b2=ta:GetClassCount(Card.GetCode)>=2
local op=0
if b1 and not b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,1))
end
if not b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,2))+1
end
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))+1
end
if op==0 then
local tb=g:FilterSelect(tp,function(c) return c:IsAbleToRemove() and c:IsFaceup() and c:IsType(TYPE_PENDULUM) end,1,3,nil)
Duel.Remove(tb,POS_FACEUP,REASON_EFFECT)
end
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local aa=lg:Select(tp,1,1,nil):GetFirst()
lg:Remove(Card.IsCode,nil,aa:GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local bb=lg:Select(tp,1,1,nil):GetFirst()
if Duel.IsExistingMatchingCard(function(c) return c:IsCode(aa:GetCode()) end,tp,0,LOCATION_EXTRA,1,nil) and Duel.IsExistingMatchingCard(function(c) return c:IsCode(bb:GetCode()) end,tp,0,LOCATION_EXTRA,1,nil) then
Duel.ConfirmCards(1-tp,g)
local cc=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil)
Duel.Remove(cc,POS_FACEUP,REASON_EFFECT)
end
Duel.ShuffleExtra(tp)
Duel.ShuffleExtra(1-tp)
end
end
end
......@@ -19,7 +19,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
......
......@@ -19,7 +19,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
......
......@@ -19,7 +19,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
......
--渊海从者-超量
function c25800602.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,2,2)
c:EnableReviveLimit()
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(25800602,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,25800602)
e3:SetCost(c25800602.cost)
e3:SetOperation(c25800602.setop)
c:RegisterEffect(e3)
end
function c25800602.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_COST) end
Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_COST)
end
function c25800602.setfilter(c)
return c:IsSetCard(0x3213) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c25800602.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c25800602.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--渊海从者-超量
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--act in set turn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
----
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(25800604,0))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,25800605)
e3:SetTarget(c25800604.target2)
e3:SetOperation(c25800604.operation2)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:GetType()==TYPE_TRAP and c:IsDiscardable()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (not e:GetHandler():IsLocation(LOCATION_HAND) or Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler())) end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) end
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked()
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPES_NORMAL_TRAP_MONSTER,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.xyzfilter(c)
return c:IsXyzSummonable(nil)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPES_NORMAL_TRAP_MONSTER,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,tp) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
local g=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
-----
function s.filter(c)
return c:IsType(TYPE_XYZ) and c:IsReleasableByEffect()
end
function c25800604.target2(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.CheckReleaseGroupEx(tp,s.filter,1,nil) and 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 c25800604.operation2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectReleaseGroupEx(tp,s.filter,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Release(g,REASON_EFFECT)~=0 then
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
end
end
\ No newline at end of file
--渊海从者-3
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+1)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.target2)
e3:SetOperation(s.activate2)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:GetType()==TYPE_TRAP and c:IsDiscardable()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (not e:GetHandler():IsLocation(LOCATION_HAND) or Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler())) end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) end
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked()
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPES_NORMAL_TRAP_MONSTER,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.xyzfilter(c)
return c:IsXyzSummonable(nil)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPES_NORMAL_TRAP_MONSTER,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,tp) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
local g=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
-----
function s.filter(c)
return c:IsType(TYPE_NORMAL) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,c) end
local g1=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,0,c)
local g2=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
local ct1=g1:GetCount()
local ct2=g2:GetCount()
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,ct1+((ct1>ct2) and ct2 or ct1),0,0)
end
function s.activate2(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,0,aux.ExceptThisCard(e))
local ct1=Duel.Destroy(g1,REASON_EFFECT)
if ct1==0 then return end
local g2=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
local ct2=g2:GetCount()
if ct2==0 then return end
Duel.BreakEffect()
if ct2<=ct1 then
Duel.Destroy(g2,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g3=g2:Select(tp,ct1,ct1,nil)
Duel.HintSelection(g3)
Duel.Destroy(g3,REASON_EFFECT)
end
end
--渊海从者-超量
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--act in set turn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+1)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.settg)
e3:SetOperation(s.setop)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:GetType()==TYPE_TRAP and c:IsDiscardable()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (not e:GetHandler():IsLocation(LOCATION_HAND) or Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler())) end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) end
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked()
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPES_NORMAL_TRAP_MONSTER,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.xyzfilter(c)
return c:IsXyzSummonable(nil)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPES_NORMAL_TRAP_MONSTER,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,tp) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
local g=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
----
function s.stfilter(c)
return c:IsSetCard(0x3213) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
and not c:IsCode(id)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.stfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.stfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--渊海从者-
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--act in set turn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.settg)
e3:SetOperation(s.setop)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:GetType()==TYPE_TRAP and c:IsDiscardable()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (not e:GetHandler():IsLocation(LOCATION_HAND) or Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler())) end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) end
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked()
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPES_NORMAL_TRAP_MONSTER,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.xyzfilter(c)
return c:IsXyzSummonable(nil)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPES_NORMAL_TRAP_MONSTER,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,tp) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
local g=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
----
function s.stfilter(c)
return c:IsSetCard(0x3213) 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.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.stfilter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.stfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--深覆境的坠梦
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,id+o*1000)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCondition(s.thcon)
e5:SetCode(EVENT_DESTROYED)
c:RegisterEffect(e5)
end
function s.tgfilter(c)
return c:IsCode(33332301) and c:IsAbleToGraveAsCost()
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xc552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil)
if chk==0 then return #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_COST)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp) end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,500)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.ffilter(c)
return c:IsCode(33332310) and c:IsFaceup()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.Damage(tp,500,REASON_EFFECT)>0 and Duel.Draw(tp,1,REASON_EFFECT)>0 then
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if Duel.IsExistingMatchingCard(s.ffilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) 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
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() and e:GetHandler():IsLocation(LOCATION_GRAVE) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
\ No newline at end of file
--深覆境的旅者 艾希菈
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function s.spfilter(c,tp)
return c:IsFacedown() and c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0
end
function s.spcon(e,c)
if c==nil then return true end
if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function s.filter(c,e,tp)
return c:IsSetCard(0xc552) and ((c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or 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_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
end
function s.ffilter(c)
return c:IsSetCard(0xc552) and c:IsFaceup() and c:IsType(TYPE_FIELD)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
local res=false
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (not tc:IsSSetable() or Duel.SelectYesNo(tp,Stringid(id,1))) then
res=Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0
if res then Duel.ConfirmCards(1-tp,tc) end
else
res=Duel.SSet(tp,tc)>0
end
if Duel.IsExistingMatchingCard(s.ffilter,tp,LOCATION_SZONE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--深覆境的时隙 白兔
local s,id,o=GetID()
function s.initial_effect(c)
--defup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENSE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(function(e,tp) return not Duel.IsExistingMatchingCard(function(e,tp) return c:IsCode(33332301) and c:IsFaceup() end,tp,LOCATION_ONFIELD,0,1,nil) end)
e1:SetValue(0)
c:RegisterEffect(e1)
--be target
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DECKDES+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,id)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(s.cost)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,id+o*1000)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCondition(s.thcon)
e5:SetCode(EVENT_DESTROYED)
c:RegisterEffect(e5)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.ChangePosition(e:GetHandler(),POS_FACEDOWN_DEFENSE)
end
function s.filter(c)
return c:IsCode(33332301) and c:IsAbleToGrave()
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_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function s.pfilter(c,tp)
return c:IsSetCard(0xc552) and c:IsType(TYPE_FIELD) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_DECK,0,1,nil,tp) end
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--深覆境的癫狂 三月兔
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,id+o*1000)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCondition(s.thcon)
e5:SetCode(EVENT_DESTROYED)
c:RegisterEffect(e5)
end
function s.filter1(c)
return c:IsSetCard(0xc552) 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.filter1,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 and c:IsRelateToEffect(e) and c:IsFaceup() and c:IsCanTurnSet() and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect()
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
end
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function s.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local rc=Duel.GetFirstTarget()
if rc:IsRelateToEffect(e) and Duel.Destroy(rc,REASON_EFFECT)~=0
and not (rc:IsLocation(LOCATION_HAND+LOCATION_DECK) or rc:IsLocation(LOCATION_REMOVED) and rc:IsFacedown())
and aux.NecroValleyFilter()(rc) then
if rc:IsType(TYPE_MONSTER) and (not rc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
or rc:IsLocation(LOCATION_EXTRA) and rc:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,rc)>0)
and rc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
and Duel.SelectYesNo(tp,aux.Stringid(90809975,3)) then
Duel.BreakEffect()
Duel.SpecialSummon(rc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,rc)
elseif (rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and rc:IsSSetable(true) and Duel.SelectYesNo(tp,aux.Stringid(90809975,4)) then
Duel.BreakEffect()
Duel.SSet(tp,rc)
end
end
end
\ No newline at end of file
--深覆境的帽匠 疯帽子
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,id+o*1000)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCondition(s.thcon)
e5:SetCode(EVENT_DESTROYED)
c:RegisterEffect(e5)
end
function s.filter1(c,e,tp)
return c:IsSetCard(0xc552) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) and c:IsRelateToEffect(e) and c:IsFaceup() and c:IsCanTurnSet() then
Duel.BreakEffect()
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
end
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function s.filter(c)
return c:IsType(TYPE_MONSTER)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local rc=Duel.GetFirstTarget()
if rc:IsRelateToEffect(e) and Duel.Destroy(rc,REASON_EFFECT)~=0
and not (rc:IsLocation(LOCATION_HAND+LOCATION_DECK) or rc:IsLocation(LOCATION_REMOVED) and rc:IsFacedown())
and aux.NecroValleyFilter()(rc) then
if rc:IsType(TYPE_MONSTER) and (not rc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
or rc:IsLocation(LOCATION_EXTRA) and rc:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,rc)>0)
and rc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
and Duel.SelectYesNo(tp,aux.Stringid(90809975,3)) then
Duel.BreakEffect()
Duel.SpecialSummon(rc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,rc)
elseif (rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and rc:IsSSetable(true) and Duel.SelectYesNo(tp,aux.Stringid(90809975,4)) then
Duel.BreakEffect()
Duel.SSet(tp,rc)
end
end
end
\ No newline at end of file
--深覆境的怪奇 柴郡猫
local s,id,o=GetID()
function s.initial_effect(c)
--return
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,id+o*1000)
e3:SetTarget(s.rettg)
e3:SetOperation(s.retop)
c:RegisterEffect(e3)
end
function s.desfilter(c)
return c:IsFacedown()
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and s.desfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.BreakEffect()
if Duel.Destroy(tc,REASON_EFFECT)>0 and tc:IsSetCard(0xc552) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
function s.retfilter(c)
return c:IsFacedown() and c:IsAbleToHand()
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and s.retfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.retfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.retfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xc552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) 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
--深覆境的女王 血蔷薇
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--material
aux.AddFusionProcFunRep(c,s.mfilter,2,true)
--spsum condition
aux.AddContactFusionProcedure(c,function(c) return c:IsReleasable() and c:IsFacedown() end,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_MATERIAL)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(s.splimit)
c:RegisterEffect(e0)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+o*1000)
e2:SetCost(s.cost)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
end
function s.mfilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0xc552)
end
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function s.filter(c)
return c:IsSetCard(0xc552) 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_DAMAGE,nil,1,tp,500)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.Damage(tp,500,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,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
end
function s.filter1(c,e,tp)
return c:IsSetCard(0xc552) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.costfilter(c,tp)
return c:IsFacedown() and (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 or (c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5)) and c:IsReleasable()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return e:IsCostChecked() and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true)
Duel.ConfirmCards(1-tp,tc)
Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
\ No newline at end of file
--树界的深覆境 瓦德兰
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetCondition(s.descon)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,id)
e2:SetCost(s.cost)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc552)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil)
end
function s.filter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end
end
function s.filter1(c,e,tp)
return c:IsSetCard(0xc552) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.costfilter(c,tp)
return c:IsFacedown() and Duel.GetMZoneCount(tp,c,tp)>0 and c:IsReleasable()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end
\ No newline at end of file
--深覆境的源树 克利夫特
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id)
e2:SetCost(s.cost)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_GRAVE_ACTION)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,id+o*1000)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCondition(s.thcon)
e5:SetCode(EVENT_DESTROYED)
c:RegisterEffect(e5)
end
function s.costfilter(c,tp)
return c:IsFacedown() and Duel.GetMZoneCount(tp,c,tp)>0 and c:IsReleasable()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xc552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc552))
e1:SetValue(500)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) 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
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function s.thfilter(c)
return c:IsSetCard(0xc552) and c:IsAbleToHand() and c:IsFaceup()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--深覆境的导引
local s,id,o=GetID()
function s.initial_effect(c)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,id)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc552) and c:IsAbleToDeck()
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(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_DECKBOTTOM,REASON_EFFECT)>0
and tc:IsLocation(LOCATION_DECK) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function s.setfilter(c,e,tp)
local b1=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
local st=Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp)
return b1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp)
or c:IsType(TYPE_FIELD) and c:IsSSetable(true)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g2=Duel.SelectTarget(tp,s.setfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
if g2:GetFirst():IsType(TYPE_MONSTER) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,0,0)
else
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g2,1,0,0)
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc2=tg:Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetFirst()
if tc2 and tc2:IsRelateToEffect(e) then
if tc2:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(tc2,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)
else
Duel.SSet(tp,tc2,1-tp)
end
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xc552) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.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,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--辉厄剑·天地之咒灵
function c46800200.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,46800200)
e1:SetCondition(c46800200.tdcon1)
e1:SetCost(c46800200.spcost)
e1:SetTarget(c46800200.sptg)
e1:SetOperation(c46800200.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,46800201)
e2:SetTarget(c46800200.target)
e2:SetOperation(c46800200.operation)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(c46800200.tdcon2)
c:RegisterEffect(e3)
end
function c46800200.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,46800220)
end
function c46800200.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,46800220)
end
function c46800200.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c46800200.filter(c,tp)
return c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c46800200.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=0
if Duel.IsPlayerAffectedByEffect(tp,46800215) then loc=LOCATION_ONFIELD end
if chk==0 then return Duel.IsExistingMatchingCard(c46800200.filter,tp,LOCATION_ONFIELD,loc,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c46800200.filter,tp,LOCATION_ONFIELD,loc,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c46800200.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c46800200.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetMZoneCount(1-tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) then
if Duel.SpecialSummonStep(c,0,tp,1-tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c46800200.efilter)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(4000)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
Duel.SpecialSummonComplete()
end
end
function c46800200.pfilter(c,tp)
return c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0xa12)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c46800200.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c46800200.pfilter,tp,LOCATION_DECK,0,1,nil,tp) end
end
function c46800200.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c46800200.pfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
end
\ No newline at end of file
--辉厄剑·神星之咒灵
function c46800205.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,46800205)
e1:SetCondition(c46800205.tdcon1)
e1:SetCost(c46800205.spcost)
e1:SetTarget(c46800205.sptg)
e1:SetOperation(c46800205.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,46800206)
e2:SetCost(c46800205.cost)
e2:SetTarget(c46800205.target)
e2:SetOperation(c46800205.op)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(c46800205.tdcon2)
c:RegisterEffect(e3)
end
function c46800205.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,46800220)
end
function c46800205.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,46800220)
end
function c46800205.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c46800205.filter(c,tp)
return c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c46800205.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=0
if Duel.IsPlayerAffectedByEffect(tp,46800215) then loc=LOCATION_ONFIELD end
if chk==0 then return Duel.IsExistingMatchingCard(c46800205.filter,tp,LOCATION_ONFIELD,loc,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c46800205.filter,tp,LOCATION_ONFIELD,loc,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c46800205.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c46800205.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetMZoneCount(1-tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) then
if Duel.SpecialSummonStep(c,0,tp,1-tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c46800205.efilter)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(4000)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
Duel.SpecialSummonComplete()
end
end
function c46800205.filter2(c)
return c:IsSetCard(0xa12) and c:IsAbleToHand() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end
function c46800205.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c46800205.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c46800205.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c46800205.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c46800205.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
\ No newline at end of file
--辉厄剑·空界之咒灵
function c46800210.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,46800210)
e1:SetCondition(c46800210.tdcon1)
e1:SetCost(c46800210.spcost)
e1:SetTarget(c46800210.sptg)
e1:SetOperation(c46800210.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,46800211)
e2:SetCost(c46800210.cost)
e2:SetTarget(c46800210.target)
e2:SetOperation(c46800210.op)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(c46800210.tdcon2)
c:RegisterEffect(e3)
end
function c46800210.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,46800220)
end
function c46800210.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,46800220)
end
function c46800210.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c46800210.filter(c,tp)
return c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c46800210.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=0
if Duel.IsPlayerAffectedByEffect(tp,46800215) then loc=LOCATION_ONFIELD end
if chk==0 then return Duel.IsExistingMatchingCard(c46800210.filter,tp,LOCATION_ONFIELD,loc,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c46800210.filter,tp,LOCATION_ONFIELD,loc,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c46800210.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c46800210.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetMZoneCount(1-tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) then
if Duel.SpecialSummonStep(c,0,tp,1-tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c46800210.efilter)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(4000)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
Duel.SpecialSummonComplete()
end
end
function c46800210.filter2(c)
return c:IsSetCard(0xa12) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c46800210.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c46800210.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c46800210.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c46800210.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c46800210.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
\ No newline at end of file
--辉厄剑的蔽天阵
function c46800215.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(46800215)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,46800216)
e3:SetCost(c46800215.cost)
e3:SetTarget(c46800215.target)
e3:SetOperation(c46800215.op)
c:RegisterEffect(e3)
end
function c46800215.filter2(c)
return c:IsSetCard(0xa12) and c:IsAbleToHand()
end
function c46800215.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c46800215.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c46800215.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c46800215.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c46800215.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
\ No newline at end of file
--辉厄剑的诛杀阵
function c46800220.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(46800220)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,46800221)
e3:SetCondition(c46800220.thcon)
e3:SetTarget(c46800220.thtg)
e3:SetOperation(c46800220.thop)
c:RegisterEffect(e3)
end
function c46800220.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xa12)
end
function c46800220.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c46800220.cfilter,1,nil)
end
function c46800220.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(c46800220.cfilter,nil)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and g:IsContains(chkc) end
if chk==0 then return #g>0 end
if g:GetCount()==1 then
Duel.SetTargetCard(g)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c46800220.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,math.floor(Duel.GetFirstTarget():GetAttack()*0.5))
end
function c46800220.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Damage(1-tp,math.floor(tc:GetAttack()*0.5),REASON_EFFECT)
end
end
\ No newline at end of file
--辉厄剑的的原咒
function c46800225.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0xa12),1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c46800225.matval)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,46800225)
e2:SetCondition(c46800225.descon)
e2:SetTarget(c46800225.destg)
e2:SetOperation(c46800225.desop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetCost(c46800225.atkcost)
e3:SetTarget(c46800225.target)
e3:SetOperation(c46800225.activate)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_ATTACK)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_ATKCHANGE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e5:SetCondition(c46800225.atkcon)
e5:SetCost(c46800225.atkcost2)
e5:SetOperation(c46800225.atkop)
c:RegisterEffect(e5)
end
function c46800225.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
return true,not mg or not mg:IsExists(Card.IsControler,1,nil,1-tp)
end
function c46800225.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c46800225.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsType(TYPE_SPELL+TYPE_TRAP) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c46800225.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c46800225.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(46800225)==0 end
c:RegisterFlagEffect(46800225,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c46800225.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local bc=Duel.GetAttacker()
if chk==0 then return bc~=nil and bc:IsControler(1-tp) and bc:IsSetCard(0xa12) and bc:GetBattleTarget()~=c and bc:GetAttack()>0 end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,bc:GetAttack())
end
function c46800225.activate(e,tp,eg,ep,ev,re,r,rp)
local bc=Duel.GetAttacker()
if bc:IsRelateToBattle() and bc:IsFaceup() then
Duel.Damage(1-tp,bc:GetAttack(),REASON_EFFECT)
end
end
function c46800225.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsSetCard(0xa12) and bc:GetAttack()>0
end
function c46800225.atkcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(46800225)==0 end
c:RegisterFlagEffect(46800225,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c46800225.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c:IsRelateToBattle() and c:IsFaceup() and bc:IsRelateToBattle() and bc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(bc:GetAttack())
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--Kamipro 亚蒙
function c50213105.initial_effect(c)
c:EnableCounterPermit(0xcbf)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,50213105)
e1:SetTarget(c50213105.thtg)
e1:SetOperation(c50213105.thop)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e11)
--counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(50213105,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,50213106)
e2:SetTarget(c50213105.cttg)
e2:SetOperation(c50213105.ctop)
c:RegisterEffect(e2)
--attack counter 1
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLED)
e3:SetCondition(c50213105.atccon)
e3:SetOperation(c50213105.atcop)
c:RegisterEffect(e3)
--atkup
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50213105,1))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c50213105.atkcost)
e4:SetOperation(c50213105.atkop)
c:RegisterEffect(e4)
end
function c50213105.filter(c)
return c:IsSetCard(0xcbf) and not c:IsCode(50213105) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c50213105.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213105.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c50213105.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c50213105.filter,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 c50213105.afilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0xcbf,3)
end
function c50213105.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213105.afilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c50213105.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c50213105.afilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0xcbf,3)
tc=g:GetNext()
end
end
function c50213105.atccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c50213105.atcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0xcbf,1)
end
end
function c50213105.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xcbf,10,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xcbf,10,REASON_COST)
end
function c50213105.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--Kamipro 尼姬
function c50213110.initial_effect(c)
c:EnableCounterPermit(0xcbf)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,50213110)
e1:SetTarget(c50213110.thtg)
e1:SetOperation(c50213110.thop)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e11)
--recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(50213110,0))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,50213111)
e2:SetTarget(c50213110.rctg)
e2:SetOperation(c50213110.rcop)
c:RegisterEffect(e2)
--attack counter 1
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLED)
e3:SetCondition(c50213110.atccon)
e3:SetOperation(c50213110.atcop)
c:RegisterEffect(e3)
--atkup
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50213110,1))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c50213110.atkcost)
e4:SetOperation(c50213110.atkop)
c:RegisterEffect(e4)
end
function c50213110.filter(c)
return c:IsSetCard(0xcbf) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c50213110.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213110.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c50213110.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c50213110.filter,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 c50213110.rctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c50213110.rcop(e,tp,eg,ep,ev,re,r,rp)
local p,rec=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,rec,REASON_EFFECT)
end
function c50213110.atccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c50213110.atcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0xcbf,1)
end
end
function c50213110.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xcbf,10,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xcbf,10,REASON_COST)
end
function c50213110.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--Kamipro 库伯勒
function c50213115.initial_effect(c)
c:EnableCounterPermit(0xcbf)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,50213115)
e1:SetCondition(c50213115.spcon)
e1:SetTarget(c50213115.sptg)
e1:SetOperation(c50213115.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,50213116)
e2:SetTarget(c50213115.thtg)
e2:SetOperation(c50213115.thop)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e22)
--attack counter 1
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLED)
e3:SetCondition(c50213115.atccon)
e3:SetOperation(c50213115.atcop)
c:RegisterEffect(e3)
--atkup
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c50213115.atkcost)
e4:SetOperation(c50213115.atkop)
c:RegisterEffect(e4)
end
function c50213115.cfilter(c)
return c:IsSetCard(0xcbf) and c:IsFaceup()
end
function c50213115.spcon(e,tp,eg,ep,ev,re,r,rp)
local ct1=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
local ct2=Duel.GetMatchingGroupCount(c50213115.cfilter,tp,LOCATION_MZONE,0,nil)
local chk1=ct1==0
local chk2=ct2>0 and ct1-ct2==0
return chk1 or chk2
end
function c50213115.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c50213115.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c50213115.thfilter(c)
return c:IsSetCard(0xcbf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c50213115.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213115.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c50213115.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c50213115.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c50213115.atccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c50213115.atcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0xcbf,1)
end
end
function c50213115.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xcbf,10,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xcbf,10,REASON_COST)
end
function c50213115.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--Kamipro 巴力
function c50213120.initial_effect(c)
c:EnableCounterPermit(0xcbf)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,50213120)
e1:SetCondition(c50213120.spcon)
e1:SetTarget(c50213120.sptg)
e1:SetOperation(c50213120.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,50213121)
e2:SetTarget(c50213120.thtg)
e2:SetOperation(c50213120.thop)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e22)
--attack counter 1
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLED)
e3:SetCondition(c50213120.atccon)
e3:SetOperation(c50213120.atcop)
c:RegisterEffect(e3)
--atkup
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c50213120.atkcost)
e4:SetOperation(c50213120.atkop)
c:RegisterEffect(e4)
end
function c50213120.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf)
end
function c50213120.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c50213120.cfilter,tp,LOCATION_MZONE,0,2,nil)
end
function c50213120.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c50213120.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c50213120.thfilter(c)
return c:IsSetCard(0xcbf) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c50213120.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213120.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c50213120.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c50213120.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c50213120.atccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c50213120.atcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0xcbf,1)
end
end
function c50213120.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xcbf,10,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xcbf,10,REASON_COST)
end
function c50213120.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--Kamipro 苏尔
function c50213125.initial_effect(c)
c:EnableCounterPermit(0xcbf)
--summon with no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50213125,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c50213125.ntcon)
c:RegisterEffect(e1)
--change level
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_COST)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(c50213125.lvop)
c:RegisterEffect(e2)
local e22=Effect.CreateEffect(c)
e22:SetType(EFFECT_TYPE_SINGLE)
e22:SetCode(EFFECT_SUMMON_COST)
e22:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e22:SetOperation(c50213125.lvop2)
c:RegisterEffect(e22)
--negate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE)
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,50213126)
e3:SetCondition(c50213125.ngcon)
e3:SetCost(c50213125.ngcost)
e3:SetTarget(c50213125.ngtg)
e3:SetOperation(c50213125.ngop)
c:RegisterEffect(e3)
--attack counter 1
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLED)
e4:SetCondition(c50213125.atccon)
e4:SetOperation(c50213125.atcop)
c:RegisterEffect(e4)
--recover
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCost(c50213125.rccost)
e5:SetTarget(c50213125.rctg)
e5:SetOperation(c50213125.rcop)
c:RegisterEffect(e5)
end
function c50213125.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c50213125.lvcon(e)
return e:GetHandler():GetMaterialCount()==0
end
function c50213125.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c50213125.lvcon)
e1:SetValue(4)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
end
function c50213125.lvcon2(e)
return e:GetHandler():GetMaterialCount()>0
end
function c50213125.lvop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c50213125.lvcon2)
e1:SetValue(6)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
end
function c50213125.costfilter(c)
return c:IsSetCard(0xcbf) and c:IsAbleToGraveAsCost()
end
function c50213125.ngcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213125.costfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,c50213125.costf,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c50213125.ngcon(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c50213125.ngtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c50213125.ngop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c50213125.atccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c50213125.atcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0xcbf,1)
end
end
function c50213125.rccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xcbf,10,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xcbf,10,REASON_COST)
end
function c50213125.rctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(5000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,5000)
end
function c50213125.rcop(e,tp,eg,ep,ev,re,r,rp)
local p,rec=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,rec,REASON_EFFECT)
end
\ No newline at end of file
--Kamipro 阿芙罗狄忒
function c50213130.initial_effect(c)
c:EnableCounterPermit(0xcbf)
--return and spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50213130,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,50213130)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(c50213130.spcon)
e1:SetTarget(c50213130.sptg)
e1:SetOperation(c50213130.spop)
c:RegisterEffect(e1)
--attack three times
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e2:SetValue(2)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--damage val
local e33=e3:Clone()
e33:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e33)
--attack counter 2
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLED)
e4:SetCondition(c50213130.atccon)
e4:SetOperation(c50213130.atcop)
c:RegisterEffect(e4)
--atkup
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_ATKCHANGE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCost(c50213130.atkcost)
e5:SetTarget(c50213130.atktg)
e5:SetOperation(c50213130.atkop)
c:RegisterEffect(e5)
end
function c50213130.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c50213130.spfilter(c,tp)
return c:IsSetCard(0xcbf) and c:IsFaceup() and c:IsAbleToHand() and c:IsLevel(4)
and Duel.GetMZoneCount(tp,c)>0
end
function c50213130.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c50213130.spfilter(chkc,tp) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c50213130.spfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.GetFlagEffect(tp,50213130)==0 end
Duel.RegisterFlagEffect(tp,50213130,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c50213130.spfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c50213130.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0
and tc:IsLocation(LOCATION_HAND) and c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c50213130.atccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c50213130.atcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0xcbf,2)
end
end
function c50213130.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xcbf,10,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xcbf,10,REASON_COST)
end
function c50213130.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf)
end
function c50213130.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213130.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c50213130.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c50213130.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1500)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
\ No newline at end of file
--Kamipro 哈迪斯
function c50213135.initial_effect(c)
c:EnableCounterPermit(0xcbf)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,50213135)
e1:SetCondition(c50213135.spcon)
e1:SetTarget(c50213135.sptg)
e1:SetOperation(c50213135.spop)
c:RegisterEffect(e1)
--double damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetCondition(c50213135.damcon)
e2:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e2)
--pierce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e3)
--attack counter 2
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLED)
e4:SetCondition(c50213135.atccon)
e4:SetOperation(c50213135.atcop)
c:RegisterEffect(e4)
--remove
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCost(c50213135.rmcost)
e5:SetTarget(c50213135.rmtg)
e5:SetOperation(c50213135.rmop)
c:RegisterEffect(e5)
end
function c50213135.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK)
end
function c50213135.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c50213135.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c50213135.damcon(e)
return e:GetHandler():GetBattleTarget()~=nil
end
function c50213135.atccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c50213135.atcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0xcbf,2)
end
end
function c50213135.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xcbf,10,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xcbf,10,REASON_COST)
end
function c50213135.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
or Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c50213135.rmop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil)
local sg=Group.CreateGroup()
if g1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
sg1=g1:Select(tp,0,1,nil)
sg:Merge(sg1)
end
if g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
sg2=g2:Select(tp,0,1,nil)
sg:Merge(sg2)
end
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--Kamipro 拜亚提斯
function c50213140.initial_effect(c)
c:EnableCounterPermit(0xcbf)
--special summon (self)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,50213140)
e1:SetCost(c50213140.spcost)
e1:SetTarget(c50213140.sptg)
e1:SetOperation(c50213140.spop)
c:RegisterEffect(e1)
--add counter and damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(c50213140.regop)
c:RegisterEffect(e2)
local e22=Effect.CreateEffect(c)
e22:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e22:SetCode(EVENT_CHAIN_SOLVED)
e22:SetRange(LOCATION_MZONE)
e22:SetCondition(c50213140.damcon)
e22:SetOperation(c50213140.damop)
c:RegisterEffect(e22)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(50213140,0))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetTarget(c50213140.rmtg)
e3:SetOperation(c50213140.rmop)
c:RegisterEffect(e3)
--attack counter 2
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLED)
e4:SetCondition(c50213140.atccon)
e4:SetOperation(c50213140.atcop)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(50213140,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCost(c50213140.descost)
e5:SetTarget(c50213140.destg)
e5:SetOperation(c50213140.desop)
c:RegisterEffect(e5)
end
function c50213140.costfilter(c)
return c:IsSetCard(0xcbf) and c:IsDiscardable()
end
function c50213140.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213140.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c50213140.costfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
end
function c50213140.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c50213140.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c50213140.regop(e,tp,eg,ep,ev,re,r,rp)
if rp==1-tp and re:IsActiveType(TYPE_MONSTER) then
e:GetHandler():RegisterFlagEffect(50213140,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
end
end
function c50213140.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetFlagEffect(50213140)~=0 and re:IsActiveType(TYPE_MONSTER)
end
function c50213140.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,50213140)
Duel.Damage(1-tp,300,REASON_EFFECT)
end
function c50213140.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c50213140.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
tc:RegisterFlagEffect(502131401,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(c50213140.retcon)
e1:SetOperation(c50213140.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c50213140.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(502131401)~=0
end
function c50213140.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function c50213140.atccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c50213140.atcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0xcbf,2)
end
end
function c50213140.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xcbf,10,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xcbf,10,REASON_COST)
end
function c50213140.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsPosition,tp,0,LOCATION_MZONE,1,nil,POS_ATTACK) end
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_ATTACK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c50213140.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_ATTACK)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--Kamipro 戴安娜
function c50213145.initial_effect(c)
c:EnableCounterPermit(0xcbf)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,50213145)
e1:SetCondition(c50213145.spcon)
e1:SetTarget(c50213145.sptg)
e1:SetOperation(c50213145.spop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_TO_HAND)
e2:SetCountLimit(1,50213146)
e2:SetCondition(c50213145.drcon)
e2:SetTarget(c50213145.drtg)
e2:SetOperation(c50213145.drop)
c:RegisterEffect(e2)
--add counter
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c50213145.cttg)
e3:SetOperation(c50213145.ctop)
c:RegisterEffect(e3)
--attack counter 2
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLED)
e4:SetCondition(c50213145.atccon)
e4:SetOperation(c50213145.atcop)
c:RegisterEffect(e4)
--add 10 counters
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(50213145,1))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCost(c50213145.a10cost)
e5:SetTarget(c50213145.a10tg)
e5:SetOperation(c50213145.a10op)
c:RegisterEffect(e5)
end
function c50213145.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW)
end
function c50213145.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c50213145.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c50213145.drfilter(c,tp)
return c:IsControler(1-tp) and not c:IsReason(REASON_DRAW)
end
function c50213145.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c50213145.drfilter,1,nil,tp)
end
function c50213145.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c50213145.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c50213145.afilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf) and c:IsCanAddCounter(0xcbf,2)
end
function c50213145.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213145.afilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c50213145.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c50213145.afilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0xcbf,2)
tc=g:GetNext()
end
end
function c50213145.atccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c50213145.atcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0xcbf,2)
end
end
function c50213145.a10cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xcbf,10,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xcbf,10,REASON_COST)
end
function c50213145.a10filter(c)
return c:IsFaceup() and c:IsCanAddCounter(0xcbf,10)
end
function c50213145.a10tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213145.a10filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
end
function c50213145.a10op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c50213145.a10filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
local tc=g:GetFirst()
if tc then
tc:AddCounter(0xcbf,10)
end
end
\ No newline at end of file
--Kamipro 奥西里斯
function c50213150.initial_effect(c)
c:EnableCounterPermit(0xcbf)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c50213150.spcon)
e1:SetOperation(c50213150.spop)
c:RegisterEffect(e1)
--atkdown
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c50213150.atkcon)
e2:SetTarget(c50213150.atktg)
e2:SetOperation(c50213150.atkop)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e22)
--disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,50213150)
e3:SetCondition(c50213150.discon)
e3:SetCost(c50213150.discost)
e3:SetTarget(c50213150.distg)
e3:SetOperation(c50213150.disop)
c:RegisterEffect(e3)
--attack counter 2
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLED)
e4:SetCondition(c50213150.atccon)
e4:SetOperation(c50213150.atcop)
c:RegisterEffect(e4)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCost(c50213150.thcost)
e5:SetTarget(c50213150.thtg)
e5:SetOperation(c50213150.thop)
c:RegisterEffect(e5)
end
function c50213150.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsCanRemoveCounter(tp,1,0,0xcbf,6,REASON_COST)
end
function c50213150.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RemoveCounter(tp,1,0,0xcbf,6,REASON_COST)
end
function c50213150.atkfilter(c,e,tp)
return c:IsControler(tp) and c:IsPosition(POS_FACEUP) and (not e or c:IsRelateToEffect(e))
end
function c50213150.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c50213150.atkfilter,1,nil,nil,1-tp)
end
function c50213150.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(eg)
end
function c50213150.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c50213150.atkfilter,nil,e,1-tp)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function c50213150.disfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf) and c:IsType(TYPE_XYZ)
end
function c50213150.discon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
and Duel.IsExistingMatchingCard(c50213150.disfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c50213150.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c50213150.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c50213150.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c50213150.atccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c50213150.dfilter(c)
return not c:IsSetCard(0xcbf) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c50213150.atcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:AddCounter(0xcbf,2) then
if Duel.IsExistingMatchingCard(c50213150.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(50213150,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c50213150.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
function c50213150.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xcbf,10,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xcbf,10,REASON_COST)
end
function c50213150.thfilter(c)
return c:IsSetCard(0xcbf) and c:IsAbleToHand()
end
function c50213150.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213150.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c50213150.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
function c50213150.thop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c50213150.thfilter,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(c50213150.thfilter,tp,LOCATION_GRAVE,0,nil)
if g1:GetCount()>0 and g2: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=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.HintSelection(sg1)
Duel.SendtoHand(sg1,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
end
\ No newline at end of file
--Kamipro 索亚拉托提普
function c50213155.initial_effect(c)
c:EnableCounterPermit(0xcbf)
Duel.EnableGlobalFlag(GLOBALFLAG_BRAINWASHING_CHECK)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetTargetRange(POS_FACEUP_ATTACK,1)
e1:SetCondition(c50213155.spcon)
e1:SetOperation(c50213155.spop)
c:RegisterEffect(e1)
--control return
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(c50213155.retreg)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,50213155)
e3:SetCondition(c50213155.discon)
e3:SetCost(c50213155.discost)
e3:SetTarget(c50213155.distg)
e3:SetOperation(c50213155.disop)
c:RegisterEffect(e3)
--attack counter 2
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLED)
e4:SetCondition(c50213155.atccon)
e4:SetOperation(c50213155.atcop)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCost(c50213155.descost)
e5:SetTarget(c50213155.destg)
e5:SetOperation(c50213155.desop)
c:RegisterEffect(e5)
end
function c50213155.spfilter(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c50213155.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c50213155.spfilter,tp,0,LOCATION_MZONE,1,nil,tp)
end
function c50213155.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c50213155.spfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c50213155.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(50213155,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCountLimit(1)
e1:SetCondition(c50213155.retcon)
e1:SetOperation(c50213155.retop)
e1:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e1,tp)
end
function c50213155.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==e:GetLabel() and e:GetOwner():GetFlagEffect(50213155)~=0
end
function c50213155.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetOwner()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_REMOVE_BRAINWASHING)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetLabelObject(c)
e1:SetTarget(c50213155.rettg)
Duel.RegisterEffect(e1,tp)
--reset
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetLabelObject(e1)
e2:SetOperation(c50213155.reset)
Duel.RegisterEffect(e2,tp)
end
function c50213155.rettg(e,c)
return c==e:GetLabelObject() and c:GetFlagEffect(50213155)~=0
end
function c50213155.reset(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():Reset()
e:Reset()
end
function c50213155.disfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf) and c:IsType(TYPE_XYZ)
end
function c50213155.discon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainDisablable(ev)
and Duel.IsExistingMatchingCard(c50213155.disfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c50213155.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c50213155.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c50213155.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c50213155.atccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c50213155.dfilter(c)
return not c:IsSetCard(0xcbf) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c50213155.atcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:AddCounter(0xcbf,2) then
if Duel.IsExistingMatchingCard(c50213155.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(50213155,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c50213155.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
function c50213155.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xcbf,10,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xcbf,10,REASON_COST)
end
function c50213155.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c50213155.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--Kamipro 罗慕路斯
function c50213160.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c50213160.xcheck,4,2,c50213160.ovfilter,aux.Stringid(50213160,0),2,c50213160.xyzop)
c:EnableReviveLimit()
--attribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(ATTRIBUTE_ALL-ATTRIBUTE_DIVINE-ATTRIBUTE_FIRE)
e1:SetCondition(c50213160.attcon)
c:RegisterEffect(e1)
--atk limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetValue(c50213160.atklimit)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c50213160.desreptg)
e3:SetValue(c50213160.desrepval)
e3:SetOperation(c50213160.desrepop)
c:RegisterEffect(e3)
end
function c50213160.xcheck(c)
return c:IsSetCard(0xcbf)
end
function c50213160.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf) and c:GetCounter(0xcbf)>=5
end
function c50213160.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,50213160)==0 end
Duel.RegisterFlagEffect(tp,50213160,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c50213160.attcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()>0
end
function c50213160.atklimit(e,c)
return c~=e:GetHandler()
end
function c50213160.repfilter(c,e,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c50213160.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c50213160.repfilter,1,nil,e,tp)
and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c50213160.desrepval(e,c)
return c50213160.repfilter(c,e,e:GetHandlerPlayer())
end
function c50213160.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
Duel.Hint(HINT_CARD,0,50213160)
end
\ No newline at end of file
--Kamipro 赫克托尔
function c50213165.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c50213165.xcheck,4,2,c50213165.ovfilter,aux.Stringid(50213165,0),2,c50213165.xyzop)
c:EnableReviveLimit()
--attribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(ATTRIBUTE_ALL-ATTRIBUTE_DIVINE-ATTRIBUTE_WATER)
e1:SetCondition(c50213165.attcon)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,50213165)
e2:SetCost(c50213165.atkcost)
e2:SetTarget(c50213165.atktg)
e2:SetOperation(c50213165.atkop)
c:RegisterEffect(e2)
--xyz
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,50213166)
e3:SetCondition(c50213165.xmcon)
e3:SetTarget(c50213165.xmtg)
e3:SetOperation(c50213165.xmop)
c:RegisterEffect(e3)
end
function c50213165.xcheck(c)
return c:IsSetCard(0xcbf)
end
function c50213165.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf) and c:GetCounter(0xcbf)>=5
end
function c50213165.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,50213165)==0 end
Duel.RegisterFlagEffect(tp,50213165,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c50213165.attcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()>0
end
function c50213165.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c50213165.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,e:GetHandler()):GetSum(Card.GetBaseAttack)>0 end
end
function c50213165.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,c):GetSum(Card.GetBaseAttack)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_DISABLE)
e1:SetValue(atk)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetValue(HALF_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c50213165.xmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c50213165.xmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,0,LOCATION_GRAVE)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function c50213165.xmop(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_XMATERIAL)
local g=Duel.GetFieldGroup(tp,0,LOCATION_GRAVE)
if aux.NecroValleyNegateCheck(g) then return end
local tg=g:Select(tp,1,1,nil)
if #tg>0 then
Duel.Overlay(c,tg)
end
end
\ No newline at end of file
--Kamipro 赖光
function c50213170.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c50213170.xcheck,4,2,c50213170.ovfilter,aux.Stringid(50213170,0),2,c50213170.xyzop)
c:EnableReviveLimit()
--attribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(ATTRIBUTE_ALL-ATTRIBUTE_DIVINE-ATTRIBUTE_WIND)
e1:SetCondition(c50213170.attcon)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(50213170,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,50213170)
e2:SetCost(c50213170.ctcost)
e2:SetTarget(c50213170.cttg)
e2:SetOperation(c50213170.ctop)
c:RegisterEffect(e2)
--xyz
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCountLimit(1,50213171)
e3:SetCondition(c50213170.xmcon)
e3:SetTarget(c50213170.xmtg)
e3:SetOperation(c50213170.xmop)
c:RegisterEffect(e3)
end
function c50213170.xcheck(c)
return c:IsSetCard(0xcbf)
end
function c50213170.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf) and c:GetCounter(0xcbf)>=5
end
function c50213170.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,50213170)==0 end
Duel.RegisterFlagEffect(tp,50213170,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c50213170.attcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()>0
end
function c50213170.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c50213170.afilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf) and c:IsCanAddCounter(0xcbf,10)
end
function c50213170.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213170.afilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c50213170.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c50213170.afilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0xcbf,10)
tc=g:GetNext()
end
end
function c50213170.xmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if not c:IsRelateToBattle() then return false end
e:SetLabelObject(tc)
return tc:IsLocation(LOCATION_GRAVE) and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and tc:IsCanOverlay()
end
function c50213170.xmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end
local tc=e:GetLabelObject()
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0)
end
function c50213170.xmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.Overlay(c,tc)
end
end
\ No newline at end of file
--Kamipro 阿斯克勒庇俄斯
function c50213175.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c50213175.xcheck,4,2,c50213175.ovfilter,aux.Stringid(50213175,0),2,c50213175.xyzop)
c:EnableReviveLimit()
--attribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(ATTRIBUTE_ALL-ATTRIBUTE_DIVINE-ATTRIBUTE_EARTH)
e1:SetCondition(c50213175.attcon)
c:RegisterEffect(e1)
--damage reduce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetCondition(c50213175.rdcon)
e2:SetOperation(c50213175.rdop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,50213175)
e3:SetCost(c50213175.spcost)
e3:SetTarget(c50213175.sptg)
e3:SetOperation(c50213175.spop)
c:RegisterEffect(e3)
end
function c50213175.xcheck(c)
return c:IsSetCard(0xcbf)
end
function c50213175.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf) and c:GetCounter(0xcbf)>=5
end
function c50213175.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,50213175)==0 end
Duel.RegisterFlagEffect(tp,50213175,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c50213175.attcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()>0
end
function c50213175.rdcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c50213175.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(tp,ev/2)
end
function c50213175.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c50213175.spfilter(c,e,tp)
return c:IsSetCard(0xcbf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c50213175.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c50213175.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c50213175.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c50213175.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c50213175.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--Kamipro 爱迪生
function c50213180.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c50213180.xcheck,6,2,c50213180.ovfilter,aux.Stringid(50213180,0),2,c50213180.xyzop)
c:EnableReviveLimit()
--attribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(ATTRIBUTE_ALL-ATTRIBUTE_DIVINE-ATTRIBUTE_LIGHT)
e1:SetCondition(c50213180.attcon)
c:RegisterEffect(e1)
--battle indes
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e11:SetRange(LOCATION_MZONE)
e11:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e11:SetCondition(c50213180.attcon)
e11:SetValue(1)
c:RegisterEffect(e11)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
local e22=Effect.CreateEffect(c)
e22:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e22:SetRange(LOCATION_MZONE)
e22:SetCode(EVENT_CHAIN_SOLVED)
e22:SetCondition(c50213180.atkcon)
e22:SetOperation(c50213180.atkop)
c:RegisterEffect(e22)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,50213180)
e3:SetCost(c50213180.thcost)
e3:SetTarget(c50213180.thtg)
e3:SetOperation(c50213180.thop)
c:RegisterEffect(e3)
--counter
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_BATTLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c50213180.ctcon)
e4:SetTarget(c50213180.cttg)
e4:SetOperation(c50213180.ctop)
c:RegisterEffect(e4)
end
function c50213180.xcheck(c)
return c:IsSetCard(0xcbf)
end
function c50213180.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf) and c:IsRank(4)
end
function c50213180.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,50213180)==0 end
Duel.RegisterFlagEffect(tp,50213180,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c50213180.attcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()>0
end
function c50213180.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()>0
end
function c50213180.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf)
end
function c50213180.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if re:IsActiveType(TYPE_MONSTER) and rp==tp and c:GetFlagEffect(1)>0 then
local g=Duel.GetMatchingGroup(c50213180.cfilter,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then
tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(200)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
end
end
function c50213180.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c50213180.thfilter(c)
return c:IsSetCard(0xcbf) and c:IsAbleToHand()
end
function c50213180.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213180.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c50213180.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c50213180.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 c50213180.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattledGroupCount()>0
end
function c50213180.afilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0xcbf,3)
end
function c50213180.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213180.afilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c50213180.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c50213180.afilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0xcbf,3)
tc=g:GetNext()
end
end
\ No newline at end of file
--Kamipro 孔明
function c50213185.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c50213185.xcheck,6,2,c50213185.ovfilter,aux.Stringid(50213185,0),2,c50213185.xyzop)
c:EnableReviveLimit()
--attribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(ATTRIBUTE_ALL-ATTRIBUTE_DIVINE-ATTRIBUTE_DARK)
e1:SetCondition(c50213185.attcon)
c:RegisterEffect(e1)
--effect indes
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e11:SetRange(LOCATION_MZONE)
e11:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e11:SetCondition(c50213185.attcon)
e11:SetValue(1)
c:RegisterEffect(e11)
--chainlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c50213185.chaincon)
e2:SetOperation(c50213185.chainop)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,50213185)
e3:SetCost(c50213185.discost)
e3:SetTarget(c50213185.distg)
e3:SetOperation(c50213185.disop)
c:RegisterEffect(e3)
--counter
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_BATTLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c50213185.ctcon)
e4:SetTarget(c50213185.cttg)
e4:SetOperation(c50213185.ctop)
c:RegisterEffect(e4)
end
function c50213185.xcheck(c)
return c:IsSetCard(0xcbf)
end
function c50213185.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf) and c:IsRank(4)
end
function c50213185.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,50213185)==0 end
Duel.RegisterFlagEffect(tp,50213185,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c50213185.attcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()>0
end
function c50213185.chaincon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()>0
end
function c50213185.chainop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if re:IsHasType(TYPE_MONSTER) and rc:IsSetCard(0xcbf) then
Duel.SetChainLimit(c50213185.chainlm)
end
end
function c50213185.chainlm(e,rp,tp)
return tp==rp
end
function c50213185.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c50213185.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and (c:GetAttack()>0 or aux.NegateEffectMonsterFilter(c))
end
function c50213185.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c50213185.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c50213185.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,c50213185.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c50213185.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) 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)
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetValue(-2000)
tc:RegisterEffect(e3)
end
end
function c50213185.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattledGroupCount()>0
end
function c50213185.ctfilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0xcbf,5)
end
function c50213185.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213185.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c50213185.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c50213185.ctfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
tc:AddCounter(0xcbf,5)
end
end
\ No newline at end of file
--Kamipro 热惑斧
function c50213205.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c50213205.target)
e1:SetOperation(c50213205.operation)
c:RegisterEffect(e1)
--Equip limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetCode(EFFECT_EQUIP_LIMIT)
e11:SetValue(1)
c:RegisterEffect(e11)
--atk
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c50213205.attrcon)
e2:SetOperation(c50213205.attrop)
c:RegisterEffect(e2)
--not
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(1000)
e3:SetCondition(c50213205.notcon)
c:RegisterEffect(e3)
--desrep
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetTarget(c50213205.destg)
e4:SetOperation(c50213205.desop)
c:RegisterEffect(e4)
end
function c50213205.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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c50213205.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c50213205.attrcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
if not ec:IsAttribute(ATTRIBUTE_FIRE) then return false end
if ec~=Duel.GetAttacker() and ec~=Duel.GetAttackTarget() then return false end
local tc=ec:GetBattleTarget()
return tc and tc:IsFaceup() and not tc:IsAttribute(ATTRIBUTE_FIRE)
end
function c50213205.attrop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
local tc=ec:GetBattleTarget()
if ec and tc and ec:IsFaceup() and tc:IsFaceup() then
local val=math.max(math.ceil(tc:GetAttack()/2),0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
ec:RegisterEffect(e1)
end
end
function c50213205.notcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return bit.band(ec:GetAttribute(),ATTRIBUTE_ALL-ATTRIBUTE_FIRE)~=0
end
function c50213205.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=c:GetEquipTarget()
if chk==0 then return c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
and tc and (tc:IsReason(REASON_BATTLE) or tc:IsReason(REASON_EFFECT)) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c50213205.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
\ No newline at end of file
--Kamipro 想仁剑
function c50213210.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c50213210.target)
e1:SetOperation(c50213210.operation)
c:RegisterEffect(e1)
--Equip limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetCode(EFFECT_EQUIP_LIMIT)
e11:SetValue(1)
c:RegisterEffect(e11)
--attack 3
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(2)
e2:SetCondition(c50213210.attrcon)
c:RegisterEffect(e2)
--reduce battle damage
local e22=Effect.CreateEffect(c)
e22:SetType(EFFECT_TYPE_EQUIP)
e22:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e22:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE))
e22:SetCondition(c50213210.attrcon)
c:RegisterEffect(e22)
--not
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(1000)
e3:SetCondition(c50213210.notcon)
c:RegisterEffect(e3)
--desrep
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetTarget(c50213210.destg)
e4:SetOperation(c50213210.desop)
c:RegisterEffect(e4)
end
function c50213210.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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c50213210.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c50213210.attrcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec:IsAttribute(ATTRIBUTE_WATER)
end
function c50213210.notcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return bit.band(ec:GetAttribute(),ATTRIBUTE_ALL-ATTRIBUTE_WATER)~=0
end
function c50213210.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=c:GetEquipTarget()
if chk==0 then return c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
and tc and (tc:IsReason(REASON_BATTLE) or tc:IsReason(REASON_EFFECT)) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c50213210.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
\ No newline at end of file
--Kamipro 注药枪
function c50213215.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c50213215.target)
e1:SetOperation(c50213215.operation)
c:RegisterEffect(e1)
--Equip limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetCode(EFFECT_EQUIP_LIMIT)
e11:SetValue(1)
c:RegisterEffect(e11)
--recover
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c50213215.reccon)
e2:SetTarget(c50213215.rectg)
e2:SetOperation(c50213215.recop)
c:RegisterEffect(e2)
--not
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetValue(1000)
e3:SetCondition(c50213215.notcon)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,50213215)
e4:SetCondition(c50213215.thcon)
e4:SetTarget(c50213215.thtg)
e4:SetOperation(c50213215.thop)
c:RegisterEffect(e4)
end
function c50213215.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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c50213215.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c50213215.reccon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
if not ec:IsAttribute(ATTRIBUTE_WIND) then return false end
return ec and eg:IsContains(ec) and ep~=tp
end
function c50213215.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ev)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,ev)
end
function c50213215.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c50213215.notcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return bit.band(ec:GetAttribute(),ATTRIBUTE_ALL-ATTRIBUTE_WIND)~=0
end
function c50213215.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c50213215.thfilter(c)
return c:IsSetCard(0xcbf) and not c:IsCode(50213215) and c:IsType(TYPE_EQUIP+TYPE_SPELL) and c:IsAbleToHand()
end
function c50213215.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213215.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c50213215.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c50213215.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
\ No newline at end of file
--Kamipro 机熊铳
function c50213220.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c50213220.target)
e1:SetOperation(c50213220.operation)
c:RegisterEffect(e1)
--Equip limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetCode(EFFECT_EQUIP_LIMIT)
e11:SetValue(1)
c:RegisterEffect(e11)
--Actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(0,1)
e2:SetValue(1)
e2:SetCondition(c50213220.actcon)
c:RegisterEffect(e2)
--not
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetValue(1000)
e3:SetCondition(c50213220.notcon)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,50213220)
e4:SetCondition(c50213220.thcon)
e4:SetTarget(c50213220.thtg)
e4:SetOperation(c50213220.thop)
c:RegisterEffect(e4)
end
function c50213220.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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c50213220.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c50213220.actcon(e)
local ec=e:GetHandler():GetEquipTarget()
if not ec:IsAttribute(ATTRIBUTE_EARTH) then return false end
return Duel.GetAttacker()==ec or Duel.GetAttackTarget()==ec
end
function c50213220.notcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return bit.band(ec:GetAttribute(),ATTRIBUTE_ALL-ATTRIBUTE_EARTH)~=0
end
function c50213220.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c50213220.thfilter(c)
return c:IsSetCard(0xcbf) and not c:IsCode(50213220) and c:IsType(TYPE_EQUIP+TYPE_SPELL) and c:IsAbleToHand()
end
function c50213220.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213220.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c50213220.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c50213220.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
\ No newline at end of file
--Kamipro 辉弹槌
function c50213225.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c50213225.target)
e1:SetOperation(c50213225.operation)
c:RegisterEffect(e1)
--Equip limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetCode(EFFECT_EQUIP_LIMIT)
e11:SetValue(1)
c:RegisterEffect(e11)
--pierce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_PIERCE)
e2:SetCondition(c50213225.attrcon)
c:RegisterEffect(e2)
--not
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(500)
e3:SetCondition(c50213225.notcon)
c:RegisterEffect(e3)
local e33=e3:Clone()
e33:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e33)
--draw
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,50213225)
e4:SetCost(c50213225.drcost)
e4:SetTarget(c50213225.drtg)
e4:SetOperation(c50213225.drop)
c:RegisterEffect(e4)
end
function c50213225.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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c50213225.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c50213225.attrcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec:IsAttribute(ATTRIBUTE_LIGHT)
end
function c50213225.notcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return bit.band(ec:GetAttribute(),ATTRIBUTE_ALL-ATTRIBUTE_LIGHT)~=0
end
function c50213225.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetEquipTarget()
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and tc:IsSetCard(0xcbf) end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c50213225.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c50213225.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--Kamipro 绝弓·胧月
function c50213230.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c50213230.target)
e1:SetOperation(c50213230.operation)
c:RegisterEffect(e1)
--Equip limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetCode(EFFECT_EQUIP_LIMIT)
e11:SetValue(1)
c:RegisterEffect(e11)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c50213230.drcon)
e2:SetTarget(c50213230.drtg)
e2:SetOperation(c50213230.drop)
c:RegisterEffect(e2)
--not
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(500)
e3:SetCondition(c50213230.notcon)
c:RegisterEffect(e3)
local e33=e3:Clone()
e33:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e33)
--draw
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,50213230)
e4:SetCost(c50213230.drcost)
e4:SetTarget(c50213230.drtg)
e4:SetOperation(c50213230.drop)
c:RegisterEffect(e4)
end
function c50213230.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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c50213230.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c50213230.drcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
if not ec:IsAttribute(ATTRIBUTE_DARK) then return false end
local bc=ec:GetBattleTarget()
return e:GetHandler():GetEquipTarget()==eg:GetFirst() and ec:IsControler(tp) and bc:IsReason(REASON_BATTLE)
end
function c50213230.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c50213230.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c50213230.notcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return bit.band(ec:GetAttribute(),ATTRIBUTE_ALL-ATTRIBUTE_DARK)~=0
end
function c50213230.thfilter(c)
return c:IsSetCard(0xcbf) and not c:IsCode(50213230) and c:IsType(TYPE_EQUIP+TYPE_SPELL) and c:IsAbleToHand()
end
function c50213230.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213230.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c50213230.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c50213230.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c50213230.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetEquipTarget()
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and tc:IsSetCard(0xcbf) end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c50213230.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c50213230.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--Kamipro 风天狱的加护
function c50213235.initial_effect(c)
c:EnableCounterPermit(0xcbf)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--add counter
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_FZONE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c50213235.ctop)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCost(c50213235.smcost)
e2:SetTarget(c50213235.smtg)
e2:SetOperation(c50213235.smop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(10,50213235)
e3:SetTarget(c50213235.desreptg)
e3:SetOperation(c50213235.desrepop)
c:RegisterEffect(e3)
end
function c50213235.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf)
end
function c50213235.ctop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c50213235.ctfilter,1,nil) then
e:GetHandler():AddCounter(0xcbf,1)
end
end
function c50213235.smcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) and e:GetHandler():IsCanRemoveCounter(tp,0xcbf,1,REASON_COST) end
Duel.PayLPCost(tp,500)
e:GetHandler():RemoveCounter(tp,0xcbf,1,REASON_COST)
end
function c50213235.sfilter(c)
return c:IsSummonable(true,nil) and c:IsSetCard(0xcbf)
end
function c50213235.smtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213235.sfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c50213235.smop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c50213235.sfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function c50213235.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsReason(REASON_REPLACE)
and e:GetHandler():IsCanRemoveCounter(tp,0xcbf,2,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c50213235.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(tp,0xcbf,2,REASON_EFFECT)
end
\ No newline at end of file
--Kamipro 北斗星君的鼓舞
function c50213240.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c50213240.ctcost)
e1:SetTarget(c50213240.cttg)
e1:SetOperation(c50213240.ctop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,50213240)
e2:SetCondition(aux.exccon)
e2:SetTarget(c50213240.tdtg)
e2:SetOperation(c50213240.tdop)
c:RegisterEffect(e2)
end
function c50213240.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c50213240.afilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0xcbf,10)
end
function c50213240.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213240.afilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c50213240.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c50213240.afilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0xcbf,10)
tc=g:GetNext()
end
end
function c50213240.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c50213240.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--Kamipro 启示录的救援
function c50213245.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,50213245)
e1:SetCost(c50213245.cost)
e1:SetTarget(c50213245.target)
e1:SetOperation(c50213245.activate)
c:RegisterEffect(e1)
--act in hand
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e11:SetCondition(c50213245.handcon)
c:RegisterEffect(e11)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,50213245)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c50213245.tgtg)
e2:SetOperation(c50213245.tgop)
c:RegisterEffect(e2)
end
function c50213245.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c50213245.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,50213245,0xcbf,TYPES_NORMAL_TRAP_MONSTER,500,2500,4,RACE_CYBERSE,ATTRIBUTE_DARK,POS_FACEUP) end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c50213245.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,50213245,0xcbf,TYPES_NORMAL_TRAP_MONSTER,500,2500,4,RACE_CYBERSE,ATTRIBUTE_DARK,POS_FACEUP) then
c:AddMonsterAttribute(TYPE_NORMAL)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function c50213245.tgfilter(c)
return c:IsSetCard(0xcbf) and c:IsAbleToGrave()
end
function c50213245.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213245.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c50213245.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c50213245.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c50213245.cfilter(c)
return c:IsSetCard(0xcbf) and c:IsFaceup()
end
function c50213245.handcon(e)
return Duel.IsExistingMatchingCard(c50213245.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
--ナンバーズ・プロテクト
function c50213250.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,50213250)
e1:SetCondition(c50213250.condition)
e1:SetTarget(c50213250.target)
e1:SetOperation(c50213250.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,50213250)
e2:SetCondition(c50213250.setcon)
e2:SetTarget(c50213250.settg)
e2:SetOperation(c50213250.setop)
c:RegisterEffect(e2)
end
function c50213250.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf)
end
function c50213250.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c50213250.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
if not Duel.IsChainNegatable(ev) then return false end
return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c50213250.target(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 c50213250.activate(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
function c50213250.setfilter(c,tp)
return c:IsSetCard(0xcbf) and c:IsType(TYPE_XYZ) and c:IsFaceup() and c:IsControler(tp)
end
function c50213250.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c50213250.setfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c50213250.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c50213250.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
end
......@@ -71,7 +71,7 @@ function c71401008.op2(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(ctype+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
if c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(71401008,2)) then
and Duel.SelectYesNo(tp,aux.Stringid(71401001,6)) then
Duel.BreakEffect()
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e2=Effect.CreateEffect(c)
......
......@@ -83,7 +83,7 @@ function c71401009.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,1-tp)
--]]
if c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(71401009,2)) then
and Duel.SelectYesNo(tp,aux.Stringid(71401001,7)) then
Duel.BreakEffect()
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e2=Effect.CreateEffect(c)
......
......@@ -17,6 +17,7 @@ function c71401010.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401010,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,71401010)
......@@ -52,15 +53,20 @@ end
function c71401010.filter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71401010.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetLinkedGroupCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c71401010.filter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
function c71401010.filter2a(c)
return c:IsType(TYPE_LINK) and c:GetLinkedGroupCount()>0
end
function c71401010.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c71401010.filter2a(chkc) end
if chk==0 then return Duel.IsExistingTarget(c71401010.filter2a,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(c71401010.filter2,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c71401010.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local lct=c:GetLinkedGroupCount()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local lct=tc:GetLinkedGroupCount()
if lct==0 then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c71401010.filter2,tp,LOCATION_HAND,0,nil,e,tp)
......
......@@ -84,7 +84,7 @@ function c71401016.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,1,1,nil,tp,POS_FACEDOWN)
if Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(71401016,2)) then
and Duel.SelectYesNo(tp,aux.Stringid(71401001,7)) then
Duel.BreakEffect()
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e2=Effect.CreateEffect(c)
......
......@@ -47,6 +47,9 @@ end
function c71401019.filter2(c,code)
return c:IsRace(RACE_SPELLCASTER) and c:IsLevel(4) and not c:IsCode(code) and c:IsSummonable(true,nil)
end
function c71401019.filter2a(c,code)
return c:IsRace(RACE_SPELLCASTER) and c:IsLevel(4) and not c:IsCode(code)
end
function c71401019.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
......@@ -55,7 +58,8 @@ function c71401019.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c71401019.filterc2,tp,LOCATION_MZONE,0,1,nil,tp,e:GetHandler())
return Duel.IsPlayerCanAdditionalSummon(tp) and Duel.GetFlagEffect(tp,71401019)==0
and Duel.IsExistingMatchingCard(c71401019.filterc2,tp,LOCATION_MZONE,0,1,nil,tp,e:GetHandler())
and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
......@@ -65,7 +69,18 @@ function c71401019.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
yume.RegButterflyCostLimit(e,tp)
end
function c71401019.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,71401019)~=0 then return end
local code=e:GetLabel()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(71401019,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(c71401019.filter2a,code))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,71401019,RESET_PHASE+PHASE_END,0,1)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c71401019.filter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,code)
local tc=g:GetFirst()
......
--蝶幻-「流」
if not c71401001 then dofile("expansions/script/c71401001.lua") end
function c71401020.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,c71401020.mfilter,aux.NonTuner(c71401020.mfilter),1)
c:EnableReviveLimit()
--DD Ground
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetTargetRange(0xff,0xff)
e1:SetTarget(c71401020.rmtarget)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401020,0))
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,71401020)
e2:SetCost(yume.ButterflyLimitCost)
e2:SetTarget(c71401020.tg2)
e2:SetOperation(c71401020.op2)
c:RegisterEffect(e2)
--cannot disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71401020,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,71501020)
e3:SetCondition(c71401020.con3)
e3:SetCost(yume.ButterflyLimitCost)
e3:SetTarget(c71401020.tg3)
e3:SetOperation(c71401020.op3)
c:RegisterEffect(e3)
yume.ButterflyCounter()
end
c71401020.material_type=TYPE_SYNCHRO
function c71401020.mfilter(c)
return c:IsSynchroType(TYPE_SYNCHRO) and c:IsRace(RACE_SPELLCASTER)
end
function c71401020.rmtarget(e,c)
return not c:IsLocation(0x80) and not c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c71401020.filter2(c)
return c:IsFaceup() and aux.NegateAnyFilter(c)
end
function c71401020.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(Card.IsFaceup,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then
return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and ct<=Duel.GetDecktopGroup(tp,ct):FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)
end
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,ct,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c71401020.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()==0 then return end
local c=e:GetHandler()
for tc in aux.Next(g) do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
local ct=Duel.GetMatchingGroupCount(Card.IsFaceup,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local tg=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck()
if Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT)>0 and c:IsRelateToEffect(e)
and not c:IsImmuneToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(71401001,6)) then
Duel.BreakEffect()
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e4=Effect.CreateEffect(c)
e4:SetCode(EFFECT_CHANGE_TYPE)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e4:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e4)
end
end
end
function c71401020.con3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetType()==TYPE_SPELL+TYPE_CONTINUOUS
end
function c71401020.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(Card.IsFaceup,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then
return ct>0 and ct<=Duel.GetDecktopGroup(tp,ct):FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,ct,tp,LOCATION_DECK)
end
function c71401020.op3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()==0 then return end
local c=e:GetHandler()
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetDescription(aux.Stringid(71401020,2))
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetValue(c71401020.efilter)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
local ct=Duel.GetMatchingGroupCount(Card.IsFaceup,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local tg=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck()
Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT)
end
function c71401020.efilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
return te:GetHandler()==e:GetHandler()
end
\ No newline at end of file
--来自炽焰的升华
local m=82209171
local cm=c82209171
function cm.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e0)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.tgcon)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
--handes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.hdcon)
e2:SetTarget(cm.hdtg)
e2:SetOperation(cm.hdop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
--to grave
function cm.tgconfilter(c,tp)
return c:GetSummonPlayer()==1-tp
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.tgconfilter,1,nil,tp)
end
function cm.tgfilter(c)
return c:IsSetCard(0x5294) and c:IsAbleToGrave()
end
function cm.thfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToHand()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local fromHand=false
if g:GetFirst():IsLocation(LOCATION_HAND) then fromHand=true end
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 and fromHand and Duel.IsExistingMatchingCard(cm.thfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
local thg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,0,LOCATION_MZONE,1,1,nil)
if thg:GetCount()>0 then
Duel.HintSelection(thg)
Duel.SendtoHand(thg,nil,REASON_EFFECT)
end
end
end
end
--handes
function cm.hdconfilter(c)
return c:IsSetCard(0x5294) and c:IsFaceup()
end
function cm.hdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.hdconfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil,tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end
function cm.hdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil,tp,POS_FACEDOWN)
if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end
end
--special summon
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():IsPreviousControler(tp) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.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,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--菠萝蜜
local m=82209180
local cm=c82209180
function cm.initial_effect(c)
--summon rule
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e1:SetCondition(cm.ttcon)
e1:SetOperation(cm.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LIMIT_SET_PROC)
e2:SetCondition(cm.setcon)
c:RegisterEffect(e2)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
end
--summon rule
function cm.ttcon(e,c,minc)
if c==nil then return true end
return minc<=5 and Duel.CheckTribute(c,5)
end
function cm.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,5,5)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function cm.setcon(e,c,minc)
if not c then return true end
return false
end
--destroy
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1800)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
local sg=Duel.GetOperatedGroup()
if sg:GetCount()>0 then
Duel.Damage(1-tp,1800,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -22,13 +22,10 @@ function c98920232.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920232,0))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,98920232)
e3:SetCost(c98920232.discost)
e3:SetTarget(c98920232.distg)
e3:SetOperation(c98920232.disop)
c:RegisterEffect(e3)
......@@ -54,21 +51,21 @@ function c98920232.disop(e,tp,eg,ep,ev,re,r,rp)
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)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
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)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
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)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
......
--额外反应机·大空式
function c98920298.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x63),2,2)
--copy effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c98920298.efop)
c:RegisterEffect(e1)
--disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920298,0))
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_SPSUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c98920298.cost)
e2:SetCondition(c98920298.condition)
e2:SetTarget(c98920298.target)
e2:SetOperation(c98920298.operation)
c:RegisterEffect(e2)
--SpecialSummon 2
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920298,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c98920298.spcost1)
e3:SetTarget(c98920298.sptg1)
e3:SetOperation(c98920298.spop1)
c:RegisterEffect(e3)
end
function c98920298.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c98920298.effilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x63) and c:IsFaceup()
end
function c98920298.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetLinkedGroup()
local wg=ct:Filter(c98920298.effilter,c,tp)
local wbc=wg:GetFirst()
while wbc do
local code=wbc:GetOriginalCode()
if c:GetFlagEffect(code)==0 then
c:CopyEffect(code,RESET_EVENT+0x1fe0000+EVENT_CHAINING,1)
c:RegisterFlagEffect(code,RESET_EVENT+0x1fe0000+EVENT_CHAINING,0,1)
end
wbc=wg:GetNext()
end
end
function c98920298.cfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsPreviousLocation(LOCATION_EXTRA)
end
function c98920298.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and eg:IsExists(c98920298.cfilter,1,nil,1-tp) and Duel.GetCurrentChain()==0
end
function c98920298.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=eg:Filter(c98920298.cfilter,nil,1-tp)
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c98920298.operation(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c98920298.cfilter,nil,1-tp)
Duel.NegateSummon(g)
Duel.Destroy(g,REASON_EFFECT)
end
function c98920298.cfilter1(c,tp)
return c:IsSetCard(0x63) and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c,tp)>0
end
function c98920298.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c98920298.cfilter1,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98920298.cfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98920298.spfilter1(c,e,tp)
return c:IsCode(16898077) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c98920298.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920298.spfilter1,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND)
end
function c98920298.spop1(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,aux.NecroValleyFilter(c98920298.spfilter1),tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--闪刀姬-胧若
local s,id,o=GetID()
function c98920322.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,8491308,aux.FilterBoolFunction(c98920322.fusfilter),1,true,true)
aux.AddContactFusionProcedure(c,c98920322.cfilter,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
Duel.AddCustomActivityCounter(98920322,ACTIVITY_CHAIN,c98920322.chainfilter)
--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(c98920322.splimit)
c:RegisterEffect(e1)
--cannot link material
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e4:SetCondition(c98920322.linkcon)
e4:SetValue(1)
c:RegisterEffect(e4)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.bpcon)
e2:SetTarget(s.dirtg)
e2:SetOperation(s.dirop)
c:RegisterEffect(e2)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c98920322.linkcon(e)
local c=e:GetHandler()
return c:IsStatus(STATUS_SPSUMMON_TURN)
end
function c98920322.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c98920322.chainfilter(re,tp,cid)
return not (re:GetHandler():IsSetCard(0x115) and re:IsActiveType(TYPE_SPELL))
end
function c98920322.fusfilter(c)
return c:IsSetCard(0x1115) and not c:IsAttribute(ATTRIBUTE_WIND)
end
function c98920322.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function c98920322.cfilter(c,fc)
local tp=fc:GetControler()
return c:IsAbleToRemoveAsCost() and (Duel.GetCustomActivityCount(98920322,tp,ACTIVITY_CHAIN)~=0 or Duel.GetCustomActivityCount(98920322,1-tp,ACTIVITY_CHAIN)~=0)
end
function s.dfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1115)
and not c:IsHasEffect(EFFECT_DIRECT_ATTACK)
end
function s.dirtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.dfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.dfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.dfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.dirop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
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_CHANGE_BATTLE_DAMAGE)
e2:SetCondition(c98920322.rdcon)
e2:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE))
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(98920322,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
end
function c98920322.rdcon(e)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
return Duel.GetAttackTarget()==nil
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and c:GetFlagEffect(98920322)>0
end
\ No newline at end of file
--真红眼爆炎龙
local s,id,o=GetID()
function c98920666.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,74677422,aux.FilterBoolFunction(Card.IsSetCard,0x3b),1,true)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetCountLimit(1,id)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
c:RegisterEffect(e1)
--atk
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_DESTROYED)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c98920666.atkcon)
e3:SetOperation(c98920666.atop)
c:RegisterEffect(e3)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920666,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c98920666.atcon)
e2:SetOperation(c98920666.atop)
c:RegisterEffect(e2)
--self destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(98920666,0))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_CUSTOM+98920666)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c98920666.destg)
e4:SetOperation(c98920666.desop)
c:RegisterEffect(e4)
--buff
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVED)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCondition(c98920666.regcon)
e5:SetOperation(c98920666.regop)
c:RegisterEffect(e5)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920666,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c98920666.condition)
e1:SetTarget(c98920666.target)
e1:SetOperation(c98920666.operation)
c:RegisterEffect(e1)
end
c98920666.material_setcode=0x3b
function c98920666.regcon(e,tp,eg,ep,ev,re,r,rp)
return (e:GetHandler():GetFlagEffect(98920666)<=0 and e:GetHandler():IsAttackAbove(4500)) or (e:GetHandler():GetFlagEffect(98920666)>=1 and e:GetHandler():IsAttackBelow(4499))
end
function c98920666.regop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsAttackAbove(4500) then
Duel.RaiseEvent(re:GetHandler(),EVENT_CUSTOM+98920666,re,r,rp,ep,ev)
e:GetHandler():RegisterFlagEffect(98920666,RESET_EVENT+RESETS_STANDARD,0,1,1)
end
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc and tc:IsControler(1-tp) and tc:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc and tc:IsRelateToBattle() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c98920666.atkcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0 and re:GetHandler()==e:GetHandler()
end
function c98920666.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsReason(REASON_BATTLE)
end
function c98920666.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function c98920666.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c98920666.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
if Duel.Destroy(e:GetHandler(),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,c98920666.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function c98920666.spfilter(c,e,tp)
return c:IsCode(74677422) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920666.condition(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
return d:IsFaceup() and d:IsControler(tp) and d:IsSetCard(0x3b) and not d:IsCode(98920666)
end
function c98920666.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c98920666.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local a=Duel.GetAttacker()
if a:IsAttackable() and not a:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
end
\ No newline at end of file
......@@ -17,17 +17,46 @@ function c9910365.initial_effect(c)
e2:SetTargetRange(1,0)
e2:SetTarget(c9910365.sumlimit)
c:RegisterEffect(e2)
--double
--destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(c9910365.dbcon)
e3:SetTarget(c9910365.dbtg)
e3:SetOperation(c9910365.dbop)
e3:SetCondition(c9910365.descon)
e3:SetOperation(c9910365.desop)
c:RegisterEffect(e3)
if not c9910365.global_check then
c9910365.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BECOME_TARGET)
ge1:SetOperation(c9910365.checkop1)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_ADJUST)
ge2:SetOperation(c9910365.checkop2)
Duel.RegisterEffect(ge2,0)
end
end
function c9910365.checkop1(e,tp,eg,ep,ev,re,r,rp)
local tg=eg:Filter(Card.IsOnField,nil)
if #tg>0 then
for tc in aux.Next(tg) do
tc:RegisterFlagEffect(9910365,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910365,1))
end
end
end
function c9910365.checkop2(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(c9910365.ctgfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if #tg>0 then
for tc in aux.Next(tg) do
tc:RegisterFlagEffect(9910365,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910365,1))
end
end
end
function c9910365.ctgfilter(c)
return c:GetOwnerTargetCount()>0 and c:GetFlagEffect(9910365)==0
end
function c9910365.thfilter(c)
return c:IsCode(9910363) and c:IsAbleToHand()
......@@ -45,63 +74,18 @@ end
function c9910365.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA)
end
function c9910365.dbcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
function c9910365.cfilter(c,tp)
return c:GetFlagEffect(9910365)~=0 and c:IsControler(tp)
end
function c9910365.dbfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5951)
function c9910365.desfilter(c,tp)
return c:GetColumnGroup():IsExists(c9910365.cfilter,1,nil,tp)
end
function c9910365.dbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9910365.dbfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9910365.dbfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c9910365.dbfilter,tp,LOCATION_MZONE,0,1,1,nil)
function c9910365.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9910365.desfilter,tp,0,LOCATION_ONFIELD,1,nil,tp)
end
function c9910365.dbop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local fid=c:GetFieldID()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(9910365,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetLabel(fid)
e2:SetLabelObject(tc)
e2:SetCondition(c9910365.atkcon)
e2:SetOperation(c9910365.atkop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
function c9910365.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c9910365.desfilter,tp,0,LOCATION_ONFIELD,nil,tp)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c9910365.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc and tc:GetFlagEffectLabel(9910365)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function c9910365.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(tc:GetBaseAttack()*2)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(tc:GetBaseDefense()*2)
tc:RegisterEffect(e2)
end
......@@ -17,16 +17,13 @@ function c9910380.initial_effect(c)
e2:SetTargetRange(1,0)
e2:SetTarget(c9910380.sumlimit)
c:RegisterEffect(e2)
--remove
--set
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,9910380)
e3:SetCondition(c9910380.rmcon)
e3:SetTarget(c9910380.rmtg)
e3:SetOperation(c9910380.rmop)
e3:SetTarget(c9910380.settg)
e3:SetOperation(c9910380.setop)
c:RegisterEffect(e3)
end
function c9910380.thfilter(c)
......@@ -45,41 +42,55 @@ end
function c9910380.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA)
end
function c9910380.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5951)
function c9910380.setfilter(c)
return c:IsSetCard(0x5951) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c9910380.rmcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER)
and Duel.IsExistingMatchingCard(c9910380.cfilter,tp,LOCATION_MZONE,0,1,nil)
function c9910380.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910380.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c9910380.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then return rc:IsRelateToEffect(re) and rc:IsAbleToRemove() and rc:GetOriginalLevel()>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,rc,1,0,0)
function c9910380.gselect(g)
return g:GetClassCount(Card.GetLocation)==#g
end
function c9910380.rmop(e,tp,eg,ep,ev,re,r,rp)
function c9910380.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if not c:IsRelateToEffect(e) or not rc:IsRelateToEffect(re) then return end
if Duel.Remove(rc,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 and rc:IsLocation(LOCATION_REMOVED) then
local lv=rc:GetOriginalLevel()
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-lv*300)
rc:RegisterFlagEffect(9910380,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local fid=c:GetFieldID()
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9910380.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local sg=g:SelectSubGroup(tp,c9910380.gselect,false,1,math.min(ft,2))
local tc=sg:GetFirst()
while tc do
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(rc)
e1:SetCountLimit(1)
e1:SetCondition(c9910380.retcon)
e1:SetOperation(c9910380.retop)
Duel.RegisterEffect(e1,tp)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(9910380,RESET_EVENT+RESET_TURN_SET+RESET_OVERLAY+RESET_MSCHANGE+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(9910380,1))
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetLabel(fid)
e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetOperation(c9910380.damop)
Duel.RegisterEffect(e2,tp)
tc=sg:GetNext()
end
end
function c9910380.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(9910380)~=0
end
function c9910380.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
function c9910380.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if not eg:IsContains(tc) then return end
if tc:GetFlagEffectLabel(9910380)~=e:GetLabel() then
e:Reset()
return
end
Duel.Hint(HINT_CARD,0,9910380)
Duel.Damage(1-tp,600,REASON_EFFECT)
tc:ResetFlagEffect(9910380)
e:Reset()
end
......@@ -18,7 +18,7 @@ function c9910391.filter1(c,code)
return c:IsSetCard(0x5951) and aux.IsCodeListed(c,code) and c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c9910391.filter2(c)
return c:IsCode(9910362) and c:IsAbleToHand()
return c:IsSetCard(0x5951) and c:IsLevel(1) and c:IsAbleToHand()
end
function c9910391.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910391.filter2,tp,LOCATION_DECK,0,1,nil)
......@@ -53,38 +53,36 @@ function c9910391.activate(e,tp,eg,ep,ev,re,r,rp)
c:CancelToGrave()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910391,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EVENT_BECOME_TARGET)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetCondition(c9910391.thcon)
e1:SetTarget(c9910391.thtg)
e1:SetOperation(c9910391.thop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function c9910391.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c9910391.thfilter1(c)
return c:IsAbleToHand()
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
function c9910391.thfilter(c)
return c:IsAbleToHand() and Duel.IsExistingMatchingCard(Card.IsAbleToHand,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function c9910391.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910391.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0)
function c9910391.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return c:GetFlagEffect(9910391)==0 and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and g and g:IsContains(c)
and Duel.IsExistingMatchingCard(c9910391.thfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c9910391.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectMatchingCard(tp,c9910391.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
if #g1==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1)
g1:Merge(g2)
Duel.HintSelection(g1)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
local c=e:GetHandler()
if Duel.SelectEffectYesNo(tp,c,aux.Stringid(9910391,1)) then
Duel.Hint(HINT_CARD,0,9910391)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectMatchingCard(tp,c9910391.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1)
g1:Merge(g2)
Duel.HintSelection(g1)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
c:RegisterFlagEffect(9910391,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910391,2))
end
end
......@@ -61,14 +61,11 @@ function c9910393.activate(e,tp,eg,ep,ev,re,r,rp)
c:CancelToGrave()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910393,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EVENT_BECOME_TARGET)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetCondition(c9910393.drcon)
e1:SetTarget(c9910393.drtg)
e1:SetOperation(c9910393.drop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
......@@ -94,15 +91,16 @@ function c9910393.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c9910393.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c9910393.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
local c=e:GetHandler()
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return c:GetFlagEffect(9910393)==0 and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and g and g:IsContains(c)
and Duel.IsPlayerCanDraw(tp,1)
end
function c9910393.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local c=e:GetHandler()
if Duel.SelectEffectYesNo(tp,c,aux.Stringid(9910393,1)) then
Duel.Hint(HINT_CARD,0,9910393)
Duel.Draw(tp,1,REASON_EFFECT)
c:RegisterFlagEffect(9910393,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910393,2))
end
end
--厮杀的远古造物
Duel.LoadScript("c9910700.lua")
function c9910718.initial_effect(c)
c:SetUniqueOnField(1,0,9910718)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -27,15 +26,16 @@ function c9910718.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c9910718.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910718,0)) then
if g:GetCount()>0 and Duel.SelectEffectYesNo(tp,c,aux.Stringid(9910718,0)) then
Duel.Hint(HINT_CARD,0,9910718)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local sc=sg:GetFirst()
local preatk=sc:GetAttack()
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
......@@ -66,5 +66,8 @@ function c9910718.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,QutryYgzw.SetFilter2,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and QutryYgzw.Set(tc,e,tp) then Duel.Draw(tp,1,REASON_EFFECT) end
if tc and QutryYgzw.Set(tc,e,tp) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--虹彩偶像的协奏 高咲侑
function c9910773.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCost(c9910773.thcost1)
e1:SetTarget(c9910773.thtg1)
e1:SetOperation(c9910773.thop1)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910773,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_DECK)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,9910773)
e2:SetCondition(c9910773.thcon2)
e2:SetTarget(c9910773.thtg2)
e2:SetOperation(c9910773.thop2)
c:RegisterEffect(e2)
end
function c9910773.thcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c9910773.thfilter(c)
return c:IsSetCard(0x5951) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c9910773.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910773.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c9910773.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910773.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 c9910773.cfilter(c)
return c:IsPreviousControler(tp) and c:IsSetCard(0x5951) and c:IsPreviousSetCard(0x5951)
and c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_DECK) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP)
end
function c9910773.thcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9910773.cfilter,1,nil) and not eg:IsContains(e:GetHandler())
end
function c9910773.thtg2(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 c9910773.thop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c9910773.splimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c9910773.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
......@@ -978,15 +978,16 @@
!setname 0x211 舰娘
!setname 0x3211 御三家(舰娘)
!setname 0x5211 舰娘舰装
!setname 0x6211 布里(舰娘)
!setname 0x9211 沉没(舰娘)
!setname 0xa211 舰娘-小(大)
!setname 0x6211 布里(舰娘)
!setname 0x9211 沉没(舰娘)
!setname 0xa211 舰娘-小(大)
!setname 0x3212 武装舰
!setname 0x5212 航空舰
!setname 0x6212 煌海舰
!setname 0x9212 重樱舰
!setname 0xa212 守护之舰
!setname 0xc212 铁血(舰娘)
!setname 0x5212 航空舰
!setname 0x6212 煌海舰
!setname 0x9212 重樱舰
!setname 0xa212 守护之舰
!setname 0xc212 铁血(舰娘)
!setname 0x3213 渊海异兽
#依然 223 0x700-0x70f
!setname 0x613 金属化
......@@ -1106,6 +1107,13 @@
!setname 0xe07 时之虫
!setname 0xe08 尘世侧写
#梦宇 468 0xa10-0xa1f qq:3142105474
!setname 0xa12 辉厄剑
#???
!counter 0x1971 指示物(硬币·表)
!counter 0x1972 指示物(硬币·里)
#TYGOC Submissions
#Desruc_6872 987
!counter 0x57b Scarlet Counter
......
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