Commit 0d803bce authored by Nemo Ma's avatar Nemo Ma

upd 251005

parent 9ff4b038
No preview for this file type
expansions/pics/66690225.jpg

71.2 KB | W: | H:

expansions/pics/66690225.jpg

70.3 KB | W: | H:

expansions/pics/66690225.jpg
expansions/pics/66690225.jpg
expansions/pics/66690225.jpg
expansions/pics/66690225.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66690330.jpg

63.2 KB | W: | H:

expansions/pics/66690330.jpg

63 KB | W: | H:

expansions/pics/66690330.jpg
expansions/pics/66690330.jpg
expansions/pics/66690330.jpg
expansions/pics/66690330.jpg
  • 2-up
  • Swipe
  • Onion skin
--绝海滋养的砗磲
local s,id,o=GetID()
function s.initial_effect(c)
--这张卡也能把任意数量的怪兽解放来上级召唤。
--「守墓的审神者」「神兽王 巴巴罗斯」
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(s.ttcon)
e0:SetOperation(s.ttop)
e0:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e0)
local e0s=e0:Clone()
e0s:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e0s)
--这张卡的等级·攻击力·守备力上升为这张卡的上级召唤而解放的怪兽的各自数值的合计
--「暴君海王星」「天魔神 因维希尔」「加速同调士」
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(s.valcheck)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_COST)
e2:SetOperation(s.facechk)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--自己主要阶段才能发动。自己回复这张卡的等级×200基本分。那之后,可以进行1只「绝海滋养」怪兽的召唤。
--「调皮宝贝·水滴娃」「隐居者的大釜」「电极兽 阳离子」
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_RECOVER+CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.con)
e3:SetTarget(s.rectg)
e3:SetOperation(s.recop)
c:RegisterEffect(e3)
local e3q=e3:Clone()
e3q:SetType(EFFECT_TYPE_QUICK_O)
e3q:SetCode(EVENT_FREE_CHAIN)
e3q:SetHintTiming(0,TIMING_MAIN_END)
e3q:SetCondition(s.qcon)
c:RegisterEffect(e3q)
--这张卡被解放的场合才能发动。从卡组把1只「绝海滋养」怪兽解放。这个回合,自己不是水属性怪兽不能特殊召唤。
--「电子化天使-弁天-」「巳剑降临」「巨石遗物复活」「白煞鲨」
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,3))
e4:SetCategory(CATEGORY_RELEASE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,id+o)
e4:SetTarget(s.rltg)
e4:SetOperation(s.rlop)
c:RegisterEffect(e4)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
local minr=minc
if minc==0 then minr=1 end
return Duel.CheckTribute(c,minr)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local minr=minc
if minc==0 then minr=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTribute(tp,c,minr,149)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.valcheck(e,c)
if e:GetLabel()~=1 then return end
e:SetLabel(0)
local g=c:GetMaterial()
local tc=g:GetFirst()
local atk=0
local def=0
local lv=0
while tc do
--获取卡片信息的时机参考「天魔神 因维希尔」
local catk=tc:GetAttack()
local cdef=tc:GetDefense()
local clv=0
if tc:IsLevelAbove(1) then clv=tc:GetLevel() end
atk=atk+(catk>=0 and catk or 0)
def=def+(cdef>=0 and cdef or 0)
lv=lv+clv
tc=g:GetNext()
end
--atk continuous effect
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(atk)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
--def continuous effect
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(def)
c:RegisterEffect(e2)
--lv continuous effect
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(lv)
c:RegisterEffect(e3)
end
function s.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not aux.IsCanBeQuickEffect(c,tp,11606068)
end
function s.qcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return aux.IsCanBeQuickEffect(c,tp,11606068)
end
function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetLevel()>0 end
local rec=e:GetHandler():GetLevel()*200
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end
function s.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsSetCard(0x5225)
end
function s.recop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsFaceup() and c:IsRelateToEffect(e)) then return end --「抒情歌鸲-独立夜莺」
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local d=c:GetLevel()*200
if Duel.Recover(p,d,REASON_EFFECT)~=0 then
if Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
end
function s.rlfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsReleasable(REASON_EFFECT) and c:IsSetCard(0x5225)
end
function s.rltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(s.rlfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_DECK)
end
function s.rlop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.rlfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Release(g,REASON_EFFECT)
end
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(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
\ No newline at end of file
--绝海滋养的鸡心螺
local s,id,o=GetID()
function s.initial_effect(c)
--这张卡也能把任意数量的怪兽解放来上级召唤。
--「守墓的审神者」「神兽王 巴巴罗斯」
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(s.ttcon)
e0:SetOperation(s.ttop)
e0:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e0)
local e0s=e0:Clone()
e0s:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e0s)
--这张卡的等级·攻击力·守备力上升为这张卡的上级召唤而解放的怪兽的各自数值的合计
--「暴君海王星」「天魔神 因维希尔」「加速同调士」
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(s.valcheck)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_COST)
e2:SetOperation(s.facechk)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--自己主要阶段才能发动。给予对方这张卡的等级×100的伤害。那之后,可以进行1只「绝海滋养」怪兽的召唤。
--「隐居者的大釜」「电极兽 阳离子」「火山帝皇」
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.con)
e3:SetTarget(s.damtg)
e3:SetOperation(s.damop)
c:RegisterEffect(e3)
local e3q=e3:Clone()
e3q:SetType(EFFECT_TYPE_QUICK_O)
e3q:SetCode(EVENT_FREE_CHAIN)
e3q:SetHintTiming(0,TIMING_MAIN_END)
e3q:SetCondition(s.qcon)
c:RegisterEffect(e3q)
--这张卡被解放的场合才能发动。从自己的卡组·墓地各把最多1只「绝海滋养」怪兽特殊召唤。这个回合,自己不是水属性怪兽不能特殊召唤。
--「电子化天使-弁天-」「命运女郎·莱蒂」「白煞鲨」「无限光」
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,3))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,id+o)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
local minr=minc
if minc==0 then minr=1 end
return Duel.CheckTribute(c,minr)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local minr=minc
if minc==0 then minr=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTribute(tp,c,minr,149)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.valcheck(e,c)
if e:GetLabel()~=1 then return end
e:SetLabel(0)
local g=c:GetMaterial()
local tc=g:GetFirst()
local atk=0
local def=0
local lv=0
while tc do
--获取卡片信息的时机参考「天魔神 因维希尔」
local catk=tc:GetAttack()
local cdef=tc:GetDefense()
local clv=0
if tc:IsLevelAbove(1) then clv=tc:GetLevel() end
atk=atk+(catk>=0 and catk or 0)
def=def+(cdef>=0 and cdef or 0)
lv=lv+clv
tc=g:GetNext()
end
--atk continuous effect
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(atk)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
--def continuous effect
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(def)
c:RegisterEffect(e2)
--lv continuous effect
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(lv)
c:RegisterEffect(e3)
end
function s.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not aux.IsCanBeQuickEffect(c,tp,11606068)
end
function s.qcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return aux.IsCanBeQuickEffect(c,tp,11606068)
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetLevel()>0 end
local dam=e:GetHandler():GetLevel()*100
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function s.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsSetCard(0x5225)
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsFaceup() and c:IsRelateToEffect(e) and c:GetLevel()>0) then return end --「抒情歌鸲-独立夜莺」
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local d=c:GetLevel()*100
if Duel.Damage(p,d,REASON_EFFECT)~=0 then
if Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x5225) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.gselect(g)
return g:GetClassCount(Card.GetLocation)==#g
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,s.gselect,false,1,math.min(ft,2))
if sg then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
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(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
\ No newline at end of file
--绝海滋养的海星
local s,id,o=GetID()
function s.initial_effect(c)
--这张卡也能把任意数量的怪兽解放来上级召唤。
--「守墓的审神者」「神兽王 巴巴罗斯」
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(s.ttcon)
e0:SetOperation(s.ttop)
e0:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e0)
local e0s=e0:Clone()
e0s:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e0s)
--这张卡的等级·攻击力·守备力上升为这张卡的上级召唤而解放的怪兽的各自数值的合计
--「暴君海王星」「天魔神 因维希尔」「加速同调士」
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(s.valcheck)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_COST)
e2:SetOperation(s.facechk)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--自己主要阶段才能发动。这张卡等级每2星最多1张的卡尽可能从对方额外卡组随机送去墓地。那之后,可以进行1只「绝海滋养」怪兽的召唤。
--「枪刺处刑刃」「No.1 感染蝇王 巴力·西卜」「龙骑兵团骑士-三叉龙骑士」
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.con)
e3:SetTarget(s.tgtg)
e3:SetOperation(s.tgop)
c:RegisterEffect(e3)
local e3q=e3:Clone()
e3q:SetType(EFFECT_TYPE_QUICK_O)
e3q:SetCode(EVENT_FREE_CHAIN)
e3q:SetHintTiming(0,TIMING_MAIN_END)
e3q:SetCondition(s.qcon)
c:RegisterEffect(e3q)
--这张卡被解放的场合才能发动。从卡组把最多2只「绝海滋养」怪兽加入手卡。
--「电子化天使-弁天-」「疾走的暗黑骑士 盖亚」
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,3))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,id+o)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
local minr=minc
if minc==0 then minr=1 end
return Duel.CheckTribute(c,minr)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local minr=minc
if minc==0 then minr=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTribute(tp,c,minr,149)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.valcheck(e,c)
if e:GetLabel()~=1 then return end
e:SetLabel(0)
local g=c:GetMaterial()
local tc=g:GetFirst()
local atk=0
local def=0
local lv=0
while tc do
--获取卡片信息的时机参考「天魔神 因维希尔」
local catk=tc:GetAttack()
local cdef=tc:GetDefense()
local clv=0
if tc:IsLevelAbove(1) then clv=tc:GetLevel() end
atk=atk+(catk>=0 and catk or 0)
def=def+(cdef>=0 and cdef or 0)
lv=lv+clv
tc=g:GetNext()
end
--atk continuous effect
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(atk)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
--def continuous effect
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(def)
c:RegisterEffect(e2)
--lv continuous effect
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(lv)
c:RegisterEffect(e3)
end
function s.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not aux.IsCanBeQuickEffect(c,tp,11606068)
end
function s.qcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return aux.IsCanBeQuickEffect(c,tp,11606068)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_EXTRA,nil)
local ct=e:GetHandler():GetLevel()//2
if chk==0 then return #g>0 and ct>0 end
ct=math.min(#g,ct)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,ct,0,0) --「灵魂游荡的墓场」「黯黑世界-暗影敌托邦-」「拓扑篡改感染龙」
end
function s.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsSetCard(0x5225)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetLevel()//2
if not (c:IsFaceup() and c:IsRelateToEffect(e)) then return end --「抒情歌鸲-独立夜莺」
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_EXTRA,nil)
ct=math.min(#g,ct)
if ct==0 then return end
local rg=g:RandomSelect(tp,ct)
if Duel.SendtoGrave(rg,REASON_EFFECT)~=0 then --「刚鬼死斗」
Duel.ShuffleExtra(1-tp)
if Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
if Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
end
end
function s.thfilter(c)
return c:IsSetCard(0x5225) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,2,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 s,id,o=GetID()
function s.initial_effect(c)
--这张卡也能把任意数量的怪兽解放来上级召唤。
--「守墓的审神者」「神兽王 巴巴罗斯」
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(s.ttcon)
e0:SetOperation(s.ttop)
e0:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e0)
local e0s=e0:Clone()
e0s:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e0s)
--这张卡的等级·攻击力·守备力上升为这张卡的上级召唤而解放的怪兽的各自数值的合计
--「暴君海王星」「天魔神 因维希尔」「加速同调士」
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(s.valcheck)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_COST)
e2:SetOperation(s.facechk)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--自己主要阶段才能发动。尽可能从对方手卡随机选这张卡等级每2星最多1张的卡确认。那之后,可以进行1只「绝海滋养」怪兽的召唤。
--「抽鬼心」
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.con)
e3:SetTarget(s.cftg)
e3:SetOperation(s.cfop)
c:RegisterEffect(e3)
local e3q=e3:Clone()
e3q:SetType(EFFECT_TYPE_QUICK_O)
e3q:SetCode(EVENT_FREE_CHAIN)
e3q:SetHintTiming(0,TIMING_MAIN_END)
e3q:SetCondition(s.qcon)
c:RegisterEffect(e3q)
--这张卡被解放的场合才能发动。从卡组中把1只「绝海滋养」魔法卡加入手卡。这个回合,自己不是水属性怪兽不能特殊召唤。
--「电子化天使-弁天-」「疾走的暗黑骑士 盖亚」「白煞鲨」
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,3))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,id+o)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
local minr=minc
if minc==0 then minr=1 end
return Duel.CheckTribute(c,minr)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local minr=minc
if minc==0 then minr=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTribute(tp,c,minr,149)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.valcheck(e,c)
if e:GetLabel()~=1 then return end
e:SetLabel(0)
local g=c:GetMaterial()
local tc=g:GetFirst()
local atk=0
local def=0
local lv=0
while tc do
--获取卡片信息的时机参考「天魔神 因维希尔」
local catk=tc:GetAttack()
local cdef=tc:GetDefense()
local clv=0
if tc:IsLevelAbove(1) then clv=tc:GetLevel() end
atk=atk+(catk>=0 and catk or 0)
def=def+(cdef>=0 and cdef or 0)
lv=lv+clv
tc=g:GetNext()
end
--atk continuous effect
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(atk)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
--def continuous effect
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(def)
c:RegisterEffect(e2)
--lv continuous effect
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(lv)
c:RegisterEffect(e3)
end
function s.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not aux.IsCanBeQuickEffect(c,tp,11606068)
end
function s.qcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return aux.IsCanBeQuickEffect(c,tp,11606068)
end
function s.cftg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetLevel()//2
if chk==0 then return ct>0 and Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 end
end
function s.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsSetCard(0x5225)
end
function s.cfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetLevel()//2
if not (c:IsFaceup() and c:IsRelateToEffect(e)) then return end --「抒情歌鸲-独立夜莺」
local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
ct=math.min(#g,ct)
if ct==0 then return end
local cg=g:RandomSelect(tp,ct)
Duel.ConfirmCards(tp,cg)
if Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
Duel.ShuffleHand(1-tp) --「镇压冥王星」
end
function s.thfilter(c)
return c:IsSetCard(0x5225) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
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(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
\ No newline at end of file
--绝海滋养的章鱼
local s,id,o=GetID()
function s.initial_effect(c)
--这张卡也能把任意数量的怪兽解放来上级召唤。
--「守墓的审神者」「神兽王 巴巴罗斯」
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(s.ttcon)
e0:SetOperation(s.ttop)
e0:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e0)
local e0s=e0:Clone()
e0s:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e0s)
--这张卡的等级·攻击力·守备力上升为这张卡的上级召唤而解放的怪兽的各自数值的合计
--「暴君海王星」「天魔神 因维希尔」「加速同调士」
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(s.valcheck)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_COST)
e2:SetOperation(s.facechk)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--自己主要阶段才能发动。选这张卡等级每2星最多1只的自己场上的水属性怪兽,那些怪兽在这个回合不能成为对方攻击·效果的对象。那之后,可以进行1只「绝海滋养」怪兽的召唤。
--「银河眼极光波龙」「天雷震龙-雷龙」「雅乐朋克粉碎拍子」
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.con)
e3:SetTarget(s.cnbttg)
e3:SetOperation(s.cnbtop)
c:RegisterEffect(e3)
local e3q=e3:Clone()
e3q:SetType(EFFECT_TYPE_QUICK_O)
e3q:SetCode(EVENT_FREE_CHAIN)
e3q:SetHintTiming(0,TIMING_MAIN_END)
e3q:SetCondition(s.qcon)
c:RegisterEffect(e3q)
--张卡被解放的场合才能发动。从卡组把1张「绝海滋养」陷阱卡盖放。这个回合,自己不是水属性怪兽不能特殊召唤。
--「电子化天使-弁天-」「白煞鲨」「教导的雷霆 弗勒德莉丝」
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,4))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,id+o)
e4:SetTarget(s.settg)
e4:SetOperation(s.setop)
c:RegisterEffect(e4)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
local minr=minc
if minc==0 then minr=1 end
return Duel.CheckTribute(c,minr)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local minr=minc
if minc==0 then minr=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTribute(tp,c,minr,149)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.valcheck(e,c)
if e:GetLabel()~=1 then return end
e:SetLabel(0)
local g=c:GetMaterial()
local tc=g:GetFirst()
local atk=0
local def=0
local lv=0
while tc do
--获取卡片信息的时机参考「天魔神 因维希尔」
local catk=tc:GetAttack()
local cdef=tc:GetDefense()
local clv=0
if tc:IsLevelAbove(1) then clv=tc:GetLevel() end
atk=atk+(catk>=0 and catk or 0)
def=def+(cdef>=0 and cdef or 0)
lv=lv+clv
tc=g:GetNext()
end
--atk continuous effect
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(atk)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
--def continuous effect
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(def)
c:RegisterEffect(e2)
--lv continuous effect
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(lv)
c:RegisterEffect(e3)
end
function s.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not aux.IsCanBeQuickEffect(c,tp,11606068)
end
function s.qcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return aux.IsCanBeQuickEffect(c,tp,11606068)
end
function s.tgfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function s.cnbttg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_MZONE,0,nil)
local ct=e:GetHandler():GetLevel()//2
if chk==0 then return ct>0 and #g>0 end
end
function s.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsSetCard(0x5225)
end
function s.cnbtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetLevel()//2
if not (c:IsFaceup() and c:IsRelateToEffect(e)) then return end --「抒情歌鸲-独立夜莺」
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_MZONE,0,nil)
ct=math.min(#g,ct)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tg=g:Select(tp,1,ct,nil)
local tc=tg:GetFirst()
local res=false
while tc do
if not tc:IsImmuneToEffect(e) then --「DDD 霸龙王 潘德拉刚」
--「银河眼极光波龙」「禁忌的圣衣」「自奏圣乐的延音」「咒眼之眷属 卡托布莱帕斯」
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(s.tgval)
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1)
--「决斗龙 决斗连接龙」「咒眼之眷属 卡托布莱帕斯」
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(aux.imval1)
tc:RegisterEffect(e2)
res=true
end
tc=tg:GetNext()
end
if res then
if Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
end
function s.tgval(e,re,rp)
return rp==1-e:GetOwnerPlayer()
end
function s.setfilter(c)
return c:IsSetCard(0x5225) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
end
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(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
\ No newline at end of file
--绝海滋养的安康鱼
local s,id,o=GetID()
function s.initial_effect(c)
--这张卡也能把任意数量的怪兽解放来上级召唤。
--「守墓的审神者」「神兽王 巴巴罗斯」
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(s.ttcon)
e0:SetOperation(s.ttop)
e0:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e0)
local e0s=e0:Clone()
e0s:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e0s)
--这张卡的等级·攻击力·守备力上升为这张卡的上级召唤而解放的怪兽的各自数值的合计
--「暴君海王星」「天魔神 因维希尔」「加速同调士」
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(s.valcheck)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_COST)
e2:SetOperation(s.facechk)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--自己主要阶段才能发动。从双方墓地以及除外的卡中,选这张卡等级每2星最多1张的卡回到持有者卡组。那之后,可以进行1只「绝海滋养」怪兽的召唤。
--「黎溟界辟」「闪刀亚式-双纽闪门」「异响鸣的继承」「吞食圣痕之龙」
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.con)
e3:SetTarget(s.tdtg)
e3:SetOperation(s.tdop)
c:RegisterEffect(e3)
local e3q=e3:Clone()
e3q:SetType(EFFECT_TYPE_QUICK_O)
e3q:SetCode(EVENT_FREE_CHAIN)
e3q:SetHintTiming(0,TIMING_MAIN_END)
e3q:SetCondition(s.qcon)
c:RegisterEffect(e3q)
--这张卡被解放的场合才能发动。这个回合只有1次,自己把「绝海滋养」怪兽上级召唤的场合,也能从卡组把最多2只「绝海滋养」怪兽解放。
--「帝王的烈旋」「古代的机械城」「被埋葬的牲祭」
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,3))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,id+o)
e4:SetOperation(s.ersop)
c:RegisterEffect(e4)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
local minr=minc
if minc==0 then minr=1 end
return Duel.CheckTribute(c,minr)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local minr=minc
if minc==0 then minr=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTribute(tp,c,minr,149)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.valcheck(e,c)
if e:GetLabel()~=1 then return end
e:SetLabel(0)
local g=c:GetMaterial()
local tc=g:GetFirst()
local atk=0
local def=0
local lv=0
while tc do
--获取卡片信息的时机参考「天魔神 因维希尔」
local catk=tc:GetAttack()
local cdef=tc:GetDefense()
local clv=0
if tc:IsLevelAbove(1) then clv=tc:GetLevel() end
atk=atk+(catk>=0 and catk or 0)
def=def+(cdef>=0 and cdef or 0)
lv=lv+clv
tc=g:GetNext()
end
--atk continuous effect
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(atk)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
--def continuous effect
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(def)
c:RegisterEffect(e2)
--lv continuous effect
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(lv)
c:RegisterEffect(e3)
end
function s.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not aux.IsCanBeQuickEffect(c,tp,11606068)
end
function s.qcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return aux.IsCanBeQuickEffect(c,tp,11606068)
end
function s.tdfilter(c)
return c:IsAbleToDeck()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil)
local ct=e:GetHandler():GetLevel()//2
if chk==0 then return #g>0 and ct>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.ofilter(c,p)
return c:IsLocation(LOCATION_DECK) and c:IsControler(p)
end
function s.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsSetCard(0x5225)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetLevel()//2
if not (c:IsFaceup() and c:IsRelateToEffect(e)) then return end --「抒情歌鸲-独立夜莺」
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil)
ct=math.min(#g,ct)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=g:Select(tp,1,ct,nil)
--「灵魂鸟神-姬孔雀」
if Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
if not og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then return end
if Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
end
function s.ersop(e,tp,eg,ep,ev,re,r,rp)
--「古代的机械城」「被埋葬的牲祭」
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,4))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCondition(s.sumcon)
e1:SetTarget(s.sumtg)
e1:SetOperation(s.sumop)
e1:SetCountLimit(1)
e1:SetValue(SUMMON_TYPE_ADVANCE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.sumtg(e,c)
return c:IsSetCard(0x5225)
end
function s.IsAdanceable(e,c)
local min,max=c:GetTributeRequirement()
if max>0 then return true end --「古代的机械城」
local es={c:IsHasEffect(EFFECT_SUMMON_PROC)}
local res=false
for _,se in ipairs(es) do
if se~=e and se:GetValue()&SUMMON_TYPE_ADVANCE==SUMMON_TYPE_ADVANCE then
res=true
break
end
end
return res
end
function s.GetFieldTributeGroup(c)
local tp=c:GetControler()
local g=Duel.GetReleaseGroup(tp,true,REASON_SUMMON)
return g
end
function s.tfilter(c)
return c:IsSetCard(0x5225) and c:IsType(TYPE_MONSTER)
end
function s.sumcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local min=minc
if minc==0 then min=1 end
--if min<minc then min=minc end
local mg=Duel.GetMatchingGroup(s.tfilter,tp,LOCATION_DECK,0,nil):Filter(Card.IsReleasable,nil,REASON_SUMMON) --「古代的机械城」
return s.IsAdanceable(e,c)
and mg:CheckSubGroup(s.mfilter,0,min,c,tp,min)
--Duel.CheckTribute(c,minc,minc,mg) --「大太郎法师」
end
function s.mfilter(sg,c,tp,minc)
local res=true
local res2=Duel.GetMZoneCount(tp,sg)>0
local ct=minc-#sg
if ct~=0 then
res=Duel.CheckTribute(c,ct)
res2=true
end
return #sg<=2 --and Duel.CheckTribute(c,#sg,#sg,sg)
and res
and res2
end
function s.m2filter(sg,mg,c,tp,minc)
local g=sg+mg
return #sg<=2 --and Duel.CheckTribute(c,#sg,#sg,sg)
and #g>=minc
and Duel.GetMZoneCount(tp,g)>0
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp,c,minc)
if minc==0 then minc=1 end
local dg=Duel.GetMatchingGroup(s.tfilter,tp,LOCATION_DECK,0,nil):Filter(Card.IsReleasable,nil,REASON_SUMMON) --「古代的机械城」
local mg=Group.CreateGroup()
if Duel.CheckTribute(c,1) and (math.min(#dg,2)<minc or Duel.SelectYesNo(tp,aux.Stringid(id,5))) then
local mg1=Duel.SelectTribute(tp,c,0,149)
mg=mg+mg1
end
if #mg<minc or Duel.SelectYesNo(tp,aux.Stringid(id,6)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,7))
local mg2=dg:SelectSubGroup(tp,s.m2filter,false,0,2,mg,c,tp,minc)
if mg2 then mg=mg+mg2 end
end
if #mg==0 then return end
c:SetMaterial(mg)
Duel.Release(mg,REASON_SUMMON+REASON_MATERIAL)
end
\ No newline at end of file
--绝海滋养的海天使
local s,id,o=GetID()
function s.initial_effect(c)
--这张卡也能把任意数量的怪兽解放来上级召唤。
--「守墓的审神者」「神兽王 巴巴罗斯」
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(s.ttcon)
e0:SetOperation(s.ttop)
e0:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e0)
local e0s=e0:Clone()
e0s:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e0s)
--这张卡的等级·攻击力·守备力上升为这张卡的上级召唤而解放的怪兽的各自数值的合计
--「暴君海王星」「天魔神 因维希尔」「加速同调士」
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(s.valcheck)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_COST)
e2:SetOperation(s.facechk)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--双方回合才能发动。选这张卡等级每4星最多1只的场上的怪兽解放。这张卡的等级·攻击力上升解放的怪兽的各自数值的合计。
--「扰动骚蛇 响云蛇」「武装龙·雷电 LV10」「巨石遗物复活」「DD 计数测量员」
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_RELEASE+CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(s.rltg)
e3:SetOperation(s.rlop)
c:RegisterEffect(e3)
--这张卡被解放的场合才能发动。选场上1张卡解放。
--「电子化天使-弁天-」「巨石遗物复活」
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_RELEASE+CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,id+o)
e4:SetTarget(s.rl2tg)
e4:SetOperation(s.rl2op)
c:RegisterEffect(e4)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
local minr=minc
if minc==0 then minr=1 end
return Duel.CheckTribute(c,minr)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local minr=minc
if minc==0 then minr=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTribute(tp,c,minr,149)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.valcheck(e,c)
if e:GetLabel()~=1 then return end
e:SetLabel(0)
local g=c:GetMaterial()
local tc=g:GetFirst()
local atk=0
local def=0
local lv=0
while tc do
--获取卡片信息的时机参考「天魔神 因维希尔」
local catk=tc:GetAttack()
local cdef=tc:GetDefense()
local clv=0
if tc:IsLevelAbove(1) then clv=tc:GetLevel() end
atk=atk+(catk>=0 and catk or 0)
def=def+(cdef>=0 and cdef or 0)
lv=lv+clv
tc=g:GetNext()
end
--atk continuous effect
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(atk)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
--def continuous effect
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(def)
c:RegisterEffect(e2)
--lv continuous effect
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(lv)
c:RegisterEffect(e3)
end
function s.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1)
end
function s.rlfilter(c)
return c:IsReleasableByEffect()
end
function s.rltg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetLevel()//4
local g=Duel.GetMatchingGroup(s.rlfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
if chk==0 then return #g>0 and ct>0 end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,PLAYER_ALL,LOCATION_MZONE)
end
function s.rlop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetLevel()//4
if not (c:IsFaceup() and c:IsRelateToEffect(e)) then return end --「抒情歌鸲-独立夜莺」
local g=Duel.GetMatchingGroup(s.rlfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
ct=math.min(#g,ct)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tg=g:Select(tp,1,ct,nil)
--「DD 计数测量员」
if Duel.Release(tg,REASON_EFFECT)>0 then
local rg=Duel.GetOperatedGroup()
local atk=rg:GetSum(Card.GetPreviousAttackOnField)
local lv=rg:Filter(Card.IsLevelAbove,nil,1):GetSum(Card.GetPreviousLevelOnField)
if c:IsFaceup() and c:IsRelateToEffect(e) and (atk>0 or lv>0) then --「圣炎王 大鹏不死鸟」
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetValue(lv)
c:RegisterEffect(e2)
end
end
end
function s.rl2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(s.rlfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,0,LOCATION_ONFIELD)
end
function s.rl2op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.rlfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Release(g,REASON_EFFECT)
end
end
\ No newline at end of file
--绝海滋养的水母
local s,id,o=GetID()
function s.initial_effect(c)
--这张卡也能把任意数量的怪兽解放来上级召唤。
--「守墓的审神者」「神兽王 巴巴罗斯」
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(s.ttcon)
e0:SetOperation(s.ttop)
e0:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e0)
local e0s=e0:Clone()
e0s:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e0s)
--这张卡的等级·攻击力·守备力上升为这张卡的上级召唤而解放的怪兽的各自数值的合计
--「暴君海王星」「天魔神 因维希尔」「加速同调士」
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(s.valcheck)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_COST)
e2:SetOperation(s.facechk)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--双方回合才能发动。选这张卡等级每4星最多1张的场上表侧表示的卡的效果直到下个回合结束时无效。
--「混沌No.107 超银河眼时空龙」「混沌No.92 伪骸虚龙 心地心混沌龙」
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(s.distg)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
--这张卡被解放的场合才能发动。从自己卡组上面把3张卡翻开,从那之中选1张加入手卡,剩下的回到卡组。这个回合,自己不是水属性怪兽不能特殊召唤。
--「强欲而谦虚之壶」「金满而谦虚之壶」「白煞鲨」
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,id+o)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
local minr=minc
if minc==0 then minr=1 end
return Duel.CheckTribute(c,minr)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local minr=minc
if minc==0 then minr=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTribute(tp,c,minr,149)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.valcheck(e,c)
if e:GetLabel()~=1 then return end
e:SetLabel(0)
local g=c:GetMaterial()
local tc=g:GetFirst()
local atk=0
local def=0
local lv=0
while tc do
--获取卡片信息的时机参考「天魔神 因维希尔」
local catk=tc:GetAttack()
local cdef=tc:GetDefense()
local clv=0
if tc:IsLevelAbove(1) then clv=tc:GetLevel() end
atk=atk+(catk>=0 and catk or 0)
def=def+(cdef>=0 and cdef or 0)
lv=lv+clv
tc=g:GetNext()
end
--atk continuous effect
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(atk)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
--def continuous effect
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(def)
c:RegisterEffect(e2)
--lv continuous effect
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(lv)
c:RegisterEffect(e3)
end
function s.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetLevel()//4
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if chk==0 then return #g>0 and ct>0 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetLevel()//4
if not (c:IsFaceup() and c:IsRelateToEffect(e)) then return end --「抒情歌鸲-独立夜莺」
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
ct=math.min(#g,ct)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tg=g:Select(tp,1,ct,nil)
local tc=tg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e3)
end
tc=tg:GetNext()
end
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end
local g=Duel.GetDecktopGroup(tp,3)
local result=g:FilterCount(Card.IsAbleToHand,nil)>0
return result
end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.ConfirmDecktop(p,3)
local g=Duel.GetDecktopGroup(p,3)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
local sg=g:Select(p,1,1,nil)
if sg:GetFirst():IsAbleToHand() then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,sg)
Duel.ShuffleHand(p)
else
Duel.SendtoGrave(sg,REASON_RULE)
end
Duel.ShuffleDeck(p)
end
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(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
\ No newline at end of file
--绝海滋养的海兔
local s,id,o=GetID()
function s.initial_effect(c)
--这张卡也能把任意数量的怪兽解放来上级召唤。
--「守墓的审神者」「神兽王 巴巴罗斯」
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(s.ttcon)
e0:SetOperation(s.ttop)
e0:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e0)
local e0s=e0:Clone()
e0s:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e0s)
--这张卡的等级·攻击力·守备力上升为这张卡的上级召唤而解放的怪兽的各自数值的合计
--「暴君海王星」「天魔神 因维希尔」「加速同调士」
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(s.valcheck)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_COST)
e2:SetOperation(s.facechk)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--双方回合才能发动。选这张卡等级每4星最多1张的场上的卡破坏。
--「混源龙 巨涡始祖神」
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
--这张卡被解放的场合才能发动。从自己墓地以及除外的卡(表侧表示)中,选最多2张「绝海滋养」卡加入手卡。
--「星逢的神篱」
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,id+o)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
local minr=minc
if minc==0 then minr=1 end
return Duel.CheckTribute(c,minr)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local minr=minc
if minc==0 then minr=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTribute(tp,c,minr,149)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.valcheck(e,c)
if e:GetLabel()~=1 then return end
e:SetLabel(0)
local g=c:GetMaterial()
local tc=g:GetFirst()
local atk=0
local def=0
local lv=0
while tc do
--获取卡片信息的时机参考「天魔神 因维希尔」
local catk=tc:GetAttack()
local cdef=tc:GetDefense()
local clv=0
if tc:IsLevelAbove(1) then clv=tc:GetLevel() end
atk=atk+(catk>=0 and catk or 0)
def=def+(cdef>=0 and cdef or 0)
lv=lv+clv
tc=g:GetNext()
end
--atk continuous effect
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(atk)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
--def continuous effect
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(def)
c:RegisterEffect(e2)
--lv continuous effect
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(lv)
c:RegisterEffect(e3)
end
function s.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetLevel()//4
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 and ct>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetLevel()//4
if not (c:IsFaceup() and c:IsRelateToEffect(e)) then return end --「抒情歌鸲-独立夜莺」
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
ct=math.min(#g,ct)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,ct,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
function s.thfilter(c)
return c:IsFaceupEx() and c:IsSetCard(0x5225) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,2,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--绝海滋养的卵
local s,id,o=GetID()
function s.initial_effect(c)
--从卡组把1只「绝海滋养」怪兽加入手卡。那之后,可以从手卡把1只「绝海滋养」怪兽召唤。
--「随风旅鸟×知更鸟」
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--自己抽卡阶段通常抽卡前,把墓地的这张卡除外才能发动。作为这个回合进行通常抽卡的代替,从自己手卡·墓地把最多2只「绝海滋养」怪兽特殊召唤。
--「炽热的决斗者们」「太阳神的使徒」
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.filter(c)
return c:IsSetCard(0x5225) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsSetCard(0x5225)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x5225) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.IsPlayerCanNormalDraw(tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not aux.IsPlayerCanNormalDraw(tp) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if ft>2 then ft=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
aux.GiveUpNormalDraw(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ft,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--绝海滋养催化的争斗
local s,id,o=GetID()
function s.initial_effect(c)
--「星遗物的胎导」「No.87 雪月花美神 月下美人」
--以自己场上(表侧表示)的1只「绝海滋养」怪兽以及那张卡以外场上1张卡为对象才能发动。那2张卡解放。
--「破械唱导 六花圣」「泪滴花束雪花莲」
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.rltg)
e1:SetOperation(s.rlop)
c:RegisterEffect(e1)
--以自己场上1只水属性怪兽为对象才能发动。从手卡·卡组中把1只「绝海滋养」怪兽解放,作为对象的怪兽等级上升2,攻击力·守备力上升1000。
--「通向魂源的影劫回归」
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RELEASE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) --「No.87 雪月花美神 月下美人」
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCountLimit(1,id)
e2:SetCondition(aux.dscon)
e2:SetTarget(s.atktg)
e2:SetOperation(s.atkop)
c:RegisterEffect(e2)
--这张卡在墓地存在的场合,自己主要阶段把自己手卡·场上1只「绝海滋养」怪兽解放才能发动。墓地的这张卡回到手卡。
--「机块变换」「邪恶龙 邪恶骑士龙」
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+o)
e3:SetCost(s.thcost)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
end
function s.rlfilter(c,tp,ec)
return c:IsFaceup() and c:IsSetCard(0x5225) and c:IsReleasableByEffect()
and Duel.IsExistingTarget(Card.IsReleasableByEffect,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,ec))
end
function s.rltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(s.rlfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g1=Duel.SelectTarget(tp,s.rlfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=Duel.SelectTarget(tp,Card.IsReleasableByEffect,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,Group.FromCards(g1:GetFirst(),c))
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g1,2,0,0)
end
function s.rlop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==2 then
Duel.Release(g,REASON_EFFECT)
end
end
function s.atkfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsFaceup()
end
function s.rfilter(c)
return c:IsSetCard(0x5225) and c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect()
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
if #g>0 and Duel.Release(g,REASON_EFFECT)>0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(2)
tc:RegisterEffect(e3)
end
end
end
function s.costfilter(c,tp)
return c:IsSetCard(0x5225) and (c:IsFaceup() or c:IsControler(tp))
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.CheckReleaseGroupEx(tp,s.costfilter,1,REASON_COST,true,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,s.costfilter,1,1,REASON_COST,true,c,tp)
Duel.Release(g,REASON_COST)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--万物争夺的绝海滋养
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--原本卡名包含「绝海滋养」的,自己场上的怪兽发动的效果变成对方回合也能发动的效果。
--「自奏圣乐的通天塔」「金色魅惑的女王」
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(id)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
aux.quick_effect_filter[id]=s.quickfilter
--只要这张卡在场地区域存在,自己在通常召唤外加上只有1次,自己主要阶段可以把1只「绝海滋养」怪兽召唤。
--「虫惑之园」
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x5225))
c:RegisterEffect(e3)
--1回合1次,从自己的卡组·墓地把1张「绝海滋养」永续魔法·永续陷阱卡在自己场上表侧表示放置。
--「深渊之兽 赫界龙」
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1)
e4:SetTarget(s.target)
e4:SetOperation(s.operation)
c:RegisterEffect(e4)
end
function s.quickfilter(c)
return c:IsOriginalSetCard(0x5225) and
c:IsLocation(LOCATION_MZONE)
end
function s.pfilter(c,tp)
return c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x5225)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_DECK,0,1,nil,tp) end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
end
\ No newline at end of file
--已化为绝海滋养的古舰
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--自己主要阶段才能发动。自己手卡·场上任意数量的「绝海滋养」怪兽解放,把解放数量的卡从自己卡组上面翻开,从那之中选1张加入手卡,剩下的卡用喜欢的顺序回到卡组下面。
--「毒枪龙骑士之影灵衣」「疾行机人 吹持童子」
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_RELEASE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--双方结束阶段才能发动。从自己墓地以及除外的卡(表侧表示)中,选1只「绝海滋养」怪兽加入手卡或特殊召唤。
--「未来之柱-奇亚诺丝」
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,id+o)
e3:SetTarget(s.thsptg)
e3:SetOperation(s.thspop)
c:RegisterEffect(e3)
end
function s.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x5225)
end
function s.gfilter(sg,tp)
local ct=#sg
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=ct
and Duel.GetDecktopGroup(tp,ct):IsExists(Card.IsAbleToHand,1,nil)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetReleaseGroup(tp,true,REASON_EFFECT):Filter(s.filter,nil)
if chk==0 then return g:CheckSubGroup(s.gfilter,1,#g,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetReleaseGroup(tp,true,REASON_EFFECT):Filter(s.filter,nil)
local sg=g:SelectSubGroup(tp,s.gfilter,false,1,#g,tp)
if sg and #sg>0 then
local ct=Duel.Release(sg,REASON_EFFECT)
Duel.ConfirmDecktop(tp,ct)
local tg=Duel.GetDecktopGroup(tp,ct)
if #tg>0 then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sc=tg:Select(tp,1,1,nil):GetFirst()
if sc:IsAbleToHand() then
Duel.SendtoHand(sc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sc)
Duel.ShuffleHand(tp)
else
Duel.SendtoGrave(sc,REASON_RULE)
end
end
if #tg>1 then
Duel.SortDecktop(tp,tp,#tg-1)
for i=1,#tg-1 do
local dg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(dg:GetFirst(),SEQ_DECKBOTTOM)
end
end
end
end
function s.thfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x5225) and (c:IsAbleToHand() or c:IsCanBeSpecialSummoned(e,0,tp,false,false)) and c:IsFaceupEx()
end
function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
end
function s.thspop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst()
if tc then
if not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) or Duel.SelectOption(tp,1190,1152)==0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--已化为绝海滋养的巨兽
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--双方主要阶段才能发动。从手卡把1只「绝海滋养」怪兽召唤。
--「魔弹-血色之冠」「抗锯齿星人」
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCondition(s.condition)
e2:SetTarget(s.sumtg)
e2:SetOperation(s.sumop)
c:RegisterEffect(e2)
--自己作「绝海滋养」怪兽上级召唤的场合,可以把自己场上任意数量怪兽和对方场上1张卡解放来上级召唤。
--「帝王的烈旋」「吸血鬼吸食者」
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_EXTRA_RELEASE_SUM)
e3:SetRange(LOCATION_HAND)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCountLimit(1,id+o)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_HAND,0)
e4:SetTarget(s.getg)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function s.sumfilter(c)
return c:IsSetCard(0x5225) and c:IsSummonable(true,nil)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function s.getg(e,c)
return c:IsSetCard(0x5225) and c:IsType(TYPE_MONSTER)
end
\ No newline at end of file
--为绝海滋养而狩猎
local s,id,o=GetID()
function s.initial_effect(c)
--自己场上有等级6以上的「绝海滋养」怪兽存在的场合,对方把卡的效果发动时才能发动。那个发动无效并解放。
--「自奏圣乐之阶」
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5225) and c:IsLevelAbove(6)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsChainNegatable(ev)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then return Duel.IsPlayerCanRelease(tp) and (not rc:IsRelateToEffect(re) or rc:IsReleasableByEffect()) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_RELEASE,eg,1,0,0)
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Release(eg,REASON_EFFECT)
end
end
......@@ -49,21 +49,27 @@ function s.setg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.seop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.AdjustAll()
Duel.AdjustAll()
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
Duel.AdjustAll()
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetReset(RESET_EVENT+RESET_PHASE+PHASE_END)
e2:SetOperation(s.tgop)
e2:SetCountLimit(1)
Duel.RegisterEffect(e2,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetOperation(s.tgop)
e2:SetCountLimit(1)
--Duel.RegisterEffect(e2,tp)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -103,15 +109,16 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
sc=ag:GetNext()
end
Duel.Destroy(dg,REASON_EFFECT)
Duel.AdjustAll()
Duel.AdjustAll()
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
Duel.AdjustAll()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetReset(RESET_EVENT+RESET_PHASE+PHASE_END)
e2:SetOperation(s.tgop)
e2:SetCountLimit(1)
Duel.RegisterEffect(e2,tp)
end
--
function s.spfilter(c,e,tp)
......
-- 诅咒玩偶
local cm, m = GetID()
function cm.initial_effect(c)
if not cm.gall then
cm.gall = true
cm.global_jc = {}
--
local l = Effect.IsHasType
Effect.IsHasType = function(ea, le)
if ea:GetLabel() == m then return true end
for z, v in pairs(cm.global_jc) do
for i = 1, #v do
if v[i] == ea and le == EFFECT_TYPE_ACTIVATE then
return true
end
end
end
return l(ea, le)
end
local l2 = Card.GetActivateEffect
Card.GetActivateEffect = function(card)
local ob = { l2(card) }
for z, v in pairs(cm.global_jc) do --表名,表内容
if z == card then
for i = 1, #v do
ob[#ob + 1] = v[i]
end
end
end
return table.unpack(ob)
end
local l3 = Effect.Clone
Effect.Clone = function(ea)
local qe = l3(ea)
if ea:GetLabel() == m then
-- 这里不需要操作global_jc,因为原来的逻辑有问题
return qe
end
for z, v in pairs(cm.global_jc) do
for i = 1, #v do
if v[i] == ea then
cm.global_jc[z][#cm.global_jc[z] + 1] = qe
return qe
end
end
end
return qe
end
--模拟魔法
local ge13 = Effect.CreateEffect(c)
ge13:SetType(EFFECT_TYPE_FIELD)
ge13:SetCode(EFFECT_ACTIVATE_COST)
ge13:SetTargetRange(1, 1)
ge13:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ge13:SetTarget(cm.actarget)
ge13:SetOperation(cm.checkop)
Duel.RegisterEffect(ge13, 0)
end
-- 基本装备效果
local e0 = aux.AddEquipSpellEffect(c, true, true, Card.IsFaceup, nil)
local qe = e0:Clone()
local de = e0:GetDescription()
if not de then
qe:SetDescription(aux.Stringid(m, 1))
end
qe:SetType(EFFECT_TYPE_QUICK_O)
qe:SetCode(EVENT_FREE_CHAIN)
qe:SetRange(LOCATION_HAND)
local con = e0:GetCondition()
qe:SetCondition(function(e, tp, eg, ep, ev, re, r, rp)
return not Duel.IsExistingMatchingCard(nil, tp, LOCATION_MZONE, 0, 1, nil) and
(not con or con(e, tp, eg, ep, ev, re, r, rp))
end)
-- 修复未定义的tc变量
cm.global_jc[c] = cm.global_jc[c] or {}
cm.global_jc[c][#cm.global_jc[c] + 1] = qe
c:RegisterEffect(qe)
if not cm.gall then
cm.gall = true
cm.global_jc = {}
--
local l = Effect.IsHasType
Effect.IsHasType = function(ea, le)
if ea:GetLabel() == m then return true end
for z, v in pairs(cm.global_jc) do
for i = 1, #v do
if v[i] == ea and le == EFFECT_TYPE_ACTIVATE then
return true
end
end
end
return l(ea, le)
end
local l2 = Card.GetActivateEffect
Card.GetActivateEffect = function(card)
local ob = { l2(card) }
for z, v in pairs(cm.global_jc) do --表名,表内容
if z == card then
for i = 1, #v do
ob[#ob + 1] = v[i]
end
end
end
return table.unpack(ob)
end
local l3 = Effect.Clone
Effect.Clone = function(ea)
local qe = l3(ea)
if ea:GetLabel() == m then
-- 这里不需要操作global_jc,因为原来的逻辑有问题
return qe
end
for z, v in pairs(cm.global_jc) do
for i = 1, #v do
if v[i] == ea then
cm.global_jc[z][#cm.global_jc[z] + 1] = qe
return qe
end
end
end
return qe
end
--模拟魔法
local ge13 = Effect.CreateEffect(c)
ge13:SetType(EFFECT_TYPE_FIELD)
ge13:SetCode(EFFECT_ACTIVATE_COST)
ge13:SetTargetRange(1, 1)
ge13:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ge13:SetTarget(cm.actarget)
ge13:SetOperation(cm.checkop)
Duel.RegisterEffect(ge13, 0)
end
-- 基本装备效果
local e0 = aux.AddEquipSpellEffect(c, true, true, Card.IsFaceup, nil)
local qe = e0:Clone()
local de = e0:GetDescription()
if not de then
qe:SetDescription(aux.Stringid(m, 1))
end
qe:SetType(EFFECT_TYPE_QUICK_O)
qe:SetCode(EVENT_FREE_CHAIN)
qe:SetRange(LOCATION_HAND)
local con = e0:GetCondition()
qe:SetCondition(function(e, tp, eg, ep, ev, re, r, rp)
return not Duel.IsExistingMatchingCard(nil, tp, LOCATION_MZONE, 0, 1, nil) or
Duel.IsExistingMatchingCard(function(c)
return c:IsType(TYPE_EQUIP) and c:IsFaceup()
end, tp, LOCATION_SZONE, 0, 1, nil)
end
)
-- 修复未定义的tc变量
cm.global_jc[c] = cm.global_jc[c] or {}
cm.global_jc[c][#cm.global_jc[c] + 1] = qe
c:RegisterEffect(qe)
e0:SetCondition(function(e, tp, eg, ep, ev, re, r, rp)
return Duel.IsExistingMatchingCard(nil, tp, LOCATION_MZONE, 0, 1, nil) and
(not con or con(e, tp, eg, ep, ev, re, r, rp))
end)
e0:SetCondition(function(e, tp, eg, ep, ev, re, r, rp)
return Duel.IsExistingMatchingCard(nil, tp, LOCATION_MZONE, 0, 1, nil) and
(not con or con(e, tp, eg, ep, ev, re, r, rp))
end)
-- 效果1:装备怪兽不能成为连接•同调•融合•超量素材
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2 = e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e2)
local e3 = e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e3)
local e4 = e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e4)
-- 效果2:怪兽召唤•特殊召唤的场合发动
local e5 = Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m, 0))
e5:SetCategory(CATEGORY_ATKCHANGE + CATEGORY_TOHAND + CATEGORY_SEARCH + CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetRange(LOCATION_SZONE)
e5:SetCondition(cm.triggercon)
e5:SetTarget(cm.triggertg)
e5:SetOperation(cm.triggerop)
c:RegisterEffect(e5)
local e6 = e5:Clone()
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e6)
-- 效果1:装备怪兽不能成为连接•同调•融合•超量素材
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2 = e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e2)
local e3 = e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e3)
local e4 = e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e4)
-- 效果2:怪兽召唤•特殊召唤的场合发动
local e5 = Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m, 0))
e5:SetCategory(CATEGORY_ATKCHANGE + CATEGORY_TOHAND + CATEGORY_SEARCH + CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetRange(LOCATION_SZONE)
e5:SetCondition(cm.triggercon)
e5:SetTarget(cm.triggertg)
e5:SetOperation(cm.triggerop)
c:RegisterEffect(e5)
local e6 = e5:Clone()
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e6)
local e7 = Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(m, 1))
e7:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_DESTROYED)
e7:SetCondition(cm.setcon)
e7:SetOperation(cm.setop)
c:RegisterEffect(e7)
end
function cm.triggercon(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
local ec = c:GetEquipTarget()
return ec ~= nil
local c = e:GetHandler()
local ec = c:GetEquipTarget()
return ec ~= nil
end
function cm.triggertg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then return true end
-- 仅在装备怪兽攻击力为0时才会触发后续操作,所以这里添加条件判断
local c = e:GetHandler()
if ec and (ec:GetAttack() - 444) == 0 then
Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
Duel.SetOperationInfo(0, CATEGORY_DESTROY, c, 1, 0, 0)
end
if chk == 0 then return true end
-- 仅在装备怪兽攻击力为0时才会触发后续操作,所以这里添加条件判断
local c = e:GetHandler()
if ec and (ec:GetAttack() - 444) == 0 then
Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
Duel.SetOperationInfo(0, CATEGORY_DESTROY, c, 1, 0, 0)
end
end
function cm.setcon(e, tp, eg, ep, ev, re, r, rp)
return e:GetHandler():IsReason(REASON_LOST_TARGET)
and not e:GetHandler():GetPreviousEquipTarget():IsLocation(LOCATION_ONFIELD + LOCATION_OVERLAY)
end
function cm.setop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
-- 创立一个永续效果,下个回合的准备阶段将卡号为m的卡加入手卡
local e = Effect.CreateEffect(c)
e:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e:SetCode(EVENT_PHASE + PHASE_STANDBY)
e:SetCountLimit(1)
e:SetCondition(function(e, tp, eg, ep, ev, re, r, rp)
return Duel.GetTurnCount() ~= e:GetLabel()
end)
e:SetOperation(function(e, tp, eg, ep, ev, re, r, rp)
local g = Duel.GetMatchingGroup(Card.IsCode, tp, LOCATION_GRAVE + LOCATION_REMOVED, 0, nil, m)
if #g > 0 then
local tc = g:GetFirst()
Duel.SendtoHand(tc, tp, REASON_EFFECT)
Duel.ConfirmCards(1 - tp, tc)
Duel.ShuffleHand(tp)
end
e:Reset()
end)
e:SetLabel(Duel.GetTurnCount())
e:SetReset(RESET_PHASE + PHASE_STANDBY)
Duel.RegisterEffect(e, tp)
end
function cm.triggerop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
local ec = c:GetEquipTarget()
if not ec or not c:IsRelateToEffect(e) then return end
local c = e:GetHandler()
local ec = c:GetEquipTarget()
if not ec or not c:IsRelateToEffect(e) then return end
-- 装备怪兽攻击力下降444
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-444)
e1:SetReset(RESET_EVENT + RESETS_STANDARD)
ec:RegisterEffect(e1)
-- 装备怪兽攻击力下降444
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-444)
e1:SetReset(RESET_EVENT + RESETS_STANDARD)
ec:RegisterEffect(e1)
-- 攻击力为0的场合,从卡组选1张「诅咒玩偶」以外的装备魔法卡加入手卡
local addedCards = 0
if ec:GetAttack() == 0 then
local g = Duel.GetMatchingGroup(cm.filter, tp, LOCATION_DECK, 0, nil)
if #g > 0 then
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
local sg = g:Select(tp, 1, 1, nil)
if #sg > 0 then
Duel.SendtoHand(sg, nil, REASON_EFFECT)
Duel.ConfirmCards(1 - tp, sg)
addedCards = #sg
end
end
c:RegisterFlagEffect(m + 1, RESET_EVENT + RESETS_STANDARD, 0, 1)
local num = 748 * c:GetFlagEffect(m + 1)
local e12 = Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_UPDATE_ATTACK)
e12:SetValue(num)
e12:SetReset(RESET_EVENT + RESETS_STANDARD)
ec:RegisterEffect(e12)
if Duel.SelectYesNo(tp, aux.Stringid(m, 4)) then
Duel.Destroy(c, REASON_EFFECT)
end
-- 那之后,装备怪兽解放,或者作为代替让这张卡破坏
-- local b1 = ec:IsReleasable()
-- local b2 = c:IsDestructable(e)
-- if b1 or b2 then
-- local opt = 0
-- if b1 and b2 then
-- opt = Duel.SelectOption(tp, aux.Stringid(m, 2), aux.Stringid(m, 3))
-- elseif b1 then
-- opt = 0
-- else
-- opt = 1
-- end
-- 攻击力为0的场合,从卡组选1张「诅咒玩偶」以外的装备魔法卡加入手卡
local addedCards = 0
if ec:GetAttack() == 0 then
local g = Duel.GetMatchingGroup(cm.filter, tp, LOCATION_DECK, 0, nil)
if #g > 0 then
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
local sg = g:Select(tp, 1, 1, nil)
if #sg > 0 then
Duel.SendtoHand(sg, nil, REASON_EFFECT)
Duel.ConfirmCards(1 - tp, sg)
addedCards = #sg
end
end
c:RegisterFlagEffect(m + 1, RESET_EVENT + RESETS_STANDARD, 0, 1)
local num = 748 * c:GetFlagEffect(m + 1)
local e12 = Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_UPDATE_ATTACK)
e12:SetValue(num)
e12:SetReset(RESET_EVENT + RESETS_STANDARD)
ec:RegisterEffect(e12)
if Duel.SelectYesNo(tp, aux.Stringid(m, 4)) then
Duel.Destroy(c, REASON_EFFECT)
end
-- 那之后,装备怪兽解放,或者作为代替让这张卡破坏
-- local b1 = ec:IsReleasable()
-- local b2 = c:IsDestructable(e)
-- if b1 or b2 then
-- local opt = 0
-- if b1 and b2 then
-- opt = Duel.SelectOption(tp, aux.Stringid(m, 2), aux.Stringid(m, 3))
-- elseif b1 then
-- opt = 0
-- else
-- opt = 1
-- end
-- if opt == 0 then
-- Duel.Release(ec, REASON_EFFECT)
-- else
-- Duel.Destroy(c, REASON_EFFECT)
-- end
-- end
end
-- if opt == 0 then
-- Duel.Release(ec, REASON_EFFECT)
-- else
-- Duel.Destroy(c, REASON_EFFECT)
-- end
-- end
end
end
function cm.filter(c)
return c:IsType(TYPE_EQUIP) and not c:IsCode(m) and c:IsAbleToHand()
return c:IsType(TYPE_EQUIP) and not c:IsCode(m) and c:IsAbleToHand()
end
function cm.actarget(e, te, tp)
local c = te:GetHandler()
local e1 = e:GetLabelObject()
if te:GetLabel() == m then return true end
for z, v in pairs(cm.global_jc) do
for i = 1, #v do
if v[i] == te then
e:SetLabelObject(z)
return true
end
end
end
return false
local c = te:GetHandler()
local e1 = e:GetLabelObject()
if te:GetLabel() == m then return true end
for z, v in pairs(cm.global_jc) do
for i = 1, #v do
if v[i] == te then
e:SetLabelObject(z)
return true
end
end
end
return false
end
function cm.checkop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetLabelObject()
tp = c:GetControler()
cm.checkopn(e, tp, c)
local c = e:GetLabelObject()
tp = c:GetControler()
cm.checkopn(e, tp, c)
end
function cm.checkopn(e, tp, c, mf)
--
if c:IsLocation(LOCATION_HAND) then
if not c:IsType(TYPE_FIELD) then
Duel.MoveToField(c, tp, tp, LOCATION_SZONE, POS_FACEUP, true)
else
local fc = Duel.GetFieldCard(tp, LOCATION_FZONE, 0)
if fc then
Duel.SendtoGrave(fc, REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(c, tp, tp, LOCATION_FZONE, POS_FACEUP, true)
end
if not c:IsType(TYPE_CONTINUOUS) and not c:IsType(TYPE_FIELD) and not c:IsType(TYPE_EQUIP) then c:CancelToGrave(false) end
end
if c:IsLocation(LOCATION_SZONE) and c:IsType(TYPE_FIELD) then
local fc = Duel.GetFieldCard(tp, LOCATION_FZONE, 0)
if fc then
Duel.SendtoGrave(fc, REASON_RULE)
Duel.BreakEffect()
end
local ta = Duel.GetMatchingGroup(aux.TRUE, tp, 0xfff - LOCATION_MZONE, 0xfff - LOCATION_MZONE, nil)
local tc = ta:GetFirst()
if tc then
Duel.Overlay(tc, c)
end
Duel.MoveToField(c, tp, tp, LOCATION_FZONE, POS_FACEUP, true)
end
Duel.ChangePosition(c, POS_FACEUP)
--
if c:IsLocation(LOCATION_HAND) then
if not c:IsType(TYPE_FIELD) then
Duel.MoveToField(c, tp, tp, LOCATION_SZONE, POS_FACEUP, true)
else
local fc = Duel.GetFieldCard(tp, LOCATION_FZONE, 0)
if fc then
Duel.SendtoGrave(fc, REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(c, tp, tp, LOCATION_FZONE, POS_FACEUP, true)
end
if not c:IsType(TYPE_CONTINUOUS) and not c:IsType(TYPE_FIELD) and not c:IsType(TYPE_EQUIP) then c:CancelToGrave(false) end
end
if c:IsLocation(LOCATION_SZONE) and c:IsType(TYPE_FIELD) then
local fc = Duel.GetFieldCard(tp, LOCATION_FZONE, 0)
if fc then
Duel.SendtoGrave(fc, REASON_RULE)
Duel.BreakEffect()
end
local ta = Duel.GetMatchingGroup(aux.TRUE, tp, 0xfff - LOCATION_MZONE, 0xfff - LOCATION_MZONE, nil)
local tc = ta:GetFirst()
if tc then
Duel.Overlay(tc, c)
end
Duel.MoveToField(c, tp, tp, LOCATION_FZONE, POS_FACEUP, true)
end
Duel.ChangePosition(c, POS_FACEUP)
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetOperation(function(e, tp, eg, ep, ev, re, r, rp)
if not c:IsType(TYPE_CONTINUOUS) and not c:IsType(TYPE_FIELD) and
(not c:IsType(TYPE_EQUIP) or (c:IsType(TYPE_EQUIP) and not c:GetEquipTarget())) and c:IsLocation(LOCATION_SZONE) and c:IsHasEffect(EFFECT_REMAIN_FIELD) == nil then
Duel.SendtoGrave(c, REASON_RULE)
end
e:Reset()
end)
Duel.RegisterEffect(e1, 0)
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetOperation(function(e, tp, eg, ep, ev, re, r, rp)
if not c:IsType(TYPE_CONTINUOUS) and not c:IsType(TYPE_FIELD) and
(not c:IsType(TYPE_EQUIP) or (c:IsType(TYPE_EQUIP) and not c:GetEquipTarget())) and c:IsLocation(LOCATION_SZONE) and c:IsHasEffect(EFFECT_REMAIN_FIELD) == nil then
Duel.SendtoGrave(c, REASON_RULE)
end
e:Reset()
end)
Duel.RegisterEffect(e1, 0)
end
--精灵胶囊
local cm, m, o = GetID()
if not Duel.LoadScript and loadfile then
function Duel.LoadScript(str)
require_list = require_list or {}
str = "expansions/script/" .. str
if not require_list[str] then
if string.find(str, "%.") then
require_list[str] = loadfile(str)
else
require_list[str] = loadfile(str .. ".lua")
end
pcall(require_list[str])
end
return require_list[str]
end
end
Duel.LoadScript("c16670000.lua")
function cm.initial_effect(c)
local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND + LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetCondition(function(e, tp, eg, ep, ev, re, r, rp)
return not Duel.IsExistingMatchingCard(nil, tp, LOCATION_MZONE, 0, 1, nil) or
Duel.IsExistingMatchingCard(function(c)
return c:IsType(TYPE_EQUIP) and c:IsFaceup()
end, tp, LOCATION_SZONE, 0, 1, nil)
end)
e1:SetTarget(function(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
local c = e:GetHandler()
local func = function(c)
return (c:IsLocation(LOCATION_MZONE) or
c:IsLocation(LOCATION_SZONE)) and c:IsType(TYPE_SPELL + TYPE_TRAP) and c:IsFaceup()
end
if chkc then
return func(chkc)
end
if chk == 0 then
return Duel.IsExistingTarget(func, tp, LOCATION_MZONE + LOCATION_SZONE,
LOCATION_MZONE + LOCATION_SZONE, 1, nil)
end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP)
Duel.SelectTarget(tp, func, tp, LOCATION_MZONE + LOCATION_SZONE, LOCATION_MZONE + LOCATION_SZONE, 1, 1, c) --aux.ExceptThisCard(e)
Duel.SetOperationInfo(0, CATEGORY_EQUIP, e:GetHandler(), 1, 0, 0)
end)
e1:SetOperation(function(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
local tc = Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
it.CopyEquip(tp, c, tc)
end
end)
c:RegisterEffect(e1)
it.EmulateSZONE(c, e1)
local e29 = Effect.CreateEffect(c)
e29:SetType(EFFECT_TYPE_EQUIP)
e29:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e29)
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
c:RegisterEffect(e2)
local e11 = Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(m, 0))
e11:SetCategory(CATEGORY_SPECIAL_SUMMON)
e11:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
e11:SetProperty(EFFECT_FLAG_DELAY)
e11:SetRange(0xfff)
e11:SetCode(EVENT_EQUIP)
e11:SetTarget(cm.sptg)
e11:SetOperation(cm.spop)
c:RegisterEffect(e11)
end
function cm.filter(c, ec)
return c == ec --c:GetEquipTarget() == ec and c:IsType(TYPE_SPELL + TYPE_TRAP)
end
function cm.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
local c = e:GetHandler()
local dg = eg:Filter(cm.filter, nil, e:GetHandler())
local kx, zzx, sxx, zzjc, sxjc, zzl = it.sxbl()
local tc2 = c:GetPreviousEquipTarget()
if chk == 0 then return #dg > 0 and zzx > 0 and tc2 ~= nil and Duel.GetLocationCount(1 - tp, LOCATION_MZONE) > 0 end
local zz, sx, lv = it.sxblx(tp, kx, zzx, sxx, zzl)
e:SetLabel(zz, sx, lv)
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, tc2, 1, 0, 0)
end
function cm.spop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
local zz, sx, lv = e:GetLabel()
local tc = c:GetPreviousEquipTarget()
if not Duel.IsPlayerCanSpecialSummonMonster(tp, tc:GetCode(), 0, TYPE_NORMAL + TYPE_MONSTER, 0, 0, lv, zz, sx) then return end
it.AddMonsterate(tc, TYPE_NORMAL + TYPE_MONSTER, sx, zz, lv, 0, 0)
Duel.SpecialSummonStep(tc, 0, tp, 1 - tp, true, false, POS_FACEUP_ATTACK)
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--超能力设置
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(s.target)
e1:SetOperation(s.prop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id)
e2:SetCondition(s.con2)
e2:SetTarget(s.target2)
e2:SetOperation(s.prop2)
c:RegisterEffect(e2)
end
function s.filter(c)
return c:IsType(TYPE_QUICKPLAY) and c:IsSSetable() and c:IsSetCard(0x603)
end
function s.filter01(c)
return c:IsSetCard(0x603) and c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc) end
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then ct=ct-1 end
if chk==0 then return ct>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function s.prop(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then
if Duel.GetMatchingGroupCount(s.filter01,tp,LOCATION_REMOVED,0,nil)>=3 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(nil),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RESOLVECARD)
local tc2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(nil),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil):GetFirst()
if not tc2 then return end
Duel.MoveToField(tc2,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
end
function s.con2(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0x603) and re:GetHandler():IsType(TYPE_MONSTER) and bit.band(r,REASON_EFFECT)>0
end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and chkc:IsAbleToHand() and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.prop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--漆黑之片羽 - 与暗之堕落天使之神圣契约
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetTarget(s.target)
e0:SetOperation(s.activate)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target3)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,id)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(s.target2)
e2:SetOperation(s.prop2)
c:RegisterEffect(e2)
end
function s.filter(c,e,tp)
return c:IsSetCard(0x619)
end
function s.mfilter(c)
return c:GetLevel()>0 and c:IsSetCard(0x619) and c:IsAbleToDeck()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_GRAVE,0,nil)
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,s.filter,e,tp,mg1,mg2,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_GRAVE)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.mfilter),tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,s.filter,e,tp,mg1,mg2,Card.GetLevel,"Greater")
local tc=g:GetFirst()
if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:Merge(mg2)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
local mat2=mat:Filter(Card.IsLocation,nil,LOCATION_GRAVE):Filter(Card.IsSetCard,nil,0x619)
mat:Sub(mat2)
Duel.ReleaseRitualMaterial(mat)
if Duel.SendtoDeck(mat2,nil,nil,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)>0 then
Duel.ShuffleDeck(tp)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function s.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetDecktopGroup(tp,5)
return g:FilterCount(Card.IsAbleToHand,nil)>0
end
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac1=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac2=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac3=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac4=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac5=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
e:SetOperation(s.prop3(ac1,ac2,ac3,ac4,ac5))
end
function s.filter0(c,e,tp)
return c:IsSetCard(0x619) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end
function s.hfilter(c,code1,code2,code3,code4,code5)
return c:IsCode(code1,code2,code3,code4,code5)
end
function s.prop3(code1,code2,code3,code4,code5)
return
function (e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
local hg=g:Filter(s.hfilter,nil,code1,code2,code3,code4,code5)
if hg:GetCount()==g:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=hg:Select(tp,1,1,nil):GetFirst()
if tc:IsAbleToHand() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
if not Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.filter0),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) then return end
local result = Duel.SelectYesNo(tp,aux.Stringid(id,5))
if not result then return end
local ft0 = Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft0=1 end
local checktg = Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter0),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ft0,nil,e,tp)
tc=checktg:GetFirst()
while tc do
local tcg = Group.CreateGroup()
tcg:AddCard(tc)
tc:SetMaterial(tcg)
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
tc=checktg:GetNext()
end
Duel.SpecialSummonComplete()
end
else
Duel.ShuffleDeck(tp)
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-600000)
end
end
end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.prop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local c=e:GetHandler()
g:AddCard(c)
if tc:IsCode(ac) and tc:IsAbleToHand() then
Duel.DisableShuffleCheck()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
elseif tc:IsAbleToRemove(tp) then
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT+REASON_REVEAL)
end
end
\ No newline at end of file
--漆黑的片翼 - 暗之堕落大天使 - 神崎兰子
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--spsummon 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(s.splimit)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.con2)
e2:SetTarget(s.target2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o)
e3:SetTarget(s.target3)
e3:SetOperation(s.prop3)
c:RegisterEffect(e3)
end
function s.splimit(e,se,sp,st)
return st&SUMMON_TYPE_RITUAL~=SUMMON_TYPE_RITUAL or (se and se:GetHandler():IsSetCard(0x619))
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function s.thfilter(c)
return c:IsSetCard(0x619) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tc:IsCode(ac) and tc:IsAbleToHand() then
Duel.DisableShuffleCheck()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) then
local result = Duel.SelectYesNo(tp,aux.Stringid(id,4))
if not result then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g1:GetCount()>0 and Duel.SendtoHand(g1,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g1)
Duel.ShuffleDeck(tp)
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT)
end
end
end
elseif tc:IsAbleToRemove(tp) then
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT+REASON_REVEAL)
end
end
function s.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetDecktopGroup(tp,5)
return g:FilterCount(Card.IsAbleToHand,nil)>0
end
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac1=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac2=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac3=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac4=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac5=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
e:SetOperation(s.retop(ac1,ac2,ac3,ac4,ac5))
end
function s.hfilter(c,code1,code2,code3,code4,code5)
return c:IsCode(code1,code2,code3,code4,code5)
end
function s.retop(code1,code2,code3,code4,code5)
return
function (e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
local hg=g:Filter(s.hfilter,nil,code1,code2,code3,code4,code5)
if hg:GetCount()==g:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=hg:Select(tp,1,1,nil):GetFirst()
if tc:IsAbleToHand() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
local disg2 = Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if disg2:GetCount()==0 then return end
local result = Duel.SelectYesNo(tp,aux.Stringid(id,5))
if not result then return end
local disg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
local tc01=disg:GetFirst()
while tc01 do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc01:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc01:RegisterEffect(e2)
tc01=g:GetNext()
end
Duel.Destroy(disg2,REASON_EFFECT)
end
else
Duel.ShuffleDeck(tp)
local removeg = Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,nil)
if removeg:GetCount()>0 then
Duel.Remove(removeg,POS_FACEDOWN,REASON_EFFECT)
end
end
end
end
function s.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
end
function s.prop3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<=0 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)<=0 then return end
local off=1
local ops={}
local opval={}
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 then
ops[off]=aux.Stringid(id,6)
opval[off]=0
off=off+1
end
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 then
ops[off]=aux.Stringid(id,7)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(1-tp,table.unpack(ops))+1
local sel=opval[op]
if sel==0 then
local sg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if sg:GetCount()>0 then
Duel.ConfirmCards(tp,sg)
Duel.BreakEffect()
if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>4 then
Duel.SortDecktop(tp,1-tp,5)
end
Duel.ShuffleHand(1-tp)
end
elseif sel==1 then
local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if sg:GetCount()>0 then
Duel.ConfirmCards(1-tp,sg)
Duel.BreakEffect()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 then
local g=Duel.GetDecktopGroup(tp,5)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.SortDecktop(1-tp,tp,5)
end
end
Duel.ShuffleHand(tp)
end
end
end
\ No newline at end of file
--漆黑的片翼 - 暗之堕落大天使 - 神崎兰子
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--spsummon 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(s.splimit)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.con2)
e2:SetTarget(s.target2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o)
e3:SetTarget(s.target3)
e3:SetOperation(s.prop3)
c:RegisterEffect(e3)
end
function s.splimit(e,se,sp,st)
return st&SUMMON_TYPE_RITUAL~=SUMMON_TYPE_RITUAL or (se and se:GetHandler():IsSetCard(0x619))
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function s.thfilter(c)
return c:IsSetCard(0x619) and c:IsAbleToHand() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tc:IsCode(ac) and tc:IsAbleToHand() then
Duel.DisableShuffleCheck()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) then
local result = Duel.SelectYesNo(tp,aux.Stringid(id,4))
if not result then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g1:GetCount()>0 and Duel.SendtoHand(g1,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g1)
Duel.ShuffleDeck(tp)
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT)
end
end
end
elseif tc:IsAbleToRemove(tp) then
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT+REASON_REVEAL)
end
end
function s.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetDecktopGroup(tp,5)
return g:FilterCount(Card.IsAbleToHand,nil)>0
end
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac1=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac2=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac3=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac4=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac5=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
e:SetOperation(s.retop(ac1,ac2,ac3,ac4,ac5))
end
function s.hfilter(c,code1,code2,code3,code4,code5)
return c:IsCode(code1,code2,code3,code4,code5)
end
function s.retop(code1,code2,code3,code4,code5)
return
function (e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
local hg=g:Filter(s.hfilter,nil,code1,code2,code3,code4,code5)
if hg:GetCount()==g:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=hg:Select(tp,1,1,nil):GetFirst()
if tc:IsAbleToHand() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
if not Duel.IsPlayerCanDraw(tp,2) then return end
local result = Duel.SelectYesNo(tp,aux.Stringid(id,5))
if not result then return end
Duel.Draw(tp,2,REASON_EFFECT)
end
else
Duel.ShuffleDeck(tp)
if e:GetHandler():IsAbleToRemove() then
Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_EFFECT)
end
local removeg = Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil)
if removeg:GetCount()>0 then
local removeg2=Duel.GetFieldGroup(tp,LOCATION_HAND,0):RandomSelect(1-tp,2)
Duel.Remove(removeg2,POS_FACEDOWN,REASON_EFFECT)
end
end
end
end
function s.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 or Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
end
function s.prop3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<=0 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)<=0 then return end
local off=1
local ops={}
local opval={}
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 then
ops[off]=aux.Stringid(id,6)
opval[off]=0
off=off+1
end
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 then
ops[off]=aux.Stringid(id,7)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(1-tp,table.unpack(ops))+1
local sel=opval[op]
if sel==0 then
local sg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if sg:GetCount()>0 then
Duel.ConfirmCards(tp,sg)
Duel.BreakEffect()
if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>4 then
Duel.SortDecktop(tp,1-tp,5)
end
Duel.ShuffleHand(1-tp)
end
elseif sel==1 then
local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if sg:GetCount()>0 then
Duel.ConfirmCards(1-tp,sg)
Duel.BreakEffect()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 then
local g=Duel.GetDecktopGroup(tp,5)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.SortDecktop(1-tp,tp,5)
end
end
Duel.ShuffleHand(tp)
end
end
end
\ No newline at end of file
--编织暗之仪式的少女
local s,id,o=GetID()
function s.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_RITUAL_LEVEL)
e0:SetValue(s.rlevel)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_EVENT_PLAYER)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(s.mtcon)
e2:SetOperation(s.mtop)
c:RegisterEffect(e2)
end
function s.rlevel(e,c)
local lv=aux.GetCappedLevel(e:GetHandler())
if c:IsSetCard(0x619) then
local clv=c:GetLevel()
return (lv<<16)+clv
else return lv end
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function s.thfilter(c)
return c:IsSetCard(0x619) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT)
end
end
end
function s.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL
and eg:IsExists(Card.IsSetCard,1,nil,0x619)
end
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0x619)
local rc=g:GetFirst()
if not rc then return end
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=4 then return end
Duel.SortDecktop(tp,tp,5)
end
\ No newline at end of file
--参加魔女舞踏会的少女
local s,id,o=GetID()
function s.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_RITUAL_LEVEL)
e0:SetValue(s.rlevel)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOGRAVE+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_EVENT_PLAYER)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(s.mtcon)
e2:SetOperation(s.mtop)
c:RegisterEffect(e2)
end
function s.rlevel(e,c)
local lv=aux.GetCappedLevel(e:GetHandler())
if c:IsSetCard(0x619) then
local clv=c:GetLevel()
return (lv<<16)+clv
else return lv end
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function s.thfilter(c)
return c:IsSetCard(0x619) and c:IsAbleToGrave()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 then
Duel.ShuffleDeck(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT)
end
end
end
function s.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL
and eg:IsExists(Card.IsSetCard,1,nil,0x619)
end
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0x619)
local rc=g:GetFirst()
if not rc then return end
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(1000)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e4,true)
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
function s.rmfilter(c)
return c:IsAbleToHand()
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.rmfilter(chkc) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
local tc2=Duel.GetFirstTarget()
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tc:IsCode(ac) and tc:IsAbleToHand() and tc2:IsRelateToEffect(e) and tc2:IsAbleToHand() then
Duel.DisableShuffleCheck()
g:AddCard(tc2)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ShuffleHand(tp)
elseif tc:IsAbleToRemove(tp) then
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT+REASON_REVEAL)
end
end
\ No newline at end of file
--仪式编织者的暗之种
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.target)
e2:SetOperation(s.prop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,id+o)
e3:SetRange(LOCATION_GRAVE)
e3:SetTarget(s.target2)
e3:SetOperation(s.prop2)
c:RegisterEffect(e3)
end
function s.filter(c,e,tp)
return c:IsSetCard(0x619) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end
function s.matfilter(c)
return c:GetLevel()>0 and c:IsSetCard(0x619)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(s.matfilter,nil)
local g=Duel.GetDecktopGroup(tp,5)
return g:FilterCount(Card.IsAbleToHand,nil)>0
end
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac1=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac2=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac3=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac4=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac5=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
e:SetOperation(s.prop3(ac1,ac2,ac3,ac4,ac5))
end
function s.hfilter(c,code1,code2,code3,code4,code5)
return c:IsCode(code1,code2,code3,code4,code5)
end
function s.prop3(code1,code2,code3,code4,code5)
return
function (e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
local hg=g:Filter(s.hfilter,nil,code1,code2,code3,code4,code5)
if hg:GetCount()==g:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=hg:Select(tp,1,1,nil):GetFirst()
if tc:IsAbleToHand() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_HAND+LOCATION_DECK,0,2,nil) then
Duel.BreakEffect()
local result = Duel.SelectYesNo(tp,aux.Stringid(id,5))
if not result then return end
local mg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
local tc=g1:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:Select(tp,1,2,tc)
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
else
Duel.ShuffleDeck(tp)
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-600000)
end
end
end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.prop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tc:IsCode(ac) and tc:IsAbleToHand() then
Duel.DisableShuffleCheck()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
elseif tc:IsAbleToRemove(tp) then
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT+REASON_REVEAL)
end
end
\ No newline at end of file
--仪式编织者的暗之种
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetTarget(s.thtg)
e0:SetOperation(s.thop)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target3)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.target2)
e2:SetOperation(s.prop2)
c:RegisterEffect(e2)
end
function s.thfilter(c)
return c:IsSetCard(0x619) and c:IsAbleToHand() and c:IsType(TYPE_RITUAL) and (c:IsType(TYPE_MONSTER) or c:IsType(TYPE_SPELL))
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tc:IsCode(ac) and tc:IsAbleToHand() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) then
local result = Duel.SelectYesNo(tp,aux.Stringid(id,4))
if not result then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g1:GetCount()>0 and Duel.SendtoHand(g1,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g1)
Duel.ShuffleDeck(tp)
Duel.ShuffleHand(tp)
end
end
elseif tc:IsAbleToRemove(tp) then
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT+REASON_REVEAL)
end
end
function s.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetDecktopGroup(tp,5)
return g:FilterCount(Card.IsAbleToHand,nil)>0
end
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac1=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac2=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac3=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac4=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac5=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
e:SetOperation(s.prop3(ac1,ac2,ac3,ac4,ac5))
end
function s.filter0(c,e,tp)
return c:IsSetCard(0x619) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) and c:IsType(TYPE_RITUAL)
end
function s.hfilter(c,code1,code2,code3,code4,code5)
return c:IsCode(code1,code2,code3,code4,code5)
end
function s.prop3(code1,code2,code3,code4,code5)
return
function (e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
local hg=g:Filter(s.hfilter,nil,code1,code2,code3,code4,code5)
if hg:GetCount()==g:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=hg:Select(tp,1,1,nil):GetFirst()
if tc:IsAbleToHand() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
if not Duel.SelectYesNo(tp,aux.Stringid(id,5)) then return end
local mg1=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g0=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_DECK,0,1,1,nil,s.filter,e,tp,mg1,nil,Card.GetLevel,"Greater")
local tc0=g0:GetFirst()
if tc0 then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc0,tc0)
if tc0.mat_filter then
mg=mg:Filter(tc0.mat_filter,tc,tp)
else
mg:RemoveCard(tc0)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc0:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc0:GetLevel(),tp,tc0,tc0:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc0:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc0,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc0:CompleteProcedure()
end
end
else
Duel.ShuffleDeck(tp)
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,0)
end
end
end
function s.filter(c,e,tp)
return c:IsSetCard(0x619)
end
function s.mfilter(c)
return c:GetLevel()>0 and c:IsSetCard(0x619) and c:IsAbleToDeck()
end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function s.prop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -9,7 +9,7 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
--e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
......
......@@ -9,7 +9,7 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
--e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
......
......@@ -9,7 +9,7 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
--e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
......@@ -38,8 +38,8 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......@@ -70,7 +70,7 @@ function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()>e:GetLabel()
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,1000,REASON_EFFECT)
Duel.Damage(1-tp,800,REASON_EFFECT)
end
--SearchCard
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -2,20 +2,6 @@
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,33300900)
--send to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,id)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
......@@ -23,12 +9,26 @@ function s.initial_effect(c)
e3:SetCode(EVENT_RELEASE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id+1000000)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
--set s/t
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id+o*10000)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function s.tgfilter(c)
return c:IsCode(33300900) and c:IsAbleToGrave()
return aux.IsCodeListed(c,33300900) and c:IsAbleToGrave()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -58,4 +58,17 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
end
--set
function s.setfilter(c)
return c:IsCode(33300907) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc then Duel.SSet(tp,tc) end
end
--诞地邪徒 拜月教弓手
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,33300900)
--return
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
......@@ -15,12 +16,13 @@ function s.initial_effect(c)
--set s/t
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,id+o*10000)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -60,4 +62,23 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc then Duel.SSet(tp,tc) end
end
--return to hand
function s.thfilter(c)
return aux.IsCodeListed(c,33300900) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
......@@ -22,8 +22,13 @@ function cm.initial_effect(c)
end
--e1
function cm.e1f1(c, e, tp)
return c:GetType() & 0x81 == 0x81 and c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_RITUAL, tp, false, true)
and (c:IsLocation(LOCATION_DECK) and c:IsCode(33300900) or c:IsRace(RACE_SPELLCASTER))
if c:GetType() & 0x81 ~= 0x81 or not c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_RITUAL, tp, false, true) then
return false
end
if c:IsLocation(LOCATION_DECK) then
return c:IsCode(33300900)
end
return c:IsRace(RACE_SPELLCASTER)
end
function cm.e1f2(c, tp, mg)
local g = mg:Filter(Card.IsCanBeRitualMaterial, c, c):Filter((c.mat_filter or aux.TRUE), nil, tp)
......
--诞地邪徒 邪教主假身
local s,id,o=GetID()
function c333009112.initial_effect(c)
--cardname
aux.AddCodeList(c,33300900)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,33300900,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),1,true,true)
--change name
aux.EnableChangeCode(c,33300900,LOCATION_MZONE+LOCATION_GRAVE)
end
......@@ -2,9 +2,9 @@
local s,id,o=GetID()
function s.initial_effect(c)
-- 作为这张卡的发动时的效果处理,可以从自己的卡组·墓地把1只「蒸汽朋克」怪兽加入手卡
-- 作为这张卡的发动时的效果处理,可以从自己的卡组·墓地把1只「蒸汽朋克」怪兽加入手卡,那之后,可以从手卡把1只「蒸汽朋克」怪兽特殊召唤
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
......@@ -33,21 +33,36 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
-- 作为这张卡的发动时的效果处理,可以从自己的卡组·墓地把1只「蒸汽朋克」怪兽加入手卡
-- 作为这张卡的发动时的效果处理,可以从自己的卡组·墓地把1只「蒸汽朋克」怪兽加入手卡,那之后,可以从手卡把1只「蒸汽朋克」怪兽特殊召唤
function s.thfilter(c)
return c:IsSetCard(0x666b) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) 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)
if #g>0 then
if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
if Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 and sg:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,sg)
Duel.BreakEffect()
local spg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if #spg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sp=spg:Select(tp,1,1,nil)
Duel.SpecialSummon(sp,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x666b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
-- 这个回合没有送去墓地的这张卡在墓地存在的场合,支付300基本分才能发动,这张卡加入手卡
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,300) end
......
--尼罗修正者 不灭王权
function c67200985.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_TOEXTRA)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(4,67200985)
e0:SetCost(c67200985.cost)
e0:SetTarget(c67200985.target)
e0:SetOperation(c67200985.activate)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,67200986+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c67200985.sprcon)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200985,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,67200987)
e2:SetTarget(c67200985.destg)
e2:SetOperation(c67200985.desop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c67200985.spcon)
c:RegisterEffect(e3)
end
function c67200985.sprfilter(c)
return c:IsFaceup() and c:IsCode(67200985)
end
function c67200985.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(c67200985.sprfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
--
function c67200985.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
end
function c67200985.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x967a)
end
function c67200985.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200985.tefilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
end
function c67200985.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200985,0))
local g=Duel.SelectMatchingCard(tp,c67200985.tefilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoExtraP(g,nil,REASON_EFFECT)
end
end
--
function c67200985.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c67200985.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--
function c67200985.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
\ No newline at end of file
--尼罗修正者 魂羽
function c67200988.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_TOEXTRA)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(4,67200988)
e0:SetTarget(c67200988.target)
e0:SetOperation(c67200988.activate)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,67200989+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c67200988.sprcon)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1,67200990)
e2:SetCondition(c67200988.thcon)
e2:SetTarget(c67200988.thtg)
e2:SetOperation(c67200988.thop)
c:RegisterEffect(e2)
end
function c67200988.sprfilter(c)
return c:IsFaceup() and c:IsCode(67200985)
end
function c67200988.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(c67200988.sprfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
--
function c67200988.seqfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:GetSequence()>=5
end
function c67200988.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c67200988.seqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67200988.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(67200988,2))
Duel.SelectTarget(tp,c67200988.seqfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c67200988.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e)
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)
if c:IsRelateToEffect(e) then
Duel.SendtoExtraP(c,nil,REASON_EFFECT)
end
end
--
function c67200988.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup()
end
function c67200988.filter(c)
return c:IsSetCard(0x967a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c67200988.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsExistingMatchingCard(c67200988.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c67200988.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c67200988.filter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c67200988.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
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