Commit 47ab13cd authored by 聖園ミカ's avatar 聖園ミカ 🐟

man!

parent d4788885
Pipeline #32336 passed with stages
in 48 minutes and 7 seconds
No preview for this file type
#[2025.1.DIY]
!2025.1.DIY
#[2025.1.DIY.]
!2025.1.DIY.
#002
00200001 1 --魔王的剑
......@@ -367,9 +367,6 @@
12062012 0 --灭天龙 最终法则
12066023 1 --天境一闪
12029001 0 --欲念的梦魇女妖
#122
12200000 1 --神明吞噬者 寰宇之灾厄
12200003 0 --神之仆从·西格纳斯
#124
12400006 1 --澄净闪耀 澄闪-酒保
12400011 0 --澄净闪耀 澄闪-突然出现
......@@ -684,15 +681,6 @@
18001005 1 --冒险遗产的先导者
18001010 0 --不灭的冒险遗产
18003007 0 --单调音乐厅
18005010 0 --封锁的拟魂
18005011 0 --改造的拟魂
18005012 0 --拟魂电路 K2R
18007005 1 --幻量子驱动器
18007007 1 --幻量子时间波船
18007010 0 --幻量子跃迁灵
18007012 0 --幻量子风暴
18007016 1 --幻量子转变
18008004 1 --新干线的车长
18009035 0 --三相交变闪姬≡响≡
18009050 0 --小世界魔术师
18010002 0 --谐律 热烈打击
......@@ -2221,6 +2209,8 @@
98630701 1 --萝莉控诱捕器
98639500 0 --被打扰的冬眠
98657312 1 --库拉丽丝-心配
98662200 1 --神明吞噬者 寰宇之灾厄
98662203 0 --神之仆从·西格纳斯
98664044 0 --富糖甜点史莱姆
98666901 0 --寒灵刻使 雾水
98670704 1 --破坏能力者 枯轲
......
--幻影拍档 巴妮与巴隆
local m=12060010
local cm=_G["c"..m]
function cm.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.discost)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_START)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetOperation(cm.regop)
c:RegisterEffect(e2)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
local lp=Duel.GetLP(tp)
if lp>=2000 then
Duel.SetLP(tp,lp-2000)
if cm.spsum then cm.spsum(e,tp,eg,ep,ev,re,r,rp) end
end
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(12060012) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.spsum(e,tp,eg,ep,ev,re,r,rp)
local resct=Duel.GetCurrentPhase()<=PHASE_STANDBY and 2 or 1
Debug.Message(resct)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(resct+1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
Debug.Message(Duel.GetTurnCount())
return Duel.GetTurnCount()~=e:GetLabel() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end)
e1:SetReset(0x1fe1000+RESET_PHASE+PHASE_STANDBY,resct+1)
Duel.RegisterEffect(e1,tp)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if d:IsRelateToBattle() and d:GetDefense()>e:GetHandler():GetAttack() then
Duel.Destroy(d,REASON_EFFECT)
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if bit.band(c:GetPreviousLocation(),LOCATION_ONFIELD)~=0 and c:IsReason(REASON_DESTROY) then
if cm.spsum then cm.spsum(e,tp,eg,ep,ev,re,r,rp) end
end
end
\ No newline at end of file
--魔导四轮车 V
local m=12060012
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(cm.splimit)
c:RegisterEffect(e0)
--atklimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetCondition(cm.dncon)
c:RegisterEffect(e1)
--activate cost
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ACTIVATE_COST)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCost(cm.dncost)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.actcon)
e4:SetOperation(cm.actop)
c:RegisterEffect(e4)
local e42=Effect.CreateEffect(c)
e42:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e42:SetCode(EVENT_LEAVE_FIELD)
e42:SetOperation(cm.retop)
c:RegisterEffect(e42)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2)
--token
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetCategory(CATEGORY_DRAW+CATEGORY_DAMAGE+CATEGORY_RECOVER+CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_ATTACK_ANNOUNCE)
e5:SetTarget(cm.sptg)
e5:SetOperation(cm.spop)
c:RegisterEffect(e5)
end
function cm.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_XYZ)~=SUMMON_TYPE_XYZ
end
function cm.dncost(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetFlagEffect(m)==0
end
function cm.dncon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)==0
end
function cm.ttfilter(c,tp)
return c:IsControler(tp) and c:IsLevelAbove(5) and c:IsLocation(LOCATION_MZONE)
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
if not eg then return false end
local tp=e:GetHandlerPlayer()
local tt=eg:Filter(cm.ttfilter,e:GetHandler(),tp)
if not tt then return false end
return e:GetHandler():GetOverlayCount()==0
end
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:Filter(cm.ttfilter,c,tp):GetFirst()
if not tc then return false end
if not tc:IsImmuneToEffect(e) then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(tc))
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
c:RegisterFlagEffect(m+100,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
local g=Group.FromCards(tc)
g:KeepAlive()
e:GetLabelObject(g)
end
end
function cm.retfilter(c,e,tp)
return c:GetFlagEffect(m+100) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
if c:GetOverlayCount()==0 then return end
local g=c:GetOverlayGroup():Filter(cm.retfilter,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFieldGroup(tp,LOCATION_DECK,LOCATION_DECK)
local seed=tg:RandomSelect(tp,1)
local code=seed:GetFirst():GetOriginalCode()
local ct=code%6+1
if ct==1 or ct==2 or ct==3 then Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(m,4))
Duel.Draw(tp,1,REASON_EFFECT) end
if ct==1 or ct==4 or ct==5 then Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(m,5))
Duel.Damage(1-tp,800,REASON_EFFECT) end
if ct==2 or ct==4 or ct==6 then Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(m,6))
cm.cpop(e,tp,eg,ep,ev,re,r,rp) end
if ct==3 or ct==5 or ct==6 then Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(m,7))
Duel.Recover(tp,1200,REASON_EFFECT) end
end
function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
local dg=g:RandomSelect(1-tp,1)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
\ No newline at end of file
--混沌支配者·艾希连德凛克
local m=12060015
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon proc
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_DECK)
e2:SetCondition(cm.spcon)
e2:SetValue(1)
c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg1)
e3:SetOperation(cm.thop1)
c:RegisterEffect(e3)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsControler(tp) then
Duel.RegisterFlagEffect(tp,m,nil,0,1)
end
tc=eg:GetNext()
end
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.GetFlagEffect(tp,m)>19
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK+LOCATION_EXTRA)
end
function cm.ttfilter(c)
return c:IsCode(12060018) and c:IsAbleToHand()
end
function cm.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ttfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.ttfilter,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 cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(12060016) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--魔导列车
local m=12060016
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(cm.splimit)
c:RegisterEffect(e0)
--atklimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetCondition(cm.dncon)
c:RegisterEffect(e1)
--activate cost
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ACTIVATE_COST)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCost(cm.dncost)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.actcon)
e4:SetOperation(cm.actop)
c:RegisterEffect(e4)
local e42=Effect.CreateEffect(c)
e42:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e42:SetCode(EVENT_LEAVE_FIELD)
e42:SetOperation(cm.retop)
c:RegisterEffect(e42)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2)
end
function cm.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_XYZ)~=SUMMON_TYPE_XYZ
end
function cm.dncost(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetFlagEffect(m)==0
end
function cm.dncon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)==0
end
function cm.ttfilter(c,tp)
return c:IsControler(tp) and c:IsLevelAbove(5) and c:IsLocation(LOCATION_MZONE)
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
if not eg then return false end
local tp=e:GetHandlerPlayer()
local tt=eg:Filter(cm.ttfilter,e:GetHandler(),tp)
if not tt then return false end
return e:GetHandler():GetOverlayCount()==0
end
function cm.ngilter(c)
return not c:IsCode(12060015)
end
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:Filter(cm.ttfilter,c,tp):GetFirst()
if not tc then return false end
if not tc:IsImmuneToEffect(e) then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(tc))
local sg=Duel.GetMatchingGroup(cm.ngilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.Remove(sg,POS_FACEDOWN,REASON_RULE)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
tc:RegisterFlagEffect(m+100,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
local g=Group.FromCards(tc)
g:KeepAlive()
e:GetLabelObject(g)
end
end
function cm.retfilter(c,e,tp)
return c:GetFlagEffect(m+100) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
if c:GetOverlayCount()==0 then return end
local g=c:GetOverlayGroup():Filter(cm.retfilter,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--灾难巨兽 布莱克王
local m=14800101
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+100)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_DESTROYED)
e3:SetOperation(cm.regop)
c:RegisterEffect(e3)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function cm.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 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.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.thfilter(c)
return c:IsSetCard(0x4800) and c:IsAbleToHand() and not c:IsCode(m)
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()
if c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_GRAVE)
e1:SetTarget(cm.sptg2)
e1:SetOperation(cm.spop2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.spfilter2(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--灾难巨兽 雷德王
local m=14800102
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+100)
e3:SetCost(cm.spcost2)
e3:SetTarget(cm.sptg2)
e3:SetOperation(cm.spop2)
c:RegisterEffect(e3)
--to grave
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_DESTROYED)
e4:SetOperation(cm.regop)
c:RegisterEffect(e4)
end
function cm.spfilter2(c,tp)
return c:GetSummonLocation()==LOCATION_GRAVE and c:GetPreviousControler()==tp
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spfilter2,1,nil,tp)
end
function cm.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 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.spcost2(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 cm.spfilter(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg2(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_HAND+LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_GRAVE)
e1:SetTarget(cm.sptg2)
e1:SetOperation(cm.spop2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.spfilter2(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--灾难巨兽 艾雷王
local m=14800103
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_DESTROYED)
e3:SetOperation(cm.regop)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:GetSummonLocation()==LOCATION_EXTRA
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
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.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_GRAVE)
e1:SetTarget(cm.sptg2)
e1:SetOperation(cm.spop2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.spfilter2(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--灾难巨兽 哥尔赞
local m=14800104
local cm=_G["c"..m]
function cm.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Special Summon (deck)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,m+100)
e3:SetCondition(cm.spcon2)
e3:SetTarget(cm.sptg2)
e3:SetOperation(cm.spop2)
c:RegisterEffect(e3)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
\ No newline at end of file
--灾难巨兽 美尔巴
local m=14800105
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--Special Summon (deck)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,m+100)
e3:SetCondition(cm.spcon2)
e3:SetTarget(cm.sptg2)
e3:SetOperation(cm.spop2)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x4800)
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.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 not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
\ No newline at end of file
--灾难巨兽 雷丘巴斯
local m=14800106
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon1)
e1:SetTarget(cm.sptg1)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
--Special Summon (deck)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.spcon2)
e3:SetTarget(cm.sptg2)
e3:SetOperation(cm.spop2)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,m+100)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function cm.sptg1(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.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x4800)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.desfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.Destroy(tg,REASON_EFFECT)
end
end
\ No newline at end of file
--灾难巨兽 超戈布
local m=14800107
local cm=_G["c"..m]
function cm.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Special Summon (deck)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,m+100)
e3:SetCondition(cm.spcon2)
e3:SetTarget(cm.sptg2)
e3:SetOperation(cm.spop2)
c:RegisterEffect(e3)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_SZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
\ No newline at end of file
--灾难巨兽 眼Q
local m=14800108
local cm=_G["c"..m]
function cm.initial_effect(c)
--negate attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.operation2)
c:RegisterEffect(e2)
--Special Summon (deck)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,m+100)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()~=tp
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.NegateAttack()
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function cm.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function cm.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsCode(14800109) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,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,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,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,c,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,c,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,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,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
\ No newline at end of file
--灾难巨兽 法伊布王
local m=14800109
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x4800),3,5,false)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--destroy replace01
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetCondition(cm.atcon)
e2:SetValue(aux.imval1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(cm.valcheck1)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--02
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.imcon)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_MATERIAL_CHECK)
e5:SetValue(cm.valcheck2)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_ATTACK_ALL)
e6:SetValue(1)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(m,2))
e7:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_MATERIAL_CHECK)
e7:SetValue(cm.valcheck3)
e7:SetLabelObject(e6)
c:RegisterEffect(e7)
--04
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(m,3))
e8:SetCategory(CATEGORY_DAMAGE)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e8:SetCode(EVENT_ATTACK_ANNOUNCE)
e8:SetRange(LOCATION_MZONE)
e8:SetCountLimit(1)
e8:SetCondition(cm.condition)
e8:SetTarget(cm.target)
e8:SetOperation(cm.activate)
c:RegisterEffect(e8)
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(m,3))
e9:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_MATERIAL_CHECK)
e9:SetValue(cm.valcheck4)
e9:SetLabelObject(e8)
c:RegisterEffect(e9)
--03
local e10=Effect.CreateEffect(c)
e10:SetDescription(aux.Stringid(m,4))
e10:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e10:SetType(EFFECT_TYPE_IGNITION)
e10:SetRange(LOCATION_MZONE)
e10:SetProperty(EFFECT_FLAG_CARD_TARGET)
e10:SetCountLimit(1)
e10:SetCondition(cm.imcon)
e10:SetTarget(cm.destg)
e10:SetOperation(cm.desop)
c:RegisterEffect(e10)
local e11=Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(m,4))
e11:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_MATERIAL_CHECK)
e11:SetValue(cm.valcheck5)
e11:SetLabelObject(e10)
c:RegisterEffect(e11)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetMaterial()
local s=0
local tc=g:GetFirst()
while tc do
local a=tc:GetAttack()
if a<0 then a=0 end
s=s+a
tc=g:GetNext()
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(s/2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2)
end
function cm.valcheck1(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsFusionCode,1,nil,14800104) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function cm.valcheck2(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsFusionCode,1,nil,14800105) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function cm.valcheck3(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsFusionCode,1,nil,14800107) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function cm.valcheck4(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsFusionCode,1,nil,14800108) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function cm.valcheck5(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsFusionCode,1,nil,14800106) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function cm.atfilter(c)
return c:IsFaceup()
end
function cm.atcon(e)
return Duel.IsExistingMatchingCard(cm.atfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function cm.imcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabel()==1
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:IsControler(1-tp) and e:GetLabel()==1
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local at=Duel.GetAttacker()
if chk==0 then return at:IsRelateToBattle() end
local dam=math.max(math.floor(at:GetBaseAttack()/2),0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
if at:IsRelateToBattle() and Duel.NegateAttack()~=0 then
local atk=math.floor(at:GetBaseAttack()/2)
if atk>0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
end
function cm.filter(c)
return c:IsFaceup() and (c:IsAttackAbove(1) or aux.disfilter1(c))
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetValue(0)
tc:RegisterEffect(e3)
end
end
\ No newline at end of file
--灾难巨兽 百慕达
local m=14800110
local cm=_G["c"..m]
function cm.initial_effect(c)
--boost
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.atktg)
e1:SetValue(500)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.atktg(e,c)
return c:IsSetCard(0x4800) and c~=e:GetHandler()
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD)
end
function cm.thfilter(c)
return c:IsSetCard(0x4800) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
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:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--灾难巨兽 安东拉
local m=14800111
local cm=_G["c"..m]
function cm.initial_effect(c)
--pos
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.postg)
e1:SetOperation(cm.posop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsCanChangePosition()
end
function cm.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(cm.estg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.estg(e,c)
return c:IsSetCard(0x4800) and c:GetCode()~=m
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD)
end
function cm.thfilter(c)
return c:IsSetCard(0x4800) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
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:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--灾难巨兽 哥莫拉
local m=14800112
local cm=_G["c"..m]
function cm.initial_effect(c)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD)
end
function cm.thfilter(c)
return c:IsSetCard(0x4800) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
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:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,tp)
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
\ No newline at end of file
--黑暗支配者 邪神加坦杰厄
local m=14800126
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(0)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
--half atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_SET_ATTACK_FINAL)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(cm.atktg)
e4:SetValue(cm.atkval)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_SET_DEFENSE_FINAL)
e5:SetValue(cm.defval)
c:RegisterEffect(e5)
end
function cm.spfilter(c)
return c:IsSetCard(0x4800) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function cm.spcon(e,c)
if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end
local g=Duel.GetMatchingGroup(cm.spfilter,c:GetControler(),LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
return ct>=5
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
aux.GCheckAdditional=aux.dncheck
local rg=g:SelectSubGroup(tp,aux.TRUE,false,5,5)
aux.GCheckAdditional=nil
Duel.Remove(rg,POS_FACEUP,REASON_COST)
end
function cm.disfilter(c)
return c:IsFaceup() and (c:IsAttackAbove(1) or aux.disfilter1(c))
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,cm.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
function cm.efilter(e,re)
return re:IsActiveType(TYPE_MONSTER) and re:GetOwner()~=e:GetOwner()
end
function cm.atktg(e,c)
return c~=e:GetHandler()
end
function cm.atkval(e,c)
return math.ceil(c:GetAttack()/2)
end
function cm.defval(e,c)
return math.ceil(c:GetDefense()/2)
end
\ No newline at end of file
--灾难巨兽 古维拉
local m=14800141
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x4800)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil)
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 not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD)
end
function cm.thfilter(c)
return c:IsSetCard(0x4800) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
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:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--灾难巨兽融合升华
local m=14800172
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter0(c)
return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function cm.filter1(c,e)
return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x4800) 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.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,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_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter1),tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,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 mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
tc:SetMaterial(mat)
if mat:IsExists(Card.IsFacedown,1,nil) then
local cg=mat:Filter(Card.IsFacedown,nil)
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(mat,nil,2,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,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
\ No newline at end of file
--异星苏生
local m=14800177
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(cm.reptg)
e2:SetValue(cm.repval)
e2:SetOperation(cm.repop)
c:RegisterEffect(e2)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x4800) and c:IsLocation(LOCATION_MZONE)
and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(cm.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function cm.repval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer())
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
--异星苏生
local m=14800178
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.sptg2)
e2:SetOperation(cm.spop2)
c:RegisterEffect(e2)
end
function cm.filter(c,e,tp,id)
return c:IsSetCard(0x4800) and c:GetTurnID()==id and not c:IsReason(REASON_RETURN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc,e,tp,Duel.GetTurnCount()) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,Duel.GetTurnCount()) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp,Duel.GetTurnCount())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if sg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,ft,ft,nil)
end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.sptg2(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_HAND+LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(cm.thcon)
e1:SetOperation(cm.thop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(m)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT)
end
\ No newline at end of file
--异星大灾害
local m=14800179
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetCondition(cm.reccon)
e3:SetTarget(cm.rectg)
e3:SetOperation(cm.recop)
c:RegisterEffect(e3)
--damage
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.damcon)
e4:SetTarget(cm.damtg)
e4:SetOperation(cm.damop)
c:RegisterEffect(e4)
end
function cm.desfilter1(c,e,tp)
return c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,c)
end
function cm.spfilter(c,e,tp,tc)
return c:IsSetCard(0x4800) and not c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.desfilter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.desfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.desfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,tc)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:GetFirst():IsControler(tp) and eg:GetFirst():IsSetCard(0x4800)
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ev)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--怪兽消灭大作战
local m=14800180
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(cm.reccon)
e2:SetOperation(cm.recop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e4)
--damage
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_DAMAGE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_PHASE+PHASE_STANDBY)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1)
e5:SetCondition(cm.damcon)
e5:SetTarget(cm.damtg)
e5:SetOperation(cm.damop)
c:RegisterEffect(e5)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2
end
function cm.desfilter1(c,e,tp)
return c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,c)
end
function cm.spfilter(c,e,tp,tc)
return c:IsSetCard(0x4800) and not c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if g:GetFirst():IsFaceup() then
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetAttack())
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local atk=tc:IsFaceup() and tc:GetAttack() or 0
if Duel.Destroy(tc,REASON_EFFECT)>0 and atk~=0 then
Duel.Recover(tp,atk,REASON_EFFECT)
end
end
end
function cm.cfilter(c,tp)
return c:GetSummonPlayer()==tp
end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,1-tp)
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Recover(tp,300,REASON_EFFECT)
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
\ No newline at end of file
--异星怪兽大恐怖
local m=14800181
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--damage
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.damcon)
e4:SetTarget(cm.damtg)
e4:SetOperation(cm.damop)
c:RegisterEffect(e4)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECKBOT)
tc:RegisterEffect(e1,true)
end
end
function cm.filter2(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
and c:GetControler()==tp and c:IsReason(REASON_DESTROY)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter2,1,nil,tp)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
\ No newline at end of file
--异星怪兽大暴走
local m=14800184
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(cm.atkval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--actlimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(0,1)
e4:SetValue(1)
e4:SetCondition(cm.actcon)
c:RegisterEffect(e4)
--damage
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.damcon)
e4:SetTarget(cm.damtg)
e4:SetOperation(cm.damop)
c:RegisterEffect(e4)
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0x4800)
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.filter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)*100
end
function cm.actfilter(c,tp)
return c and c:IsFaceup() and c:IsSetCard(0x4800) and c:IsType(TYPE_MONSTER) and c:IsControler(tp)
end
function cm.actcon(e)
local tp=e:GetHandlerPlayer()
return cm.actfilter(Duel.GetAttacker(),tp) or cm.actfilter(Duel.GetAttackTarget(),tp)
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
\ No newline at end of file
--异星吸收
local m=14800186
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsSetCard(0x4800) and c:IsFaceup()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker()
if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg)
local rec=tg:GetAttack()
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackable() then
if Duel.NegateAttack(tc) then
if Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT)~=0 then
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
end
end
end
--异星怨灵鬼 恋鬼
local m=14800191
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_BE_BATTLE_TARGET)
c:RegisterEffect(e3)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_DISABLE)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(0,LOCATION_MZONE)
e6:SetTarget(cm.distg)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_DISABLE_EFFECT)
c:RegisterEffect(e7)
--actlimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,1)
e4:SetValue(1)
e4:SetCondition(cm.actcon)
c:RegisterEffect(e4)
--special summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,m+100)
e5:SetCost(aux.bfgcost)
e5:SetTarget(cm.target)
e5:SetOperation(cm.operation)
c:RegisterEffect(e5)
end
function cm.actcon(e)
local c=e:GetHandler()
return (Duel.GetAttacker()==c and c:GetBattleTarget()) or Duel.GetAttackTarget()==c
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if not tc then return end
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
end
function cm.distg(e,c)
return c:GetFlagEffect(m)~=0
end
function cm.spfilter(c,sp)
return c:GetSummonPlayer()==sp
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spfilter,1,nil,1-tp)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
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 not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x4800) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
--超合体异星恐兽 暴君泰兰特
local m=14800192
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x4800),3,8,false)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(cm.atkops)
c:RegisterEffect(e1)
--summon success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(cm.matcheck)
c:RegisterEffect(e2)
--destroy replace
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_DESTROY_REPLACE)
e6:SetTarget(cm.reptg)
e6:SetOperation(cm.repop)
c:RegisterEffect(e6)
end
function cm.atkops(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetMaterial()
local s=0
local tc=g:GetFirst()
while tc do
local a=tc:GetAttack()
if a<0 then a=0 end
s=s+a
tc=g:GetNext()
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(s/2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2)
end
function cm.matcheck(e,c)
local ct=c:GetMaterial():GetClassCount(Card.GetCode)
if ct>=3 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.atkcon)
e1:SetOperation(cm.atkop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
c:RegisterEffect(e1)
end
if ct>=5 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.detg)
e1:SetOperation(cm.deop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
c:RegisterEffect(e1)
end
if ct>=7 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetCost(cm.tgcost)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
c:RegisterEffect(e1)
end
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
end
function cm.detg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function cm.deop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
end
function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function cm.repfilter(c,e)
return c:IsFaceup() and c:IsSetCard(0x4800)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and Duel.IsExistingMatchingCard(cm.repfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,e) end
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,cm.repfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c,e)
Duel.SetTargetCard(g)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true
else return false end
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE)
end
\ No newline at end of file
--异星暴君 狂怒
local m=14800199
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(aux.dscon)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--attack target
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(cm.tgcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsDefenseAbove(0)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
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)
--def to 0
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_TURN_END)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCountLimit(1)
e2:SetOperation(cm.ddop)
tc:RegisterEffect(e2)
end
end
function cm.ddop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetOwner()
local tc=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
e:Reset()
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and aux.bpcon()
end
function cm.tgfilter(c)
return c:GetFlagEffect(m)==0
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ONLY_ATTACK_MONSTER)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(cm.atklimit)
e1:SetLabel(tc:GetRealFieldID())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,0)
end
end
function cm.atklimit(e,c)
return c:GetRealFieldID()==e:GetLabel()
end
--异星 红莲斩
local m=14800219
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsType(TYPE_MONSTER)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 and Duel.Destroy(tg,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--源素龙-极冰龙王
local m=14800582
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_WYRM),1)
c:EnableReviveLimit()
--add tuner
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e1:SetCondition(cm.tncon)
e1:SetOperation(cm.tnop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
--place
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+100)
e3:SetCondition(cm.setcon)
e3:SetTarget(cm.settg)
e3:SetOperation(cm.setop)
c:RegisterEffect(e3)
end
function cm.tncon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO
end
function cm.tnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function cm.tgfilter(c,lv,olv)
local clv=c:GetOriginalLevel()
return c:IsRace(RACE_WYRM) and c:IsAbleToRemove() and clv~=olv and math.abs(clv-olv)~=lv
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c=e:GetHandler()
return c:IsLevelAbove(0)
and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel(),c:GetOriginalLevel())
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,c:GetLevel(),c:GetOriginalLevel())
local tc=g:GetFirst()
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_LEVEL)
e2:SetValue(math.abs(c:GetOriginalLevel()-tc:GetOriginalLevel()))
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2)
end
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.setfilter(c)
return c:IsSetCard(0x4804) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsSSetable()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--山海异闻录-龙宫
local m=14800589
local cm=_G["c"..m]
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:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--move
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WYRM))
e3:SetValue(cm.val)
e3:SetLabel(1)
c:RegisterEffect(e3)
end
function cm.thfilter1(c)
return c:IsSetCard(0x4802) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.thfilter1,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function cm.tdfilter(c)
return c:IsSetCard(0x4802) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE,0,nil):Filter(Card.IsCanBeEffectTarget,nil,e)
if chkc then return false end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and g:GetClassCount(Card.GetAttribute)>=3 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=g:SelectSubGroup(tp,aux.dabcheck,false,3,3)
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<=0 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
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function cm.atkfilter(c)
return c:IsFaceup() and c:GetAttribute()~=0
end
function cm.val(e,c)
local g=Duel.GetMatchingGroup(cm.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
local att=0
local tc=g:GetFirst()
while tc do
att=bit.bor(att,tc:GetAttribute())
tc=g:GetNext()
end
local ct=0
while att~=0 do
if bit.band(att,0x1)~=0 then ct=ct+1 end
att=bit.rshift(att,1)
end
return ct*200
end
\ No newline at end of file
--源素龙-圣珖皇龙
local m=14800607
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_WYRM),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.negcon)
e2:SetTarget(cm.negtg)
e2:SetOperation(cm.negop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,0,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function cm.cfilter(c)
return c:IsFaceup()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=ct end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
Duel.ConfirmDecktop(tp,ct)
local g=Duel.GetDecktopGroup(tp,ct)
if g:GetCount()>0 and g:FilterCount(Card.IsRace,nil,RACE_WYRM)>0 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
local cg=g:FilterCount(Card.IsRace,nil,RACE_WYRM)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,cg,nil)
Duel.HintSelection(sg)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)
return g:GetClassCount(Card.GetAttribute)>=4 and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.negop(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.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and e:GetHandler():GetColumnGroup():IsContains(re:GetHandler())
end
\ No newline at end of file
--源素龙-咣龙
local m=14800681
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon from hand
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.hspcon)
e1:SetValue(cm.hspval)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_TUNER)
e3:SetCondition(cm.con2)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_UPDATE_LEVEL)
e4:SetValue(-1)
e4:SetCondition(cm.con1)
c:RegisterEffect(e4)
--link limit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCondition(cm.con2)
e5:SetValue(cm.linkimit)
c:RegisterEffect(e5)
end
function cm.cfilter(c)
return c:GetColumnGroupCount()>=0
end
function cm.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=0
local lg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE,tp))
end
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function cm.hspval(e,c)
local tp=c:GetControler()
local zone=0
local lg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE,tp))
end
return 0,zone
end
function cm.tgfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x4802) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,c)
end
function cm.thfilter(c,tc)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x4802) and c:IsAbleToHand()
and c:IsLevel(tc:GetOriginalLevel()) and not c:IsAttribute(tc:GetOriginalAttribute())
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.tgfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() 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,2))
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)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
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
function cm.filters(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.con1(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.filters2(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and not c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function cm.con2(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters2,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.linkimit(e,c)
if not c then return false end
return not c:IsRace(RACE_WYRM)
end
--源素龙-黯龙
local m=14800682
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon from hand
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.hspcon)
e1:SetValue(cm.hspval)
c:RegisterEffect(e1)
--move
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.seqtg)
e2:SetOperation(cm.seqop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(-1)
e3:SetCondition(cm.con1)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_ADD_TYPE)
e4:SetValue(TYPE_TUNER)
e4:SetCondition(cm.con2)
c:RegisterEffect(e4)
--link limit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCondition(cm.con2)
e5:SetValue(cm.linkimit)
c:RegisterEffect(e5)
end
function cm.cfilter(c)
return c:GetColumnGroupCount()>=0
end
function cm.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=0
local lg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE,tp))
end
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function cm.hspval(e,c)
local tp=c:GetControler()
local zone=0
local lg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE,tp))
end
return 0,zone
end
function cm.seqfilter(c)
return c:IsFaceup() and c:IsRace(RACE_WYRM)
end
function cm.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.seqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.seqfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
Duel.SelectTarget(tp,cm.seqfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.seqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
end
function cm.filters(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function cm.con1(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.filters2(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and not c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function cm.con2(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters2,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.linkimit(e,c)
if not c then return false end
return not c:IsRace(RACE_WYRM)
end
--源素龙-焱龙
local m=14800683
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon from hand
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.hspcon)
e1:SetValue(cm.hspval)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_TUNER)
e3:SetCondition(cm.con3)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_UPDATE_LEVEL)
e4:SetValue(-1)
e4:SetCondition(cm.con1)
c:RegisterEffect(e4)
--atk
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetValue(-500)
e5:SetCondition(cm.con2)
c:RegisterEffect(e5)
--link limit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCondition(cm.con3)
e6:SetValue(cm.linkimit)
c:RegisterEffect(e6)
end
function cm.hspzone(tp)
local zone=0
local lg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE,tp))
end
return bit.bnot(zone)
end
function cm.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=cm.hspzone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function cm.hspval(e,c)
local tp=c:GetControler()
local zone=cm.hspzone(tp)
return 0,zone
end
function cm.desfilter(c,col)
return col==aux.GetColumn(c)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local col=aux.GetColumn(e:GetHandler())
return col and eg:IsExists(cm.desfilter,1,e:GetHandler(),col)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800)
end
function cm.thfilter(c,e,tp)
return (c:IsSetCard(0x4802) and c:IsType(TYPE_MONSTER)) and c:IsAbleToHand()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)>0 then
Duel.BreakEffect()
if Duel.Recover(tp,800,REASON_EFFECT)>0 then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,e:GetHandler(),e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
end
function cm.filters(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.con1(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.filters2(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE)
end
function cm.con2(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters2,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.filters3(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH)
end
function cm.con3(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters3,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.linkimit(e,c)
if not c then return false end
return not c:IsRace(RACE_WYRM)
end
--源素龙-焱龙
local m=14800684
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon from hand
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.hspcon)
e1:SetValue(cm.hspval)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.descon)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(-500)
e3:SetCondition(cm.con2)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_UPDATE_LEVEL)
e4:SetValue(-1)
e4:SetCondition(cm.con3)
c:RegisterEffect(e4)
--def
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_ADD_TYPE)
e5:SetValue(TYPE_TUNER)
e5:SetCondition(cm.con1)
c:RegisterEffect(e5)
--link limit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCondition(cm.con1)
e6:SetValue(cm.linkimit)
c:RegisterEffect(e6)
end
function cm.hspzone(tp)
local zone=0
local lg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE,tp))
end
return bit.bnot(zone)
end
function cm.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=cm.hspzone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function cm.hspval(e,c)
local tp=c:GetControler()
local zone=cm.hspzone(tp)
return 0,zone
end
function cm.desfilter(c,col)
return col==aux.GetColumn(c)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local col=aux.GetColumn(e:GetHandler())
return col and eg:IsExists(cm.desfilter,1,e:GetHandler(),col)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDestructable() end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0)
end
function cm.spfilter(c,e,tp)
return (c:IsSetCard(0x4802) and c:IsType(TYPE_MONSTER)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then
Duel.BreakEffect()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Damage(p,d,REASON_EFFECT)>0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,e:GetHandler(),e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function cm.filters(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.con1(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.filters2(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.con2(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters2,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.filters3(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH)
end
function cm.con3(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters3,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.linkimit(e,c)
if not c then return false end
return not c:IsRace(RACE_WYRM)
end
--源素龙-讽龙
local m=14800685
local cm=_G["c"..m]
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:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.hspcon)
e1:SetValue(cm.hspval)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_ADD_TYPE)
e4:SetValue(TYPE_TUNER)
e4:SetCondition(cm.con1)
c:RegisterEffect(e4)
--atk
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetValue(500)
e5:SetCondition(cm.con3)
c:RegisterEffect(e5)
--atk
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetRange(LOCATION_MZONE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetCode(EFFECT_UPDATE_LEVEL)
e6:SetValue(-1)
e6:SetCondition(cm.con2)
c:RegisterEffect(e6)
--link limit
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e7:SetCondition(cm.con1)
e7:SetValue(cm.linkimit)
c:RegisterEffect(e7)
end
function cm.cfilter(c)
return c:IsRace(RACE_WYRM) and c:IsFaceup()
end
function cm.getzone(tp)
local zone=0
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local seq=aux.MZoneSequence(tc:GetSequence())
zone=zone|(1<<seq)
if seq>0 then zone=zone|(1<<(seq-1)) end
if seq<4 then zone=zone|(1<<(seq+1)) end
end
return zone
end
function cm.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=cm.getzone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function cm.hspval(e,c)
local tp=c:GetControler()
return 0,cm.getzone(tp)
end
function cm.thfilter(c)
return c:IsSetCard(0x4804) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
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:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.filters(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.con1(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.filters2(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE)
end
function cm.con2(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters2,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.filters3(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH)
end
function cm.con3(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters3,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.linkimit(e,c)
if not c then return false end
return not c:IsRace(RACE_WYRM)
end
--源素龙-谛龙
local m=14800686
local cm=_G["c"..m]
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:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.hspcon)
e1:SetValue(cm.hspval)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(500)
e4:SetCondition(cm.con3)
c:RegisterEffect(e4)
--atk
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_ADD_TYPE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetValue(TYPE_TUNER)
e5:SetCondition(cm.con2)
c:RegisterEffect(e5)
--atk
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetRange(LOCATION_MZONE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetCode(EFFECT_UPDATE_LEVEL)
e6:SetValue(-1)
e6:SetCondition(cm.con1)
c:RegisterEffect(e6)
--link limit
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e7:SetCondition(cm.con2)
e7:SetValue(cm.linkimit)
c:RegisterEffect(e7)
end
function cm.cfilter(c)
return c:IsRace(RACE_WYRM) and c:IsFaceup()
end
function cm.getzone(tp)
local zone=0
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local seq=aux.MZoneSequence(tc:GetSequence())
zone=zone|(1<<seq)
if seq>0 then zone=zone|(1<<(seq-1)) end
if seq<4 then zone=zone|(1<<(seq+1)) end
end
return zone
end
function cm.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=cm.getzone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function cm.hspval(e,c)
local tp=c:GetControler()
return 0,cm.getzone(tp)
end
function cm.tgfilter(c)
return c:IsRace(RACE_WYRM) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
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:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.filters(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.con1(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.filters2(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE)
end
function cm.con2(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters2,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.filters3(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.con3(e)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(cm.filters3,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),seq,e:GetHandlerPlayer())
end
function cm.linkimit(e,c)
if not c then return false end
return not c:IsRace(RACE_WYRM)
end
--源素龙-闪耀皇龙
local m=14800696
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_WYRM),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.negcon)
e2:SetTarget(cm.negtg)
e2:SetOperation(cm.negop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
end
function cm.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and e:GetHandler():GetColumnGroup():IsContains(re:GetHandler())
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,0,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)+Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=ct end
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)+Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)
Duel.ConfirmDecktop(tp,ct)
local g=Duel.GetDecktopGroup(tp,ct)
local cg=g:GetCount()
if cg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:FilterCount(cm.spfilter,nil,e,tp)>0
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:FilterSelect(tp,cm.spfilter,1,1,nil,e,tp)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
cg=g:GetCount()-sg:GetCount()
end
Duel.ShuffleDeck(tp)
end
function cm.splimit(e,c)
return not c:IsRace(RACE_WYRM) and c:IsLocation(LOCATION_EXTRA)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)
return g:GetClassCount(Card.GetAttribute)>=4 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.negop(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
--源素龙-腾海皇龙
local m=14800698
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--atk/def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
--actlimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,1)
e4:SetValue(1)
e4:SetCondition(cm.actcon)
c:RegisterEffect(e4)
--pierce
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e5)
--to deck
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,1))
e6:SetCategory(CATEGORY_TODECK)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_PHASE+PHASE_BATTLE)
e6:SetCountLimit(1)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(cm.tdcon)
e6:SetTarget(cm.tdtg)
e6:SetOperation(cm.tdop)
c:RegisterEffect(e6)
end
function cm.atkval(e,c)
local g=Duel.GetMatchingGroup(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)
return g:GetClassCount(Card.GetAttribute)*500
end
function cm.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function cm.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and e:GetHandler():GetColumnGroup():IsContains(re:GetHandler())
end
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattledGroupCount()>0
end
function cm.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
--山海异闻录-九龙拉棺
local m=14800710
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--level
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.lvtg)
e2:SetOperation(cm.lvop)
c:RegisterEffect(e2)
end
function cm.spfilter(c,e,tp,check)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and ((check and c:IsRace(RACE_WYRM)) or c:IsSetCard(0x4802))
end
function cm.checkfilter(c)
return c:IsRace(RACE_WYRM) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local check=Duel.IsExistingMatchingCard(cm.checkfilter,tp,LOCATION_MZONE,0,1,nil)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp,check) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,check) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,check)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.lvfilter(c)
return c:IsRace(RACE_WYRM) and c:IsFaceup() and c:GetLevel()>0
end
function cm.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local sel=0
local lvl=1
if tc:IsLevel(1) then
sel=Duel.SelectOption(tp,aux.Stringid(m,2))
else
sel=Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))
end
if sel==1 then
lvl=-1
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lvl)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--山海异闻录-神龙召唤
local m=14800734
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--level
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.lvtg)
e2:SetOperation(cm.lvop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsSetCard(0x4802) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.checkfilter(c)
return c:IsRace(RACE_WYRM) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if Duel.GetMatchingGroupCount(cm.checkfilter,tp,LOCATION_MZONE,0,nil)>0 then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
end
end
function cm.activate(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,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsPlayerCanDraw(tp,1)
and Duel.GetMatchingGroupCount(cm.checkfilter,tp,LOCATION_MZONE,0,nil)>0
and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
if Duel.Draw(tp,1,REASON_EFFECT)~=0 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local cg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(cg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
end
function cm.lvfilter(c)
return c:IsRace(RACE_WYRM) and c:IsFaceup() and c:GetLevel()>0
end
function cm.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local sel=0
local lvl=1
if tc:IsLevel(1) then
sel=Duel.SelectOption(tp,aux.Stringid(m,2))
else
sel=Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))
end
if sel==1 then
lvl=-1
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lvl)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--山海异闻录-真龙秘藏
local m=14800773
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--LP up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_REMOVE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(cm.reccon)
e2:SetOperation(cm.recop)
c:RegisterEffect(e2)
--tuner
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.tncon)
e3:SetTarget(cm.tntg)
e3:SetOperation(cm.tnop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
function cm.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x4802) and c:IsAbleToHand()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function cm.filter2(c)
return not c:IsType(TYPE_TOKEN)
end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter2,1,nil)
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Recover(tp,500,REASON_EFFECT)
end
function cm.ctfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x4802) and c:IsLevelAbove(1) and not c:IsType(TYPE_TUNER) and c:IsSummonPlayer(tp)
end
function cm.tncon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.ctfilter,1,nil,tp)
end
function cm.tnfilter(c)
return c:IsFaceup() and c:IsSetCard(0x4802) and c:IsLevelAbove(1) and not c:IsType(TYPE_TUNER)
end
function cm.tntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(cm.ctfilter,nil,tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.tnfilter(chkc,tp,g) end
if chk==0 then return true end
if g:GetCount()==1 then
Duel.SetTargetCard(g)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.tnfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,g)
end
end
function cm.tnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(TYPE_TUNER)
tc:RegisterEffect(e1)
--link limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.linkimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function cm.linkimit(e,c)
if not c then return false end
return not c:IsRace(RACE_WYRM)
end
\ No newline at end of file
--山海异闻录-往生殿
local m=14800774
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e0:SetOperation(cm.activate)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE)
e1:SetRange(LOCATION_SZONE)
e1:SetTarget(cm.sptg1)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
--halve damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetCondition(cm.condition)
e2:SetValue(cm.val)
c:RegisterEffect(e2)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x4802) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND))
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.spfilter1(c,e,tp,tid)
return c:IsRace(RACE_WYRM) and c:GetTurnID()==tid and bit.band(c:GetReason(),REASON_BATTLE)~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tid=Duel.GetTurnCount()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter1(chkc,e,tp,tid) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,tid) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,tid)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_WYRM)
end
function cm.condition(e)
return Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.val(e,re,dam,r,rp,rc)
return math.floor(dam/2)
end
\ No newline at end of file
--源素龙-绯玉帝龙·虹
local m=14800778
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.negcon)
e2:SetCost(cm.negcost)
e2:SetTarget(cm.negtg)
e2:SetOperation(cm.negop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(cm.tglimit)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e5:SetCountLimit(1)
e5:SetTarget(cm.destg)
e5:SetOperation(cm.desop)
c:RegisterEffect(e5)
end
cm.material_type=TYPE_SYNCHRO
function cm.splimit(e,se,sp,st)
if e:GetHandler():IsLocation(LOCATION_EXTRA) then
return bit.band(st,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
end
return true
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)
return g:GetClassCount(Card.GetAttribute)>=6 and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and rp==1-tp
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,0,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function cm.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and e:GetHandler():GetColumnGroup():IsContains(re:GetHandler())
end
function cm.tglimit(e,c)
local c=e:GetHandler()
return c:GetBattleTarget():GetColumnGroup():IsContains(c)
end
function cm.ckfilter(c,tp)
return c:IsRace(RACE_WYRM) and c:IsType(TYPE_MONSTER)
and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttribute())
end
function cm.desfilter(c,at)
return c:IsFaceup() and c:IsAttribute(at)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.ckfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.ckfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.ckfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst()
local tg=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil,tc:GetAttribute())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,tg:GetCount(),0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil,tc:GetAttribute())
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--拟魂 阿赖耶识
Duel.LoadScript("c10199990.lua")
local m=18005001
local cm=_G["c"..m]
if not rsv.PseudoSoul then
rsv.PseudoSoul={}
rsps=rsv.PseudoSoul
function rsps.EndPhasePFun(c,type2)
aux.EnablePendulumAttribute(c)
local cate=not type2 and "th,se" or "th"
local operation=not type2 and rsps.thop1 or rsps.thop2
local e1=rsef.FTF(c,EVENT_PHASE+PHASE_END,{m,1},1,cate,nil,LOCATION_PZONE,nil,nil,rsps.thtg,operation)
return e1
end
function rsps.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function rsps.setfilter(c)
return c:IsSSetable() and c:CheckSetCard("PseudoSoul") and c:GetType()==TYPE_CONTINUOUS+TYPE_TRAP
end
function rsps.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:CheckSetCard("PseudoSoul") and c:IsAbleToHand()
end
function rsps.thop2(e,tp)
local c=aux.ExceptThisCard(e)
if not c or Duel.SendtoHand(c,nil,REASON_EFFECT)<=0 or not c:IsLocation(LOCATION_HAND) then return end
local g=Duel.GetMatchingGroup(rsps.setfilter,tp,LOCATION_DECK,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SSet(tp,sg:GetFirst())
Duel.ConfirmCards(1-tp,sg)
end
end
function rsps.thop1(e,tp)
local c=aux.ExceptThisCard(e)
if not c or Duel.SendtoHand(c,nil,REASON_EFFECT)<=0 or not c:IsLocation(LOCATION_HAND) then return end
local g=Duel.GetMatchingGroup(rsps.thfilter,tp,LOCATION_DECK,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,6)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function rsps.EndPhaseMFun(c)
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
local e1=rscf.SetSummonCondition(c,true)
end
function rsps.mthcon(e)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function rsps.FieldToHandFun(c)
local e1=rsef.STO(c,EVENT_TO_HAND,{m,0},nil,"th","de",rsps.mthcon,nil,rstg.target(rsop.list(Card.IsAbleToHand,"th",0,LOCATION_ONFIELD,1)),rsps.mthop)
end
function rsps.mthop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
if #tg>0 then
Duel.HintSelection(tg)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
function rsps.SummonSucessFun(c,code,cate,costcount,tg,op)
local e1=rsef.STO(c,EVENT_SUMMON_SUCCESS,{code,1},nil,cate,"de",nil,rsps.sscost(costcount),tg,op)
return e1
end
function rsps.cfilter(c)
return c:IsAbleToHandAsCost() and c:IsFaceup() and c:CheckSetCard("PseudoSoul")
end
function rsps.sscost(ct)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return ct==0 or Duel.IsExistingMatchingCard(rsps.cfilter,tp,LOCATION_EXTRA,0,ct,nil) end
if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,rsps.cfilter,tp,LOCATION_EXTRA,0,ct,ct,nil)
Duel.SendtoHand(tg,nil,REASON_COST)
end
end
end
function rsps.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
if Duel.GetTurnPlayer()==tp then
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
else
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
end
function rsps.sumfilter(c,e,tp)
return c:CheckSetCard("PseudoSoul") and not c:IsCode(e:GetHandler():GetCode()) and c:IsSummonable(true,nil)
end
function rsps.MBPSummonFun(c)
local e1=rsef.QO(c,nil,{m,1},1,"sum",nil,LOCATION_MZONE,rsps.sumcon,nil,rstg.target(rsop.list(rsps.sumfilter,"sum",LOCATION_HAND)),rsps.sumop)
end
function rsps.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,rsps.sumfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
function rsps.oscon(e,tp,eg)
local f=function(c,p)
return c:CheckSetCard("PseudoSoul") and c:IsFaceup() and c:IsControler(p)
end
return eg:IsExists(f,1,e:GetHandler(),tp)
end
function rsps.OtherSummonFun(c,code,cate,tg,op,filter,customop)
local operation=not customop and rsps.osop(op,filter) or op
local e1=rsef.FTO(c,EVENT_SUMMON_SUCCESS,{m,0},{1,code},cate,"de",LOCATION_MZONE,rsps.oscon,nil,tg,operation)
return e1
end
function rsps.osfilter(c,tp,filter)
return c:IsAbleToHand() and (not filter or filter(c,tp))
end
function rsps.osop(op,filter)
return function(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg=Duel.SelectMatchingCard(tp,rsps.osfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp,filter)
if #tg>0 then
Duel.HintSelection(tg)
end
if Duel.SendtoHand(tg,nil,REASON_EFFECT)>0 and tg:GetFirst():IsLocation(LOCATION_HAND) then
op(e,tp)
end
end
end
function rsps.trapcon(e)
local f=function(c)
return c:IsFaceup() and not c:CheckSetCard("PseudoSoul")
end
local tp=e:GetHandlerPlayer()
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_DISABLE) or e:GetHandler():IsHasEffect(EFFECT_CANNOT_DISABLE) then return true end
return not Duel.IsExistingMatchingCard(f,tp,LOCATION_ONFIELD,0,1,nil)
end
function rsps.TrapRemoveFun(c)
local e1=rsef.FTF(c,EVENT_PHASE+PHASE_STANDBY,{m,2},1,"rm",nil,LOCATION_SZONE,rsps.rmcon,nil,rsps.rmtg,rsps.rmop)
end
function rsps.pactfilter(c,tp)
return c:IsType(TYPE_PENDULUM) and c:CheckSetCard("PseudoSoul") and c:GetActivateEffect():IsActivatable(tp)
end
function rsps.rmcon(e,tp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0
end
function rsps.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
end
function rsps.rmop(e,tp)
local c=aux.ExceptThisCard(e)
if c and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)>0 and c:IsLocation(LOCATION_REMOVED) and Duel.IsExistingMatchingCard(rsps.pactfilter,tp,LOCATION_HAND,0,1,nil,tp) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and Duel.SelectYesNo(tp,aux.Stringid(m,7)) then
local maxct=0
if Duel.CheckLocation(tp,LOCATION_PZONE,0) then maxct=maxct+1 end
if Duel.CheckLocation(tp,LOCATION_PZONE,1) then maxct=maxct+1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local ag=Duel.SelectMatchingCard(tp,rsps.pactfilter,tp,LOCATION_HAND,0,1,maxct,nil,tp)
for tc in aux.Next(ag) do
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
end
end
end
--------------------------------
end
--------------------------------
if cm then
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
rsps.EndPhasePFun(c,true)
rsps.EndPhaseMFun(c)
rsps.FieldToHandFun(c)
rsps.SummonSucessFun(c,m,nil,1,rstg.target(rsop.list(cm.afilter,nil,LOCATION_DECK)),cm.op)
end
function cm.afilter(c,e,tp)
return c:GetType()==TYPE_CONTINUOUS+TYPE_TRAP and c:CheckSetCard("PseudoSoul") and c:GetActivateEffect():IsActivatable(tp)
end
function cm.op(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,cm.afilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
end
end
--------------------------
end
--拟魂 鼻识
Duel.LoadScript("c18005001.lua")
local m=18005002
local cm=_G["c"..m]
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
rsps.EndPhasePFun(c)
rsps.EndPhaseMFun(c)
rsps.MBPSummonFun(c)
rsps.OtherSummonFun(c,m,"th,dr",cm.tg,cm.op)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.op(e,tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
\ No newline at end of file
--拟魂 耳识
Duel.LoadScript("c18005001.lua")
local m=18005003
local cm=_G["c"..m]
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
rsps.EndPhasePFun(c)
rsps.EndPhaseMFun(c)
rsps.MBPSummonFun(c)
rsps.OtherSummonFun(c,m,"th,sum",cm.tg,cm.op,cm.cfilter)
end
function cm.cfilter(c,tp)
return c:IsAbleToHand() and Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.sumfilter(c)
return c:CheckSetCard("PseudoSoul") and c:IsSummonable(true,nil)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.op(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
if #g>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
\ No newline at end of file
--拟魂 末那识
Duel.LoadScript("c18005001.lua")
local m=18005004
local cm=_G["c"..m]
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
rsps.EndPhasePFun(c,true)
rsps.EndPhaseMFun(c)
rsps.FieldToHandFun(c)
rsps.SummonSucessFun(c,m,nil,1,rstg.target2(cm.fun,rsop.list(Card.IsAbleToDeck,"td",LOCATION_ONFIELD,LOCATION_ONFIELD)),cm.op)
end
function cm.fun(g)
Duel.SetChainLimit(cm.chlimit)
end
function cm.chlimit(e,ep,tp)
return tp==ep
end
function cm.op(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #tg>0 then
Duel.HintSelection(tg)
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--拟魂 目识
Duel.LoadScript("c18005001.lua")
local m=18005005
local cm=_G["c"..m]
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
rsps.EndPhasePFun(c)
rsps.EndPhaseMFun(c)
rsps.MBPSummonFun(c)
rsps.OtherSummonFun(c,m,"th",rstg.target(rsop.list(Card.IsAbleToHand,"th",LOCATION_ONFIELD),rsop.list(Card.IsAbleToHand,"th",0,LOCATION_ONFIELD)),cm.op,nil,true)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local target=e:GetTarget()
if not target(e,tp,eg,ep,ev,re,r,rp,0) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg1=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg2=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
tg1:Merge(tg2)
Duel.HintSelection(tg1)
Duel.SendtoHand(tg1,nil,REASON_EFFECT)
end
\ No newline at end of file
--拟魂 舌识
Duel.LoadScript("c18005001.lua")
local m=18005006
local cm=_G["c"..m]
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
rsps.EndPhasePFun(c)
rsps.EndPhaseMFun(c)
rsps.MBPSummonFun(c)
rsps.OtherSummonFun(c,m,"th,se",cm.tg,cm.op)
end
function cm.thfilter(c)
return c:CheckSetCard("PseudoSoul") and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.op(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
\ No newline at end of file
--拟魂 身识
Duel.LoadScript("c18005001.lua")
local m=18005007
local cm=_G["c"..m]
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
rsps.EndPhasePFun(c,true)
rsps.EndPhaseMFun(c)
rsps.FieldToHandFun(c)
rsps.SummonSucessFun(c,m,nil,0,rstg.target(rsop.list(Card.IsAbleToRemove,"rm",LOCATION_ONFIELD,LOCATION_ONFIELD)),cm.op)
end
function cm.op(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #tg>0 then
Duel.HintSelection(tg)
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--拟魂 意识
Duel.LoadScript("c18005001.lua")
local m=18005008
local cm=_G["c"..m]
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
rsps.EndPhasePFun(c,true)
rsps.EndPhaseMFun(c)
rsps.FieldToHandFun(c)
rsps.SummonSucessFun(c,m,nil,0,aux.TRUE,cm.op)
end
function cm.op(e,tp)
local c=rscf.GetRelationThisCard(e)
if not c then return end
local atk=c:GetBaseAttack()*2
local e1=rsef.SV_SET(c,"batk",atk,nil,rsreset.est_pend+RESET_DISABLE)
end
\ No newline at end of file
--真拟魂 K觉K者G
Duel.LoadScript("c18005001.lua")
local m=18005009
local cm=_G["c"..m]
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
rsps.EndPhasePFun(c,true)
rsps.EndPhaseMFun(c)
rsps.FieldToHandFun(c)
rsps.SummonSucessFun(c,m,nil,3,cm.tg,cm.op)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--tribute limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRIBUTE_LIMIT)
e2:SetValue(cm.tlimit)
c:RegisterEffect(e2)
--summon with 3 tribute
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e3:SetCondition(cm.ttcon)
e3:SetOperation(cm.ttop)
e3:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_LIMIT_SET_PROC)
c:RegisterEffect(e4)
end
function cm.tlimit(e,c)
return c.rssetcode~="PseudoSoul"
end
function cm.ttcon(e,c,minc)
if c==nil then return true end
return minc<=3 and Duel.CheckTribute(c,3)
end
function cm.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA+LOCATION_HAND)>2 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_EXTRA+LOCATION_HAND)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_EXTRA+LOCATION_HAND,0,nil,TYPE_MONSTER)
if #g>2 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local sg=g:Select(1-tp,3,3,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_RULE)
end
end
\ No newline at end of file
--封锁的拟魂.
Duel.LoadScript("c18005001.lua")
local m=18005010
local cm=_G["c"..m]
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e3=rsps.TrapRemoveFun(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetCondition(rsps.trapcon)
c:RegisterEffect(e2)
end
--改造的拟魂
Duel.LoadScript("c18005001.lua")
local m=18005011
local cm=_G["c"..m]
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.FV_LIMIT(c,"dis",nil,cm.distg,{LOCATION_MZONE,LOCATION_MZONE },rsps.trapcon)
local e4=rsps.TrapRemoveFun(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(cm.distg)
e3:SetCondition(rsps.trapcon)
e3:SetValue(0)
c:RegisterEffect(e3)
end
function cm.distg(e,c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
\ No newline at end of file
--拟魂电路 K2心R
Duel.LoadScript("c18005001.lua")
local m=18005012
local cm=_G["c"..m]
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
local e2=rsef.FV_CANNOT_BE_TARGET(c,"effect",aux.tgoval,aux.TargetBoolFunction(rscf.CheckSetCard,"PseudoSoul"),{LOCATION_ONFIELD,0},cm.con)
local e4=rsef.QO(c,nil,{m,0},1,nil,nil,LOCATION_FZONE,cm.pcon,nil,rstg.target(rsop.list(cm.cfilter,nil,LOCATION_HAND)),cm.pop)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCondition(cm.atkcon)
e3:SetTarget(aux.TargetBoolFunction(rscf.CheckSetCard,"PseudoSoul"))
e3:SetValue(450)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:CheckSetCard("PseudoSoul") and c:IsLevelAbove(5)
end
function cm.pcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
if Duel.GetTurnPlayer()==tp then
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
else
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
end
function cm.pop(e,tp)
local g=Duel.GetMatchingGroup(Card.IsLevelAbove,tp,LOCATION_HAND,0,nil,5)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.ConfirmCards(1-tp,tc)
if tc:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(tp) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END)
e1:SetValue(-2)
tc:RegisterEffect(e1)
end
end
function cm.atkcon(e)
local d=Duel.GetAttackTarget()
local tp=e:GetHandlerPlayer()
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and d and d:IsControler(1-tp) and cm.con(e)
end
function cm.con(e,tp)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_EXTRA,0)==0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 then
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
end
\ No newline at end of file
--徘徊的拟魂
Duel.LoadScript("c18005001.lua")
local m=18005013
local cm=_G["c"..m]
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e3=rsps.TrapRemoveFun(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(cm.tg)
e2:SetTargetRange(0xff,0xff)
e2:SetCondition(rsps.trapcon)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(81674782)
e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e4:SetTargetRange(0xff,0xff)
e4:SetTarget(cm.checktg)
c:RegisterEffect(e4)
end
function cm.tg(e,c)
return not c:IsLocation(0x80) and not c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.checktg(e,c)
return not c:IsPublic()
end
\ No newline at end of file
--迎击的拟魂
Duel.LoadScript("c18005001.lua")
local m=18005014
local cm=_G["c"..m]
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.FTO(c,EVENT_ATTACK_ANNOUNCE,{m,0},nil,"sum",nil,LOCATION_SZONE,cm.con,nil,rstg.target(rsop.list(cm.sumfilter,"sum",LOCATION_HAND)),cm.sumop)
local e3=rsps.TrapRemoveFun(c)
end
function cm.con(e,tp)
return Duel.GetAttacker():IsControler(1-tp) and not Duel.GetAttackTarget()
end
function cm.sumfilter(c)
return c:CheckSetCard("PseudoSoul") and c:IsSummonable(true,nil)
end
function cm.sumop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
if #g>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
\ No newline at end of file
--模拟魂 虚饰
Duel.LoadScript("c18005001.lua")
local m=18005015
local cm=_G["c"..m]
cm.rssetcode="PseudoSoul"
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
local e1=rsef.QO(c,nil,{m,0},1,"td",nil,LOCATION_PZONE,nil,rscost.cost2(cm.costfun,cm.cfilter,"th",LOCATION_ONFIELD),rstg.target(rsop.list(cm.tdfilter,"td",LOCATION_REMOVED)),cm.tdop)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsAbleToHandAsCost() and c:CheckSetCard("PseudoSoul")
end
function cm.tdfilter(c)
return c:IsFaceup() and c:IsAbleToDeck() and c:CheckSetCard("PseudoSoul")
end
function cm.costfun(g,e)
e:SetLabelObject(g:GetFirst())
end
function cm.tdop(e,tp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if (tc and tc==c) or c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.HintSelection(tg)
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--幻量子呼唤者
Duel.LoadScript("c10199990.lua")
rsof.SelectHint=rshint.Select
local m=18007001
local cm=_G["c"..m]
if not rsv.PhantomQuantum then
rsv.PhantomQuantum={}
rspq=rsv.PhantomQuantum
function rspq.ToDeckFun(c,code)
local e1=rsef.STO(c,EVENT_TO_DECK,{m,0},{1,code},"sp","de",rspq.tdcon,nil,rstg.target(rsop.list(rspq.spfilter(code),"sp",LOCATION_DECK)),rspq.tdop(code))
return e1
end
function rspq.tdcon(e,tp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function rspq.spfilter(code)
return function(c,e,tp)
return not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:CheckSetCard("PhantomQuantum")
end
end
function rspq.tdop(code)
return function(e,tp)
rsof.SelectHint(tp,"sp")
local sg=Duel.SelectMatchingCard(tp,rspq.spfilter(code),tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #sg>0 then
rssf.SpecialSummon(sg)
end
end
end
function rspq.SpecialSummonFun(c,code,cate,tg,op)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{code,1},{1,code+100},cate,"de",rspq.sscon,nil,tg,op)
end
function rspq.sscon(e,tp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK)
end
function rspq.LeaveFieldFun(c,code,isnoeffect,isnoposlimit)
local e1=rsef.STO(c,EVENT_LEAVE_FIELD,{m,0},nil,"sp","de",rspq.lfcon(isnoeffect),nil,rstg.target(rsop.list(rspq.lfspfilter(isnoposlimit),"sp",LOCATION_DECK)),rspq.lfop(isnoposlimit))
end
function rspq.lfcon(isnoeffect)
return function(e,tp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and (not isnoeffect or c:IsReason(REASON_EFFECT))
end
end
function rspq.lfspfilter(isnoposlimit)
return function(c,e,tp)
local pos=isnoposlimit and POS_FACEUP or POS_FACEUP_DEFENSE
return c:CheckSetCard("PhantomQuantum") and c:IsCanBeSpecialSummoned(e,0,tp,false,false,pos) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
end
function rspq.lfop(isnoposlimit)
return function(e,tp)
local pos=isnoposlimit and POS_FACEUP or POS_FACEUP_DEFENSE
rsof.SelectHint(tp,"sp")
local sg=Duel.SelectMatchingCard(tp,rspq.lfspfilter(isnoposlimit),tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,pos)
end
end
end
function rspq.FusionSummonFun(c,code,iscanfusion,filter1,reqlv,minct)
local f1,f2,maxct=nil
if not minct then minct=1 end
local sumval=iscanfusion and rspq.splimit2 or rspq.splimit1
local e1=rscf.SetSummonCondition(c,false,sumval)
if filter1 then
f1=function(mc,tp)
return mc:IsFusionCode(18007005) and mc:IsControler(tp)
end
f2=function(mc,tp)
return mc:IsLocation(LOCATION_MZONE) and mc:IsLevelBelow(reqlv) and mc:IsControler(tp)
end
aux.AddFusionProcCodeFunRep(c,18007005,rspq.ffilter,1,99,true,true)
else
f1=function(mc)
return mc:CheckFusionSetCard("PhantomQuantum") and mc:IsLocation(LOCATION_MZONE)
end
f2=function(mc)
return mc:IsLocation(LOCATION_MZONE) and rspq.ffilter2(mc)
end
maxct=1
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(rscf.CheckFusionSetCard,"PhantomQuantum"),rspq.ffilter2,true)
end
local e2=rscf.SetSpecialSummonProduce(c,LOCATION_EXTRA,rspq.sprcon(f1,f2,maxct,reqlv,minct),rspq.sprop(f1,f2,maxct,reqlv,minct))
return e1,e2
end
function rspq.sprcon(f1,f2,maxct,reqlv,minct)
return function(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg1=Duel.GetMatchingGroup(rspq.sprfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,fc)
return mg1:CheckSubGroup(rspq.spcheck,1,3,c,tp,f1,f2,maxct,reqlv,minct)
end
end
function rspq.sprfilter(c,fc)
return c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(fc)
end
function rspq.spcheck(g,fc,tp,f1,f2,maxct,reqlv,minct)
if Duel.GetLocationCountFromEx(tp,tp,g)<=0 then return false end
if maxct and #g~=maxct+1 then return false end
if minct and #g<minct+1 then return false end
local f1g=g:Filter(f1,nil,tp)
if #f1g<=0 then return false end
for tc in aux.Next(f1g) do
if reqlv then
local sg=g:Clone()
sg:RemoveCard(tc)
if sg:FilterCount(f2,nil,tp)~=#sg then return false end
if sg:GetSum(Card.GetLevel)==reqlv then return true end
else
if g:IsExists(f2,1,tc,tp) then return true end
end
end
return false
end
function rspq.sprop(f1,f2,maxct,reqlv,minct)
return function(e,tp,eg,ep,ev,re,r,rp,c)
local mg1=Duel.GetMatchingGroup(rspq.sprfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,fc)
local mat=mg1:SelectSubGroup(tp,rspq.spcheck,false,1,3,c,tp,f1,f2,maxct,reqlv,minct)
local setg=mat:Filter(Card.IsFacedown,nil)
if #setg>0 then
Duel.ConfirmCards(1-tp,setg)
end
Duel.SendtoDeck(mat,nil,2,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
end
function rspq.splimit1(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function rspq.splimit2(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function rspq.ffilter(c,fc,sub,mg,sg)
local tg=sg:Filter(Card.IsCode,nil,18007005)
if c:IsLevelAbove(6) then return false end
if not sg then return true end
for tc in aux.Next(tg) do
local sg2=sg:Clone()
sg2:RemoveCard(tc)
if sg2:GetSum(Card.GetLevel)==5 then return true end
end
return false
end
function rspq.ffilter2(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:GetSummonLocation()==LOCATION_DECK
end
------------
end
------------
if cm then
function cm.initial_effect(c)
local e1=rspq.ToDeckFun(c,m)
local e2=rspq.SpecialSummonFun(c,m,nil,rstg.target(rsop.list(cm.setfilter,nil,LOCATION_DECK)),cm.setop)
end
cm.rssetcode="PhantomQuantum"
function cm.setfilter(c)
return c:CheckSetCard("PhantomQuantum") and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function cm.setop(e,tp)
rsof.SelectHint(tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if #sg>0 then
Duel.SSet(tp,sg:GetFirst())
Duel.ConfirmCards(1-tp,sg)
end
end
------------
end
--幻量子疾驰者
Duel.LoadScript("c18007001.lua")
local m=18007002
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rspq.ToDeckFun(c,m)
local e2=rspq.SpecialSummonFun(c,m,"th",rstg.target(rsop.list(cm.thfilter,"th",LOCATION_GRAVE)),cm.thop)
end
cm.rssetcode="PhantomQuantum"
function cm.thfilter(c)
return c:CheckSetCard("PhantomQuantum") and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsof.SelectHint(tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if #sg>0 then
Duel.HintSelection(sg)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--幻量子破坏者
Duel.LoadScript("c18007001.lua")
local m=18007003
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rspq.ToDeckFun(c,m)
local e2=rspq.SpecialSummonFun(c,m,"td",rstg.target(rsop.list(Card.IsAbleToDeck,"td",LOCATION_ONFIELD,LOCATION_ONFIELD)),cm.tdop)
end
cm.rssetcode="PhantomQuantum"
function cm.tdop(e,tp)
rsof.SelectHint(tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #sg>0 then
Duel.HintSelection(sg)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--幻量子切割者
Duel.LoadScript("c18007001.lua")
local m=18007004
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rspq.ToDeckFun(c,m)
local e2=rspq.SpecialSummonFun(c,m,"sp",rstg.target(rsop.list(cm.spfilter,"sp",LOCATION_HAND+LOCATION_GRAVE)),cm.spop)
end
cm.rssetcode="PhantomQuantum"
function cm.spfilter(c,e,tp)
return c:CheckSetCard("PhantomQuantum") and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.spop(e,tp)
rsof.SelectHint(tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #sg>0 then
rssf.SpecialSummon(sg)
end
end
\ No newline at end of file
--幻量子驱动器
Duel.LoadScript("c18007001.lua")
local m=18007005
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rspq.ToDeckFun(c,m)
local e2=rspq.SpecialSummonFun(c,m,"sp",rstg.target(rsop.list(cm.spfilter,"sp",LOCATION_DECK)),cm.spop)
end
cm.rssetcode="PhantomQuantum"
function cm.spfilter(c,e,tp)
return c:CheckSetCard("PhantomQuantum") and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.spop(e,tp)
rsof.SelectHint(tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #sg>0 then
rssf.SpecialSummon(sg)
end
end
\ No newline at end of file
--幻量子强袭者
Duel.LoadScript("c18007001.lua")
local m=18007006
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2=rspq.FusionSummonFun(c,m,false,true,5)
local e3=rspq.LeaveFieldFun(c,m)
local e4=rsef.I(c,{m,0},1,"td","tg",LOCATION_MZONE,nil,nil,rstg.target({cm.tdfilter,"td",LOCATION_MZONE },{Card.IsAbleToDeck,"td",LOCATION_MZONE,LOCATION_MZONE }),cm.tdop)
end
cm.rssetcode="PhantomQuantum"
function cm.tdfilter(c)
return c:IsAbleToDeck() and c:CheckSetCard("PhantomQuantum")
end
function cm.tdop(e,tp)
local g=rsgf.GetTargetGroup()
if #g>0 then Duel.SendtoDeck(g,nil,2,REASON_EFFECT) end
end
\ No newline at end of file
--幻量子时间波船
Duel.LoadScript("c18007001.lua")
local m=18007007
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
local e1,e2=rspq.FusionSummonFun(c,m,true,false)
local e3=rspq.LeaveFieldFun(c,m,true,true)
local e4=rsef.SV_CHANGE(c,"code",18007005)
e4:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
end
cm.rssetcode="PhantomQuantum"
--幻量子掌控者
Duel.LoadScript("c18007001.lua")
local m=18007008
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2=rspq.FusionSummonFun(c,m,true,true,4)
local e3=rspq.LeaveFieldFun(c,m)
local e4=rsef.I(c,{m,0},1,"td,se,th","tg",LOCATION_MZONE,nil,nil,rstg.target({cm.tdfilter,"td",LOCATION_MZONE },rsop.list(cm.thfilter,"th",LOCATION_DECK)),cm.tdop)
end
cm.rssetcode="PhantomQuantum"
function cm.tdfilter(c)
return c:IsAbleToDeck() and c:CheckSetCard("PhantomQuantum")
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:CheckSetCard("PhantomQuantum")
end
function cm.tdop(e,tp)
local tc=rscf.GetTargetCard()
if not tc or Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)<=0 or not tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then return end
rsof.SelectHint(tp,"th")
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
\ No newline at end of file
--真幻量子守护者
Duel.LoadScript("c18007001.lua")
local m=18007009
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2=rspq.FusionSummonFun(c,m,false,true,8,2)
local e3=rspq.LeaveFieldFun(c,m)
local e4=rsef.I(c,{m,0},1,"td","tg",LOCATION_MZONE,nil,nil,rstg.target({cm.tdfilter,"td",LOCATION_MZONE },rsop.list(Card.IsAbleToDeck,"td",0,LOCATION_HAND),rsop.list(Card.IsAbleToDeck,"td",0,LOCATION_ONFIELD),rsop.list(Card.IsAbleToDeck,"td",0,LOCATION_GRAVE)),cm.tdop)
end
cm.rssetcode="PhantomQuantum"
function cm.tdfilter(c)
return c:IsAbleToDeck() and c:CheckSetCard("PhantomQuantum")
end
function cm.tdop(e,tp)
local tc=rscf.GetTargetCard()
if not tc or Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)<=0 or not tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then return end
local loclist={LOCATION_HAND,LOCATION_ONFIELD,LOCATION_GRAVE }
for _,loc in pairs(loclist) do
if Duel.GetMatchingGroupCount(Card.IsAbleToDeck,tp,0,loc,nil)<=0 then return end
end
local tg=Group.CreateGroup()
for _,loc in pairs(loclist) do
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,loc,nil)
rsof.SelectHint(tp,"td")
local tg2=g:Select(tp,1,1,nil)
if loc~=LOCATION_HAND then
Duel.HintSelection(tg2)
end
tg:Merge(tg2)
end
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
\ No newline at end of file
--幻量子跃迁灵
Duel.LoadScript("c18007001.lua")
local m=18007010
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2,cm.gf)
local e1=rsef.I(c,{m,0},1,"td,sp","tg",LOCATION_MZONE,nil,nil,rstg.target({cm.tdfilter,"td",LOCATION_MZONE+LOCATION_GRAVE,0,2},rsop.list(cm.spfilter,"sp",LOCATION_DECK)),cm.tdop)
local e2=rsef.FTO(c,EVENT_SPSUMMON_SUCCESS,{m,1},nil,nil,"de",LOCATION_MZONE,cm.imcon,nil,nil,cm.imop)
end
cm.rssetcode="PhantomQuantum"
function cm.gf(g)
return g:GetClassCount(Card.GetRace)==#g
end
function cm.tdfilter(c,e,tp)
return c:CheckSetCard("PhantomQuantum") and c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.spfilter(c,e,tp)
return c:CheckSetCard("PhantomQuantum") and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tdop(e,tp)
local g=rsgf.GetTargetGroup()
if #g<=0 or Duel.SendtoDeck(g,nil,2,REASON_EFFECT)<=0 or not g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
rsof.SelectHint(tp,"sp")
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #sg>0 then
rssf.SpecialSummon(sg)
end
end
function cm.cfilter(c,ec)
if ec:GetSummonLocation()~=LOCATION_DECK then return false end
if c:IsLocation(LOCATION_MZONE) then
return ec:GetLinkedGroup():IsContains(c)
else
return bit.extract(ec:GetLinkedZone(c:GetPreviousControler()),c:GetPreviousSequence())~=0
end
end
function cm.imcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,e:GetHandler())
end
function cm.imop(e,tp)
local e1=rsef.FV_INDESTRUCTABLE({e:GetHandler(),tp},"effect",aux.indoval,aux.TargetBoolFunction(rscf.CheckSetCard,"PhantomQuantum"),{LOCATION_ONFIELD,0},nil,rsreset.pend)
local e2=rsef.FV_CANNOT_BE_TARGET({e:GetHandler(),tp},"effect",aux.tgoval,aux.TargetBoolFunction(rscf.CheckSetCard,"PhantomQuantum"),{LOCATION_ONFIELD,0},nil,rsreset.pend)
end
--幻量子波动
Duel.LoadScript("c18007001.lua")
local m=18007011
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,{m,0},nil,"td","tg",nil,nil,rstg.target({cm.tdfilter,"td",LOCATION_MZONE },{Card.IsAbleToDeck,"td",0,LOCATION_ONFIELD,2}),cm.tdop)
end
cm.rssetcode="PhantomQuantum"
function cm.tdfilter(c)
return c:IsAbleToDeck() and c:CheckSetCard("PhantomQuantum")
end
function cm.tdop(e,tp)
local g=rsgf.GetTargetGroup()
if #g>0 then Duel.SendtoDeck(g,nil,2,REASON_EFFECT) end
end
\ No newline at end of file
--幻量子风暴
Duel.LoadScript("c18007001.lua")
local m=18007012
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,{m,0},nil,"td",nil,nil,nil,rstg.target(rsop.list(cm.tdfilter,"td",LOCATION_HAND+LOCATION_MZONE)),cm.tdop)
local e2=rsef.FV_REDIRECT(c,"tg",LOCATION_DECK,cm.tg,{LOCATION_MZONE,LOCATION_MZONE })
local e3=rsef.QO(c,nil,{m,1},1,"sp","tg",LOCATION_FZONE,nil,nil,rstg.target({cm.tgfilter,nil,LOCATION_MZONE },rsop.list(cm.spfilter,"sp",LOCATION_DECK)),cm.spop)
end
cm.rssetcode="PhantomQuantum"
function cm.tgfilter(c,e,tp)
return c:GetSummonLocation()==LOCATION_DECK and c:GetTurnID()==Duel.GetTurnCount() and c:IsLevelAbove(2)
end
function cm.spfilter(c,e,tp,eg,ep,ev,re,r,rp,usingg)
return c:CheckSetCard("PhantomQuantum") and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetLevel()<usingg:GetFirst():GetLevel()
end
function cm.spop(e,tp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=rscf.GetTargetCard(Card.IsFaceup)
if not tc then return end
rsof.SelectHint(tp,"sp")
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp,Group.FromCards(tc))
if #sg>0 then
rssf.SpecialSummon(sg)
end
end
function cm.tg(e,c)
return c:GetOriginalType()&TYPE_MONSTER ~=0
end
function cm.tdfilter(c)
return c:CheckSetCard("PhantomQuantum") and c:IsAbleToDeck() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsType(TYPE_MONSTER)
end
function cm.tdop(e,tp)
if not e:GetHandler():IsRelateToEffect(e) then return end
rsof.SelectHint(tp,"td")
local tg=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if #tg<=0 then return end
if tg:GetFirst():IsLocation(LOCATION_MZONE) then
Duel.HintSelection(tg)
else
Duel.ConfirmCards(1-tp,tg)
end
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
\ No newline at end of file
--幻量子解放
Duel.LoadScript("c18007001.lua")
local m=18007013
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
cm.rssetcode="PhantomQuantum"
function cm.cfilter(c)
return c:IsFaceup() and c:CheckSetCard("PhantomQuantum")
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
end
function cm.tdfilter(c)
return c:IsFaceup() and c:CheckSetCard("PhantomQuantum") and c:IsAbleToDeck()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then
ec:CancelToGrave()
if Duel.SendtoDeck(ec,nil,2,REASON_EFFECT)~=0 and ec:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
end
end
--幻量子涟漪
Duel.LoadScript("c18007001.lua")
local m=18007014
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,{m,0},nil,"td",nil,nil,nil,rstg.target(rsop.list(cm.tdfilter,"td",LOCATION_MZONE)),cm.tdop)
local e2=rsef.FC(c,EVENT_SPSUMMON_SUCCESS,nil,nil,"de",LOCATION_SZONE,cm.tdcon1,cm.tdop1)
local e3=rsef.FC(c,EVENT_SPSUMMON_SUCCESS,nil,nil,nil,LOCATION_SZONE,cm.tdcon2,cm.tdop2)
local e4=rsef.FC(c,EVENT_CHAIN_SOLVED,nil,nil,nil,LOCATION_SZONE,cm.tdcon3,cm.tdop3)
local e5=rsef.RegisterClone(c,e2,"code",EVENT_SUMMON_SUCCESS)
local e6=rsef.RegisterClone(c,e3,"code",EVENT_SUMMON_SUCCESS)
end
cm.rssetcode="PhantomQuantum"
function cm.tdfilter(c)
return c:CheckSetCard("PhantomQuantum") and c:IsAbleToDeck()
end
function cm.tdop(e,tp)
if not e:GetHandler():IsRelateToEffect(e) then return end
rsof.SelectHint(tp,"td")
local tg=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_MZONE,0,1,1,nil)
if #tg>0 then
Duel.HintSelection(tg)
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
end
function cm.tdcon1(e,tp,eg,ep,ev,re,r,rp)
local sp=eg:GetFirst():GetSummonPlayer()
return (not re or not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS)) and not Duel.IsPlayerAffectedByEffect(sp,EFFECT_IRON_WALL) and Duel.GetFieldGroupCount(sp,LOCATION_HAND+LOCATION_MZONE,0)>0
end
function cm.tdfilter2(c,tp)
return c:IsType(TYPE_MONSTER) and Duel.IsPlayerCanSendtoDeck(tp,c)
end
function cm.tdop1(e,tp,eg,ep,ev,re,r,rp,p,n)
local sp=p or eg:GetFirst():GetSummonPlayer()
Duel.Hint(HINT_CARD,0,m)
local g=Duel.GetFieldGroup(sp,LOCATION_HAND+LOCATION_MZONE,0)
local ct=g:FilterCount(cm.tdfilter2,nil,sp)
if not n then n=1 end
local sct=math.min(ct,n)
rsof.SelectHint(sp,"td")
local sg=g:FilterSelect(sp,cm.tdfilter2,sct,sct,nil,sp)
if #sg>0 then
if sg:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-sp,sg)
else
Duel.HintSelection(sg)
end
Duel.SendtoDeck(sg,nil,2,REASON_RULE)
end
end
function cm.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function cm.tdop2(e,tp,eg,ep,ev,re,r,rp)
local sp=eg:GetFirst():GetSummonPlayer()
Duel.RegisterFlagEffect(sp,m,RESET_CHAIN,0,1)
end
function cm.tdcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>0 or Duel.GetFlagEffect(1-tp,m)>0
end
function cm.tdop3(e,tp,eg,ep,ev,re,r,rp)
local list={tp,1-tp}
for i=1,2 do
local p=list[i]
local n=Duel.GetFlagEffect(p,m)
Duel.ResetFlagEffect(p,m)
if n>0 then
cm.tdop1(e,tp,eg,ep,ev,re,r,rp,p,n)
end
end
end
--幻量子驱动
Duel.LoadScript("c18007001.lua")
local m=18007015
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,{m,0},nil,"td,sp","tg",nil,nil,rstg.target({cm.tdfilter1,"td",LOCATION_MZONE },{cm.tdfilter2,"td",LOCATION_MZONE },rsop.list(cm.spfilter,"sp",LOCATION_EXTRA)),cm.tdop)
end
cm.rssetcode="PhantomQuantum"
function cm.tdfilter1(c,e,tp)
return c:CheckSetCard("PhantomQuantum") and c:IsFaceup()
end
function cm.tdfilter2(c,e,tp,eg,ep,ev,re,r,rp,usingg)
local g=rsgf.Mix2(usingg,c)
return cm.tdfilter1(c,e,tp) and Duel.GetLocationCountFromEx(tp,tp,g)>0
end
function cm.spfilter(c,e,tp)
return c:CheckSetCard("PhantomQuantum") and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function cm.tdop(e,tp)
local g=rsgf.GetTargetGroup()
if #g<=0 or Duel.SendtoDeck(g,nil,2,REASON_EFFECT)<=0 or not g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) or Duel.GetLocationCountFromEx(tp)<=0 then return end
rsof.SelectHint(tp,"sp")
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--幻量子转变
Duel.LoadScript("c18007001.lua")
local m=18007016
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,{m,0},nil,"dr","ptg",nil,rscost.cost(cm.cfilter,"td",LOCATION_MZONE+LOCATION_HAND),cm.drtg,cm.drop)
local e2=rsef.QO(c,nil,{m,1},nil,"sp",nil,LOCATION_GRAVE,cm.spcon,aux.bfgcost,rstg.target(rsop.list(cm.spfilter,"sp",LOCATION_DECK)),cm.spop)
end
cm.rssetcode="PhantomQuantum"
function cm.spcon(e,tp)
return Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function cm.spfilter(c,e,tp)
return c:CheckSetCard("PhantomQuantum") and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.spop(e,tp)
rsof.SelectHint(tp,"sp")
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #sg>0 then
rssf.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE,nil,rssf.SummonBuff(nil,nil,nil,nil,"td"))
end
end
function cm.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--新干线700铁路之星
Duel.LoadScript("c10199990.lua")
local m=18008001
local cm=_G["c"..m]
if not rsv.Shinkansen then
rsv.Shinkansen={}
rssk=rsv.Shinkansen
function rssk.set(c)
return c:CheckSetCard("Shinkansen")
end
function rssk.lset(c)
return c:CheckLinkSetCard("Shinkansen")
end
function rssk.nmcon(e,tp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function rssk.SpecialSummonFun(c)
local e1=rsef.I(c,{m,0},nil,"sp",nil,LOCATION_HAND,rssk.nmcon,nil,rssk.sptg,rssk.spop)
return e1
end
function rssk.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 rssk.limit(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(rssk.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function rssk.spop(e,tp)
local c=e:GetHandler()
rssk.limit(c)
if c:IsRelateToEffect(e) then rssf.SpecialSummon(c) end
end
function rssk.splimit(e,c)
return not rssk.set(c)
end
function rssk.LinkFun(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),2)
local e1=rssk.LimitSpFun(c)
return e1
end
function rssk.LimitSpFun(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_MUST_USE_MZONE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(0xff)
e1:SetTargetRange(0xff,0xff)
e1:SetTarget(function(e,rc) return rc.rssetcode=="Shinkansen" and rc:IsType(TYPE_LINK) end)
e1:SetValue(rssk.frcval)
--c:RegisterEffect(e1)
return e1
end
function rssk.lkfilter(c)
return c:IsType(TYPE_LINK) and c:IsFaceup() and rssk.set(c)
end
function rssk.frcval(e,c,fp,rp,r)
local zone=0
local g=Duel.GetMatchingGroup(rssk.lkfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
zone=zone|tc:GetLinkedZone()
end
if r==0x1 then
return 0x7f
else
return zone
end
end
function rssk.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local fid=c:GetFieldID()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetValue(Duel.GetTurnCount())
c:RegisterFlagEffect(m,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2,fid)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
e1:SetValue(0)
c:RegisterFlagEffect(m,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1,fid)
end
e1:SetLabel(fid)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetCondition(rssk.retcon)
e1:SetOperation(rssk.retop)
Duel.RegisterEffect(e1,tp)
end
end
function rssk.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():GetFlagEffectLabel(m)==e:GetLabel()
end
function rssk.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function rssk.cfilter(c,tp,zone)
local seq=c:GetPreviousSequence()
if c:GetPreviousControler()~=tp then seq=seq+16 end
return c:IsFaceup()
and c:IsPreviousLocation(LOCATION_MZONE) and bit.extract(zone,seq)~=0
end
function rssk.lfcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(rssk.cfilter,1,nil,tp,e:GetHandler():GetLinkedZone())
end
function rssk.link()
local tg=function(e,c)
return c:IsLinkState() and rssk.set(c)
end
local tgrange={LOCATION_MZONE,0}
local con=function(e,tp)
return e:GetHandler():IsLinkState()
end
return {tg,tgrange,con}
end
---------
end
---------
if cm then
function cm.initial_effect(c)
local e1=rsef.QO(c,nil,{m,0},nil,"sp",nil,LOCATION_HAND,rssk.nmcon,rscost.regflag(m),rssk.sptg,cm.spop)
local e2=rsef.SV_IMMUNE_EFFECT(c,rsval.imoe,cm.con)
end
cm.rssetcode="Shinkansen"
function cm.con(e,tp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
end
function cm.spop(e,tp)
local c=e:GetHandler()
rssk.limit(c)
if c:IsRelateToEffect(e) and rssf.SpecialSummon(c)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ONLY_ATTACK_MONSTER)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(cm.atklimit)
e1:SetLabel(c:GetRealFieldID())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.atklimit(e,c)
return c:GetRealFieldID()==e:GetLabel()
end
---------
end
--新干线700希望
Duel.LoadScript("c18008001.lua")
local m=18008002
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rssk.SpecialSummonFun(c)
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},"sp","tg",nil,nil,rstg.target(cm.spfilter,"sp",LOCATION_REMOVED),cm.spop)
end
cm.rssetcode="Shinkansen"
function cm.spfilter(c,e,tp)
return c:IsFaceup() and rssk.set(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.spop(e,tp)
local tc=rscf.GetTargetCard()
if tc then rssf.SpecialSummon(tc) end
end
\ No newline at end of file
--新干线N700瑞穗
Duel.LoadScript("c18008001.lua")
local m=18008003
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rssk.SpecialSummonFun(c)
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},"sp","tg",nil,nil,rstg.target(cm.spfilter,"sp",LOCATION_GRAVE),cm.spop)
end
cm.rssetcode="Shinkansen"
function cm.spfilter(c,e,tp)
return rssk.set(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.spop(e,tp)
local tc=rscf.GetTargetCard()
if tc then rssf.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,nil,rssf.SummonBuff(nil,nil,nil,LOCATION_REMOVED)) end
end
\ No newline at end of file
--新干线的车长
Duel.LoadScript("c18008001.lua")
local m=18008004
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rssk.SpecialSummonFun(c)
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},"sp",nil,nil,nil,rstg.target(rsop.list(cm.spfilter,"sp",LOCATION_DECK)),cm.spop)
end
cm.rssetcode="Shinkansen"
function cm.spfilter(c,e,tp)
return rssk.set(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and not c:IsCode(m)
end
function cm.spop(e,tp)
rsof.SelectHint(tp,"sp")
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #sg>0 then
rssf.SpecialSummon(sg)
end
end
\ No newline at end of file
--新干线先锋 E3翼
Duel.LoadScript("c18008001.lua")
local m=18008005
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rssk.LinkFun(c)
local e2=rsef.QO(c,nil,{m,0},{1,m},nil,nil,LOCATION_MZONE,nil,rssk.rmcost,rstg.target(rsop.list(cm.setfilter,nil,LOCATION_DECK)),cm.setop)
local e3=rsef.FTO(c,EVENT_LEAVE_FIELD,{m,1},{1,m+100},"rm","de,tg,dsp",LOCATION_MZONE,rssk.lfcon,nil,rstg.target(cm.rmfilter,"rm",0,LOCATION_ONFIELD),cm.rmop)
local e4=rsef.FV_INDESTRUCTABLE(c,"effect",aux.indoval,table.unpack(rssk.link()))
end
cm.rssetcode="Shinkansen"
function cm.rmfilter(c)
return c:IsAbleToRemove() and c:IsType(TYPE_TRAP+TYPE_SPELL)
end
function cm.rmop(e,tp)
local tc=rscf.GetTargetCard()
if tc then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end
end
function cm.setfilter(c,e,tp)
return rssk.set(c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function cm.setop(e,tp)
rsof.SelectHint(tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
--新干线先锋 E5隼
Duel.LoadScript("c18008001.lua")
local m=18008006
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rssk.LinkFun(c)
local e2=rsef.QO(c,nil,{m,0},{1,m},"se,th",nil,LOCATION_MZONE,nil,rssk.rmcost,rstg.target(rsop.list(cm.thfilter,"th",LOCATION_DECK)),cm.thop)
local e3=rsef.FTO(c,EVENT_LEAVE_FIELD,{m,1},{1,m+100},"th","de,dsp",LOCATION_MZONE,rssk.lfcon,nil,rstg.target(rsop.list(Card.IsAbleToHand,"th",0,LOCATION_ONFIELD)),cm.thop3)
local e4=rsef.FV_CANNOT_BE_TARGET(c,"effect",aux.tgoval,table.unpack(rssk.link()))
end
cm.rssetcode="Shinkansen"
function cm.thfilter(c)
return c:IsAbleToHand() and rssk.set(c)
end
function cm.thop(e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCountLimit(1)
e1:SetCondition(cm.thcon2)
e1:SetOperation(cm.thop2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
rsof.SelectHint(tp,"th")
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function cm.thop3(e,tp,eg,ep,ev,re,r,rp)
rsof.SelectHint(tp,"th")
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
if #tg>0 then
Duel.HintSelection(tg)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--新干线先锋 E6小町
Duel.LoadScript("c18008001.lua")
local m=18008007
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rssk.LinkFun(c)
local e2=rsef.QO(c,nil,{m,0},{1,m},"se,th",nil,LOCATION_MZONE,nil,rssk.rmcost,rstg.target(rsop.list(cm.thfilter,"th",LOCATION_DECK)),cm.thop)
local e3=rsef.FTO(c,EVENT_LEAVE_FIELD,{m,1},{1,m+100},"des","de,tg,dsp",LOCATION_MZONE,rssk.lfcon,nil,rstg.target(aux.TRUE,"rm",0,LOCATION_MZONE),cm.desop)
local e4=rsef.FV_UPDATE(c,"atk",500,table.unpack(rssk.link()))
end
cm.rssetcode="Shinkansen"
function cm.desop(e,tp)
local tc=rscf.GetTargetCard()
if tc then Duel.Destroy(tc,REASON_EFFECT) end
end
function cm.thfilter(c,e,tp)
return rssk.set(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsof.SelectHint(tp,"th")
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
\ No newline at end of file
--新干线先锋 E7光辉
Duel.LoadScript("c18008001.lua")
local m=18008008
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rssk.LinkFun(c)
local e2=rsef.QO(c,nil,{m,0},{1,m},"th",nil,LOCATION_MZONE,nil,rssk.rmcost,rstg.target(rsop.list(cm.thfilter,"th",LOCATION_GRAVE)),cm.thop)
local e3=rsef.FTO(c,EVENT_LEAVE_FIELD,{m,1},{1,m+100},"dis","de,tg,dsp",LOCATION_MZONE,rssk.lfcon,nil,rstg.target(aux.disfilter1,"dis",0,LOCATION_ONFIELD),cm.disop)
local e4=rsef.FV_IMMUNE_EFFECT(c,cm.val,table.unpack(rssk.link()))
end
cm.rssetcode="Shinkansen"
function cm.val(e,re)
return re:IsActivated() and re:IsActiveType(TYPE_MONSTER) and re:GetHandlerPlayer()~=e:GetHandlerPlayer()
end
function cm.disop(e,tp)
local c=e:GetHandler()
local tc=rscf.GetTargetCard()
if not tc then return end
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1,e2=rsef.SV_LIMIT({c,tc},"dis,dise",nil,nil,rsreset.est_pend)
end
function cm.thfilter(c,e,tp)
return rssk.set(c) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsof.SelectHint(tp,"th")
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if #tg>0 then
Duel.HintSelection(tg)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--超进合体!新干线!
Duel.LoadScript("c18008001.lua")
local m=18008009
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,nil,"sp",nil,nil,rscost.reglabel(100),cm.tg,cm.act)
end
cm.rssetcode="Shinkansen"
function cm.rmfilter(c)
return c:IsAbleToRemoveAsCost() and rssk.set(c)
end
function cm.spcheck(g,e,tp)
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g)
end
function cm.spfilter(c,e,tp,g)
return rssk.set(c) and c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) and ((not g and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) or (g and Duel.GetLocationCountFromEx(tp,tp,g,c)>0))
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then
if e:GetLabel()==100 then
return g:CheckSubGroup(cm.spcheck,2,2,e,tp)
else
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
end
end
if e:GetLabel()==100 then
e:SetLabel(0)
rsof.SelectHint(tp,"rm")
local rg=g:SelectSubGroup(tp,cm.spcheck,false,2,2,e,tp)
if Duel.Remove(rg,POS_FACEUP,REASON_COST+REASON_TEMPORARY)>0 then
local og=Duel.GetOperatedGroup()
local fid=c:GetFieldID()
for tc in aux.Next(og) do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,1,fid)
end
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetLabelObject(og)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.act(e,tp)
rsof.SelectHint(tp,"sp")
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #sg>0 then rssf.SpecialSummon(sg,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP,nil,rssf.SummonBuff(nil,nil,nil,nil,"rm")) end
end
function cm.retfilter(c,fid)
return c:GetFlagEffectLabel(m)==fid
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():IsExists(cm.retfilter,1,nil,e:GetLabel()) and Duel.GetTurnPlayer()~=tp
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject():Filter(cm.retfilter,nil,e:GetLabel())
for tc in aux.Next(g) do
Duel.ReturnToField(tc)
end
end
\ No newline at end of file
--新干线超进化研究所
Duel.LoadScript("c18008001.lua")
local m=18008010
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.QO(c,nil,{m,0},1,nil,"tg",LOCATION_FZONE,nil,nil,rstg.target(cm.mvfilter,nil,LOCATION_MZONE),cm.mvop)
local e3=rsef.I(c,{m,1},1,"sp,rm","tg",LOCATION_FZONE,nil,nil,rstg.target2(cm.fun,cm.cfilter,nil,LOCATION_MZONE),cm.spop)
end
cm.rssetcode="Shinkansen"
function cm.cfilter(c,e,tp)
if not rssk.set(c) or not c:IsType(TYPE_LINK) then return end
local zone=c:GetLinkedZone(tp)
return zone>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,zone)
end
function cm.spfilter(c,e,tp,zone)
return rssk.set(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp)
local c,tc=aux.ExceptThisCard(e),rscf.GetTargetCard()
if not c or not tc then return end
local zone=tc:GetLinkedZone(tp)
if zone<=0 then return end
rsof.SelectHint(tp,"sp")
local sc=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,zone):GetFirst()
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP,zone)>0 then
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
if #g1<=0 or #g2<=0 then return end
if not Duel.SelectYesNo(tp,aux.Stringid(m,2)) then return end
Duel.BreakEffect()
rsof.SelectHint(tp,"rm")
local rg1=g1:Select(tp,1,1,nil)
rsof.SelectHint(tp,"rm")
local rg2=g2:Select(tp,1,1,nil)
rg1:Merge(rg2)
Duel.HintSelection(rg1)
if Duel.Remove(rg1,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)<=0 then return end
local og=Duel.GetOperatedGroup()
local fid=c:GetFieldID()
for tc in aux.Next(og) do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
end
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(og)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retfilter(c,fid)
return c:GetFlagEffectLabel(m)==fid
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():IsExists(cm.retfilter,1,nil,e:GetLabel())
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject():Filter(cm.retfilter,nil,e:GetLabel())
for tc in aux.Next(g) do
Duel.ReturnToField(tc)
end
end
function cm.mvfilter(c)
local seq=c:GetSequence()
return rssk.set(c) and seq<5 and (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1))
end
function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) then return end
local seq=tc:GetSequence()
if seq>4 then return end
if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then
local flag=0
if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=bit.replace(flag,0x1,seq-1) end
if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=bit.replace(flag,0x1,seq+1) end
flag=bit.bxor(flag,0xff)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
end
end
\ No newline at end of file
--新干线的超进化
Duel.LoadScript("c18008001.lua")
local m=18008011
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c,EVENT_CHAINING,nil,nil,"neg,sp","dsp,dcal",cm.con,nil,cm.tg,cm.act)
end
cm.rssetcode="Shinkansen"
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_REMOVED,0,nil)
return rssk.nmcon(e,tp) and g:GetClassCount(Card.GetCode)>=3 and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.cfilter(c)
return rssk.set(c) and c:IsFaceup()
end
function cm.tg(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)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceup() and rssk.set(c)
end
function cm.act(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) then
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_REMOVED,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
rsof.SelectHint(tp,"sp")
local sg=g:Select(tp,1,1,nil)
rssf.SpecialSummon(sg)
end
end
end
\ No newline at end of file
--新干线回转调车
Duel.LoadScript("c18008001.lua")
local m=18008012
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.QO(c,nil,{m,0},1,"dr,td",nil,LOCATION_SZONE,nil,rscost.cost(cm.rmfilter,{"rm",cm.fun},LOCATION_MZONE),rstg.target0(cm.cfun,cm.tfun,rsop.list(cm.tdfilter,"td",LOCATION_GRAVE+LOCATION_REMOVED)),cm.drop)
local e3=rsef.SV_IMMUNE_EFFECT(c,nil,rssk.nmcon)
end
cm.rssetcode="Shinkansen"
function cm.cfun(e,tp)
return Duel.IsPlayerCanDraw(tp,1)
end
function cm.tfun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.tdfilter(c)
return c:IsAbleToDeck() and c:IsFaceup() and c:IsType(TYPE_MONSTER) and rssk.set(c)
end
function cm.drop(e,tp)
local c=aux.ExceptThisCard(e)
if not c then return end
if Duel.Draw(tp,1,REASON_EFFECT)<=0 then return end
rsof.SelectHint(tp,"td")
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.BreakEffect()
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
end
end
function cm.rmfilter(c)
return rssk.set(c) and c:IsAbleToRemoveAsCost()
end
function cm.fun(g,e,tp)
local tc=g:GetFirst()
local c=e:GetHandler()
if Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local ct=1
if Duel.GetTurnPlayer()==tp then ct=2 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,ct)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retcon(e,tp)
return Duel.GetTurnCount()~=e:GetLabel()
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
\ No newline at end of file
--谐律 轻盈电音
Duel.LoadScript("c10199990.lua")
local m=18010001
local cm=_G["c"..m]
if not rsv.HarmonicRhythm then
rsv.HarmonicRhythm={}
rshr=rsv.HarmonicRhythm
function rshr.Set(c)
if not c:IsStatus(STATUS_COPYING_EFFECT) then
local mt=getmetatable(c)
mt.rssetcode="HarmonicRhythm"
end
end
function rshr.IsSet(c)
return c:CheckSetCard("HarmonicRhythm")
end
function rshr.DiscardFun(c,code,cate,tg,op)
local e1=rsef.I(c,{m,0},{1,code},cate,nil,LOCATION_HAND,nil,rscost.cost({Card.IsDiscardable,nil},{rshr.cfilter,{"dish",rshr.disfun},LOCATION_HAND,0,1,1,c}),tg,op)
return e1
end
function rshr.disfun(g,e,tp)
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function rshr.cfilter(c)
return c:IsDiscardable() and c:IsType(TYPE_TUNER)
end
function rshr.GraveFun(c,code,cate,extraop)
local e1=rsef.FTO(c,EVENT_TO_GRAVE,{m,1},{1,code},{cate,"sp"},"de",LOCATION_GRAVE,rshr.spcon,nil,rsop.target(rshr.spfilter,"sp"),rshr.spop(extraop))
return e1
end
function rshr.spcon(e,tp,eg)
local c=e:GetHandler()
return not eg:IsContains(c) and eg:IsExists(Card.IsType,1,nil,TYPE_TUNER)
end
function rshr.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function rshr.spop(extraop)
return function(e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(rshr.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local c=rscf.GetRelationThisCard(e)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c or rssf.SpecialSummon(c)<=0 then return end
if extraop then
extraop(e,tp)
end
end
end
function rshr.splimit(e,c)
return not c:IsType(TYPE_TUNER)
end
---------------
end
---------------
if cm then
function cm.initial_effect(c)
rshr.Set(c)
rshr.DiscardFun(c,m,"th",rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
rshr.GraveFun(c,m,nil,cm.op)
end
function cm.thfilter(c)
return c:IsAbleToHand() and rshr.IsSet(c)
end
function cm.thop(e,tp)
rsof.SelectHint(tp,"th")
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.op(e,tp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,0,nil,TYPE_TUNER)
if #g>0 and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,g) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
rsof.SelectHint(tp,"sp")
local sc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil,g):GetFirst()
Duel.SynchroSummon(tp,sc,nil,g)
end
end
---------------
end
--谐律 热烈打击
Duel.LoadScript("c18010001.lua")
local m=18010002
local cm=_G["c"..m]
function cm.initial_effect(c)
rshr.Set(c)
rshr.DiscardFun(c,m,"sp",rsop.target(cm.spfilter,"sp",LOCATION_DECK),cm.spop)
rshr.GraveFun(c,m,"th",cm.op)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and rshr.IsSet(c)
end
function cm.spop(e,tp)
rsof.SelectHint(tp,"sp")
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
rssf.SpecialSummon(g)
end
end
function cm.thfilter(c)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local att=0
for tc in aux.Next(g) do
local att2=tc:GetAttribute()
if att2 then
att=att|att2
end
end
return c:IsType(TYPE_TUNER) and c:IsAbleToHand() and c:IsAttribute(att)
end
function cm.op(e,tp)
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
rsof.SelectHint(tp,"th")
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
\ No newline at end of file
--谐律 柔情弦乐
Duel.LoadScript("c18010001.lua")
local m=18010003
local cm=_G["c"..m]
function cm.initial_effect(c)
rshr.Set(c)
rshr.DiscardFun(c,m,"th",rsop.target(cm.thfilter,"th",LOCATION_GRAVE),cm.thop)
rshr.GraveFun(c,m,"th",cm.op)
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsType(TYPE_TUNER)
end
function cm.thop(e,tp)
rsof.SelectHint(tp,"th")
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
function cm.op(e,tp)
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
rsof.SelectHint(tp,"th")
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
end
\ No newline at end of file
--谐律 稳重吹管
Duel.LoadScript("c18010001.lua")
local m=18010004
local cm=_G["c"..m]
function cm.initial_effect(c)
rshr.Set(c)
rshr.DiscardFun(c,m,"sp",rsop.target(cm.spfilter,"sp",LOCATION_GRAVE),cm.spop)
rshr.GraveFun(c,m,nil,cm.op)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and rshr.IsSet(c)
end
function cm.spop(e,tp)
rsof.SelectHint(tp,"sp")
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
rssf.SpecialSummon(g)
end
end
function cm.op(e,tp)
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
rsof.SelectHint(tp,"sp")
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
if #g>0 then
rssf.SpecialSummon(g)
end
end
end
\ No newline at end of file
--谐律调 崇高奏鸣
Duel.LoadScript("c18010001.lua")
local m=18010005
local cm=_G["c"..m]
function cm.initial_effect(c)
rshr.Set(c)
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),nil,nil,aux.Tuner(nil),1,99,cm.checkfun)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},nil,"td","de,dsp",rscon.sumtype("syn"),nil,cm.tg,cm.op)
local e2=rsef.FTO(c,EVENT_TO_GRAVE,{m,1},1,"td","de",LOCATION_MZONE,cm.tdcon,nil,rsop.target(Card.IsAbleToDeck,"td",LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE),cm.tdop)
--local e3=rsef.STO(c,EVENT_LEAVE_FIELD,{m,3},nil,"th","de,dsp",rscon.sumtype("syn"),nil,cm.tg2,cm.op2)
--splimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_SPSUMMON_CONDITION)
e4:SetValue(cm.splimit)
c:RegisterEffect(e4)
--summon success
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCondition(cm.sumcon)
e5:SetOperation(cm.sumsuc)
c:RegisterEffect(e5)
--double tuner
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e9:SetCode(21142671)
c:RegisterEffect(e9)
end
function cm.sumcon(e,tp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and Duel.GetTurnPlayer()~=tp
end
function cm.sumsuc(e,tp)
local c=e:GetHandler()
local e1=rsef.SV_IMMUNE_EFFECT(c,rsval.imoe,nil,rsreset.est)
end
function cm.splimit(e,se,sp,st)
if st&SUMMON_TYPE_SYNCHRO ~=0 then return not se or not se:IsHasType(EFFECT_TYPE_ACTIONS)
else
return true
end
end
function cm.checkfun(mg)
return mg:IsExists(Card.IsLevel,2,nil,3) and mg:GetClassCount(Card.GetAttribute)==#mg
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=3 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
end
function cm.op(e,tp)
local plist={tp,1-tp}
local tct=0
for i=1,2 do
local p=plist[i]
Duel.ConfirmDecktop(p,3)
local g=Duel.GetDecktopGroup(p,3)
local ct=g:FilterCount(Card.IsType,nil,TYPE_TUNER)
tct=tct+ct
Duel.ShuffleDeck(p)
end
if tct==0 then return end
rsof.SelectHint(tp,"td")
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,tct,nil)
if #tg>0 then
Duel.HintSelection(tg)
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
end
function cm.tdcon(e,tp,eg)
return eg:IsExists(Card.IsType,1,nil,TYPE_TUNER)
end
function cm.tdop(e,tp)
rsof.SelectHint(tp,"td")
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if #tg>0 then
Duel.HintSelection(tg)
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsType(TYPE_TUNER)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>=4 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,4,PLAYER_ALL,LOCATION_GRAVE)
end
function cm.op2(e,tp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
if g:GetClassCount(Card.GetCode)<=3 then return end
rsof.SelectHint(tp,"th")
local tg=g:SelectSubGroup(tp,aux.dncheck,false,4,4)
if #tg>0 then
Duel.HintSelection(tg)
Duel.SendtoHand(tg,tp,REASON_EFFECT)
end
end
\ No newline at end of file
--谐律调 优美和声
Duel.LoadScript("c18010001.lua")
local m=18010006
local cm=_G["c"..m]
function cm.initial_effect(c)
rshr.Set(c)
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,aux.Tuner(Card.IsLevel,3),nil,nil,aux.Tuner(Card.IsLevel,3),1,1)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},nil,"th","de,dsp",rscon.sumtype("syn"),nil,rsop.target({cm.thfilter,"th",LOCATION_GRAVE },{cm.thfilter,"th",0,LOCATION_GRAVE }),cm.op)
local e2=rsef.FTO(c,EVENT_TO_GRAVE,{m,1},1,"se,th","de",LOCATION_MZONE,cm.tdcon,nil,rsop.target(cm.thfilter2,"th",LOCATION_DECK),cm.thop)
local e3=rsef.QO(c,nil,{m,2},1,"sp",nil,LOCATION_MZONE,cm.syncon,nil,rsop.target(cm.synfilter,"sp",LOCATION_EXTRA),cm.synop)
--double tuner
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e9:SetCode(21142671)
c:RegisterEffect(e9)
end
function cm.thfilter(c)
return c:IsType(TYPE_TUNER) and c:IsAbleToHand()
end
function cm.op(e,tp)
local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,nil)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.thfilter),tp,0,LOCATION_GRAVE,nil)
if #g1<=0 or #g2<=0 then return end
rsof.SelectHint(tp,"th")
local tg1=g1:Select(tp,1,1,nil)
rsof.SelectHint(tp,"th")
local tg2=g2:Select(tp,1,1,nil)
tg1:Merge(tg2)
Duel.HintSelection(tg1)
Duel.SendtoHand(tg1,tp,REASON_EFFECT)
end
function cm.tdcon(e,tp,eg)
return eg:IsExists(Card.IsType,1,nil,TYPE_TUNER)
end
function cm.cfilter(c,lv)
return c:IsType(TYPE_TUNER) and c:IsLevel(lv)
end
function cm.thfilter(c,e,tp,eg)
return c:IsAbleToHand() and c:IsType(TYPE_TUNER) and eg and eg:IsExists(cm.cfilter,1,nil,c:GetLevel())
end
function cm.thop(e,tp,eg)
rsof.SelectHint(tp,"th")
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,eg)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.syncon(e,tp)
return Duel.GetTurnPlayer()~=tp
end
function cm.synfilter(c,e,tp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,0,nil,TYPE_TUNER)
return #g>0 and c:IsSynchroSummonable(nil,g)
end
function cm.synop(e,tp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,0,nil,TYPE_TUNER)
rsof.SelectHint(tp,"sp")
local sc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil,g):GetFirst()
if sc then
Duel.SynchroSummon(tp,sc,nil,g)
end
end
\ No newline at end of file
--调谐律法
Duel.LoadScript("c18010001.lua")
local m=18010007
local cm=_G["c"..m]
function cm.initial_effect(c)
rshr.Set(c)
local e1=rsef.ACT(c,nil,nil,{1,m,1})
--local e2=rsef.I(c,{m,0},1,"se,th",nil,LOCATION_FZONE,nil,rscost.cost(cm.cfilter,"dish",LOCATION_HAND),cm.thtg,cm.thop)
local e2=rsef.I(c,{m,0},1,"se,th,ga",nil,LOCATION_FZONE,nil,rscost.cost(cm.cfilter,"dish",LOCATION_HAND),rsop.target(cm.thfilter,"th",LOCATION_GRAVE),cm.thop2)
local e3=rsef.FTO(c,EVENT_SPSUMMON_SUCCESS,{m,1},nil,"dr,td","de",LOCATION_FZONE,nil,nil,cm.drtg,cm.drop)
end
function cm.cfilter(c)
return c:IsDiscardable() and c:IsType(TYPE_TUNER)
end
function cm.thfilter(c)
return c:IsAbleToHand() and rshr.IsSet(c) and c:IsType(TYPE_MONSTER)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>=2 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function cm.thop(e,tp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetClassCount(Card.GetCode)<=1 then return end
rsof.SelectHint(tp,"th")
local tg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function cm.thfilter2(c,tc)
return c:IsType(TYPE_TUNER) and c:IsAbleToHand() and c:IsAttack(tc:GetAttack()) and c:IsDefense(tc:GetDefense()) and c:IsAttribute(tc:GetAttribute()) and c:IsLevel(tc:GetLevel())
end
function cm.thop2(e,tp)
rsof.SelectHint(tp,"th")
local tc=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tc)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE,0,nil,tc)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect()
rsof.SelectHint(tp,"th")
local tg=g:Select(tp,1,1,nil)
Duel.HintSelection(tg)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
end
function cm.cfilter2(c)
local mat=c:GetMaterial()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and #mat>0 and mat:IsExists(Card.IsType,1,nil,TYPE_TUNER)
end
function cm.matcheck(eg)
local dct=0
for tc in aux.Next(eg) do
local mat=tc:GetMaterial()
if tc:IsSummonType(SUMMON_TYPE_SYNCHRO) and #mat>0 then
local tct=mat:FilterCount(Card.IsType,nil,TYPE_TUNER)
dct=dct+tct
end
end
return dct
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local dct=cm.matcheck(eg)
if chk==0 then return dct>0 and Duel.IsPlayerCanDraw(tp,dct) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,2,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(dct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,dct)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 then
rsof.SelectHint(tp,"td")
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,2,2,nil)
if #g==2 and Duel.SendtoDeck(g,nil,0,REASON_EFFECT)==2 then
Duel.SortDecktop(tp,tp,2)
end
end
end
\ No newline at end of file
--暗之星
local s,id,o=GetID
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,s.mfilter,nil,3,3)
......
......@@ -23,7 +23,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(m,1)},{b2,aux.Stringid(m,2)})
if op==1 then Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,LOCATION_MZONE)
and Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) end
e:SetLabel(op)
end
......
......@@ -3,7 +3,7 @@ function c75636000.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE),2)
c:EnableReviveLimit()
-to hand
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75636000,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
......
......@@ -28,11 +28,11 @@ function s.initial_effect(c)
e2:SetCondition(s.effcon)
c:RegisterEffect(e2)
local e3=e2:Clone(c)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetValue(s.atkval)
e3:SetCondition(s.atkcon)
e3:SetTarget(aux.TargetBoolFunction(s.pfilter))
e3:SetTarget(s.atktg)
c:RegisterEffect(e3)
local e4=e2:Clone(c)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -56,30 +56,36 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.filter1(c,e,tp)
function s.filter1(c)
return c:IsCode(79250006) and c:IsFaceup()
end
function s.filter2(c,e,tp)
function s.filter2(c)
return c:IsCode(79250007) and c:IsFaceup()
end
function s.filter3(c,e,tp)
function s.filter3(c)
return c:IsCode(79250008) and c:IsFaceup()
end
function s.effcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
local c=e:GetHandler()
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_SZONE,0,1,nil)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_SZONE,0,1,nil)
end
function s.atkval(e,c)
local cont=c:GetControler()
return math.abs((Duel.GetLP(cont)-Duel.GetLP(1-cont))/2)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
function s.atktg(e,c)
return c.setcard=="Abnormality" and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_FUSION)
end
function s.becon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.filter3,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
end
function s.pfilter(c,e,tp)
return c.setcard=="Abnormality" and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_FUSION)
local c=e:GetHandler()
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.filter3,tp,LOCATION_SZONE,0,1,nil)
end
function s.damval(e,re,val,r,rp,rc)
return math.floor(val/2)
......
......@@ -26,7 +26,8 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.negcon)
e2:SetTarget(cm.negtg)
e2:SetCost(cm.negcost)
e2:SetTarget(aux.nbtg)
e2:SetOperation(cm.negop)
c:RegisterEffect(e2)
end
......
--时计塔 幻影之城
function c23301000.initial_effect(c)
aux.AddCodeList(c,23301000)
function c98001000.initial_effect(c)
aux.AddCodeList(c,98001000)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,23301000+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c23301000.target)
e1:SetOperation(c23301000.activate)
e1:SetCountLimit(1,98001000+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c98001000.target)
e1:SetOperation(c98001000.activate)
c:RegisterEffect(e1)
--XYZ spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(23301000,1))
e2:SetDescription(aux.Stringid(98001000,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_FZONE)
e2:SetCost(c23301000.cost)
e2:SetTarget(c23301000.sptg)
e2:SetOperation(c23301000.spop)
e2:SetCost(c98001000.cost)
e2:SetTarget(c98001000.sptg)
e2:SetOperation(c98001000.spop)
c:RegisterEffect(e2)
end
function c23301000.filter(c)
return aux.IsCodeListed(c,23301000) and c:IsAbleToHand()-- and c:IsType(TYPE_MONSTER)
function c98001000.filter(c)
return aux.IsCodeListed(c,98001000) and c:IsAbleToHand()-- and c:IsType(TYPE_MONSTER)
end
function c23301000.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c23301000.filter,tp,LOCATION_DECK,0,1,nil) end
function c98001000.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98001000.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c23301000.activate(e,tp,eg,ep,ev,re,r,rp)
function c98001000.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c23301000.filter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c98001000.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c23301000.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,23301000)==0 end
Duel.RegisterFlagEffect(tp,23301000,RESET_CHAIN,0,1)
function c98001000.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,98001000)==0 end
Duel.RegisterFlagEffect(tp,98001000,RESET_CHAIN,0,1)
end
function c23301000.xyzfilter(c)
function c98001000.xyzfilter(c)
return c:IsXyzSummonable(nil) and (c:IsRank(4) or c:IsCode(23301100))
end
function c23301000.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c23301000.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
function c98001000.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98001000.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c23301000.spop(e,tp,eg,ep,ev,re,r,rp)
function c98001000.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c23301000.xyzfilter,tp,LOCATION_EXTRA,0,nil)
local g=Duel.GetMatchingGroup(c98001000.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
......
--时计回转
function cid.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,98001000)
--activate
local e1=Effect.CreateEffect(c)
......@@ -7,37 +8,37 @@ function cid.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cid.target)
e1:SetOperation(cid.activate)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function cid.xyzfilter(c,tp)
function s.xyzfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function cid.matfilter(c)
function s.matfilter(c)
return aux.IsCodeListed(c,98001000)
end
function cid.setfilter(c)
function s.setfilter(c)
return c:IsType(TYPE_QUICKPLAY) and c:IsSSetable()
end
function cid.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cid.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cid.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cid.matfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,2,nil) end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cid.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function cid.activate(e,tp,eg,ep,ev,re,r,rp)
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,cid.matfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,2,2,nil)
local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,2,2,nil)
if g:GetCount()>0 then
Duel.Overlay(tc,g)
local sg=Duel.GetOverlayGroup(tp,1,1)
if sg and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect()
local sc=sg:FilterSelect(tp,cid.setfilter,1,1,nil):GetFirst()
local sc=sg:FilterSelect(tp,s.setfilter,1,1,nil):GetFirst()
Duel.SendtoHand(sc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sc)
end
......
......@@ -21,7 +21,7 @@ function cid.initial_effect(c)
e3:SetCategory(CATEGORY_HANDES+CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,1id)
e3:SetCountLimit(1,id+o)
e3:SetCost(cid.cost2)
e3:SetCondition(cid.con2)
e3:SetTarget(cid.target2)
......
......@@ -22,7 +22,7 @@ function cid.initial_effect(c)
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,1id)
e3:SetCountLimit(1,id+o)
e3:SetCost(cid.cost2)
e3:SetCondition(cid.con2)
e3:SetTarget(cid.target2)
......
......@@ -21,7 +21,7 @@ function cid.initial_effect(c)
e3:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,1id)
e3:SetCountLimit(1,id+o)
e3:SetCost(cid.cost2)
e3:SetCondition(cid.con2)
e3:SetTarget(cid.target2)
......
......@@ -22,7 +22,7 @@ function cid.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,1id)
e3:SetCountLimit(1,id+o)
e3:SetCost(cid.cost2)
e3:SetCondition(cid.con2)
e3:SetTarget(cid.target2)
......
......@@ -21,7 +21,7 @@ function cid.initial_effect(c)
e3:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,1id)
e3:SetCountLimit(1,id+o)
e3:SetCost(cid.cost2)
e3:SetCondition(cid.con2)
e3:SetTarget(cid.target2)
......
......@@ -17,7 +17,7 @@ function cid.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,1id)
e3:SetCountLimit(1,id+o)
e3:SetCost(cid.cost2)
e3:SetCondition(cid.con2)
e3:SetTarget(cid.target2)
......
......@@ -16,7 +16,7 @@ function cid.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,1id)
e3:SetCountLimit(1,id+o)
e3:SetCost(cid.cost2)
e3:SetCondition(cid.con2)
e3:SetTarget(cid.target2)
......
......@@ -17,7 +17,7 @@ function cid.initial_effect(c)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,1id)
e3:SetCountLimit(1,id+o)
e3:SetCost(cid.cost2)
e3:SetCondition(cid.con2)
e3:SetTarget(cid.target2)
......
......@@ -17,7 +17,7 @@ function cid.initial_effect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,1id)
e3:SetCountLimit(1,id+o)
e3:SetCost(cid.cost2)
e3:SetCondition(cid.con2)
e3:SetTarget(cid.lvtg)
......
......@@ -15,7 +15,7 @@ function cid.initial_effect(c)
e3:SetCategory(CATEGORY_HANDES+CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,1id)
e3:SetCountLimit(1,id+o)
e3:SetCost(cid.cost2)
e3:SetCondition(cid.con2)
e3:SetTarget(cid.target2)
......
......@@ -30,7 +30,7 @@ function cid.initial_effect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,1id)
e3:SetCountLimit(1,id+o)
e3:SetCost(cid.cost2)
e3:SetCondition(cid.con2)
e3:SetTarget(cid.target2)
......
--表与里的人偶少女
local cid,id,o=GetID()
function cid.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--summon limit
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......@@ -16,10 +16,10 @@ function cid.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_SET_AVAILABLE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cid.setcon)
e2:SetCost(cid.setcost)
e2:SetTarget(cid.settg)
e2:SetOperation(cid.setop)
e2:SetCondition(s.setcon)
e2:SetCost(s.setcost)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
......@@ -27,11 +27,11 @@ function cid.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CVAL_CHECK)
e3:SetCondition(cid.regcon)
e3:SetCost(cid.regcost)
e3:SetTarget(cid.regtg)
e3:SetOperation(cid.regop)
e3:SetValue(cid.valcheck)
e3:SetCondition(s.regcon)
e3:SetCost(s.regcost)
e3:SetTarget(s.regtg)
e3:SetOperation(s.regop)
e3:SetValue(s.valcheck)
c:RegisterEffect(e3)
--set
local e4=Effect.CreateEffect(c)
......@@ -41,18 +41,18 @@ function cid.initial_effect(c)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetTarget(cid.postg)
e4:SetOperation(cid.posop)
e4:SetTarget(s.postg)
e4:SetOperation(s.posop)
c:RegisterEffect(e4)
end
function cid.setcon(e,tp,eg,ep,ev,re,r,rp)
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFacedown() and Duel.GetTurnPlayer()~=tp
end
function cid.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE)
end
function cid.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and c:GetFlagEffect(2id)==0 end
......@@ -62,7 +62,7 @@ function cid.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
c:RegisterFlagEffect(id,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1)
end
function cid.setop(e,tp,eg,ep,ev,re,r,rp)
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local cf=tc:IsFaceup()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and cf then
......@@ -71,98 +71,98 @@ function cid.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(cid.distg)
e1:SetTarget(s.distg)
e1:SetLabel(tc:GetOriginalCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(cid.discon)
e2:SetOperation(cid.disop)
e2:SetCondition(s.discon)
e2:SetOperation(s.disop)
e2:SetLabel(tc:GetOriginalCode())
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function cid.distg(e,c)
function s.distg(e,c)
local code=e:GetLabel()
local code1,code2=c:GetOriginalCodeRule()
return code1==code or code2==code
end
function cid.discon(e,tp,eg,ep,ev,re,r,rp)
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
local code1,code2=re:GetHandler():GetOriginalCodeRule()
return code1==code or code2==code
end
function cid.disop(e,tp,eg,ep,ev,re,r,rp)
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function cid.regcon(e,tp,eg,ep,ev,re,r,rp)
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cid.costfilter(c)
function s.costfilter(c)
return c:IsCode(98010006) and c:IsAbleToRemove() and not c:IsDisabled()
end
function cid.regcost(e,tp,eg,ep,ev,re,r,rp,chk)
function s.regcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFlagEffect(tp,id)==0 then
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
c98010004[0]=Duel.GetMatchingGroupCount(Card.IsDiscardable,tp,LOCATION_HAND,0,nil)
if Duel.IsExistingMatchingCard(cid.costfilter,tp,LOCATION_GRAVE,0,1,nil) then
c98010004[0]=c98010004[0]+Duel.GetMatchingGroupCount(cid.costfilter,tp,LOCATION_GRAVE,0,nil) end
if Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) then
c98010004[0]=c98010004[0]+Duel.GetMatchingGroupCount(s.costfilter,tp,LOCATION_GRAVE,0,nil) end
c98010004[1]=0
end
return c98010004[0]-c98010004[1]>=1
end
local dc=Duel.GetMatchingGroupCount(Card.IsDiscardable,tp,LOCATION_HAND,0,nil)
if Duel.IsExistingMatchingCard(cid.costfilter,tp,LOCATION_GRAVE,0,1,nil) and dc>0
if Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) and dc>0
and Duel.SelectYesNo(tp,aux.Stringid(98010006,1)) then
local rc=Duel.GetFirstMatchingCard(cid.costfilter,tp,LOCATION_GRAVE,0,nil)
local rc=Duel.GetFirstMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)
elseif dc>0 then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
else
local rc=Duel.GetFirstMatchingCard(cid.costfilter,tp,LOCATION_GRAVE,0,nil)
local rc=Duel.GetFirstMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)
end
end
function cid.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.regtg(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
end
function cid.regop(e,tp,eg,ep,ev,re,r,rp)
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetTarget(cid.sptg)
e1:SetOperation(cid.spop)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_EVENT+0x5e60000)
e:GetHandler():RegisterEffect(e1)
end
function cid.valcheck(e)
function s.valcheck(e)
c98010004[1]=c98010004[1]+1
end
function cid.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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 cid.spop(e,tp,eg,ep,ev,re,r,rp)
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
function cid.postg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.postg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(1id)==0 end
-- c:RegisterFlagEffect(1id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0)
end
function cid.posop(e,tp,eg,ep,ev,re,r,rp)
function s.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
......
--召灵姬 水辰
local cid,id,o=GetID()
function cid3.initial_effect(c)
function cid.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
......
--神明吞噬者 寰宇之灾厄
Duel.LoadScript("c33310023.lua")
function c12200000.initial_effect(c)
c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsSetCard,0x451),LOCATION_MZONE)
function c98662200.initial_effect(c)
c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsSetCard,0x387a),LOCATION_MZONE)
--spsummon limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(c12200000.splimits)
e3:SetValue(c98662200.splimits)
c:RegisterEffect(e3)
--splimit
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e12:SetCode(EFFECT_SPSUMMON_CONDITION)
e12:SetValue(c12200000.splimit)
e12:SetValue(c98662200.splimit)
c:RegisterEffect(e12)
--summon with 3 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12200000,2))
e1:SetDescription(aux.Stringid(98662200,2))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e1:SetCondition(c12200000.ttcon)
e1:SetOperation(c12200000.ttop)
e1:SetCondition(c98662200.ttcon)
e1:SetOperation(c98662200.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LIMIT_SET_PROC)
e2:SetCondition(c12200000.setcon)
e2:SetCondition(c98662200.setcon)
c:RegisterEffect(e2)
--immune
local e21=Effect.CreateEffect(c)
......@@ -37,60 +37,60 @@ function c12200000.initial_effect(c)
e21:SetCode(EFFECT_IMMUNE_EFFECT)
e21:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e21:SetRange(LOCATION_MZONE)
e21:SetCondition(c12200000.imcon)
e21:SetValue(c12200000.efilter)
e21:SetCondition(c98662200.imcon)
e21:SetValue(c98662200.efilter)
c:RegisterEffect(e21)
--atk
local e23=Effect.CreateEffect(c)
e23:SetDescription(aux.Stringid(12200000,1))
e23:SetDescription(aux.Stringid(98662200,1))
e23:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE+CATEGORY_POSITION)
e23:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e23:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e23:SetRange(LOCATION_MZONE)
e23:SetCondition(c12200000.atkcon2)
e23:SetTarget(c12200000.destg)
e23:SetOperation(c12200000.atkop2)
e23:SetCondition(c98662200.atkcon2)
e23:SetTarget(c98662200.destg)
e23:SetOperation(c98662200.atkop2)
c:RegisterEffect(e23)
end
c12200000.setcard="terraria"
function c12200000.ttcon(e,c,minc)
c98662200.setcard="terraria"
function c98662200.ttcon(e,c,minc)
if c==nil then return true end
return minc<=3 and Duel.CheckTribute(c,3)
end
function c12200000.ttop(e,tp,eg,ep,ev,re,r,rp,c)
function c98662200.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function c12200000.setcon(e,c,minc)
function c98662200.setcon(e,c,minc)
if not c then return true end
return false
end
function c12200000.imcon(e)
function c98662200.imcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c12200000.efilter(e,te)
function c98662200.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c12200000.splimit(e,se,sp,st)
function c98662200.splimit(e,se,sp,st)
return not se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c12200000.splimits(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM and not Duel.IsExistingMatchingCard(c12200000.scfilter,tp,LOCATION_PZONE,0,1,nil)
function c98662200.splimits(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM and not Duel.IsExistingMatchingCard(c98662200.scfilter,tp,LOCATION_PZONE,0,1,nil)
end
function c12200000.scfilter(c)
return not c:IsSetCard(0x453)
function c98662200.scfilter(c)
return not c:IsSetCard(0x587a)
end
function c12200000.atkcon2(e,tp,eg,ep,ev,re,r,rp)
function c98662200.atkcon2(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
return bc~=nil and bc:GetAttack()>e:GetHandler():GetAttack()
end
function c12200000.destg(e,tp,eg,ep,ev,re,r,rp,chk)
function c98662200.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc and tc:GetAttack()>e:GetHandler():GetAttack() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
end
function c12200000.atkop2(e,tp,eg,ep,ev,re,r,rp)
function c98662200.atkop2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
......@@ -108,12 +108,12 @@ function c12200000.atkop2(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetOperation(c12200000.posop)
e1:SetOperation(c98662200.posop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c12200000.posop(e,tp,eg,ep,ev,re,r,rp)
function c98662200.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsAttackPos() then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
......
--神之仆从·风暴编织者
Duel.LoadScript("c33310023.lua")
function c12200001.initial_effect(c)
c:SetUniqueOnField(1,0,12200001)
function c98662201.initial_effect(c)
c:SetUniqueOnField(1,0,98662201)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--Activate
......@@ -9,32 +9,32 @@ function c12200001.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetOperation(c12200001.activate)
e1:SetOperation(c98662201.activate)
c:RegisterEffect(e1)
--SpecialSummon
local e12=Effect.CreateEffect(c)
e12:SetDescription(aux.Stringid(12200001,2))
e12:SetDescription(aux.Stringid(98662201,2))
e12:SetCategory(CATEGORY_SPECIAL_SUMMON)
e12:SetType(EFFECT_TYPE_IGNITION)
e12:SetRange(LOCATION_PZONE)
e12:SetCountLimit(1,12200001)
e12:SetCondition(c12200001.ngcon)
e12:SetTarget(c12200001.sptg)
e12:SetOperation(c12200001.spop)
e12:SetCountLimit(1,98662201)
e12:SetCondition(c98662201.ngcon)
e12:SetTarget(c98662201.sptg)
e12:SetOperation(c98662201.spop)
c:RegisterEffect(e12)
--Activate
local e13=Effect.CreateEffect(c)
e13:SetDescription(aux.Stringid(12200001,3))
e13:SetDescription(aux.Stringid(98662201,3))
e13:SetCategory(CATEGORY_DESTROY)
e13:SetType(EFFECT_TYPE_QUICK_O)
e13:SetRange(LOCATION_PZONE)
e13:SetProperty(EFFECT_FLAG_CARD_TARGET)
e13:SetCode(EVENT_FREE_CHAIN)
e13:SetCountLimit(1,12200002)
e13:SetCountLimit(1,98662202)
e13:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e13:SetCost(c12200001.cost)
e13:SetTarget(c12200001.target)
e13:SetOperation(c12200001.desactivate)
e13:SetCost(c98662201.cost)
e13:SetTarget(c98662201.target)
e13:SetOperation(c98662201.desactivate)
c:RegisterEffect(e13)
--search
local e15=Effect.CreateEffect(c)
......@@ -42,8 +42,8 @@ function c12200001.initial_effect(c)
e15:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e15:SetCode(EVENT_SUMMON_SUCCESS)
e15:SetProperty(EFFECT_FLAG_DELAY)
e15:SetTarget(c12200001.thtg1)
e15:SetOperation(c12200001.thop1)
e15:SetTarget(c98662201.thtg1)
e15:SetOperation(c98662201.thop1)
c:RegisterEffect(e15)
local e2=e15:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -54,52 +54,52 @@ function c12200001.initial_effect(c)
e16:SetCode(EFFECT_IMMUNE_EFFECT)
e16:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e16:SetRange(LOCATION_MZONE)
e16:SetCondition(c12200001.imcon)
e16:SetValue(c12200001.efilter)
e16:SetCondition(c98662201.imcon)
e16:SetValue(c98662201.efilter)
c:RegisterEffect(e16)
end
c12200001.setcard="terraria"
function c12200001.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x451) and c:IsAbleToHand()
c98662201.setcard="terraria"
function c98662201.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x387a) and c:IsAbleToHand()
end
function c12200001.activate(e,tp,eg,ep,ev,re,r,rp)
function c98662201.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c12200001.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12200001,0)) then
local g=Duel.GetMatchingGroup(c98662201.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(98662201,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c12200001.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x453)
and Duel.IsExistingMatchingCard(c12200001.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
function c98662201.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x587a)
and Duel.IsExistingMatchingCard(c98662201.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
end
function c12200001.cfilter2(c,code)
return c:IsFaceup() and c:IsSetCard(0x453) and not c:IsCode(code)
function c98662201.cfilter2(c,code)
return c:IsFaceup() and c:IsSetCard(0x587a) and not c:IsCode(code)
end
function c12200001.ngcon(e)
return Duel.IsExistingMatchingCard(c12200001.cfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
function c98662201.ngcon(e)
return Duel.IsExistingMatchingCard(c98662201.cfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
end
function c12200001.filter(c,e,tp)
function c98662201.filter(c,e,tp)
local bool=aux.PendulumSummonableBool(c)
return c:IsSetCard(0x453) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,bool,bool) and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode()) and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA))
return c:IsSetCard(0x587a) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,bool,bool) and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode()) and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA))
end
function c12200001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c98662201.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c12200001.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c98662201.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA)
end
function c12200001.spop(e,tp,eg,ep,ev,re,r,rp)
function c98662201.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12200001.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c98662201.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP)
end
end
function c12200001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function c98662201.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST)
......@@ -107,42 +107,42 @@ function c12200001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
end
end
function c12200001.desfilter(c)
function c98662201.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c12200001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c12200001.desfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c12200001.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
function c98662201.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c98662201.desfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c98662201.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c12200001.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectTarget(tp,c98662201.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c12200001.desactivate(e,tp,eg,ep,ev,re,r,rp)
function c98662201.desactivate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(g,REASON_EFFECT)
if e:GetLabel()==100 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(12200001,1)) then
if e:GetLabel()==100 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(98662201,1)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c12200001.thfilters(c)
return c:IsSetCard(0x453) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
function c98662201.thfilters(c)
return c:IsSetCard(0x587a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c12200001.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12200001.thfilters,tp,LOCATION_DECK,0,1,nil) end
function c98662201.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98662201.thfilters,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12200001.thop1(e,tp,eg,ep,ev,re,r,rp)
function c98662201.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12200001.thfilters,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c98662201.thfilters,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 c12200001.imcon(e)
function c98662201.imcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c12200001.efilter(e,te)
function c98662201.efilter(e,te)
return e:GetOwnerPlayer()~=te:GetOwnerPlayer() and te:IsActiveType(TYPE_TRAP)
end
\ No newline at end of file
--神之仆从·无尽虚空
Duel.LoadScript("c33310023.lua")
function c12200002.initial_effect(c)
c:SetUniqueOnField(1,0,12200002)
function c98662202.initial_effect(c)
c:SetUniqueOnField(1,0,98662202)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--Activate
......@@ -9,18 +9,18 @@ function c12200002.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetOperation(c12200002.activate)
e1:SetOperation(c98662202.activate)
c:RegisterEffect(e1)
--SpecialSummon
local e12=Effect.CreateEffect(c)
e12:SetDescription(aux.Stringid(12200002,2))
e12:SetDescription(aux.Stringid(98662202,2))
e12:SetCategory(CATEGORY_SPECIAL_SUMMON)
e12:SetType(EFFECT_TYPE_IGNITION)
e12:SetRange(LOCATION_PZONE)
e12:SetCountLimit(1,12200003)
e12:SetCondition(c12200002.ngcon)
e12:SetTarget(c12200002.sptg)
e12:SetOperation(c12200002.spop)
e12:SetCountLimit(1,98662203)
e12:SetCondition(c98662202.ngcon)
e12:SetTarget(c98662202.sptg)
e12:SetOperation(c98662202.spop)
c:RegisterEffect(e12)
--search
local e15=Effect.CreateEffect(c)
......@@ -28,8 +28,8 @@ function c12200002.initial_effect(c)
e15:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e15:SetCode(EVENT_SUMMON_SUCCESS)
e15:SetProperty(EFFECT_FLAG_DELAY)
e15:SetTarget(c12200002.thtg1)
e15:SetOperation(c12200002.thop1)
e15:SetTarget(c98662202.thtg1)
e15:SetOperation(c98662202.thop1)
c:RegisterEffect(e15)
local e2=e15:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -40,8 +40,8 @@ function c12200002.initial_effect(c)
e16:SetCode(EFFECT_IMMUNE_EFFECT)
e16:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e16:SetRange(LOCATION_MZONE)
e16:SetCondition(c12200002.imcon)
e16:SetValue(c12200002.efilter)
e16:SetCondition(c98662202.imcon)
e16:SetValue(c98662202.efilter)
c:RegisterEffect(e16)
--indes
local e17=Effect.CreateEffect(c)
......@@ -49,7 +49,7 @@ function c12200002.initial_effect(c)
e17:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e17:SetRange(LOCATION_MZONE)
e17:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e17:SetCondition(c12200002.imcon)
e17:SetCondition(c98662202.imcon)
e17:SetValue(1)
c:RegisterEffect(e1)
--scale
......@@ -58,75 +58,75 @@ function c12200002.initial_effect(c)
e21:SetCode(EFFECT_CHANGE_LSCALE)
e21:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e21:SetRange(LOCATION_PZONE)
e21:SetCondition(c12200002.slcon)
e21:SetCondition(c98662202.slcon)
e21:SetValue(13)
c:RegisterEffect(e21)
local e31=e21:Clone()
e31:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e31)
end
c12200002.setcard="terraria"
function c12200002.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x451) and c:IsAbleToHand()
c98662202.setcard="terraria"
function c98662202.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x387a) and c:IsAbleToHand()
end
function c12200002.activate(e,tp,eg,ep,ev,re,r,rp)
function c98662202.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c12200002.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12200002,0)) then
local g=Duel.GetMatchingGroup(c98662202.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(98662202,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c12200002.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x453)
and Duel.IsExistingMatchingCard(c12200002.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
function c98662202.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x587a)
and Duel.IsExistingMatchingCard(c98662202.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
end
function c12200002.cfilter2(c,code)
return c:IsFaceup() and c:IsSetCard(0x453) and not c:IsCode(code)
function c98662202.cfilter2(c,code)
return c:IsFaceup() and c:IsSetCard(0x587a) and not c:IsCode(code)
end
function c12200002.ngcon(e)
return Duel.IsExistingMatchingCard(c12200002.cfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
function c98662202.ngcon(e)
return Duel.IsExistingMatchingCard(c98662202.cfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
end
function c12200002.filter(c,e,tp)
function c98662202.filter(c,e,tp)
local bool=aux.PendulumSummonableBool(c)
return c:IsSetCard(0x453) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,bool,bool) and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode()) and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA))
return c:IsSetCard(0x587a) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,bool,bool) and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode()) and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA))
end
function c12200002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c98662202.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c12200002.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c98662202.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA)
end
function c12200002.spop(e,tp,eg,ep,ev,re,r,rp)
function c98662202.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12200002.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c98662202.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP)
end
end
function c12200002.thfilters(c)
return c:IsSetCard(0x453) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
function c98662202.thfilters(c)
return c:IsSetCard(0x587a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c12200002.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12200002.thfilters,tp,LOCATION_DECK,0,1,nil) end
function c98662202.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98662202.thfilters,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12200002.thop1(e,tp,eg,ep,ev,re,r,rp)
function c98662202.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12200002.thfilters,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c98662202.thfilters,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 c12200002.imcon(e)
function c98662202.imcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c12200002.efilter(e,te)
function c98662202.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
end
function c12200002.slcon(e)
return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),0x453)
function c98662202.slcon(e)
return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),0x587a)
end
\ No newline at end of file
--神之仆从·西格纳斯
Duel.LoadScript("c33310023.lua")
function c12200003.initial_effect(c)
c:SetUniqueOnField(1,0,12200003)
function c98662203.initial_effect(c)
c:SetUniqueOnField(1,0,98662203)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--Activate
......@@ -9,18 +9,18 @@ function c12200003.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetOperation(c12200003.activate)
e1:SetOperation(c98662203.activate)
c:RegisterEffect(e1)
--SpecialSummon
local e12=Effect.CreateEffect(c)
e12:SetDescription(aux.Stringid(12200003,2))
e12:SetDescription(aux.Stringid(98662203,2))
e12:SetCategory(CATEGORY_SPECIAL_SUMMON)
e12:SetType(EFFECT_TYPE_IGNITION)
e12:SetRange(LOCATION_PZONE)
e12:SetCountLimit(1,12200004)
e12:SetCondition(c12200003.ngcon)
e12:SetTarget(c12200003.sptg)
e12:SetOperation(c12200003.spop)
e12:SetCountLimit(1,98662204)
e12:SetCondition(c98662203.ngcon)
e12:SetTarget(c98662203.sptg)
e12:SetOperation(c98662203.spop)
c:RegisterEffect(e12)
--search
local e15=Effect.CreateEffect(c)
......@@ -28,8 +28,8 @@ function c12200003.initial_effect(c)
e15:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e15:SetCode(EVENT_SUMMON_SUCCESS)
e15:SetProperty(EFFECT_FLAG_DELAY)
e15:SetTarget(c12200003.thtg1)
e15:SetOperation(c12200003.thop1)
e15:SetTarget(c98662203.thtg1)
e15:SetOperation(c98662203.thop1)
c:RegisterEffect(e15)
local e2=e15:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -40,8 +40,8 @@ function c12200003.initial_effect(c)
e16:SetCode(EFFECT_IMMUNE_EFFECT)
e16:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e16:SetRange(LOCATION_MZONE)
e16:SetCondition(c12200003.imcon)
e16:SetValue(c12200003.efilter)
e16:SetCondition(c98662203.imcon)
e16:SetValue(c98662203.efilter)
c:RegisterEffect(e16)
--Activate
local e17=Effect.CreateEffect(c)
......@@ -50,91 +50,91 @@ function c12200003.initial_effect(c)
e17:SetCode(EVENT_PHASE+PHASE_STANDBY)
e17:SetRange(LOCATION_PZONE)
e17:SetCountLimit(1)
e17:SetCondition(c12200003.damcon)
e17:SetTarget(c12200003.target)
e17:SetOperation(c12200003.operation)
e17:SetCondition(c98662203.damcon)
e17:SetTarget(c98662203.target)
e17:SetOperation(c98662203.operation)
c:RegisterEffect(e17)
--special summon
local e18=Effect.CreateEffect(c)
e18:SetCategory(CATEGORY_POSITION)
e18:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e18:SetCode(EVENT_BATTLE_DESTROYED)
e18:SetCondition(c12200003.condition)
e18:SetTarget(c12200003.postg)
e18:SetOperation(c12200003.posop)
e18:SetCondition(c98662203.condition)
e18:SetTarget(c98662203.postg)
e18:SetOperation(c98662203.posop)
c:RegisterEffect(e18)
end
c12200003.setcard="terraria"
function c12200003.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x451) and c:IsAbleToHand()
c98662203.setcard="terraria"
function c98662203.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x387a) and c:IsAbleToHand()
end
function c12200003.activate(e,tp,eg,ep,ev,re,r,rp)
function c98662203.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c12200003.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12200003,0)) then
local g=Duel.GetMatchingGroup(c98662203.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(98662203,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c12200003.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x453)
and Duel.IsExistingMatchingCard(c12200003.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
function c98662203.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x587a)
and Duel.IsExistingMatchingCard(c98662203.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
end
function c12200003.cfilter2(c,code)
return c:IsFaceup() and c:IsSetCard(0x453) and not c:IsCode(code)
function c98662203.cfilter2(c,code)
return c:IsFaceup() and c:IsSetCard(0x587a) and not c:IsCode(code)
end
function c12200003.ngcon(e)
return Duel.IsExistingMatchingCard(c12200003.cfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
function c98662203.ngcon(e)
return Duel.IsExistingMatchingCard(c98662203.cfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
end
function c12200003.filter(c,e,tp)
function c98662203.filter(c,e,tp)
local bool=aux.PendulumSummonableBool(c)
return c:IsSetCard(0x453) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,bool,bool) and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode()) and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA))
return c:IsSetCard(0x587a) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,bool,bool) and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode()) and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA))
end
function c12200003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c98662203.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c12200003.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c98662203.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA)
end
function c12200003.spop(e,tp,eg,ep,ev,re,r,rp)
function c98662203.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12200003.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c98662203.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP)
end
end
function c12200003.thfilters(c)
return c:IsSetCard(0x453) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
function c98662203.thfilters(c)
return c:IsSetCard(0x587a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c12200003.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12200003.thfilters,tp,LOCATION_DECK,0,1,nil) end
function c98662203.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98662203.thfilters,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12200003.thop1(e,tp,eg,ep,ev,re,r,rp)
function c98662203.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12200003.thfilters,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c98662203.thfilters,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 c12200003.imcon(e)
function c98662203.imcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c12200003.efilter(e,te)
function c98662203.efilter(e,te)
return te:IsActiveType(TYPE_TRAP) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c12200003.damcon(e,tp,eg,ep,ev,re,r,rp)
function c98662203.damcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c12200003.target(e,tp,eg,ep,ev,re,r,rp,chk)
function c98662203.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
Duel.SetTargetParam(Duel.SelectOption(tp,1076,1056,1063,1073))
end
function c12200003.operation(e,tp,eg,ep,ev,re,r,rp)
function c98662203.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local opt=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local ct=nil
......@@ -148,26 +148,26 @@ function c12200003.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetLabel(ct)
e1:SetTargetRange(0,1)
e1:SetTarget(c12200003.sumlimit)
e1:SetTarget(c98662203.sumlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c12200003.sumlimit(e,c,sump,sumtype,sumpos,targetp)
function c98662203.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsType(e:GetLabel()) and c:IsLocation(LOCATION_EXTRA)
end
function c12200003.condition(e,tp,eg,ep,ev,re,r,rp)
function c98662203.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_BATTLE)
end
function c12200003.posfilter(c)
function c98662203.posfilter(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function c12200003.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12200003.posfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c12200003.posfilter,tp,0,LOCATION_MZONE,nil)
function c98662203.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98662203.posfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c98662203.posfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c12200003.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c12200003.posfilter,tp,0,LOCATION_MZONE,nil)
function c98662203.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c98662203.posfilter,tp,0,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
local tc=g:GetFirst()
while tc do
......
--特征码交换
function c12200004.initial_effect(c)
function c98662204.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetCountLimit(1,12200005+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c12200004.condition)
e1:SetTarget(c12200004.target)
e1:SetOperation(c12200004.activate)
e1:SetCountLimit(1,98662205+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c98662204.condition)
e1:SetTarget(c98662204.target)
e1:SetOperation(c98662204.activate)
c:RegisterEffect(e1)
end
function c12200004.condition(e,tp,eg,ep,ev,re,r,rp)
function c98662204.condition(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
return d:IsFaceup() and d:IsControler(tp) and (d:IsRace(RACE_MACHINE) or d:IsRace(RACE_CYBERSE))
end
function c12200004.filter(c,rac)
function c98662204.filter(c,rac)
if c==Duel.GetAttacker() then return false end
return c:IsFaceup() and c:IsRace(rac)
end
function c12200004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c98662204.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local rac=Duel.GetAttackTarget():GetRace()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c12200004.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12200004.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,Duel.GetAttackTarget(),rac) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c98662204.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c98662204.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,Duel.GetAttackTarget(),rac) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c12200004.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,Duel.GetAttackTarget(),rac)
Duel.SelectTarget(tp,c98662204.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,Duel.GetAttackTarget(),rac)
Duel.GetAttacker():CreateEffectRelation(e)
end
function c12200004.activate(e,tp,eg,ep,ev,re,r,rp)
function c98662204.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
local tc=Duel.GetFirstTarget()
......
......@@ -32,7 +32,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsSetCard(0x872) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
return c:IsSetCard(0x387e) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -19,7 +19,7 @@ end
function cm.ritual_filter(c)
return c:IsSetCard(0x872)
return c:IsSetCard(0x387e)
end
......
......@@ -44,7 +44,7 @@ function cm.initial_effect(c)
end
--LINK
function cm.linkcon(c)
return (c:IsSetCard(0x872) and c:IsLevelBelow(4)) or c:IsCode(98683200)
return (c:IsSetCard(0x387e) and c:IsLevelBelow(4)) or c:IsCode(98683200)
end
function cm.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
......@@ -55,7 +55,7 @@ end
--special summon
function cm.spfilter1(c,e,tp)
return c:IsSetCard(0x872) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true,POS_FACEUP)
return c:IsSetCard(0x387e) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true,POS_FACEUP)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -32,7 +32,7 @@ end
--atk
function cm.fil1(c)
return c:IsSetCard(0x872) and c:IsFaceup() and c:IsType(TYPE_RITUAL)
return c:IsSetCard(0x387e) and c:IsFaceup() and c:IsType(TYPE_RITUAL)
end
function cm.adval(e,c)
local tp=e:GetHandler():GetControler()
......@@ -43,7 +43,7 @@ end
--sp
function cm.spcfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousSetCard(0x872) and c:IsPreviousLocation(LOCATION_MZONE)
return c:IsPreviousControler(tp) and c:IsPreviousSetCard(0x387e) and c:IsPreviousLocation(LOCATION_MZONE)
and c:GetReasonPlayer()==1-tp
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -31,7 +31,7 @@ end
--atk
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return at and Duel.GetTurnPlayer()~=tp and at:IsSetCard(0x872) and at~=e:GetHandler()
return at and Duel.GetTurnPlayer()~=tp and at:IsSetCard(0x387e) and at~=e:GetHandler()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
......
......@@ -15,10 +15,10 @@ function cm.initial_effect(c)
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_RITUAL) and c:IsSetCard(0x872) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true)
return c:IsType(TYPE_RITUAL) and c:IsSetCard(0x387e) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true)
end
function cm.matfil(c,tp)
return c:IsSetCard(0x872) and Duel.GetMZoneCount(tp,c)>0 and c:IsReleasable()
return c:IsSetCard(0x387e) and Duel.GetMZoneCount(tp,c)>0 and c:IsReleasable()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
......@@ -68,7 +68,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
--]]
end
function cm.splimit(e,c)
return not c:IsSetCard(0x872)
return not c:IsSetCard(0x387e)
end
function cm.stfilter(c,tp)
......
......@@ -43,11 +43,11 @@ function cm.d2hmatchfilter(c,cd)
return c:IsFaceup() and c:IsCode(cd)
end
function cm.d2hfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x872) and c:IsAbleToHand()
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x387e) and c:IsAbleToHand()
and not Duel.IsExistingMatchingCard(cm.d2hmatchfilter,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x872) and rp==tp
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x387e) and rp==tp
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.d2hfilter,tp,LOCATION_DECK,0,nil,tp)
......@@ -91,7 +91,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.eftg(e,c)
return c:IsSetCard(0x872) and c:IsType(TYPE_EFFECT)
return c:IsSetCard(0x387e) and c:IsType(TYPE_EFFECT)
end
......
......@@ -223,10 +223,6 @@
!counter 0x2fb0 梦境指示物
!counter 0x1fb1 深绿指示物
#△冰精⑨ 2460890081 122 0x450-0x45f
!setname 0x451 神明吞噬者
!setname 0x453 神之仆从
#οゞ稀饭ゞo 1746923733 124 0x2a0-0x2af
!setname 0x32a0 澄净闪耀
!setname 0x52a0 澄闪
......@@ -266,7 +262,7 @@
!counter 0xa7d 女神指示物
!counter 0xa7f 好感指示物
#乐 3113279818 130 0xe00-0xe0f
#乐 3113279818 130 0xe00-0xe0f
!setname 0xe08 尘世侧写
#tama 1051309153 132 0x350-0x35f
......@@ -290,7 +286,7 @@
#Scarlet 3027246459 137
#仲村芽衣子 2736617510 141
#仲村芽衣子 2736617510 141
#named_with_hana 花舞少女
#Ruby 917770701 147 0x2e0-0x2ef
......@@ -303,11 +299,6 @@
!setname 0x2e8 神灵
!counter 0x12e7 碟子指示物
#△Candy 1195203843 148 0x800-0x80f
!setname 0x4800 陆星
!setname 0x4802 源素龙
!setname 0x4804 山海异闻录
#廷达的信徒 401940250 150 0xf30-0xf3f
!setname 0x6f30 混沌构想|非「混沌」
!setname 0xcf30 苍白星海
......@@ -462,9 +453,6 @@
!setname 0x6ee 忆炼
#DefineSet(code,"LianXing") 恋星
#setname="advency" 冒险遗产
#setname="HarmonicRhythm" 谐律
#setname="PseudoSoul" 拟魂
#setcard="PhantomQuantum" 幻量子
#setcard="Shinkansen" 新干线
#aux.AddCodeList(c,18029407) 「英杰衍生物」衍生物名记述
......@@ -516,7 +504,7 @@
!setname 0x9c92 枝江
!setname 0xc99 ReLive
#演示白板 178434020 210 0x600-0x60f
#演示白板 178434020 210 0x600-0x60f
!setname 0x601 道明寺歌鈴
!setname 0x602 舆水幸子
!setname 0x603 堀裕子
......@@ -573,7 +561,7 @@
!setname 0x36b 白马义从
#cm.YiLong_Bloodline 血裔
#冥月凌 2102552959 231 0xf70-0xf7f
#冥月凌 2102552959 231 0xf70-0xf7f
!setname 0x3f71 轨迹
!setname 0x5f71 /神气合一
!setname 0x6f71 废墟图书馆
......@@ -933,11 +921,11 @@
#cm.named_with_Youthberk 朱斯贝克
#AddCodeList(40009190) 刻神督导龙卡名记述
#雪鸮 3234454893 440 0x470-0x47f
#雪鸮 3234454893 440 0x470-0x47f
!setname 0x470 血祭魇
!counter 0x1470 心慌指示物
#小青 475054511 457 0x880-0x88f
#小青 475054511 457 0x880-0x88f
!setname 0x880 H×H
!setname 0x5880 幻影旅团
!setname 0x881 极翼灵兽
......@@ -1389,7 +1377,7 @@
!setname 0x3730 洛克
!setname 0x5730 圣物
#TT - 12 750 0x750-0x75f
#TT - 750 0x750-0x75f
!setname 0x751 纹章士|非「纹章」
!setname 0x753 苍炎之轨迹|非「轨迹」
!setname 0x755 焰刃
......@@ -1442,6 +1430,7 @@
#幻灵~eidoion 3371467150 791 0xa10-0xa1f
!setname 0xa10 绯红编年史
!setname 0x3a11 律法塔魂
!setname 0x3a12 复乐园
#yee 1138772630 792 0x5c0-0x5cf
......@@ -1557,7 +1546,7 @@
#王道游老子 995602632 894 0x700-0x70f
!setname 0xa701 XTale
!setname 0x70a S.W.Studio Wasabi
!setname 0x70a S.W.
!setname 0x370a S.W.恶狼
!setname 0x570a S.W.夏娃
!setname 0x670a S.W.囚馆
......@@ -1612,7 +1601,7 @@
!setname 0x9ef8 Jewel
!setname 0x3ef9 口袋精灵
#奇跡の早苗 2060043514 961 0x7e0-0x7ef
#奇跡の早苗 2060043514 961 0x7e0-0x7ef
!setname 0x37e0 苍蓝奇迹
!setname 0x57e0 千禧年科技学院
!setname 0x67e0 研讨会
......@@ -1632,27 +1621,44 @@
!setname 0xaae 日神君
!setname 0xaaf 幻灵
#公用区间 986 0x870-0x87f
##柚木梨沙 1141457733 000-200
#柚木梨沙 1141457733 000-200
!setname 0x870 少女分形
!setname 0x871 濑名歌铃
##◇星空璀璨之地 3077843411 280-281
#◇星空璀璨之地 3077843411 280-281
#cm.Koyuki 三水小雪(仅魔陷)
##◇識之梦 1073149304 307
##虹霓文花 2538420075 395
##雾羽小姐 185591910 471
##◇花糖 2236141431 573-574
#◇識之梦 1073149304 307
#虹霓文花 2538420075 395
#雾羽小姐 185591910 471
#◇花糖 2236141431 573-574
!setname 0x87c 库拉丽丝
#named_with_sanae 早苗H
#named_with_windbot Windbot
##◇某失智の刀客塔 3529764274 600
##△绒 2039721962 640
##◇小K 1318052139 669
##◇落 2403265619 707-708
##珠泪 773
##魔法纪录 1741642966 832
!setname 0x872 魔法纪录
!setname 0x873 记忆结晶
!counter 0x872 因果
##◇水叶 865
##芙兰朵露 978818523 896
#◇某失智の刀客塔 3529764274 600
#△冰精⑨ 2460890081 622
!setname 0x387a 神明吞噬者
!setname 0x587a 神之仆从
#△绒 2039721962 640
#◇小K 1318052139 669
#◇落 2403265619 707-708
#珠泪 773
#魔法纪录 1741642966 832
!setname 0x387e 魔法纪录
#◇水叶 865
#芙兰朵露 978818523 896
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