Commit ff0d3ebf authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 334a7d52
Pipeline #29783 passed with stage
in 16 minutes and 28 seconds
No preview for this file type
...@@ -540,8 +540,6 @@ ...@@ -540,8 +540,6 @@
17032000 1 --冥守的顶点·艾夏 17032000 1 --冥守的顶点·艾夏
17032180 0 --断绝的妖精 法尔莎莉雅 17032180 0 --断绝的妖精 法尔莎莉雅
17032220 0 --永恒的断绝 17032220 0 --永恒的断绝
17032420 0 --霸王龙 拉克
17032630 1 --杰尼龟军团
17032770 1 --安息的隐者 17032770 1 --安息的隐者
17032840 1 --悠久的绝望 17032840 1 --悠久的绝望
17032860 0 --沉默绝杰·鲁鲁纳伊 17032860 0 --沉默绝杰·鲁鲁纳伊
......
--“艾”的采矿
function c17032390.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,17032390+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c17032390.target)
e1:SetOperation(c17032390.activate)
c:RegisterEffect(e1)
end
function c17032390.filter(c)
return c:IsFaceup() and c:IsLinkAbove(3) and c:IsRace(RACE_CYBERSE)
end
function c17032390.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c17032390.filter,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c17032390.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetMatchingGroup(c17032390.filter,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
Duel.Draw(p,ct,REASON_EFFECT)
--cannot activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c17032390.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--cannot attack
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c17032390.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
end
\ No newline at end of file
--暗魔人@火灵天星
function c17032400.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_NORMAL),1,1)
c:EnableReviveLimit()
--force mzone
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MUST_USE_MZONE)
e1:SetValue(0x60)
c:RegisterEffect(e1)
--cannot special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_GRAVE+LOCATION_SZONE+LOCATION_REMOVED+LOCATION_OVERLAY)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e2)
--cannot be target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c17032400.indcon)
e3:SetValue(aux.imval1)
c:RegisterEffect(e3)
--damage
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(17032400,0))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,17032400)
e4:SetCondition(c17032400.damcon)
e4:SetTarget(c17032400.damtg)
e4:SetOperation(c17032400.damop)
c:RegisterEffect(e4)
end
function c17032400.indcon(e)
return e:GetHandler():IsLinkState()
end
function c17032400.desfilter(c,p)
return c:IsPreviousControler(p) and c:IsReason(REASON_BATTLE)
end
function c17032400.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c17032400.desfilter,1,nil,1-tp)
end
function c17032400.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c17032400.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--新序系4 以太阿努比斯
function c17032440.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c17032440.setcon)
e1:SetCost(c17032440.setcost)
e1:SetTarget(c17032440.settg)
e1:SetOperation(c17032440.setop)
c:RegisterEffect(e1)
end
c17032440.New_Order=4
function c17032440.chkfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp)
end
function c17032440.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c17032440.chkfilter,1,nil,tp)
end
function c17032440.setcost(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 c17032440.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c17032440.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=eg:FilterSelect(tp,c17032440.chkfilter,1,1,nil,tp)
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:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--新序系6 以太阿波菲斯
function c17032450.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,2,c17032450.ovfilter,aux.Stringid(17032450,1),2,c17032450.xyzop)
c:EnableReviveLimit()
--addown
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17032450,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c17032450.cost)
e1:SetTarget(c17032450.target)
e1:SetOperation(c17032450.operation)
c:RegisterEffect(e1)
end
c17032450.New_Order=6
function c17032450.cfilter(c)
return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and (c:IsDiscardable() or c:IsAbleToHand())
end
function c17032450.ovfilter(c)
return c:IsFaceup() and c.New_Order and c:IsRank(4)
end
function c17032450.xyzop(e,tp,chk)
local fe=Duel.IsPlayerAffectedByEffect(tp,17032500)
local loc=LOCATION_HAND
if fe then loc=LOCATION_HAND+LOCATION_DECK end
if chk==0 then return Duel.IsExistingMatchingCard(c17032450.cfilter,tp,loc,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,c17032450.cfilter,tp,loc,0,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_DECK) then
Duel.Hint(HINT_CARD,0,17032500)
fe:UseCountLimit(tp)
Duel.SendtoHand(tc,nil,REASON_COST)
else
Duel.SendtoGrave(tc,REASON_DISCARD+REASON_COST)
end
end
function c17032450.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c17032450.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c17032450.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c17032450.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--新序系8 以太索贝克--新序系8 以太索贝克
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2,s.ovfilter,aux.Stringid(17032460,1),2,s.xyzop)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(17032460,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(s.cost)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
end
s.New_Order=8
function s.cfilter(c)
return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and (c:IsDiscardable() or c:IsAbleToHand())
end
function s.ovfilter(c)
return c:IsFaceup() and c.New_Order and c:IsRank(6)
end
function s.xyzop(e,tp,chk)
local fe=Duel.IsPlayerAffectedByEffect(tp,17032500)
local loc=LOCATION_HAND
if fe then loc=LOCATION_HAND+LOCATION_DECK end
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,loc,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,loc,0,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_DECK) then
Duel.Hint(HINT_CARD,0,17032500)
fe:UseCountLimit(tp)
Duel.SendtoHand(tc,nil,REASON_COST)
else
Duel.SendtoGrave(tc,REASON_DISCARD+REASON_COST)
end
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.thfilter(c)
return c:IsCode(17032510) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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 s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.filter(c,e,tp)
local te,eg,ep,ev,re,r,rp=c:CheckActivateEffect(true,true,true)
local cost=nil
if te and te:GetCost() then cost=te:GetCost() end
local condition=nil
if te and te:GetCondition() then condition=te:GetCondition() end
local tg=nil
if te and te:GetTarget() then tg=te:GetTarget() end
local res=c:CheckActivateEffect(true,true,false)~=nil
and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) and te:CheckCountLimit(tp)==true
and (not condition or condition(e,tp,eg,ep,ev,re,r,rp)) and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0))
return c:IsType(TYPE_SPELL+TYPE_TRAP) and res
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.ClearOperationInfo(0)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(17032460,0))
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst()
local loc=nil
if tc:IsType(TYPE_FIELD) then loc=LOCATION_FZONE else loc=LOCATION_SZONE end
local te=tc:GetActivateEffect()
local cte,ceg,cep,cev,cre,cr,crp=tc:CheckActivateEffect(true,true,true)
local cost=nil
if cte and cte:GetCost() then cost=cte:GetCost() end
local condition=nil
if cte and cte:GetCondition() then condition=cte:GetCondition() end
local target=nil
if cte and cte:GetTarget() then target=cte:GetTarget() end
if tc and tc:CheckActivateEffect(true,true,false)~=nil
and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) and te:CheckCountLimit(tp)==true
and (not condition or condition(e,tp,eg,ep,ev,re,r,rp)) and (not target or target(e,tp,eg,ep,ev,re,r,rp,0)) then
Duel.MoveToField(tc,tp,tp,loc,POS_FACEUP,true)
local bc=Duel.GetOperatedGroup():GetFirst()
te:UseCountLimit(tp,1,true)
tc:CreateEffectRelation(te)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
local target=te:GetTarget()
if target then
target(e,tp,eg,ep,ev,re,r,rp,1)
Duel.RaiseEvent(bc,EVENT_CHAINING,cte,0,tp,tp,Duel.GetCurrentChain())
end
local ag=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if ag then
for ac in aux.Next(ag) do
--Duel.Hint(HINT_CARD,0,ac:GetOriginalCode())
ac:CreateEffectRelation(te)
end
end
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
tc:ReleaseEffectRelation(te)
if ag then
for ac in aux.Next(ag) do
ac:ReleaseEffectRelation(te)
end
end
if not tc:IsType(TYPE_CONTINUOUS+TYPE_FIELD) then
Duel.SendtoGrave(tc,REASON_RULE)
end
end
end
--新序系10 以太荷鲁斯
function c17032470.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,10,2,c17032470.ovfilter,aux.Stringid(17032470,1),2,c17032470.xyzop)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17032470,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c17032470.cost)
e1:SetTarget(c17032470.target)
e1:SetOperation(c17032470.operation)
c:RegisterEffect(e1)
end
c17032470.New_Order=10
function c17032470.cfilter(c)
return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and (c:IsDiscardable() or c:IsAbleToHand())
end
function c17032470.ovfilter(c)
return c:IsFaceup() and c.New_Order and c:IsRank(8)
end
function c17032470.xyzop(e,tp,chk)
local fe=Duel.IsPlayerAffectedByEffect(tp,17032500)
local loc=LOCATION_HAND
if fe then loc=LOCATION_HAND+LOCATION_DECK end
if chk==0 then return Duel.IsExistingMatchingCard(c17032470.cfilter,tp,loc,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,c17032470.cfilter,tp,loc,0,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_DECK) then
Duel.Hint(HINT_CARD,0,17032500)
fe:UseCountLimit(tp)
Duel.SendtoHand(tc,nil,REASON_COST)
else
Duel.SendtoGrave(tc,REASON_DISCARD+REASON_COST)
end
end
function c17032470.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c17032470.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local ct=g:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
if e:GetHandler():IsLocation(LOCATION_HAND) then ct=ct-1 end
if chk==0 then return ct>0 and #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0)
end
function c17032470.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local ct=g:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
if ct>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local sg=g:FilterSelect(1-tp,aux.TRUE,ct,ct,nil,1-tp)
Duel.Destroy(sg,REASON_RULE)
end
end
\ No newline at end of file
--新序系12 以太马赫斯
function c17032480.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,12,2,c17032480.ovfilter,aux.Stringid(17032480,1),2,c17032480.xyzop)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17032480,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c17032480.target)
e1:SetOperation(c17032480.operation)
c:RegisterEffect(e1)
end
function c17032480.eftg(e,c)
return c:IsType(TYPE_SYNCHRO)
end
c17032480.New_Order=12
function c17032480.cfilter(c)
return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and (c:IsDiscardable() or c:IsAbleToHand())
end
function c17032480.ovfilter(c)
return c:IsFaceup() and c.New_Order and c:IsRank(10)
end
function c17032480.xyzop(e,tp,chk)
local fe=Duel.IsPlayerAffectedByEffect(tp,17032500)
local loc=LOCATION_HAND
if fe then loc=LOCATION_HAND+LOCATION_DECK end
if chk==0 then return Duel.IsExistingMatchingCard(c17032480.cfilter,tp,loc,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,c17032480.cfilter,tp,loc,0,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_DECK) then
Duel.Hint(HINT_CARD,0,17032500)
fe:UseCountLimit(tp)
Duel.SendtoHand(tc,nil,REASON_COST)
else
Duel.SendtoGrave(tc,REASON_DISCARD+REASON_COST)
end
end
function c17032480.qfilter(c)
if c:IsCode(40516623,71614230,77511331) then return end
return c:IsType(TYPE_FUSION+TYPE_RITUAL+TYPE_SYNCHRO+TYPE_XYZ+TYPE_SPSUMMON+TYPE_LINK+TYPE_SPIRIT)
end
function c17032480.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and
(c:IsStatus(STATUS_PROC_COMPLETE) or not c17032480.qfilter(c))
end
function c17032480.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g1=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_MONSTER)
local g2=e:GetHandler():GetOverlayGroup():Filter(c17032480.spfilter,nil,e,tp)
if chk==0 then return ft>=#g1 and #g1==#g2 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,#g1,tp,LOCATION_HAND)
end
function c17032480.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=e:GetHandler():GetOverlayGroup():Filter(c17032480.spfilter,nil,e,tp)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local fid=e:GetHandler():GetFieldID()
local sg=Group.CreateGroup()
local tc=g:GetFirst()
e:GetHandler():RegisterFlagEffect(17032481,RESET_EVENT+RESETS_STANDARD,0,1,fid)
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(17032480,RESET_EVENT+RESETS_STANDARD,0,1,fid)
sg:AddCard(tc)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
sg:KeepAlive()
sg:AddCard(e:GetHandler())
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c17032480.descon)
e1:SetOperation(c17032480.desop)
e1:SetLabel(fid)
e1:SetLabelObject(sg)
Duel.RegisterEffect(e1,tp)
end
function c17032480.desfilter(c,fid)
return c:GetFlagEffectLabel(17032480)==fid
end
function c17032480.matfilter(c,fid)
return c:GetFlagEffectLabel(17032481)==fid
end
function c17032480.descon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c17032480.desfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c17032480.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=e:GetLabelObject()
local cc=e:GetLabelObject():Filter(c17032480.matfilter,nil,e:GetLabel()):GetFirst()
local dg=sg:Filter(c17032480.desfilter,nil,e:GetLabel())
sg:DeleteGroup()
if dg:GetCount()>0 and cc then
Duel.Overlay(cc,dg)
end
end
--新序系13 以太阿蒙
function c17032490.initial_effect(c)
--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(c17032490.splimit)
c:RegisterEffect(e1)
--mat
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(17032490,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c17032490.mattg)
e2:SetOperation(c17032490.matop)
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)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
--mat
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(17032490,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e5:SetTarget(c17032490.xyzmattg)
e5:SetOperation(c17032490.xyzmatop)
c:RegisterEffect(e5)
end
c17032490.New_Order=13
function c17032490.splimit(e,se,sp,st)
local sc=se:GetHandler()
return se:GetHandler():IsSetCard(0x95) and sc:IsType(TYPE_SPELL)
end
function c17032490.cfilter(c,tp,rk)
local rank=c:GetRank()
local ct=0
if rank>rk then ct=rank-rk else ct=rk-rank end
return c:IsType(TYPE_XYZ) and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=ct
end
function c17032490.mattg(e,tp,eg,ep,ev,re,r,rp,chk)
local rk=e:GetHandler():GetRank()
if chk==0 then return Duel.IsExistingMatchingCard(c17032490.cfilter,tp,0,LOCATION_MZONE,1,nil,tp,rk) end
end
function c17032490.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rk=c:GetRank()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(17032490,1))
local g=Duel.SelectMatchingCard(tp,c17032490.cfilter,tp,0,LOCATION_MZONE,1,1,nil,tp,rk)
local tc=g:GetFirst()
local rank=tc:GetRank()
local ct=0
if rank>rk then ct=rank-rk else ct=rk-rank end
local mg=Duel.GetDecktopGroup(1-tp,ct)
Duel.Overlay(c,mg)
end
function c17032490.cfilter2(c,tp,rk)
local rank=c:GetRank()
local ct=0
if rank>rk then ct=rank-rk else ct=rk-rank end
return c:IsType(TYPE_XYZ) and c:IsControler(1-tp) and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=ct
end
function c17032490.xyzmattg(e,tp,eg,ep,ev,re,r,rp,chk)
local rk=e:GetHandler():GetRank()
if chk==0 then return eg:IsExists(c17032490.cfilter2,1,nil,tp,rk) end
end
function c17032490.xyzmatop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rk=c:GetRank()
local g=eg:Filter(c17032490.cfilter2,nil,tp,rk)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(17032490,1))
tc=g:Select(tp,1,1,nil):GetFirst()
local rank=tc:GetRank()
local ct=0
if rank>rk then ct=rank-rk else ct=rk-rank end
local mg=Duel.GetDecktopGroup(1-tp,ct)
Duel.Overlay(c,mg)
end
\ No newline at end of file
--升阶增益
function c17032500.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(17032500,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c17032500.condition)
e2:SetTarget(c17032500.target)
e2:SetOperation(c17032500.operation)
c:RegisterEffect(e2)
--change cost
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(17032500,1))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(17032500)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCountLimit(1)
e3:SetTargetRange(1,0)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DISABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetTarget(c17032500.distg)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(c17032500.eftg)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
end
function c17032500.xyzfilter(c,rk)
local rank=c:GetRank()
return c:IsType(TYPE_XYZ) and rank<rk
end
function c17032500.cfilter(c,tp)
local rk=c:GetRank()
local g=c:GetMaterial()
return c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_XYZ)
and g:IsExists(c17032500.xyzfilter,1,nil,rk)
end
function c17032500.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c17032500.cfilter,1,nil,tp)
end
function c17032500.target(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 c17032500.operation(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 c17032500.distg(e,c)
return c==e:GetHandler():GetBattleTarget()
end
function c17032500.eftg(e,c)
local rk=c:GetRank()
local g=c:GetMaterial()
local tp=e:GetHandlerPlayer()
return c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_XYZ)
and g:IsExists(c17032500.xyzfilter,1,nil,rk)
end
\ No newline at end of file
--杰尼龟军团
function c17032630.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c17032630.activate)
c:RegisterEffect(e1)
end
function c17032630.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(17032635)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
...@@ -83,7 +83,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,7 +83,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
--up --up
function cm.lvcon(e,tp,eg,ep,ev,re,r,rp) function cm.lvcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0xef1) and not c:IsCode(m) return re:IsActiveType(TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER) and re:GetHandler():IsSetCard(0xef1) and not c:IsCode(m)
end end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp) function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
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