Commit 8bddf965 authored by 聖園ミカ's avatar 聖園ミカ 🐟

54188

parent cedc795b
Pipeline #30777 passed with stages
in 44 minutes and 35 seconds
No preview for this file type
#[2024.10.DIY...]
!2024.10.DIY...
#[2024.10.DIY....]
!2024.10.DIY....
#002
00200001 1 --魔王的剑
......@@ -1568,7 +1568,6 @@
53796022 0 --堕影的救赎 ICG
53796033 0 --学样
53796035 0 --艾布雷普斯
53796045 1 --长久拾遗
53796068 0 --无面控流者
53796124 0 --异次元之箱
53797080 0 --炮管雄鹿
......@@ -1610,7 +1609,6 @@
53799251 0 --被代替者
53799270 0 --遏止
#600
60000017 0 --承岚 扭转万象
60000056 0 --黄昏之骑士 璀璨旭阳
60000057 0 --黄昏之骑士 暗夜追猎
60000058 0 --黄昏之骑士 血魂生灭
......
local m=15005070
local cm=_G["c"..m]
cm.name="辞世绝句·三终渊之花"
function cm.initial_effect(c)
--search (hand/grave)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,15005070)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,15005071)
e2:SetHintTiming(0,TIMING_CHAIN_END)
e2:SetCondition(cm.drcon)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetCode(EVENT_REMOVE)
e3:SetOperation(cm.regop)
c:RegisterEffect(e3)
end
function cm.rmfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToRemoveAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rg=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,c)
if chk==0 then return rg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
rc=rg:FilterSelect(tp,cm.rmfilter,1,1,nil):GetFirst()
if rc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,rc) end
Duel.Remove(rc,POS_FACEDOWN,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p=c:GetControler()
local rc=re:GetHandler()
if c:IsFacedown() and c:IsReason(REASON_COST) and re and re:IsActivated() and (rc:IsSetCard(0xcf3e) or (rc:IsAttribute(ATTRIBUTE_DARK) and re:IsActiveType(TYPE_MONSTER))) then
local id=c:GetFieldID()
Duel.RegisterFlagEffect(p,15005070,RESET_CHAIN,0,1,id)
end
if c:IsFacedown() then
local id=c:GetFieldID()
Duel.RegisterFlagEffect(p,15005071,RESET_PHASE+PHASE_END,0,1,id)
end
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p=c:GetControler()
local id=c:GetFieldID()
local b1=false
local b2=false
if Duel.GetFlagEffect(p,15005070)~=0 then
for _,i in ipairs{Duel.GetFlagEffectLabel(p,15005070)} do
if i==id then b1=true end
end
end
if Duel.GetFlagEffect(p,15005071)~=0 then
for _,i in ipairs{Duel.GetFlagEffectLabel(p,15005071)} do
if i==id then b2=true end
end
end
return c:IsFacedown() and (b1 or (Duel.IsPlayerAffectedByEffect(p,15005084) and b2))
end
function cm.tdfilter(c)
return c:IsAbleToDeck() and c:IsFacedown() and not c:IsCode(15005070)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,3,3,nil)
if #tg~=3 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==3 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
local m=15005072
local cm=_G["c"..m]
cm.name="失落水理·三终渊之花"
function cm.initial_effect(c)
--search (hand/grave)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,15005072)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,15005073)
e2:SetHintTiming(0,TIMING_CHAIN_END)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetCode(EVENT_REMOVE)
e3:SetOperation(cm.regop)
c:RegisterEffect(e3)
end
function cm.rmfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToRemoveAsCost()
end
function cm.thfilter(c)
return c:IsSetCard(0xcf3e) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rg=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,c)
if chk==0 then return rg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
rc=rg:FilterSelect(tp,cm.rmfilter,1,1,nil):GetFirst()
if rc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,rc) end
Duel.Remove(rc,POS_FACEDOWN,REASON_COST)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p=c:GetControler()
local rc=re:GetHandler()
if c:IsFacedown() and c:IsReason(REASON_COST) and re and re:IsActivated() and (rc:IsSetCard(0xcf3e) or (rc:IsAttribute(ATTRIBUTE_DARK) and re:IsActiveType(TYPE_MONSTER))) then
local id=c:GetFieldID()
Duel.RegisterFlagEffect(p,15005072,RESET_CHAIN,0,1,id)
end
if c:IsFacedown() then
local id=c:GetFieldID()
Duel.RegisterFlagEffect(p,15005073,RESET_PHASE+PHASE_END,0,1,id)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p=c:GetControler()
local id=c:GetFieldID()
local b1=false
local b2=false
if Duel.GetFlagEffect(p,15005072)~=0 then
for _,i in ipairs{Duel.GetFlagEffectLabel(p,15005072)} do
if i==id then b1=true end
end
end
if Duel.GetFlagEffect(p,15005073)~=0 then
for _,i in ipairs{Duel.GetFlagEffectLabel(p,15005073)} do
if i==id then b2=true end
end
end
return c:IsFacedown() and (b1 or (Duel.IsPlayerAffectedByEffect(p,15005084) and b2))
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xcf3e) and c:IsType(TYPE_MONSTER) and Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP,tp,c) and (c:IsLocation(LOCATION_GRAVE) or (c:IsLocation(LOCATION_REMOVED) and c:IsFacedown())) and not c:IsCode(15005072) and not c:IsType(TYPE_FUSION)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED+LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
local m=15005074
local cm=_G["c"..m]
cm.name="未颂龙诗·三终渊之花"
function cm.initial_effect(c)
--tograve (hand/grave)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,15005074)
e1:SetCost(cm.tgcost)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
--return to grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,15005075)
e2:SetHintTiming(0,TIMING_CHAIN_END)
e2:SetCondition(cm.rgcon)
e2:SetTarget(cm.rgtg)
e2:SetOperation(cm.rgop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetCode(EVENT_REMOVE)
e3:SetOperation(cm.regop)
c:RegisterEffect(e3)
end
function cm.rmfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToRemoveAsCost()
end
function cm.tgfilter(c)
return c:IsSetCard(0xcf3e) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and not c:IsCode(15005074)
end
function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rg=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,c)
if chk==0 then return rg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
rc=rg:FilterSelect(tp,cm.rmfilter,1,1,nil):GetFirst()
if rc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,rc) end
Duel.Remove(rc,POS_FACEDOWN,REASON_COST)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p=c:GetControler()
local rc=re:GetHandler()
if c:IsFacedown() and c:IsReason(REASON_COST) and re and re:IsActivated() and (rc:IsSetCard(0xcf3e) or (rc:IsAttribute(ATTRIBUTE_DARK) and re:IsActiveType(TYPE_MONSTER))) then
local id=c:GetFieldID()
Duel.RegisterFlagEffect(p,15005074,RESET_CHAIN,0,1,id)
end
if c:IsFacedown() then
local id=c:GetFieldID()
Duel.RegisterFlagEffect(p,15005075,RESET_PHASE+PHASE_END,0,1,id)
end
end
function cm.rgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p=c:GetControler()
local id=c:GetFieldID()
local b1=false
local b2=false
if Duel.GetFlagEffect(p,15005074)~=0 then
for _,i in ipairs{Duel.GetFlagEffectLabel(p,15005074)} do
if i==id then b1=true end
end
end
if Duel.GetFlagEffect(p,15005075)~=0 then
for _,i in ipairs{Duel.GetFlagEffectLabel(p,15005075)} do
if i==id then b2=true end
end
end
return c:IsFacedown() and (b1 or (Duel.IsPlayerAffectedByEffect(p,15005084) and b2))
end
function cm.rgfilter(c)
return c:IsSetCard(0xcf3e) and c:IsFacedown()
end
function cm.rgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rgfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED)
end
function cm.rgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.rgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)
end
end
\ No newline at end of file
local m=15005076
local cm=_G["c"..m]
cm.name="三终渊的废星壳"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
--ReplaceDraw
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,6)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==6 end
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetTurnPlayer()
return Duel.GetMatchingGroupCount(cm.thfilter,p,LOCATION_REMOVED,0,nil)>0 and Duel.GetFieldGroupCount(p,LOCATION_DECK,0)>0
and Duel.GetDrawCount(p)>0
end
function cm.thfilter(c)
return c:IsFacedown() and c:IsAbleToHand() and bit.band(c:GetType(),TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)==0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local p=Duel.GetTurnPlayer()
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,p,LOCATION_REMOVED,0,1,nil) end
local dt=Duel.GetDrawCount(p)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,p)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetTurnPlayer()
aux.DrawReplaceCount=aux.DrawReplaceCount+1
if aux.DrawReplaceCount>aux.DrawReplaceMax then return end
local g=Duel.GetMatchingGroup(cm.thfilter,p,LOCATION_REMOVED,0,nil)
if g:GetCount()>0 then
local tc=g:RandomSelect(p,1):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,tc)
end
end
end
\ No newline at end of file
local m=15005077
local cm=_G["c"..m]
cm.name="终结巢歌·三终渊之死"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,15005077)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,15005070,15005072,15005074,true,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.efilter)
c:RegisterEffect(e2)
--activate cost
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_ACTIVATE_COST)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
e3:SetCondition(cm.costcon)
e3:SetCost(cm.costchk)
e3:SetOperation(cm.costop)
c:RegisterEffect(e3)
--accumulate
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_FLAG_EFFECT+m)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCondition(cm.costcon)
e4:SetTargetRange(1,1)
c:RegisterEffect(e4)
if not cm.gcheck then
cm.gcheck=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(cm.regacop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_REMOVE)
ge2:SetOperation(cm.regrmop)
Duel.RegisterEffect(ge2,0)
end
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.regacop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(rp,15005077,RESET_PHASE+PHASE_END,0,1)
end
function cm.regrmop(e,tp,eg,ep,ev,re,r,rp)
local ag=eg:Filter(Card.IsLocation,nil,LOCATION_REMOVED)
local tc=ag:GetFirst()
while tc do
Duel.RegisterFlagEffect(0,15005078,RESET_PHASE+PHASE_END,0,1)
tc=ag:GetNext()
end
end
function cm.costcon(e)
return Duel.GetFlagEffect(0,15005078)>=6
end
function cm.costchk(e,te_or_c,tp)
local ct=Duel.GetFlagEffect(tp,m)
if Duel.GetFlagEffect(tp,15005077)<=3 then return true end
return Duel.CheckLPCost(tp,ct*1800)
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,15005077)>3 then
Duel.PayLPCost(tp,1800)
end
end
\ No newline at end of file
local m=15005078
local cm=_G["c"..m]
cm.name="最终幻想 末世终迹"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,15005078)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--fusion
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(cm.sp1con)
e2:SetCost(cm.sp1cost)
e2:SetTarget(cm.sp1tg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--fusion (opponent)
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TODECK)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e8:SetCode(EVENT_PHASE+PHASE_STANDBY)
e8:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e8:SetRange(LOCATION_SZONE)
e8:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e8:SetCondition(cm.sp2con)
e8:SetCost(cm.sp2cost)
e8:SetTarget(cm.sp2tg)
e8:SetOperation(cm.spop)
c:RegisterEffect(e8)
end
function cm.sfilter(c)
return c:IsFaceup() and c:IsCode(15005077)
end
function cm.sp1con(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.sp2con(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetControler()
return Duel.IsExistingMatchingCard(cm.sfilter,p,LOCATION_ONFIELD,0,1,nil) and tp~=p
end
function cm.rmfilter(c)
return c:IsSetCard(0xcf3e) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or c:IsLocation(LOCATION_DECK)) and c:IsAbleToRemoveAsCost()
end
function cm.sp1cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rg=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil)
if chk==0 then return rg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
rc=rg:FilterSelect(tp,cm.rmfilter,1,1,nil):GetFirst()
if not rc:IsLocation(LOCATION_GRAVE) then Duel.ConfirmCards(1-tp,rc) end
Duel.Remove(rc,POS_FACEDOWN,REASON_COST)
end
function cm.sp2cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local p=c:GetControler()
local rg=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil)
local g=Duel.GetDecktopGroup(p,3)
if chk==0 then return rg:GetCount()>0 or g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==3 end
local op=0
local b1=rg:GetCount()>0
local b2=g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==3
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,1))
else op=Duel.SelectOption(tp,aux.Stringid(m,2))+1 end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
rc=rg:FilterSelect(tp,cm.rmfilter,1,1,nil):GetFirst()
if not rc:IsLocation(LOCATION_GRAVE) then Duel.ConfirmCards(1-tp,rc) end
Duel.Remove(rc,POS_FACEDOWN,REASON_COST)
else
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
end
function cm.filter0(c)
return (c:IsFacedown() or c:IsLocation(LOCATION_GRAVE)) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.filter1(c,e)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFacedown()) and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e) and c:IsAbleToDeck()
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xcf3e) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.sp1tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.sp2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
local ag=mat1:Filter(Card.IsFacedown,nil)
if #ag~=0 then Duel.ConfirmCards(1-tp,ag) end
Duel.SendtoDeck(mat1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
end
end
\ No newline at end of file
local m=15005079
local cm=_G["c"..m]
cm.name="瓦铭·三终渊之忆"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,15005079)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xcf3e),2,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_REMOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.atkcon)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
--facedown banish
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(cm.rmcost)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
end
function cm.atkfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.atkfilter,1,nil)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=eg:FilterCount(cm.atkfilter,nil)
if c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=math.floor(e:GetHandler():GetAttack()/600)
local g=Duel.GetDecktopGroup(tp,ct)
local tg=Duel.GetDecktopGroup(1-tp,ct)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==ct and tg:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)==ct
end
local rg=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck()
local ct2=Duel.Remove(rg,POS_FACEDOWN,REASON_COST)
e:SetLabel(ct2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,ct2,1-tp,LOCATION_DECK)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
if ct==0 then return end
local tg=Duel.GetDecktopGroup(1-tp,ct)
Duel.DisableShuffleCheck()
Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT)
end
\ No newline at end of file
local m=15005080
local cm=_G["c"..m]
cm.name="三终渊的星之融合"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,15005080+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,15005081)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.filter1(c,e)
return c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e) and c:IsAbleToDeck()
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xcf3e) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_REMOVED,0,nil)
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_REMOVED,0,nil,e)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
local ag=mat1:Filter(Card.IsFacedown,nil)
if #ag~=0 then Duel.ConfirmCards(1-tp,ag) end
Duel.SendtoDeck(mat1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
end
end
function cm.rmfilter(c)
return c:IsSetCard(0xcf3e) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToRemoveAsCost()
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rg=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil)
if chk==0 then return rg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
rc=rg:FilterSelect(tp,cm.rmfilter,1,1,nil):GetFirst()
if rc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,rc) end
Duel.Remove(rc,POS_FACEDOWN,REASON_COST)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
\ No newline at end of file
local m=15005082
local cm=_G["c"..m]
cm.name="何谓生·三终渊之流星"
function cm.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,15005082)
e1:SetCondition(cm.spcon)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xcf3e))
e2:SetValue(1)
c:RegisterEffect(e2)
--return to grave
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_REMOVED)
e4:SetCountLimit(1,15005083)
e4:SetHintTiming(0,TIMING_CHAIN_END)
e4:SetCondition(cm.thcon)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetCode(EVENT_REMOVE)
e3:SetOperation(cm.regop)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcf3e) and not c:IsCode(15005082)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,3)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==3 end
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p=c:GetControler()
local rc=re:GetHandler()
if c:IsFacedown() and c:IsReason(REASON_COST) and re and re:IsActivated() and (rc:IsSetCard(0xcf3e) or (rc:IsAttribute(ATTRIBUTE_DARK) and re:IsActiveType(TYPE_MONSTER))) then
local id=c:GetFieldID()
Duel.RegisterFlagEffect(p,15005082,RESET_CHAIN,0,1,id)
end
if c:IsFacedown() then
local id=c:GetFieldID()
Duel.RegisterFlagEffect(p,15005083,RESET_PHASE+PHASE_END,0,1,id)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p=c:GetControler()
local id=c:GetFieldID()
local b1=false
local b2=false
if Duel.GetFlagEffect(p,15005082)~=0 then
for _,i in ipairs{Duel.GetFlagEffectLabel(p,15005082)} do
if i==id then b1=true end
end
end
if Duel.GetFlagEffect(p,15005083)~=0 then
for _,i in ipairs{Duel.GetFlagEffectLabel(p,15005083)} do
if i==id then b2=true end
end
end
return c:IsFacedown() and (b1 or (Duel.IsPlayerAffectedByEffect(p,15005084) and b2))
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
\ No newline at end of file
local m=15005084
local cm=_G["c"..m]
cm.name="近在天边·三终渊"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--change effect type
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(15005084)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
--salvage
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,15005084)
e3:SetCondition(aux.exccon)
e3:SetCost(cm.thcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.rmfilter(c)
return c:IsSetCard(0xcf3e) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToRemoveAsCost()
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rg=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil)
if chk==0 then return rg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
rc=rg:FilterSelect(tp,cm.rmfilter,1,1,nil):GetFirst()
if rc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,rc) end
Duel.Remove(rc,POS_FACEDOWN,REASON_COST)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
\ No newline at end of file
local m=15005085
local cm=_G["c"..m]
cm.name="狭缝·三终渊之忆"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,15005085)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xcf3e),2,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_REMOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.defcon)
e2:SetOperation(cm.defop)
c:RegisterEffect(e2)
--facedown banish
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,m)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(cm.rmcost)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
end
function cm.deffilter(c)
return not c:IsType(TYPE_TOKEN)
end
function cm.defcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.deffilter,1,nil)
end
function cm.defop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=eg:FilterCount(cm.deffilter,nil)
if c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(ct*200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=math.floor(e:GetHandler():GetAttack()/600)
local g=Duel.GetDecktopGroup(tp,ct)
local tg=Duel.GetDecktopGroup(1-tp,ct)
if chk==0 then
return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==ct
end
local rg=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck()
Duel.Remove(rg,POS_FACEDOWN,REASON_COST)
end
function cm.rmfilter(c,tp)
return c:IsAbleToRemove(tp,POS_FACEDOWN)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and cm.rmfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.rmfilter,tp,0,LOCATION_ONFIELD,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.rmfilter,tp,0,LOCATION_ONFIELD,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end
\ No newline at end of file
local m=53796045
local cm=_G["c"..m]
cm.name="长久拾遗"
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DRAW_PHASE+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil,tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil,tp,POS_FACEDOWN):GetFirst()
if tc and Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)~=0 and tc:IsCode(53799250,53799256,53799267,53796042,53796043,53796044,53796071,53796072) then
local le={tc:GetActivateEffect()}
for _,te in pairs(le) do
local e1=te:Clone()
e1:SetDescription(aux.Stringid(m,0))
e1:SetRange(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(tc)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_ACTIVATE_COST)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_REMOVED)
e2:SetTargetRange(1,0)
e2:SetLabelObject(e1)
e2:SetTarget(function(e,te,tp)return te==e:GetLabelObject()end)
e2:SetOperation(cm.costop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
local tc=te:GetHandler()
local tp=te:GetHandlerPlayer()
if tc:IsType(TYPE_FIELD) then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,false)
else
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetLabelObject(te)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re==e:GetLabelObject() end)
e1:SetOperation(cm.ready)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetOperation(cm.rsop)
Duel.RegisterEffect(e2,tp)
end
function cm.ready(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():GetHandler():SetStatus(STATUS_EFFECT_ENABLED,true)
e:Reset()
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():GetHandler():SetStatus(STATUS_ACTIVATE_DISABLED,true)
e:Reset()
end
--承岚 FR-0026M
local cm,m,o=GetID()
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(0xff)
e3:SetCost(cm.icost)
e3:SetCondition(cm.icon)
e3:SetTarget(cm.itg)
e3:SetOperation(cm.iop)
c:RegisterEffect(e3)
end
function cm.filter1(c)
return c:IsPublic() and c:IsAbleToGraveAsCost()
end
function cm.filter2(c)
return c:IsSetCard(0x3623) and not c:IsCode(m) and c:IsAbleToGraveAsCost()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND,LOCATION_HAND,1,c)
or (Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) and Duel.GetFlagEffect(tp,m)==0))
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local c=e:GetHandler()
local wt=0
if Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND,LOCATION_HAND,1,c)
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) and Duel.GetFlagEffect(tp,m)==0
and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
wt=1
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
if not Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND,LOCATION_HAND,1,c)
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) and Duel.GetFlagEffect(tp,m)==0 then
wt=1
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
local g=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if wt==1 then
g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK,0,1,1,nil)
elseif wt==0 then
g=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_HAND,LOCATION_HAND,1,1,c)
end
local tc=g:GetFirst()
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3623) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end
function cm.icost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if not (c:IsPublic() or c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) then Duel.ConfirmCards(1-tp,c) end
end
function cm.icon(e,tp,eg,ep,ev,re,r,rp)
local tf=false
local c=e:GetHandler()
local loc=0
if c:IsLocation(LOCATION_DECK) then loc=1
elseif c:IsLocation(LOCATION_HAND) then loc=2
elseif c:IsLocation(LOCATION_ONFIELD) then loc=3
elseif c:IsLocation(LOCATION_GRAVE) then loc=4
elseif c:IsLocation(LOCATION_REMOVED) then loc=5 end
if loc==0 then return end
if e:GetLabel()==0 then
tf=false
elseif e:GetLabel()~=loc then
tf=true
end
e:SetLabel(loc)
return tf
end
function cm.itg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.iop(e,tp,eg,ep,ev,re,r,rp,c)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetOperatedGroup():GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetLabel(tc:GetCode())
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return se and se:GetHandler():IsCode(m) and c:GetCode()==e:GetLabel()
end
\ No newline at end of file
--承岚 FR-0045B
local cm,m,o=GetID()
function cm.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.discon)
e1:SetCost(cm.discost)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(0xff)
e3:SetCost(cm.icost)
e3:SetCondition(cm.icon)
e3:SetTarget(cm.itg)
e3:SetOperation(cm.iop)
c:RegisterEffect(e3)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.IsChainNegatable(ev)
end
function cm.costfilter1(c)
return c:IsPublic() and c:IsAbleToGraveAsCost()
end
function cm.costfilter2(c)
return c:IsSetCard(0x3623) and c:IsAbleToGraveAsCost()
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost()
and (Duel.IsExistingMatchingCard(cm.costfilter1,tp,LOCATION_HAND,LOCATION_HAND,1,c)
or (Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_HAND,0,1,c)
and Duel.GetFlagEffect(tp,m))) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=nil
local wt=0
if Duel.IsExistingMatchingCard(cm.costfilter1,tp,LOCATION_HAND,LOCATION_HAND,1,c)
and Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_HAND,0,1,c)
and Duel.GetFlagEffect(tp,m)==0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
wt=1
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
elseif not Duel.IsExistingMatchingCard(cm.costfilter1,tp,LOCATION_HAND,LOCATION_HAND,1,c)
and Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_HAND,0,1,c)
and Duel.GetFlagEffect(tp,m)==0 then
wt=1
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
if wt==1 then
g=Duel.SelectMatchingCard(tp,cm.costfilter2,tp,LOCATION_HAND,0,1,1,c)
elseif wt==0 then
g=Duel.SelectMatchingCard(tp,cm.costfilter1,tp,LOCATION_HAND,LOCATION_HAND,1,1,c)
end
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function cm.icost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if not (c:IsPublic() or c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) then Duel.ConfirmCards(1-tp,c) end
end
function cm.icon(e,tp,eg,ep,ev,re,r,rp)
local tf=false
local c=e:GetHandler()
local loc=0
if c:IsLocation(LOCATION_DECK) then loc=1
elseif c:IsLocation(LOCATION_HAND) then loc=2
elseif c:IsLocation(LOCATION_ONFIELD) then loc=3
elseif c:IsLocation(LOCATION_GRAVE) then loc=4
elseif c:IsLocation(LOCATION_REMOVED) then loc=5 end
if loc==0 then return end
if e:GetLabel()==0 then
tf=false
elseif e:GetLabel()~=loc then
tf=true
Duel.RegisterFlagEffect(tp,m+10000000,0,0,1)
end
e:SetLabel(loc)
return tf
end
function cm.itg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(500*Duel.GetFlagEffect(tp,m+10000000))
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500*Duel.GetFlagEffect(tp,m+10000000))
end
function cm.iop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_CARD,0,m)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
--承岚 FR-1035B
local cm,m,o=GetID()
function cm.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_REMOVE+CATEGORY_TODECK+CATEGORY_LEAVE_GRAVE)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(0xff)
e3:SetCost(cm.icost)
e3:SetCondition(cm.icon)
e3:SetTarget(cm.itg)
e3:SetOperation(cm.iop)
c:RegisterEffect(e3)
end
function cm.fil1(c)
return c:IsSetCard(0x3623) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.fil2(c,e,tp,code1)
return c:IsSetCard(0x3623) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not c:IsCode(code1)
end
function cm.fil3(c,code1,code2)
return c:IsSetCard(0x3623) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and c:IsFaceup()
and not c:IsCode(code1) and not c:IsCode(code2)
end
function cm.fil4(c,code1,code2,code3)
return c:IsSetCard(0x3623) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
and not c:IsCode(code1) and not c:IsCode(code2) and not c:IsCode(code3)
end
function cm.fil5(c,code1,code2,code3,code4)
return c:IsSetCard(0x3623) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
and not c:IsCode(code1) and not c:IsCode(code2) and not c:IsCode(code3) and not c:IsCode(code4)
end
function cm.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)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local code={}
if Duel.IsExistingMatchingCard(cm.fil1,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
code[1]=Duel.GetOperatedGroup():GetFirst():GetCode()
Duel.ConfirmCards(1-tp,g)
else
code[1]=0
end
else
code[1]=0
end
Duel.BreakEffect()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.fil2,tp,LOCATION_HAND,0,1,nil,e,tp,code[1])
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.fil2,tp,LOCATION_HAND,0,1,1,nil,e,tp,code[1])
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
code[2]=Duel.GetOperatedGroup():GetFirst():GetCode()
else
code[2]=0
end
else
code[2]=0
end
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(cm.fil3,tp,LOCATION_MZONE,0,1,nil,code[1],code[2]) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.fil3,tp,LOCATION_MZONE,0,1,1,nil,code[1],code[2])
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
code[3]=Duel.GetOperatedGroup():GetFirst():GetCode()
else
code[3]=0
end
else
code[3]=0
end
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(cm.fil4,tp,LOCATION_GRAVE,0,1,nil,code[1],code[2],code[3]) and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.fil4,tp,LOCATION_GRAVE,0,1,1,nil,code[1],code[2],code[3])
if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
code[4]=Duel.GetOperatedGroup():GetFirst():GetCode()
else
code[4]=0
end
else
code[4]=0
end
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(cm.fil5,tp,LOCATION_REMOVED,0,1,nil,code[1],code[2],code[3],code[4]) and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.fil5,tp,LOCATION_REMOVED,0,1,1,nil,code[1],code[2],code[3],code[4])
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
end
function cm.icost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if not (c:IsPublic() or c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) then Duel.ConfirmCards(1-tp,c) end
end
function cm.icon(e,tp,eg,ep,ev,re,r,rp)
local tf=false
local c=e:GetHandler()
local loc=0
if c:IsLocation(LOCATION_DECK) then loc=1
elseif c:IsLocation(LOCATION_HAND) then loc=2
elseif c:IsLocation(LOCATION_ONFIELD) then loc=3
elseif c:IsLocation(LOCATION_GRAVE) then loc=4
elseif c:IsLocation(LOCATION_REMOVED) then loc=5 end
if loc==0 then return end
if e:GetLabel()==0 then
tf=false
elseif e:GetLabel()~=loc then
tf=true
end
e:SetLabel(loc)
return tf
end
function cm.itg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
end
function cm.iop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_CARD,0,m)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.DiscardDeck(p,d,REASON_EFFECT)
end
\ No newline at end of file
--承岚 FR-0023R
local cm,m,o=GetID()
function cm.initial_effect(c)
--extra summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e2:SetRange(LOCATION_MZONE)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_EXTRA_SET_COUNT)
c:RegisterEffect(e3)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(0xff)
e3:SetCost(cm.icost)
e3:SetCondition(cm.icon)
e3:SetTarget(cm.itg)
e3:SetOperation(cm.iop)
c:RegisterEffect(e3)
end
function cm.icost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if not (c:IsPublic() or c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) then Duel.ConfirmCards(1-tp,c) end
end
function cm.icon(e,tp,eg,ep,ev,re,r,rp)
local tf=false
local c=e:GetHandler()
local loc=0
if c:IsLocation(LOCATION_DECK) then loc=1
elseif c:IsLocation(LOCATION_HAND) then loc=2
elseif c:IsLocation(LOCATION_ONFIELD) then loc=3
elseif c:IsLocation(LOCATION_GRAVE) then loc=4
elseif c:IsLocation(LOCATION_REMOVED) then loc=5 end
if loc==0 then return end
if e:GetLabel()==0 then
tf=false
elseif e:GetLabel()~=loc then
tf=true
end
e:SetLabel(loc)
return tf
end
function cm.itg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_MZONE)
end
function cm.iop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
if tc and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0
and tc:IsLocation(LOCATION_REMOVED) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetValue(Duel.GetTurnCount())
tc:RegisterFlagEffect(m,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
e1:SetValue(0)
tc:RegisterFlagEffect(m,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1)
end
Duel.RegisterEffect(e1,tp)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp or Duel.GetTurnCount()==e:GetValue() then return false end
return e:GetLabelObject():GetFlagEffect(m)~=0
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.ReturnToField(tc)
end
\ No newline at end of file
--承岚 FR-0036A
local cm,m,o=GetID()
function cm.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(0xff)
e3:SetCost(cm.icost)
e3:SetCondition(cm.icon)
e3:SetTarget(cm.itg)
e3:SetOperation(cm.iop)
c:RegisterEffect(e3)
end
function cm.drfil1(c)
return c:IsPublic() and c:IsAbleToGrave()
end
function cm.drfil2(c)
return c:IsSetCard(0x3623) and c:IsAbleToRemove()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and (Duel.IsExistingMatchingCard(cm.drfil1,tp,LOCATION_HAND,LOCATION_HAND,1,nil)
or (Duel.IsExistingMatchingCard(cm.drfil2,tp,LOCATION_GRAVE,0,1,nil) and Duel.GetFlagEffect(tp,m)==0)) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local wt=0
if Duel.IsExistingMatchingCard(cm.drfil1,tp,LOCATION_HAND,LOCATION_HAND,1,nil)
and Duel.IsExistingMatchingCard(cm.drfil2,tp,LOCATION_GRAVE,0,1,nil)
and Duel.GetFlagEffect(tp,m)==0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
wt=1
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
if not Duel.IsExistingMatchingCard(cm.drfil1,tp,LOCATION_HAND,LOCATION_HAND,1,nil)
and Duel.IsExistingMatchingCard(cm.drfil2,tp,LOCATION_GRAVE,0,1,nil)
and Duel.GetFlagEffect(tp,m)==0 then
wt=1
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
local g=nil
local num=0
if wt==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=Duel.SelectMatchingCard(tp,cm.drfil12,tp,LOCATION_GRAVE,0,1,1,nil)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then num=num+1 end
if Duel.IsExistingMatchingCard(cm.drfil1,tp,LOCATION_HAND,LOCATION_HAND,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
gg=Duel.SelectMatchingCard(tp,cm.drfil11,tp,LOCATION_HAND,LOCATION_HAND,1,1,nil)
if Duel.SendtoGrave(gg,REASON_EFFECT)~=0 then num=num+1 end
end
elseif wt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=Duel.SelectMatchingCard(tp,cm.drfil11,tp,LOCATION_HAND,LOCATION_HAND,1,2,nil)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then num=#Duel.GetOperatedGroup() end
end
Duel.Draw(tp,num,REASON_EFFECT)
end
function cm.icost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if not (c:IsPublic() or c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) then Duel.ConfirmCards(1-tp,c) end
end
function cm.icon(e,tp,eg,ep,ev,re,r,rp)
local tf=false
local c=e:GetHandler()
local loc=0
if c:IsLocation(LOCATION_DECK) then loc=1
elseif c:IsLocation(LOCATION_HAND) then loc=2
elseif c:IsLocation(LOCATION_ONFIELD) then loc=3
elseif c:IsLocation(LOCATION_GRAVE) then loc=4
elseif c:IsLocation(LOCATION_REMOVED) then loc=5 end
if loc==0 then return end
if e:GetLabel()==0 then
tf=false
elseif e:GetLabel()~=loc then
tf=true
Duel.RegisterFlagEffect(tp,m+10000000,0,0,1)
end
e:SetLabel(loc)
return tf
end
function cm.itg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,1)
end
function cm.iop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,Duel.GetFlagEffect(tp,m+10000000),nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
\ No newline at end of file
--承岚 FR-1030D
local cm,m,o=GetID()
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,cm.mfilter,1)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PUBLIC)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_HAND,LOCATION_HAND)
c:RegisterEffect(e2)
end
function cm.mfilter(c)
return c:IsLinkRace(RACE_WARRIOR) and not c:IsType(TYPE_LINK)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.filter(c)
return c:IsSetCard(0x3623) and c:IsAbleToHand() and (c:IsLocation(LOCATION_DECK) or (c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()))
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--承岚 EMPRESS
local cm,m,o=GetID()
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,cm.lcheck)
c:EnableReviveLimit()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PUBLIC)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_HAND,LOCATION_HAND)
c:RegisterEffect(e2)
--negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.discon)
e4:SetCost(cm.discost)
e4:SetTarget(cm.distg)
e4:SetOperation(cm.disop)
c:RegisterEffect(e4)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TODECK+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
end
function cm.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x3623)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,LOCATION_HAND,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsPublic,tp,LOCATION_HAND,LOCATION_HAND,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0
and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.filter1(c)
return c:IsSetCard(0x3623) and c:IsAbleToGrave()
end
function cm.filter2(c)
return c:IsAbleToDeck()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil)
or Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local b1=false
local b2=false
if Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) then b1=true end
if Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) then b2=true end
if b1==true and b2==true then
op=aux.SelectFromOptions(tp,{b1,aux.Stringid(m,1)},{b2,aux.Stringid(m,2)})
elseif b1==true and b2==false then
op=1
elseif b1==false and b2==true then
op=2
else return end
if op==1 then
local g=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
aux.GCheckAdditional=aux.dncheck
local hg=g:SelectSubGroup(tp,aux.TRUE,false,1,#g)
aux.GCheckAdditional=nil
if hg and #hg>0 then Duel.SendtoGrave(hg,REASON_EFFECT) end
elseif op==2 then
local g=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if g and #g>0 then Duel.SendtoDeck(g,nil,2,REASON_EFFECT) end
end
end
function cm.spcheck(g)
return g:GetClassCount(Card.GetCode)==g:GetCount()
end
\ No newline at end of file
--承岚 扭转万象
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(0xff)
e3:SetCost(cm.icost)
e3:SetCondition(cm.icon)
e3:SetTarget(cm.itg)
e3:SetOperation(cm.iop)
c:RegisterEffect(e3)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lp=Duel.GetLP(tp)
if chk==0 then return Duel.CheckLPCost(tp,lp-1,true) end
e:SetLabel(lp-1)
Duel.PayLPCost(tp,lp-1,true)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WARRIOR))
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WARRIOR))
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(cm.efilter)
Duel.RegisterEffect(e1,tp)
if c:IsRelateToEffect(e) and c:IsCanTurnSet() and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
function cm.icost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if not (c:IsPublic() or c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) then Duel.ConfirmCards(1-tp,c) end
end
function cm.icon(e,tp,eg,ep,ev,re,r,rp)
local tf=false
local c=e:GetHandler()
local loc=0
if c:IsLocation(LOCATION_DECK) then loc=1
elseif c:IsLocation(LOCATION_HAND) then loc=2
elseif c:IsLocation(LOCATION_ONFIELD) then loc=3
elseif c:IsLocation(LOCATION_GRAVE) then loc=4
elseif c:IsLocation(LOCATION_REMOVED) then loc=5 end
if loc==0 then return end
if e:GetLabel()==0 then
tf=false
elseif e:GetLabel()~=loc then
tf=true
end
e:SetLabel(loc)
return tf
end
function cm.itg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
end
function cm.iop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_CARD,0,m)
if Duel.SSet(tp,e:GetHandler())~=0 then
if Duel.GetCurrentPhase()==PHASE_END then return end
local turnp=Duel.GetTurnPlayer()
Duel.SkipPhase(turnp,PHASE_STANDBY,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(turnp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,turnp)
end
end
......@@ -80,7 +80,7 @@ function c71400025.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if op==0 then
e:SetCategory(CATEGORY_TOGRAVE)
local og=Duel.GetMatchingGroup(c71400025.filter1a3,tp,LOCATION_DECK,0,nil,check)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,og,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,og,1,tp,LOCATION_DECK)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
......
......@@ -9,8 +9,6 @@
#【以上两类作者的内容和公共区间内容一样随时都有可能下架】
# ▽作者虽在群内但已3个月以上未出现
#屋屋赛高【2024年9月30日前禁止投稿】
#公孙氏 2167068485 2
#娜娜 119724848 10 0x200-0x20f
......@@ -298,6 +296,7 @@
!setname 0x4804 山海异闻录
#廷达的信徒 401940250 150 0xf30-0xf3f
#【2025年3月31日前禁止投稿】
!setname 0x6f30 混沌构想|非「混沌」
!setname 0xcf30 苍白星海
!setname 0x6f31 虚实写笔
......@@ -326,7 +325,6 @@
!setname 0x5f3e Pecftlcus
!setname 0x6f3e Se7en
!setname 0xaf3e 异闻鸣
!setname 0xcf3e 三终渊
!setname 0x3f3f 死蔷薇|非蔷薇
!setname 0x5f3f 异再神
!setname 0xaf3f 时际
......@@ -1043,10 +1041,10 @@
#AddCodeList(53727003) 祖脑 神火卡名记述
#竹子 1252425371 600 0x620-0x62f
#【2025年6月30日前禁止投稿】
!setname 0x3620 永夜抄
!setname 0x6620 灵代
!setname 0xa620 时光酒桌
!setname 0x3623 承岚
!setname 0x626 黄昏
!setname 0x3626 黄昏之骑士
!setname 0x6629 伊兹尼亚
......
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