Commit 0d0fe92e authored by Peter Xin's avatar Peter Xin

2024 update

parent 440d1556
Pipeline #37964 passed with stages
in 38 seconds
--舞焰鬼
local s,id,o=GetID()
function s.initial_effect(c)
--destory
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CUSTOM+id)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.ctcon)
e2:SetOperation(s.ctop)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
if not recg1 then recg1=0 end
if not recg2 then recg2=0 end
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DAMAGE)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local oldev=Duel.GetFlagEffectLabel(ep,id)
if not oldev then oldev=0 end
Duel.ResetFlagEffect(ep,id)
Duel.RegisterFlagEffect(ep,id,RESET_PHASE+PHASE_END,0,1,ev+oldev)
if ep==0 then
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+id,re,r,rp,ep,0)
elseif ep==1 then
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+id,re,r,rp,ep,1)
end
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and bit.band(r,REASON_EFFECT)~=0
end
function s.filter(c,ep)
return c:IsDefenseBelow(Duel.GetFlagEffectLabel(ep,id)) or c:IsType(TYPE_LINK)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ep) then return end
Duel.Hint(HINT_CARD,0,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,ep)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
Duel.Draw(tp,1,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_DP)
e1:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
end
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
-----------------------------------------------------------------------------------
--- 那个什么来着(172016021) 通常陷阱 (Custom)
--- 这张卡能且只能从手卡发动。
--- ①:自己场上没有怪兽存在,对方场上这回合特殊召唤且攻击表示的怪兽把效果发动时才能发动。
--- 从卡组选1张「健忘」除外,那张卡的效果适用。那之后,这张卡返回手卡。
-----------------------------------------------------------------------------------
local s,id,o=GetID()
function s.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(aux.TRUE)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local tgp,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
local tc=re:GetHandler()
local c=e:GetHandler()
return c:IsLocation(LOCATION_HAND) and tgp==1-tp and loc==LOCATION_MZONE and tc:IsStatus(STATUS_SPSUMMON_TURN) and tc:IsPosition(POS_FACEUP_ATTACK) and Duel.IsChainDisablable(ev)
end
function s.filter(c,tp)
return c:IsCode(71098407) and c:IsAbleToRemove() --and c:GetActivateEffect():IsActivatable(tp,true,true)
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,tp) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,tp)
local c=e:GetHandler()
local tc=g:GetFirst()
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT) then
local rc=re:GetHandler()
local te=tc:GetActivateEffect()
rc:CreateEffectRelation(te)
te:GetOperation()(te,tp,eg,ep,ev,re,r,rp)
if rc:IsPosition(POS_FACEUP_DEFENSE) then
Duel.BreakEffect()
c:CancelToGrave()
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
end
-----------------------------------------------------------------------------------------
--- 纵欲之壶(172016022) 通常魔法 (Custom)
--- ①:从卡组选2张「纵欲之壶」以外的「之壶」魔法卡(同名卡至多1张)在自己卡组最上方放置,抽2张卡。
-----------------------------------------------------------------------------------------
local s,id,o=GetID()
s.pots={
[55144522]=1, --强欲
[70278545]=1, --谦虚
[67169062]=1, --贪欲
[51790181]=1, --无欲
[96598015]=1, --金满
[64014615]=1, --大欲
[id] =1, --纵欲
[98645731]=1, --强谦
[98672567]=1, --贪无
[35261759]=1, --强贪
[49238328]=1, --强金
[84211599]=1, --金谦
}
function s.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(s.activate)
c:RegisterEffect(e1)
end
function s.filter(c)
return s.pots[c:GetCode()]~=nil
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and g:GetClassCount(Card.GetCode)>1 end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil)
if g:GetClassCount(Card.GetCode)<2 then return end
local sg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
local tc1=sg:GetFirst()
local tc2=sg:GetNext()
if tc1 and tc2 then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc1,SEQ_DECKTOP)
Duel.MoveSequence(tc2,SEQ_DECKTOP)
Duel.ConfirmDecktop(tp,2)
end
Duel.Draw(tp,2,REASON_EFFECT)
end
\ No newline at end of file
------------------------------------------------------------------------------------
--- 均富卡(172016023) 通常陷阱 (Custom)
--- 这张卡也能把基本分支付一半从手卡发动。
--- ①:自己的卡组和额外卡组卡的数量都比对方多的场合才能发动。均分自己和对方的卡组·额外卡组。
------------------------------------------------------------------------------------
local s,id,o=GetID()
function s.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(aux.TRUE)
e0:SetCost(s.cost)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_DECK, 0)>Duel.GetFieldGroupCount(tp,0, LOCATION_DECK) and
Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)>Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetFieldGroup(tp,LOCATION_DECK, LOCATION_DECK)
local eg=Duel.GetFieldGroup(tp,LOCATION_EXTRA,LOCATION_EXTRA)
da={}
ea={}
for dc in aux.Next(dg) do
table.insert(da,dc)
end
for ec in aux.Next(eg) do
table.insert(ea,ec)
end
s.shuffle(da)
s.shuffle(ea)
local dct=math.floor(#da/2)
local ect=math.floor(#ea/2)
for i = 1,#da do
local dc=da[i]
local cucontroller=dc:GetControler()
local tocontroller=tp
if i>dct then tocontroller=1-tp end
if cucontroller~=tocontroller then
Duel.SendtoDeck(dc,tocontroller,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
for i = 1,#ea do
local ec=ea[i]
local cucontroller=ec:GetControler()
local tocontroller=tp
if i>ect then tocontroller=1-tp end
if cucontroller~=tocontroller then
Duel.Remove(ec,POS_FACEDOWN,REASON_EFFECT)
Duel.SendtoDeck(ec,tocontroller,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
Duel.ConfirmCards(tp,Duel.GetFieldGroup(tp,LOCATION_DECK,0))
Duel.ConfirmCards(1-tp,Duel.GetFieldGroup(1-tp,LOCATION_DECK,0))
Duel.ShuffleDeck(p)
Duel.ShuffleDeck(1-tp)
end
function s.shuffle(t)
for i = #t, 2, -1 do
local j = math.random(i)
t[i], t[j] = t[j], t[i]
end
end
---------------------------------------------
--- 冥王的敕令(172016024) 速攻魔法 (Custom)
--- ①:场上全部表侧表示的卡效果无效。
---------------------------------------------
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,0,1,nil)>=0
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)>0 end
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0,e:GetHandler())
for tc in aux.Next(g) do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
-----------------------------------------------------------------------------------------
--- 王家的人柱(172016025) 通常陷阱 (Custom)
--- ①:当自己场上有「王家长眠之谷」存在时才能发动。双方玩家把卡组·额外卡组中的怪兽卡全部送去墓地。
-----------------------------------------------------------------------------------------
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_HANDES+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(47355498,tp)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_DECK+LOCATION_EXTRA,LOCATION_DECK+LOCATION_EXTRA,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_DECK+LOCATION_EXTRA)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_DECK+LOCATION_EXTRA,LOCATION_DECK+LOCATION_EXTRA,nil,TYPE_MONSTER)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
end
end
\ No newline at end of file
---------------------------------------------------------------------------------------------------------
--- FAIR GAME(172016026) 通常魔法
--- ①:对方回合的结束阶段,自己场上没有卡存在的场合,可以把手卡的这张卡展示。这个效果展示的卡在对方的抽卡阶段抽卡前送去墓地。
--- ②:为①效果而公开表示的这张卡送去墓地的场合,对下列每项而言,这张卡展示期间若自己未曾如此做,
--- 对方选择手卡·场上1张卡送去墓地,或双方不能如此做直到对方回合结束(若对方曾如此做,改为你来选):
--- ● 抽卡
--- ● 通常召唤
--- ● 特殊召唤
--- ● 卡的盖放
--- ● 攻击宣言
--- ● 效果的发动
--- ● 发动的怪兽效果的适用
--- ● 发动的魔法·陷阱卡的效果的适用
--- 提示文本:是否要展示FAIR GAME?、抽卡、通常召唤、特殊召唤、卡的盖放、攻击宣言、效果的发动、
--- 发动的怪兽效果的适用、发动的魔法·陷阱卡的效果适用、选卡送去墓地、不能如此做
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------
-- Flag effects
-- bit 0: No use
-- bit 1: Draw
-- bit 2: Normal Summon
-- bit 3: Special Summon
-- bit 4: Set
-- bit 5: Attack announcement
-- bit 6: Trigger Effect
-- bit 7: Monster Effect Resolve
-- bit 8: Spell/Trap Effect Resolve
-- 0b010110011 = Enabled, already draw, normal summon,
-- attack announcement, trigger effect,
-- and resolve monster effect.
---------------------------------------------------------
local s,id,o=GetID()
o=1e9
function s.initial_effect(c)
-- show
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_EVENT_PLAYER+EFFECT_FLAG_IMMEDIATELY_APPLY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1)
e1:SetCondition(s.showcon)
e1:SetOperation(s.showop)
c:RegisterEffect(e1)
-- to grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetOperation(s.op)
c:RegisterEffect(e2)
end
function s.showcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)==0 and (not e:GetHandler():IsPublic()) and Duel.GetTurnPlayer()==1-tp
end
function s.showop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectYesNo(tp,aux.Stringid(id,0)) then return end
Duel.Hint(HINT_CARD,0,id)
-- be public
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
-- discard
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PREDRAW)
e2:SetCountLimit(1)
e2:SetLabelObject(c)
e2:SetCondition(s.discon)
e2:SetOperation(s.disop)
Duel.RegisterEffect(e2,tp)
-- flag
c:RegisterFlagEffect(id+o,RESET_EVENT+RESETS_STANDARD,0,1)
c:RegisterFlagEffect(id,0,0,1,1)
-- listen
s.listen(c,EVENT_DRAW,1)
s.listen(c,EVENT_SUMMON,2)
s.listen(c,EVENT_SPSUMMON_SUCCESS,3)
s.listen(c,EVENT_SSET,4)
s.listen(c,EVENT_ATTACK_ANNOUNCE,5)
s.listen(c,EVENT_CHAINING,6)
s.listen(c,EVENT_CHAIN_SOLVED,7,s.monstercon)
s.listen(c,EVENT_CHAIN_SOLVED,8,s.spellcon)
end
function s.listen(c,code,bit,con)
local e=Effect.CreateEffect(c)
e:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e:SetRange(LOCATION_HAND)
e:SetDescription(aux.Stringid(id,bit))
e:SetCode(code)
e:SetCountLimit(1)
if bit==5 then
e:SetCondition(s.recordcon)
elseif con==nil then
e:SetCondition(s.recordcon1)
else
e:SetCondition(aux.AND(s.recordcon1,con))
end
e:SetOperation(s.counterop(bit))
e:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e)
if bit==5 then return end
local eo=e:Clone()
if con==nil then
eo:SetCondition(s.recordcon2)
else
eo:SetCondition(aux.AND(s.recordcon2,con))
end
eo:SetProperty(nil)
eo:SetOperation(s.counterop(bit+8))
c:RegisterEffect(eo)
end
function s.counterop(bit)
return function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local status=c:GetFlagEffectLabel(id)
if status==nil then status=1 end
c:SetFlagEffectLabel(id,status|(1<<bit))
e:Reset()
end
end
function s.monstercon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER)
end
function s.spellcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function s.recordcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffectLabel(id)~=nil and c:GetFlagEffect(id+o)>0
end
function s.recordcon1(e,tp,eg,ep,ev,re,r,rp)
return s.recordcon(e,tp,eg,ep,ev,re,r,rp) and rp==tp
end
function s.recordcon2(e,tp,eg,ep,ev,re,r,rp)
return s.recordcon(e,tp,eg,ep,ev,re,r,rp) and rp==1-tp
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(id+o)>0 and Duel.GetTurnPlayer()==1-tp
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(id+o)>0 then
Duel.SendtoGrave(e:GetLabelObject(),REASON_EFFECT)
end
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,id)
local code=c:GetFlagEffectLabel(id)
c:ResetFlagEffect(id)
if code==nil then
return
end
local te=Effect.CreateEffect(c)
te:SetType(EFFECT_TYPE_FIELD)
te:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
te:SetTargetRange(1,1)
te:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
if s.select(code,tp,1) then
local e1=te:Clone();
e1:SetCode(EFFECT_CANNOT_DRAW)
Duel.RegisterEffect(e1,tp)
end
if s.select(code,tp,2) then
local e2=te:Clone();
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
if s.select(code,tp,3) then
local e3=te:Clone();
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e3,tp)
end
if s.select(code,tp,4) then
local e4=te:Clone();
e4:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e4,tp)
local e4p=te:Clone();
e4p:SetCode(EFFECT_CANNOT_SSET)
Duel.RegisterEffect(e4p,tp)
end
if s.select(code,tp,5) then
local e5=te:Clone();
e5:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
Duel.RegisterEffect(e5,tp)
end
if s.select(code,tp,6) then
local e6=te:Clone();
e6:SetCode(EFFECT_CANNOT_ACTIVATE)
e6:SetValue(aux.TRUE)
Duel.RegisterEffect(e6,tp)
end
if s.select(code,tp,7) then
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_CHAIN_SOLVING)
e7:SetOperation(s.neop)
e7:SetCondition(s.monstercon)
e7:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e7,tp)
end
if s.select(code,tp,8) then
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_CHAIN_SOLVING)
e8:SetOperation(s.neop)
e8:SetCondition(s.spellcon)
e8:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e8,tp)
end
end
function s.select(code,tp,bit)
if code&(1<<bit)>0 then return false end
local p=1-tp
if code&(1<<8<<bit)>0 then p=tp end
if #Duel.GetMatchingGroup(Duel.IsAbleToGrave,tp,0,LOCATION_HAND+LOCATION_ONFIELD,nil)==0 then return true end
Duel.SelectOption(p,aux.Stringid(id,bit))
local option=Duel.SelectOption(p,aux.Stringid(id,9),aux.Stringid(id,10))
if option==0 then
local g=Duel.SelectMatchingCard(p,Duel.IsAbleToGrave,tp,0,LOCATION_HAND+LOCATION_ONFIELD,1,1,nil)
Duel.SendtoGrave(g,REASON_RULE)
end
return option==1
end
function s.neop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev,true)
end
---------------------------------------------------------------------------------------------------------------------
--- S.A.R.A.(172016020) 无 3星 龙/调整 0 1800 (Custom)
--- 这个卡名的效果1回合只能使用1次。
--- 这张卡的属性是最后召唤·特殊召唤·反转召唤成功的怪兽的属性。
--- ①:对方的主要阶段才能发动。手卡的这张卡直到回合结束时公开,从卡组选1张「S.A.R.A」以外和这张卡属性相同的攻0/防1800的调整怪兽加入手卡。
--- 这个回合,这张卡是公开表示的场合,自己不是与这张卡属性相同的怪兽的效果不能发动。
---------------------------------------------------------------------------------------------------------------------
local s,id,o=GetID()
s.attribute=0
function s.initial_effect(c)
-- tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
s.register_attribute_effect(c,ATTRIBUTE_DARK)
s.register_attribute_effect(c,ATTRIBUTE_DIVINE)
s.register_attribute_effect(c,ATTRIBUTE_EARTH)
s.register_attribute_effect(c,ATTRIBUTE_FIRE)
s.register_attribute_effect(c,ATTRIBUTE_LIGHT)
s.register_attribute_effect(c,ATTRIBUTE_WATER)
s.register_attribute_effect(c,ATTRIBUTE_WIND)
if s.inited==nil then
--Listen summons
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(s.attrop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
local ge3=ge1:Clone()
ge3:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge3,0)
s.iniied=true
end
end
function s.register_attribute_effect(c,attribute)
local e=Effect.CreateEffect(c)
e:SetType(EFFECT_TYPE_SINGLE)
e:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e:SetCode(EFFECT_ADD_ATTRIBUTE)
e:SetRange(~0)
e:SetValue(attribute)
e:SetCondition(s.attribute_condition(attribute))
c:RegisterEffect(e)
end
function s.attribute_condition(attribute)
return function(c)
return s.attribute&attribute>0
end
end
function s.attrop(e,tp,eg,ep,ev,re,r,rp)
s.attribute=0
for tc in aux.Next(eg) do
s.attribute=s.attribute|tc:GetAttribute()
end
end
function s.thfilter(c,attr)
return c:GetAttack()==0 and c:GetDefense()==1800 and c:IsAttribute(attr) and c:IsType(TYPE_TUNER) and not c:IsCode(id) and c:IsAbleToHand()
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and not e:GetHandler():IsPublic()
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,e:GetHandler():GetAttribute()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thcost(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 s.thop(e,tp,eg,ep,ev,re,r,rp)
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_PUBLIC)
e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil,e:GetHandler():GetAttribute())
local g=sg:SelectSubGroup(tp,aux.dncheck,false,1,1)
if sg:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
e1:SetLabelObject(c)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function s.aclimit(e,re,tp)
local c=e:GetLabelObject()
return c:IsPublic() and not re:GetHandler():IsAttribute(c:GetAttribute())
end
--圣夜的辉龙
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_NO_TURN_RESET)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1)
e2:SetCondition(s.tgcon)
e2:SetTarget(s.tgtg)
e2:SetOperation(s.tgop)
c:RegisterEffect(e2)
--cannot be material
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e12:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e12:SetValue(s.mlimit)
c:RegisterEffect(e12)
local e21=e12:Clone()
e21:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e21:SetValue(1)
c:RegisterEffect(e21)
local e31=e21:Clone()
e31:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e31)
local e41=e31:Clone()
e41:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e41)
--cannot release
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(0xff)
e4:SetCode(EFFECT_UNRELEASABLE_SUM)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function s.mlimit(e,c,st)
return st==SUMMON_TYPE_FUSION
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW)
end
function s.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 s.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
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e2,tp)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_FIELD)
e12:SetCode(EFFECT_CANNOT_SUMMON)
e12:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e12:SetRange(LOCATION_MZONE)
e12:SetAbsoluteRange(tp,1,0)
e12:SetReset(RESET_EVENT+RESETS_STANDARD)
--c:RegisterEffect(e12,true)
local e21=e1:Clone()
e21:SetCode(EFFECT_CANNOT_MSET)
--c:RegisterEffect(e21,true)
end
function s.chkfilter1(c)
return not (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY))
end
function s.chkfilter2(c)
return not c:IsPreviousLocation(LOCATION_GRAVE)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsExists(s.chkfilter1,1,nil) and not eg:IsExists(s.chkfilter2,1,nil)
end
function s.chkfilter3(c,spchk,e,tp)
return not (c:IsAbleToHand() or (spchk and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local spchk=Duel.IsExistingMatchingCard(Card.IsAttribute,tp,0,LOCATION_MZONE,1,nil,ATTRIBUTE_DARK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=eg:GetCount()
if chk==0 then return not eg:IsExists(s.chkfilter3,1,nil,spchk,e,tp) end
end
function s.chkfilter4(c,e,tp)
return not c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(Card.IsLocation,nil,LOCATION_REMOVED)
if Duel.IsExistingMatchingCard(Card.IsAttribute,tp,0,LOCATION_MZONE,1,nil,ATTRIBUTE_DARK)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>eg:GetCount()
and not sg:IsExists(s.chkfilter4,1,nil,e,tp)
and (not Duel.IsPlayerAffectedByEffect(tp,59822133) or eg:GetCount()<=1)
and Duel.SelectOption(tp,1190,1152)==1 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
...@@ -37,7 +37,7 @@ function s.initial_effect(c) ...@@ -37,7 +37,7 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_CHAIN_END) e3:SetCode(EVENT_CHAIN_END)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCondition(s.drcon) e3:SetCondition(s.drcon)
e3:SetTarget(s.drtg) e3:SetTarget(s.drtg)
e3:SetOperation(s.drop) e3:SetOperation(s.drop)
......
...@@ -44,8 +44,8 @@ function s.spfilter(c,e,tp,level) ...@@ -44,8 +44,8 @@ function s.spfilter(c,e,tp,level)
and (level==99 or c:IsType(TYPE_SPSUMMON)) and (level==99 or c:IsType(TYPE_SPSUMMON))
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,REASON_COST,nil,0xaa) end if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0xaa) end
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,REASON_COST,nil,0xaa) local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0xaa)
if Duel.Release(g,REASON_COST)>0 then if Duel.Release(g,REASON_COST)>0 then
local c=g:GetFirst() local c=g:GetFirst()
if c:IsCode(51194046) then if c:IsCode(51194046) then
...@@ -158,7 +158,7 @@ function s.pendop() ...@@ -158,7 +158,7 @@ function s.pendop()
end end
end end
function s.GetLocationCountFromEx(p,tp,sg,t,...) function s.GetLocationCountFromEx(tp,tp,sg,t,...)
if t==TYPE_PENDULUM then t=TYPE_SYNCHRO end if t==TYPE_PENDULUM then t=TYPE_SYNCHRO end
return s.originGetLocationCountFromEx(p,tp,sg,t,...) return s.originGetLocationCountFromEx(tp,tp,sg,t,...)
end end
\ No newline at end of file
-----------------------------------------------------------------------------------------
--- 世坏遨游(172016300) 永续魔法 (Custom)
--- 这个卡名的①②③效果1回合只能各使用1次。
--- 自己场上有「维萨斯-斯塔弗罗斯特」表侧表示存在的场合,这张卡的效果适用之际只有1次,可以重掷骰子。
--- 这张卡的效果处理时没有可以处理的卡的场合,直到回合结束,不能把这张卡的效果发动。
--- ①:投掷1枚骰子。从卡组选那个数字对应的「世坏」或「世坏」系列的魔法·陷阱卡加入手卡。
--- ②:投掷1枚骰子。从卡组选那个数字对应的「世坏」或「世坏」系列的魔法·陷阱卡送去墓地。
--- ③:投掷1枚骰子。从卡组选那个数字对应的「世坏」系列的怪兽特殊召唤。
--- (「世坏」系列是指:1-「珠泪哀歌族」,4-「恐吓爪牙族」,5-「末那愚子族」,6-「惧舍怒威族」)
--- 提示文本:选魔法·陷阱卡加入手卡、选魔法·陷阱卡送去墓地、把怪兽特殊召唤、是否要重掷骰子?
-----------------------------------------------------------------------------------------
local s,id,o=GetID()
o=1e8
s.sets = {
[1]=0x181,
[4]=0x17a,
[5]=0x190,
[6]=0x189
}
s.cards = {
[77103950]=1,
[56063182]=4,
[82460246]=5,
[71832012]=6
}
function s.initial_effect(c)
aux.AddCodeList(c,56099748)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e0)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.con)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.con)
e2:SetTarget(s.tgtg)
e2:SetOperation(s.tgop)
c:RegisterEffect(e2)
--specialsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,id+o+o)
e3:SetCondition(s.con)
e3:SetTarget(s.sstg)
e3:SetOperation(s.ssop)
c:RegisterEffect(e3)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)==0
end
-- apply n=-1 as a ALL filter.
function s.filter(c,n)
local tn=s.cards[c:GetCode()]
if tn==n or (tn~=nil and n<0) then return true end
if n<0 then
for n,set in pairs(s.sets) do
if c:IsSetCard(set) then return true end
end
return false
end
local set=s.sets[n]
if set==nil then return false end
return c:IsSetCard(set)
end
function s.thfilter(c,n)
return s.filter(c,n) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToHand()
end
function s.tgfilter(c,n)
return s.filter(c,n) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToGrave()
end
function s.ssfilter(c,n,e,tp)
return s.filter(c,n) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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,-1) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,-1) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ssfilter,tp,LOCATION_DECK,0,1,nil,-1) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function s.dice(tp)
local n=Duel.TossDice(tp,1)
local canredice=Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,56099748)
if canredice and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
n=Duel.TossDice(tp,1)
end
return n
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local n=s.dice(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,n)
if #g==0 then
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local n=s.dice(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,n)
if #g==0 then
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
else
Duel.SendtoGrave(g,nil,REASON_EFFECT)
end
end
function s.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local n=s.dice(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.ssfilter,tp,LOCATION_DECK,0,1,1,nil,n,e,tp)
if #g==0 then
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
else
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
----------------------------------------------------------------------------------------------------------------
--- 魔界台本「唐突结局」(172016305) 速攻魔法 (Custom)
--- 系列:魔界台本
--- 不能对应这张卡的①效果的发动把卡的效果发动。
--- ①:自己的主要阶段1才能发动。回合玩家抽1张卡,回合结束(剩余的阶段以及连锁上的效果均予跳过)。
--- ②:自己的额外卡组有表侧表示的「魔界剧团」灵摆怪兽存在,盖放的这张卡被对方的效果破坏的场合才能发动。
--- 从卡组把1张「魔界剧团」灵摆怪兽送去墓地,这张卡的①效果适用。
----------------------------------------------------------------------------------------------------------------
local s,id,o=GetID()
function s.initial_effect(c)
--skip
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.con)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,23784497)
e2:SetCondition(s.tgcon)
e2:SetTarget(s.tgtg)
e2:SetOperation(s.tgop)
c:RegisterEffect(e2)
end
function s.con(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(Duel.GetTurnPlayer(),1,REASON_EFFECT)
local c=e:GetHandler()
-- silent.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,1)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
-- override effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_FZONE)
e2:SetReset(RESET_CHAIN)
e2:SetOperation(s.chop)
Duel.RegisterEffect(e2,tp)
-- skip all phases
local p=Duel.GetTurnPlayer()
Duel.SkipPhase(p,PHASE_DRAW,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(p,PHASE_STANDBY,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(p,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(p,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(p,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(p,PHASE_END,RESET_PHASE+PHASE_END,1)
end
function s.filter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x10ec)
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,s.realop)
end
function s.realop()
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and rp==1-tp and c:IsPreviousControler(tp)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN)
and Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,s.filter),tp,LOCATION_EXTRA,0,1,nil)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsAbleToGrave,s.filter),tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsAbleToGrave,s.filter),tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
s.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
...@@ -15,7 +15,6 @@ function s.initial_effect(c) ...@@ -15,7 +15,6 @@ function s.initial_effect(c)
--to field --to field
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
......
--凶导的落印
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--negative
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.handfilter(c,tp)
return c:IsType(TYPE_RITUAL) and c:IsSetCard(0x145) and not c:IsPublic() and Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_MZONE,1,nil,tp,c:GetLevel())
end
function s.desfilter(c,tp,lvl)
return aux.NegateEffectMonsterFilter(c) and c:IsLevel(lvl) and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetAttack())
end
function s.tgfilter(c,atk)
return c:IsAttackAbove(atk) and c:IsAbleToGrave()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.handfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.handfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
Duel.ConfirmCards(1-tp,g)
e:SetLabel(g:GetFirst():GetLevel())
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lvl=e:GetLabel()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.desfilter(chkc,tp,lvl) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,s.desfilter,tp,0,LOCATION_MZONE,1,1,nil,tp,lvl)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function s.activate(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 atk=tc:GetAttack()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil,atk)
local gc=g:GetFirst()
if gc and Duel.SendtoGrave(gc,REASON_EFFECT)~=0 and gc:IsLocation(LOCATION_GRAVE) then
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)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(1)
tc:RegisterEffect(e2)
local e3=e2:Clone()
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e3)
local e4=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetValue(s.fuslimit)
tc:RegisterEffect(e4)
if tc:IsRace(RACE_SPELLCASTER) then
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(s.racecondition)
e5:SetCost(s.racecost)
e5:SetOperation(s.raceactivate)
tc:RegisterEffect(e5)
end
end
end
end
function s.racefilter(c,tp)
return c:IsSummonType(SUMMON_TYPE_RITUAL) and c:IsControler(1-tp) and c:IsSetCard(0x145)
end
function s.racecondition(e,tp,eg,ep,ev,re,r,rp)
return eg ~= nil and eg:IsExists(s.racefilter,1,nil,tp)
end
function s.racecost(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 s.tefilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function s.raceactivate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.tefilter,tp,LOCATION_MZONE,0,nil)
Duel.SendtoDeck(g:Filter(Card.IsAbleToExtra,nil),nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
\ No newline at end of file
--曾被称为的白龟
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(s.con)
e1:SetOperation(s.sop)
e1:SetCountLimit(8,id)
c:RegisterEffect(e1)
local e2=e1:Clone();
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
end
function s.sop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()==0 then return end
Duel.HintSelection(g)
local id=g:GetFirst():GetCode()
Duel.Hint(HINT_CARD,tp,id)
local ct=Duel.GetFlagEffectLabel(tp,id)
if ct==nil then ct=0 end
ct=ct+1
if ct==3 then
Duel.Win(tp,0xf2)
elseif ct==1 then
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1,ct)
else
Duel.SetFlagEffectLabel(tp,id,ct)
end
Duel.SendtoHand(e:GetHandler(),tp,REASON_EFFECT,tp)
end
----------------------------------------------------------------------------------------------------------------------------------------------
--- [SR22-JP001] 主宰龙 无穷烈日(172017200) 光 11星 龙/同调 ? ? (Custom)
--- 光·暗属性龙族调整怪兽1只或「光脉冲星龙」+不能通常召唤的龙族怪兽1只或「暗黑耀星龙」
--- 「主宰龙 无穷烈日」在自己场上只能有1只表侧表示存在。
--- 这个卡名的③效果每个阶段只能发动1次。
--- ①:这张卡同调召唤成功时发动。把为那次同调召唤使用的同调素材中最高等级数量的「燃料指示物」给这张卡放置。
--- ②:这张卡的攻击力·守备力上升这张卡持有的「燃料指示物」数量×500。
--- ③:把这张卡上2个「燃料指示物」取除,以自己墓地·除外的光·暗属性龙族怪兽各1只为对象才能发动。那些怪兽特殊召唤。这个效果对方回合也能发动。
--- 这个效果发动的回合,自己不是龙族怪兽不能特殊召唤。
--- ④:自己·对方的结束阶段,这张卡没有「燃料指示物」存在的场合,把这张卡所在区域的前面·后面,以及相邻区域和相邻区域的前面·后面合计8个区域中的卡送去墓地发动。
--- 为这个效果发动送去墓地的卡每有1张,把2个「燃料指示物」给这张卡放置。那之后,这张卡得到下列效果。
--- ● 只要这张卡在场上表侧表示存在,这张卡所在区域的前面·后面,以及相邻区域和相邻区域的前面·后面合计8个区域不可用。
--- 提示文本:放置指示物、苏生龙族怪兽、把附近区域的卡送去墓地
-----------------------------------------------------------------------------------------------------------------------------------------------
local s,id,o=GetID()
COUNTER_ID=0x10ec
function s.initial_effect(c)
aux.AddSynchroMixProcedure(c,s.matfilter1,nil,nil,s.matfilter2,1,1)
c:EnableReviveLimit()
c:SetUniqueOnField(1,0,id)
--synchro success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.addcc1)
e1:SetTarget(s.addct1)
e1:SetOperation(s.addc1)
c:RegisterEffect(e1)
--atk def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(s.value)
c:RegisterEffect(e2)
local e2d=e2:Clone()
e2d:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2d)
--revive
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.spcon)
e3:SetCost(s.spcost)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(s.tgcon)
e4:SetCost(s.tgcost)
e4:SetOperation(s.tgop)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(id, ACTIVITY_CHAIN, s.chainfilter)
end
s.material_type=TYPE_SYNCHRO
function s.matfilter1(c,syncard)
return (c:IsTuner(syncard) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT)) or c:IsCode(99365553)
end
function s.matfilter2(c)
return (not c:IsSummonableCard() and c:IsRace(RACE_DRAGON)) or c:IsCode(25460258)
end
function s.addcc1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.addct1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local cg,ct=e:GetHandler():GetMaterial():GetMaxGroup(Card.GetOriginalLevel)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,ct,0,COUNTER_ID)
end
function s.addc1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local cg,ct=c:GetMaterial():GetMaxGroup(Card.GetOriginalLevel)
c:AddCounter(COUNTER_ID,ct)
end
end
function s.value(e,c)
return c:GetCounter(COUNTER_ID)*500
end
function s.chainfilter(re, tp, cid)
return (not re:IsActiveType(TYPE_MONSTER)) or re:GetHandler():IsRace(RACE_DRAGON)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetCounter(COUNTER_ID)>1 end
c:RemoveCounter(tp,COUNTER_ID,2,REASON_COST)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_DRAW+PHASE_STANDBY+PHASE_MAIN1+PHASE_BATTLE+PHASE_MAIN2+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(s.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.spfilter1(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function s.spfilter2(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function s.spjudge(sg,e,tp)
local c1=sg:GetFirst()
local c2=sg:GetNext()
if c1==nil or c2==nil then return false end
return (s.spfilter1(c1,e,tp) and s.spfilter2(c2,e,tp)) or (s.spfilter1(c2,e,tp) and s.spfilter2(c1,e,tp))
end
function s.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsRace(RACE_DRAGON)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id)==0 and Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and (s.spfilter1(chkc,e,tp) or s.spfilter2(chkc,e,tp)) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingTarget(s.spfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)
and Duel.IsExistingTarget(s.spfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
local g2=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
local g=(g1+g2):SelectSubGroup(tp,s.spjudge,false,2,2,e,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(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)~=2 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and e:GetHandler():GetCounter(COUNTER_ID)==0
end
function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local z=aux.ZoneNear(c)
local tg=Duel.GetMatchingGroup(aux.ZoneFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,z)
local ct=Duel.SendtoGrave(tg,REASON_COST)
e:SetLabel(ct)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
if ct>0 then
c:AddCounter(COUNTER_ID,ct*2)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetValue(s.disval)
c:RegisterEffect(e1)
end
function s.disval(e)
return aux.ZoneNear(e:GetHandler())
end
if not aux.ZoneNear then
aux.ZoneList = {
[0]=0x322,
[1]=0x725,
[2]=0xe6a,
[3]=0x1c54,
[4]=0x1848,
[5]=0x1c0007,
[6]=0x7001c,
}
function aux.ZoneNear(c)
return aux.ZoneList[c:GetSequence()]
end
function aux.GetZone(c,tp)
local seq=c:GetSequence()
local loc=c:GetLocation()
local ctp=c:GetControler()
local zone=0
if loc==LOCATION_MZONE then
zone=0x1<<seq
elseif loc==LOCATION_SZONE then
zone=0x100<<seq
elseif loc==LOCATION_FZONE then
zone=0x1000
elseif loc==LOCATION_PZONE then
zone=0 -- rule 4
end
if ctp~=tp then zone=zone<<16 end
return zone
end
function aux.ZoneFilter(c,tp,zone)
return aux.GetZone(c,tp)&zone>0
end
end
---------------------------------------------------------------------------------------------------------------------------------------
--- [SR22-JPP01] 热脉动星龙(172017201) 光 10星 龙/融合/调整 3000 2400 (Custom)
--- 「光脉冲星龙」+ 暗属性龙族怪兽1只
--- 这个卡名的②效果1回合只能发动1次。
--- ①:这张卡特殊召唤成功时,以及自己·对方1回合1次必须发动。这张卡所在区域的前面·后面,以及相邻区域和相邻区域的前面·后面合计8个区域的卡破坏。
--- 破坏的卡中包含暗属性·龙族怪兽的场合,可以把以下效果中选1个适用。
--- ● 用这张卡和那些怪兽中任意只当作融合素材从额外卡组把1只融合怪兽当作融合召唤特殊召唤。
--- ● 用这张卡和那些怪兽中任意只当做同调素材从额外卡组把1只同调怪兽同调召唤。
--- ● 用这张卡和那些怪兽中任意只当做连接素材从额外卡组把1只连接怪兽连接召唤。
--- ● 从额外卡组把1只可以用这张卡和那些怪兽中任意只作为超量素材超量召唤的超量怪兽当作超量召唤特殊召唤。那之后,那些怪兽在特殊召唤的超量怪兽下面重叠作为超量素材。
--- ②:这张卡送去墓地的场合才能发动。从墓地选1只龙族·暗属性·5星以上的怪兽特殊召唤。
--- 提示文本:卡片破坏、特殊召唤、什么都不做、融合召唤、连接召唤、同调召唤、超量召唤
---------------------------------------------------------------------------------------------------------------------------------------
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddFusionProcCodeFun(c,25460258,aux.AND(aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT)),1,true,true)
--des
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetDescription(aux.Stringid(id,0))
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(s.descon)
e2:SetLabel(1)
e2:SetCountLimit(1)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCondition(s.descon)
e3:SetLabel(1)
c:RegisterEffect(e3)
--special summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCountLimit(1,id)
e5:SetTarget(s.sstg)
e5:SetOperation(s.ssop)
c:RegisterEffect(e5)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)==0
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local z=aux.ZoneNear(c)
Duel.Hint(HINT_ZONE,tp,z)
local tg=Duel.GetMatchingGroup(aux.ZoneFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,z)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,#tg,0,0)
if e:GetLabel()==1 then
-- Duel.PayLPCost(tp,1)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local z=aux.ZoneNear(c)
local tg=Duel.GetMatchingGroup(aux.ZoneFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,z)
Duel.Destroy(tg,REASON_EFFECT+REASON_DESTROY+REASON_MATERIAL+REASON_FUSION+REASON_LINK+REASON_XYZ+REASON_SYNCHRO)
local g=Duel.GetOperatedGroup()
g=g+c
if #(g:Filter(s.desfilter,nil))>0 then
local fex=Duel.GetMatchingGroup(s.fcheck,tp,LOCATION_EXTRA,0,nil,e,tp,g,c)
local lex=Duel.GetMatchingGroup(s.lcheck,tp,LOCATION_EXTRA,0,nil,e,tp,g,c)
local sex=Duel.GetMatchingGroup(s.scheck,tp,LOCATION_EXTRA,0,nil,e,tp,g,c)
local xex=Duel.GetMatchingGroup(s.xcheck,tp,LOCATION_EXTRA,0,nil,e,tp,g,c)
if #fex+#lex+#sex+#xex==0 then return end
local option=aux.SelectFromOptions(tp,{true, aux.Stringid(id,2),0},
{#fex>0,aux.Stringid(id,3),1},
{#lex>0,aux.Stringid(id,4),2},
{#sex>0,aux.Stringid(id,5),3},
{#xex>0,aux.Stringid(id,6),4})
local ex=nil
local type=nil
if option==0 then return
elseif option==1 then ex=fex
elseif option==2 then ex=lex
elseif option==3 then ex=sex
elseif option==4 then ex=xex
end
local et=Effect.CreateEffect(c)
et:SetType(EFFECT_TYPE_FIELD)
et:SetRange(LOCATION_MZONE)
et:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
et:SetTargetRange(1,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=ex:Select(tp,1,1,nil):GetFirst()
if option==1 then
local mg=Duel.SelectFusionMaterial(tp,tc,g,c)
Duel.SendtoGrave(mg,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
tc:SetMaterial(mg)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
elseif option==2 then
et:SetCode(EFFECT_MUST_BE_LMATERIAL)
c:RegisterEffect(et)
Duel.LinkSummon(tp,tc,g)
elseif option==3 then
et:SetCode(EFFECT_MUST_BE_SMATERIAL)
c:RegisterEffect(et)
Duel.SynchroSummon(tp,tc,c,g)
elseif option==4 then
et:SetCode(EFFECT_MUST_BE_XMATERIAL)
c:RegisterEffect(et)
Duel.XyzSummon(tp,tc,g)
end
et:Reset()
end
end
function s.desfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON)
end
function s.mixcheck(c,e,tp,mg,gc)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.fcheck(c,e,tp,mg,gc)
return s.mixcheck(c,e,tp,mg,gc) and c:IsType(TYPE_FUSION) and c:CheckFusionMaterial(mg,gc,PLAYER_NONE,false)
end
function s.lcheck(c,e,tp,mg,gc)
return s.mixcheck(c,e,tp,mg,gc) and c:IsType(TYPE_LINK) and c:IsLinkSummonable(mg,gc,1,#mg)
end
function s.scheck(c,e,tp,mg,gc)
return s.mixcheck(c,e,tp,mg,gc) and c:IsType(TYPE_SYNCHRO) and c:IsSynchroSummonable(gc,mg,1,#mg-1)
end
function s.xcheck(c,e,tp,mg,gc)
return s.mixcheck(c,e,tp,mg,gc) and c:IsType(TYPE_XYZ) and c:IsXyzSummonable(mg,2,#mg)
end
function s.ssfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ssfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.ssop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.ssfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
if not aux.ZoneNear then
aux.ZoneList = {
[0]=0x322,
[1]=0x725,
[2]=0xe6a,
[3]=0x1c54,
[4]=0x1848,
[5]=0x1c0007,
[6]=0x7001c,
}
function aux.ZoneNear(c)
return aux.ZoneList[c:GetSequence()]
end
function aux.GetZone(c,tp)
local seq=c:GetSequence()
local loc=c:GetLocation()
local ctp=c:GetControler()
local zone=0
if loc==LOCATION_MZONE then
if ctp~=tp and seq>4 then seq=11-seq end
zone=0x1<<seq
elseif loc==LOCATION_SZONE then
zone=0x100<<seq
elseif loc==LOCATION_FZONE then
zone=0x1000
elseif loc==LOCATION_PZONE then
zone=0 -- rule 4
end
if ctp~=tp and seq<4 then zone=zone<<16 end
return zone
end
function aux.ZoneFilter(c,tp,zone)
return aux.GetZone(c,tp)&zone>0
end
end
-----------------------------------------------------------------------------------------
--- [SR22-JPP02] 暗日星斑龙(172017202) 暗 10星 龙/融合 2400 3000 (Custom)
--- 「暗黑耀星龙」+光属性龙族怪兽1只
--- 这个卡名的②效果1回合只能发动1次。
--- ①:这张卡特殊召唤成功时,以及自己·对方1回合1次必须发动。
--- 这张卡所在区域的前面·后面,以及相邻区域和相邻区域的前面·后面合计8个区域的卡返回手卡。
--- ②:从手卡·卡组把合计3张龙族怪兽送去墓地才能发动。根据从手卡送去墓地的卡的数量以下效果适用:
--- ● 0张:变成这个回合的结束阶段。
--- ● 1张:这张卡向选择的对方的主要怪兽区域移动。
--- ● 2张:选场上·墓地各1张卡除外。
--- ● 3张:场上的卡全部破坏,从墓地选1只龙族·光属性·6星以上的怪兽特殊召唤。
--- 提示文本:返回手卡、选龙族怪兽送去墓地
-----------------------------------------------------------------------------------------
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddFusionProcCodeFun(c,25460258,aux.AND(aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT)),1,true,true)
--tohand
--des
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetDescription(aux.Stringid(id,0))
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(s.thcon)
e2:SetLabel(1)
e2:SetCountLimit(1)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCondition(s.thcon)
e3:SetLabel(1)
c:RegisterEffect(e3)
--to grave
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,id)
e5:SetCost(s.tgcost)
e5:SetTarget(s.tgtg)
e5:SetOperation(s.tgop)
c:RegisterEffect(e5)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)==0
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local z=aux.ZoneNear(c)
Duel.Hint(HINT_ZONE,tp,z)
local tg=Duel.GetMatchingGroup(aux.ZoneFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,z)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,#tg,0,0)
if e:GetLabel()==1 then
-- Duel.PayLPCost(tp,1)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local z=aux.ZoneNear(c)
local tg=Duel.GetMatchingGroup(aux.ZoneFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,z)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
function s.tgfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAbleToGraveAsCost()
end
function s.refilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevelAbove(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.judge(sg,can_hand_0,can_hand_1,can_hand_2,can_hand_3)
local ct=sg:FilterCount(Card.IsLocation,nil,LOCATION_HAND)
if ct==0 then return can_hand_0
elseif ct==1 then return can_hand_1
elseif ct==2 then return can_hand_2
elseif ct==3 then return can_hand_3
end
return false
end
function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c1=Duel.GetMatchingGroupCount(s.tgfilter,tp,LOCATION_HAND,0,nil)
local c2=Duel.GetMatchingGroupCount(s.tgfilter,tp,LOCATION_DECK,0,nil)
local can_hand_0=true
local can_hand_1=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
local can_hand_2=Duel.IsExistingMatchingCard(Duel.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Duel.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
local can_hand_3=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.refilter),tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then
if c1+c2<3 then return false end
if c1==0 then return can_hand_0
elseif c1==1 then return can_hand_0 or can_hand_1
elseif c1==2 then return can_hand_0 or can_hand_1 or can_hand_2
elseif c1>=3 then return can_hand_0 or can_hand_1 or can_hand_2 or can_hand_3
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil)
local g=sg:SelectSubGroup(tp,s.judge,false,3,3,can_hand_0,can_hand_1,can_hand_2,can_hand_3)
Duel.SendtoGrave(g,REASON_COST)
local type=Duel.GetOperatedGroup():FilterCount(Card.IsPreviousLocation,nil,LOCATION_HAND)
e:SetLabel(type)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local type=e:GetLabel()
if type==1 then Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,1-tp,0)
elseif type==2 then Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_GRAVE)
elseif type==3 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local type=e:GetLabel()
if type==0 then
Duel.SkipPhase(tp,PHASE_DRAW,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_STANDBY,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
elseif type==1 then
Duel.GetControl(e:GetHandler(),1-tp)
elseif type==2 then
local g1=Duel.GetMatchingGroup(Duel.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0,nil)
local g2=Duel.GetMatchingGroup(Duel.IsAbleToRemove,tp,LOCATION_GRAVE, LOCATION_GRAVE ,0,nil)
if #g1>0 and #g2>0 then
local cg1=g1:Select(tp,1,1,nil)
local cg2=g2:Select(tp,1,1,nil)
cg1:Merge(cg2)
Duel.Remove(cg1,POS_FACEUP,REASON_EFFECT)
end
elseif type==3 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if Duel.Destroy(g,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.refilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
if not aux.ZoneNear then
aux.ZoneList = {
[0]=0x322,
[1]=0x725,
[2]=0xe6a,
[3]=0x1c54,
[4]=0x1848,
[5]=0x1c0007,
[6]=0x7001c,
}
function aux.ZoneNear(c)
return aux.ZoneList[c:GetSequence()]
end
function aux.GetZone(c,tp)
local seq=c:GetSequence()
local loc=c:GetLocation()
local ctp=c:GetControler()
local zone=0
if loc==LOCATION_MZONE then
if ctp~=tp and seq>4 then seq=11-seq end
zone=0x1<<seq
elseif loc==LOCATION_SZONE then
zone=0x100<<seq
elseif loc==LOCATION_FZONE then
zone=0x1000
elseif loc==LOCATION_PZONE then
zone=0 -- rule 4
end
if ctp~=tp and seq<4 then zone=zone<<16 end
return zone
end
function aux.ZoneFilter(c,tp,zone)
return aux.GetZone(c,tp)&zone>0
end
end
-----------------------------------------------------------------------------------------------------------------------------------------
--- [SR22-JP002] 日食爆龙(172017203) 暗 LINK-2 龙/连接 1600 [↓][↘] (Custom)
--- 光属性龙族怪兽+暗属性龙族怪兽
--- ①:这张卡连接召唤成功时发动。这张卡以外的场上的怪兽的攻击力只要这张卡在场上表侧表示变成0。为这个效果下降的攻击力每有500,把1个「燃料指示物」在这张卡上放置。
--- ②:1回合1次,把这张卡上1个「燃料指示物」取除才能发动。从卡组选光·暗属性龙族怪兽各1只除外。这个效果发动的回合,自己不能把龙族怪兽以外的怪兽效果发动。
--- ③:龙族怪兽的效果发动时,把这张卡解放才能发动。为这张卡连接召唤的那一组素材在墓地集齐的场合,把那些怪兽在自己场上特殊召唤。
--- 那之后,可以把这张卡放置过的「燃料指示物」数量的「燃料指示物」在自己场上1只「主宰龙 无穷烈日」上放置。
-----------------------------------------------------------------------------------------------------------------------------------------
local s,id,o=GetID()
COUNTER_ID=0x10ec
function s.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),2,2,s.mfilter)
--atk down
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(s.atkcon)
e1:SetTarget(s.atktg)
e1:SetOperation(s.atkop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(s.rmcon)
e2:SetCost(s.rmcost)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
--revive
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.recon)
e3:SetCost(s.recost)
e3:SetTarget(s.retg)
e3:SetOperation(s.reop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id, ACTIVITY_CHAIN, s.chainfilter)
end
function s.mfilter(gf)
local c1=gf:GetFirst()
local c2=gf:GetNext()
if c1==nil or c2==nil then return false end
return (c1:IsAttribute(ATTRIBUTE_LIGHT) and c2:IsAttribute(ATTRIBUTE_DARK)) or (c1:IsAttribute(ATTRIBUTE_DARK) and c2:IsAttribute(ATTRIBUTE_LIGHT))
end
function s.chainfilter(re, tp, cid)
return (not re:IsActiveType(TYPE_MONSTER)) or re:GetHandler():IsRace(RACE_DRAGON)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(id)>0
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local sum=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()):GetSum(Card.GetAttack)
local ct=math.floor(sum/500)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,ct,0,COUNTER_ID)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0)
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local sum=0
for tc in aux.Next(g) do
sum=sum+tc:GetAttack()
if tc:GetAttack()>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetLabelObject(c)
e1:SetCondition(s.atkcon2)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
local ct=math.floor(sum/500)
c:AddCounter(COUNTER_ID,ct)
end
function s.rmfilter(c,attr)
return c:IsAbleToRemove() and c:IsAttribute(attr) and c:IsRace(RACE_DRAGON)
end
function s.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsRace(RACE_DRAGON)
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0
end
function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetCounter(COUNTER_ID)>0 end
c:RemoveCounter(tp,COUNTER_ID,1,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(s.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
-- will bug if there is only a card which is ATTRIBUTE_LIGHT+ATTRIBUTE_DARK
if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_DECK,0,1,nil,ATTRIBUTE_LIGHT) and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_DECK,0,1,nil,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_DECK)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_DECK,0,nil,ATTRIBUTE_LIGHT)
local g2=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_DECK,0,nil,ATTRIBUTE_DARK)
if #g1==0 or #g2==0 then return end
g1:Merge(g2)
if #g1<2 then return end
local g=g1:SelectSubGroup(tp,s.mfilter,false,2,2,tp)
if #g==2 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function s.refilter(c,e,tp,lc,mg)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
--and c:GetReason()&(REASON_LINK+REASON_MATERIAL)>0 and c:GetReasonCard()==lc
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.refilter2(c,ct)
return c:IsCode(172017200) and c:IsCanAddCounter(COUNTER_ID,ct)
end
function s.recon(e,tp,eg,ep,ev,re,r,rp)
local race = Duel.GetChainInfo(ev, CHAININFO_TRIGGERING_RACE)
return race&RACE_DRAGON>0
end
function s.recost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
local c=e:GetHandler()
local ctct=c:GetCounter(COUNTER_ID)
e:SetLabel(ctct)
Duel.Release(c,REASON_COST)
end
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=c:GetMaterial()
local ct=mg:GetCount()
if chk==0 then return c:IsSummonType(SUMMON_TYPE_LINK)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct
and mg:FilterCount(aux.NecroValleyFilter(s.refilter),nil,e,tp,c,mg)==ct end
Duel.SetTargetCard(mg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,mg,ct,0,0)
end
function s.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local g=mg:Filter(Card.IsRelateToEffect,nil,e)
local ctct=e:GetLabel()
if g:GetCount()<mg:GetCount() then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<g:GetCount() then return end
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local tg=Duel.GetMatchingGroup(s.refilter2,tp,LOCATION_MZONE,0,nil,ctct)
if ctct>0 and #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local tc=tg:Select(tp,1,1,nil):GetFirst()
tc:AddCounter(COUNTER_ID,ctct)
end
end
end
-----------------------------------------------------------------------------------------
--- [SR22-JP028] 烈日凌空(172017210) 场地魔法 (Custom)
--- ①:龙族怪兽特殊召唤时发动。那些怪兽攻击力上升1000。
--- ②:1回合1次,自己场上有5星以上的光·暗属性的龙族怪兽存在的场合才能发动。
--- 从卡组选1张不持有其他字段的「龙之」魔法·陷阱卡加入手卡。
--- ③:魔法·陷阱卡送去墓地时,以那些卡中的1张和自己场上1张「主宰龙 无穷烈日」为对象才能发动。
--- 那只怪兽上2个「燃料指示物」取除。结束阶段,选择的卡在自己场上盖放。
-----------------------------------------------------------------------------------------
local s,id,o=GetID()
s.dragons={
-- ドラゴンの
[ 1435851]=1, --秘宝
[92408984]=1, --宝珠
-- 竜の
[28596933]=1, --振翅
[55991637]=1, --炎弹
[54178050]=1, --逆鳞
[ 2833249]=1, --血族
[62265044]=1, --溪谷
[20638610]=1, --转生
[90887783]=1, --交感
[41620959]=1, --霊廟
[16278116]=1, --束缚
[69868555]=1, --遗迹
[95697223]=1, --斗志
[50186558]=1, --结界(守护龙)
[11908584]=1, --核醒(守护龙)
[63295720]=1, --影光
-- 龍の
[71490127]=1, --镜
[87025064]=1, --轰咆
[40971261]=1, --旋律
[43219114]=1, --威光(白龙)
[11434258]=1, --蛇龙的枷锁
[92428405]=1, --霸王龙之魂
[40456412]=1, --霸王龙的奇迹
[76840111]=1, --霸王天龙之魂
-- DIY
--[172017211]=1, --再聚变
[172017212]=1, --超新星
[172017213]=1 --息吹
}
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e0)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_FZONE)
e1:SetCondition(s.atkcon)
e1:SetOperation(s.atkop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_FZONE)
e3:SetCondition(s.retcon)
e3:SetTarget(s.rettg)
e3:SetOperation(s.retop)
c:RegisterEffect(e3)
end
function s.thfilter1(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsLevelAbove(5)
end
function s.thfilter2(c)
return s.dragons[c:GetCode()]~=nil
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsRace,1,nil,RACE_DRAGON)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(Card.IsRace,nil,RACE_DRAGON)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_MZONE,0,1,nil)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true 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.thfilter2,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.retfilter(c,tp)
return c:IsCode(172017200) and c:IsCanRemoveCounter(tp,0x10ec,2,REASON_EFFECT)
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.retfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(Card.IsType,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=eg:Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP):Select(tp,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,s.retfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
g1:Merge(g2)
Duel.SetTargetCard(g1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local retc=g:GetFirst()
local counterc=g:GetNext()
if counterc:IsCanRemoveCounter(tp,0x10ec,2,REASON_EFFECT) then
counterc:RemoveCounter(tp,0x10ec,2,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabelObject(retc)
e1:SetCondition(s.retcon)
e1:SetOperation(s.retop2)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
Duel.RegisterEffect(e1,tp)
end
end
function s.retop2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetLocation()==LOCATION_GRAVE then
Duel.SSet(tp,tc)
end
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------
--- [SR22-JP029] 再聚变(172017211) 速攻魔法
--- 系列:融合
--- ①:从墓地把不能通常召唤的光属性怪兽或「光脉冲星龙」,以及不能通常召唤的暗属性怪兽或「暗黑耀星龙」各1只除外才能发动。从以下效果选任意个适用。自己失去800×未选择的效果数量的基本分。
--- ● 只用那些怪兽当作连接素材从额外卡组把1只连接怪兽当作连接召唤特殊召唤。
--- ● 只用那些怪兽当作融合素材从额外卡组把1只融合怪兽当作融合召唤特殊召唤。
--- ● 只用那些怪兽当作融合素材从额外卡组把1只融合怪兽当作融合召唤特殊召唤。
--- ● 只用那些怪兽当作融合素材从额外卡组把1只融合怪兽当作融合召唤特殊召唤。
--- ● 只用那些怪兽当作同调素材从额外卡组把1只同调怪兽当作同调召唤特殊召唤
--- ● 从额外卡组把1只可以用那些怪兽作为超量素材超量召唤的超量怪兽当作超量召唤特殊召唤。那之后,那些素材怪兽在特殊召唤的超量怪兽下面重叠作为超量素材。
--- 提示文本:、是否要特殊召唤?
-----------------------------------------------------------------------------------------------------------------------------------------------------------
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial() and c:IsCanBeLinkMaterial(nil) and c:IsCanBeSynchroMaterial() and c:IsCanBeXyzMaterial(nil)
end
function s.mixcheck(c,e,tp,mg,scount,fcount,lcount,xcount)
if not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or Duel.GetLocationCountFromEx(tp,tp,nil,c)<1 then return false end
if c:IsType(TYPE_FUSION) then
return c:CheckFusionMaterial(mg,nil,PLAYER_NONE,false) and fcount>0
elseif c:IsType(TYPE_LINK) then
return c:IsLinkSummonable(mg,nil,#mg,#mg) and lcount>0
elseif c:IsType(TYPE_SYNCHRO) then
return c:IsSynchroSummonable(nil,mg,#mg-1,#mg-1) and scount>0
elseif c:IsType(TYPE_XYZ) then
return c:IsXyzSummonable(mg,#mg,#mg) and xcount>0
else
return false
end
end
function s.lcheck(c)
return (c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsSummonableCard())or c:IsCode(99365553)
end
function s.dcheck(c)
return (c:IsAttribute(ATTRIBUTE_DARK) and not c:IsSummonableCard())or c:IsCode(25460258)
end
function s.chk(g,e,tp)
if not g:IsExists(s.lcheck,1,nil) or not g:IsExists(s.dcheck,1,nil) then return false end
return Duel.IsExistingMatchingCard(s.mixcheck,tp,LOCATION_EXTRA,0,1,nil,e,tp,g,1,3,1,1)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return mg:CheckSubGroup(s.chk,2,2,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=mg:SelectSubGroup(tp,s.chk,false,2,2,e,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
g:KeepAlive()
e:SetLabelObject(g)
end
function s.limit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION+TYPE_SYNCHRO)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() end
local g=e:GetLabelObject()
Duel.SetTargetCard(g)
g:DeleteGroup()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_EXTRA)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not Duel.IsExistingMatchingCard(s.mixcheck,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,1,3,1,1) then return end
local scount=1
local fcount=3
local lcount=1
local xcount=1
local mtype=TYPE_XYZ|TYPE_FUSION|TYPE_SYNCHRO|TYPE_LINK
local summontype={[TYPE_XYZ]=SUMMON_TYPE_XYZ,[TYPE_FUSION]=SUMMON_TYPE_FUSION,[TYPE_SYNCHRO]=SUMMON_TYPE_SYNCHRO,[TYPE_LINK]=SUMMON_TYPE_LINK}
local xc=nil
while Duel.IsExistingMatchingCard(s.mixcheck,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,scount,fcount,lcount,xcount) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.mixcheck,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg,scount,fcount,lcount,xcount):GetFirst()
if tc:IsType(TYPE_XYZ) then
xc=tc
xcount=xcount-1
elseif tc:IsType(TYPE_FUSION) then
fcount=fcount-1
elseif tc:IsType(TYPE_SYNCHRO) then
scount=scount-1
else
lcount=lcount-1
end
Duel.SpecialSummonStep(tc,summontype[tc:GetType()&mtype],tp,tp,false,false,POS_FACEUP)
tc:SetMaterial(mg)
end
Duel.SpecialSummonComplete()
if aux.GetValueType(xc)=="Card" then
Duel.BreakEffect()
Duel.Overlay(xc,mg)
end
local count=scount+fcount+lcount+xcount
local dlp=count*800
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-dlp)
end
--------------------------------------------------------------------------------------------------------------------------------------------------------
--- [SR22-JP037] 龙之超新星(172017212) 通常陷阱
--- ①:主要阶段,以自己场上1只不能通常召唤的龙族为对象才能发动。那只怪兽的攻击力变成2倍,与那只怪兽同行和同纵列的其他卡全部破坏,从自己墓地选择任意数量等级6以下的龙族怪兽特殊召唤,
--- 作为对象的那只怪兽的攻击力下降那些特殊召唤的怪兽的攻击力之和的数值。那之后,那只作为对象的怪兽除外,根据那个怪兽场上的攻击力,以下效果适用:
--- ● 0:从额外卡组把1只「星尘龙」当做同调召唤特殊召唤。
--- ● 1-4500:从卡组把1只「矮星龙 恒行星龙」特殊召唤。
--- ● 4501-6000:从卡组把1只「中子龙 脉冲星龙」特殊召唤。
--- ● 6001-10000:从卡组把1只「无限龙 史瓦西龙」特殊召唤。
--- ● >10000:从额外卡组把1只「宇宙类星龙」当作同调召唤无视条件特殊召唤。
--------------------------------------------------------------------------------------------------------------------------------------------------------
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(s.condition)
e1:SetTarget(s.bttg)
e1:SetOperation(s.btop)
c:RegisterEffect(e1)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function s.seqcheck1(c)
return c:GetSequence()<5
end
function s.seqcheck2(c)
return c:GetSequence()>4
end
function s.stcheck(c,e,tp,code)
local st=0
if c:IsLocation(LOCATION_EXTRA) then
st=SUMMON_TYPE_SYNCHRO
end
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,st,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.gcheck1(g,e,tp,atk,c)
local atkm=atk-g:GetSum(Card.GetAttack)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local count=g:GetCount()
if atkm<0 then
atkm=0
end
local dg=Duel.GetMatchingGroup(s.seqcheck1,c:GetControler(),LOCATION_MZONE,0,c)
local fir = atkm==0 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_EXTRA,0,1,nil,e,tp,44508094) and Duel.GetLocationCountFromEx(tp,tp,dg,nil)>g:GetCount()
local sec = atkm > 0 and atkm<4501 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_DECK,0,1,nil,e,tp,67310848) and Duel.GetLocationCount(tp,LOCATION_MZONE)>g:GetCount()-dg:GetCount()
local thi = atkm > 4500 and atkm<6001 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_DECK,0,1,nil,e,tp,172017298) and Duel.GetLocationCount(tp,LOCATION_MZONE)>g:GetCount()-dg:GetCount()
local fot = atkm > 6000 and atkm<10001 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_DECK,0,1,nil,e,tp,72880377) and Duel.GetLocationCount(tp,LOCATION_MZONE)>g:GetCount()-dg:GetCount()
local fit = atkm > 10000 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_EXTRA,0,1,nil,e,tp,37442336) and Duel.GetLocationCountFromEx(tp,tp,dg,nil)>g:GetCount()
return fir or sec or thi or fot or fit
end
function s.gcheck2(g,e,tp,atk,c)
local atkm=atk-g:GetSum(Card.GetAttack)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local count=g:GetCount()
if atkm<0 then
atkm=0
end
local fir = atkm==0 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_EXTRA,0,1,nil,e,tp,44508094) and Duel.GetLocationCountFromEx(tp,tp,c,nil)>g:GetCount()
local sec = atkm > 0 and atkm<4501 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_DECK,0,1,nil,e,tp,67310848) and Duel.GetLocationCount(tp,LOCATION_MZONE)>g:GetCount()
local thi = atkm > 4500 and atkm<6001 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_DECK,0,1,nil,e,tp,172017298) and Duel.GetLocationCount(tp,LOCATION_MZONE)>g:GetCount()
local fot = atkm > 6000 and atkm<10001 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_DECK,0,1,nil,e,tp,72880377) and Duel.GetLocationCount(tp,LOCATION_MZONE)>g:GetCount()
local fit = atkm > 10000 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_EXTRA,0,1,nil,e,tp,37442336)
return fir or sec or thi or fot or fit
end
function s.gcheck3(g,e,tp,atk,c)
local atkm=atk-g:GetSum(Card.GetAttack)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local count=g:GetCount()
if atkm<0 then
atkm=0
end
local fir = atkm==0 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_EXTRA,0,1,nil,e,tp,44508094) and Duel.GetLocationCountFromEx(tp,tp,c,nil)>g:GetCount()
local sec = atkm > 0 and atkm<4501 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_DECK,0,1,nil,e,tp,67310848) and Duel.GetLocationCount(tp,LOCATION_MZONE)>g:GetCount()
local thi = atkm > 4500 and atkm<6001 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_DECK,0,1,nil,e,tp,172017298) and Duel.GetLocationCount(tp,LOCATION_MZONE)>g:GetCount()
local fot = atkm > 6000 and atkm<10001 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_DECK,0,1,nil,e,tp,72880377) and Duel.GetLocationCount(tp,LOCATION_MZONE)>g:GetCount()
local fit = atkm > 10000 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_EXTRA,0,1,nil,e,tp,37442336) and Duel.GetLocationCountFromEx(tp,tp,c,nil)>g:GetCount()
return fir or sec or thi or fot or fit
end
function s.scheck(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.bfilter(c,e,tp)
local atk=c:GetAttack()*2
local g=Duel.GetMatchingGroup(s.scheck,tp,LOCATION_GRAVE,0,nil,e,tp)
if not c:IsSummonableCard() and c:IsAbleToRemove() and c:IsAttackAbove(0) then
local cg=c:GetColumnGroup()
if c:GetSequence()<5 then
return (cg:GetCount()>0 or Duel.GetMatchingGroupCount(s.seqcheck1,tp,LOCATION_MZONE,0,c)>0) and g:CheckSubGroup(s.gcheck1,1,5,e,tp,atk,c)
else
return cg:GetCount()>0 or Duel.GetMatchingGroupCount(s.seqcheck2,0,LOCATION_MZONE,LOCATION_MZONE,c)>0 and g:CheckSubGroup(s.gcheck2,1,5,e,tp,atk,c)
end
else
return false
end
end
function s.bttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.bfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.bfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.bfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
tc=g:GetFirst()
local cg=tc:GetColumnGroup()
local rg=Group.CreateGroup()
if tc:GetSequence()<5 then
rg=Duel.GetMatchingGroup(s.seqcheck1,tp,LOCATION_MZONE,0,tc)
else
rg=Duel.GetMatchingGroup(s.seqcheck2,0,LOCATION_MZONE,LOCATION_MZONE,tc)
end
rg:Merge(cg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,rg,#rg,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.btop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local cg=tc:GetColumnGroup()
local rg=Group.CreateGroup()
if tc:GetSequence()<5 then
rg=Duel.GetMatchingGroup(s.seqcheck1,tp,LOCATION_MZONE,0,tc)
else
rg=Duel.GetMatchingGroup(s.seqcheck2,0,LOCATION_MZONE,LOCATION_MZONE,tc)
end
rg:Merge(cg)
local atk=tc:GetAttack()
local g=Duel.GetMatchingGroup(s.scheck,tp,LOCATION_GRAVE,0,nil,e,tp)
if Duel.Destroy(rg,REASON_EFFECT)>0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sg=g:SelectSubGroup(tp,s.gcheck3,false,1,ft,e,tp,atk,tc)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then
local atk2=sg:GetSum(Card.GetAttack)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-atk2)
tc:RegisterEffect(e1)
local atkd=tc:GetAttack()
Duel.AdjustAll()
Duel.BreakEffect()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then
local fir = atkd==0 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_EXTRA,0,1,nil,e,tp,44508094)
local sec = (atkd > 0 and atkd < 4501 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_DECK,0,1,nil,e,tp,67310848)
local thi = (atkd > 4500 and atkd<6001 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_DECK,0,1,nil,e,tp,172017298)
local fot = (atkd > 6000 and atkd<10001 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_DECK,0,1,nil,e,tp,72880377)
local fit = atkd > 10000 and Duel.IsExistingMatchingCard(s.stcheck,tp,LOCATION_EXTRA,0,1,nil,e,tp,37442336)
if fir then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sp=Duel.SelectMatchingCard(tp,s.stcheck,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,44508094)
Duel.SpecialSummon(sp,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
elseif sec then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sp=Duel.SelectMatchingCard(tp,s.stcheck,tp,LOCATION_DECK,0,1,1,nil,e,tp,67310848)
Duel.SpecialSummon(sp,0,tp,tp,false,false,POS_FACEUP)
elseif thi then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sp=Duel.SelectMatchingCard(tp,s.stcheck,tp,LOCATION_DECK,0,1,1,nil,e,tp,172017298)
Duel.SpecialSummon(sp,0,tp,tp,false,false,POS_FACEUP)
elseif fot then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sp=Duel.SelectMatchingCard(tp,s.stcheck,tp,LOCATION_DECK,0,1,1,nil,e,tp,72880377)
Duel.SpecialSummon(sp,0,tp,tp,false,false,POS_FACEUP)
elseif fit then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sp=Duel.SelectMatchingCard(tp,s.stcheck,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,44508094)
Duel.SpecialSummon(sp,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
end
end
end
end
end
end
--------------------------------------------------------------------------------
--- [SR22-JP038] 龙之息吹(172017213) 反击陷阱 (Custom)
--- ①:怪兽效果的发动无效并破坏,选自己场上1只龙族怪兽攻击力下降那只怪兽的攻击力数值。
--------------------------------------------------------------------------------
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.atkfilter(c,atk)
return c:IsRace(RACE_DRAGON) and c:IsAttackAbove(atk)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,0,1,nil,eg:GetFirst():GetAttack()) 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 s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
if Duel.Destroy(eg,REASON_EFFECT)>0 then
local atk=eg:GetFirst():GetAttack()
local tg=Duel.SelectMatchingCard(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,atk)
if #tg>0 then
local tc=tg:GetFirst()
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
end
------------------------------------------------------------------------------------------------------------
--- 中子龙 脉冲星龙(172017298) 暗 8星 龙 2500 2000 (Custom)
--- ①:结束阶段发动。和这张卡相同纵列的其他卡全部破坏,这张卡向右边的主要怪兽区域移动(最右侧的场合,移动至最左侧)。
------------------------------------------------------------------------------------------------------------
local s,id,o=GetID()
function s.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
end
function s.desfilter(c,g)
return g:IsContains(c)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local cg=e:GetHandler():GetColumnGroup()
local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,cg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cg=c:GetColumnGroup()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,cg)
Duel.Destroy(g,REASON_EFFECT)
local seq=c:GetSequence()
seq=(seq+1)%5
Duel.MoveSequence(c,seq)
end
end
\ No newline at end of file
----------------------------------------------------------------------------------------------
--- 赤心染金(172017950) 永续陷阱
--- 场上有卡名·类别·种族·属性·等级·攻击力·守备力与原本对应项不同的卡片表侧表示存在的场合,这张卡可以从手卡发动。
--- ①:把这张卡发动的结束阶段发动。你获得「大统领指示物」。(持有「大统领指示物」的玩家公开手卡,
--- 通常抽卡数量变成2张,通常召唤次数变成2次,受到战斗伤害时「大统领指示物」交给对方,受到效果伤害时移除,
--- 「大统领指示物」同时仅有1个存在,获得「大统领指示物」的效果会导致其他玩家失去之。)
--- ②:这张卡从场上送去墓地时才能发动。下个回合仅1次,连锁上没有效果存在的场合,
--- 可以把场上所有表侧表示的魔法·陷阱卡送去墓地(作为Cost),墓地的这张卡发动。
--- ★ 困兽皓首,苍心难鉴;娼伶穷经,金身入敛。壮志凌云,赤心一片;私仇旧恨,黄泉相见。
--- 提示文本:大统领
----------------------------------------------------------------------------------------------
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetOperation(s.op)
c:RegisterEffect(e0)
--broken
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetOperation(s.regop)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(s.handcon)
c:RegisterEffect(e2)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
--gain potus
local c=e:GetHandler()
local te=Effect.CreateEffect(c)
te:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
te:SetDescription(aux.Stringid(id,0))
te:SetCode(EVENT_PHASE+PHASE_END)
te:SetRange(LOCATION_SZONE)
te:SetCountLimit(1)
te:SetOperation(s.op2)
te:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(te)
end
function s.op2(e,tp,eg,ep,ev,re,r,rp)
aux.GainPotusToken(tp)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
-- ret
local te=Effect.CreateEffect(c)
te:SetType(EFFECT_TYPE_QUICK_O)
te:SetCode(EVENT_FREE_CHAIN)
te:SetRange(LOCATION_GRAVE)
te:SetLabel(Duel.GetTurnCount()+1)
te:SetCondition(s.retcon)
te:SetCost(s.retcost)
te:SetOperation(s.retop)
te:SetCountLimit(1)
te:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(te)
end
function s.retfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==e:GetLabel()
end
function s.retcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.retfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 end
Duel.SendtoGrave(g,REASON_COST)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
te:GetOperation()(te,tp,eg,ep,ev,re,r,rp)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,id,te,0,tp,tp,Duel.GetCurrentChain())
end
function s.handfilter(c)
return c:GetOriginalCode()~=c:GetCode() or c:GetOriginalType()~=c:GetType() or
c:GetOriginalLevel()~=c:GetLevel() or c:GetOriginalAttribute()~=c:GetAttribute() or
c:GetOriginalRace()~=c:GetRace() or c:GetTextAttack()~=c:GetAttack() or
c:GetTextDefense()~=c:GetDefense()
end
function s.handcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.handfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.GetCurrentChain()==0
end
if not aux.GainPotusToken then
aux.POTUS_ID=id
function aux.GainPotusToken(tp)
if Duel.GetFlagEffect(1-tp,aux.POTUS_ID)>0 then
aux.LosePotusToken(1-tp)
end
-- public hand
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetDescription(aux.Stringid(aux.POTUS_ID,0))
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_PUBLIC)
e1:SetTargetRange(LOCATION_HAND,0)
Duel.RegisterEffect(e1,tp)
-- draw 2 cards
local e2=Effect.GlobalEffect()
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_DRAW_COUNT)
e2:SetTargetRange(1,0)
e2:SetValue(2)
Duel.RegisterEffect(e2,tp)
-- summon 2 times
local e3=Effect.GlobalEffect()
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetValue(2)
Duel.RegisterEffect(e3,tp)
-- move token (battle damage)
local e4=Effect.GlobalEffect()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCode(EVENT_DAMAGE)
e4:SetCondition(aux.PotusBattleCondition)
e4:SetOperation(aux.MovePotusTokenOperation)
Duel.RegisterEffect(e4,tp)
-- remove token (effect damage)
local e5=e4:Clone()
e5:SetCondition(aux.PotusEffectCondition)
e5:SetOperation(aux.RemovePotusTokenOperation)
Duel.RegisterEffect(e5,tp)
Duel.RegisterFlagEffect(tp,aux.POTUS_ID,0,0,1)
aux.potus_effects={e1,e2,e3,e4,e5}
end
function aux.LosePotusToken(tp)
for _, e in ipairs(aux.potus_effects) do
e:Reset()
end
Duel.ResetFlagEffect(tp,code)
end
function aux.PotusBattleCondition(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end
function aux.PotusEffectCondition(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
function aux.MovePotusTokenOperation(e,tp,eg,ep,ev,re,r,rp)
aux.GainPotusToken(1-tp)
end
function aux.RemovePotusTokenOperation(e,tp,eg,ep,ev,re,r,rp)
aux.LosePotusToken(tp)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment