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

31

parent 3f5de524
No preview for this file type
#[2024.4 DIY] #[2024.5 DIY]
!2024.4 DIY !2024.5 DIY
#001 #001
00110015 0 --Fate/Grand Order·Lancer·埃列什基伽勒 00110015 0 --Fate/Grand Order·Lancer·埃列什基伽勒
...@@ -101,7 +101,6 @@ ...@@ -101,7 +101,6 @@
09310010 0 --旅界神使 单调缘 09310010 0 --旅界神使 单调缘
09310023 1 --单调万圣 白石唯 09310023 1 --单调万圣 白石唯
09310024 1 --相对性单调逻辑 09310024 1 --相对性单调逻辑
09310030 1 --扭曲植物 形单调味树
09310038 1 --空想邪物 单调雷蛇 09310038 1 --空想邪物 单调雷蛇
09310039 0 --幻兽界神 圣单调白翼 09310039 0 --幻兽界神 圣单调白翼
09310054 0 --单调的记忆 灰色 09310054 0 --单调的记忆 灰色
...@@ -614,6 +613,20 @@ ...@@ -614,6 +613,20 @@
21000781 0 --大原满美食汇 - 心爱甜品 21000781 0 --大原满美食汇 - 心爱甜品
21000823 0 --璃亚梦的地下演出场 21000823 0 --璃亚梦的地下演出场
21000860 0 --千川千寻 21000860 0 --千川千寻
#211
21185571 1 --森林的王兽
21185576 0 --灰之水云天-雾龙
21185580 0 --幻星的守护者
21185584 1 --迷沼异声 蔓古
21185588 0 --翔空鱼灵
21185590 2 --库拉小恶魔
21185593 0 --神理的未来之盒
21185595 2 --苍星之理
21185601 0 --星见的种草姬
21185602 2 --庇佑者
21185605 1 --灵巢之主 索杰德尔
21185608 1 --斯布林蒂
21185612 2 --奇稻田姬·八岐附身
#215 #215
21520061 1 --玲珑法师-夕雾 21520061 1 --玲珑法师-夕雾
21520066 1 --玲珑法师-鸢尾 21520066 1 --玲珑法师-鸢尾
...@@ -1493,17 +1506,6 @@ ...@@ -1493,17 +1506,6 @@
67210104 0 --夏乡追忆 初遇花田 67210104 0 --夏乡追忆 初遇花田
67210112 0 --夏乡净梦 桐远暮羽 67210112 0 --夏乡净梦 桐远暮羽
67220003 0 --忘却之剑 67220003 0 --忘却之剑
#696
69601003 0 --算命蟾蜍
69696005 0 --钟馗大神
69696903 0 --电磁蜘蛛
69696915 0 --迁跃融合
69696916 0 --星灵虎
69696918 1 --梦魇术士
69696931 0 --奇璞
69696933 0 --洞察之冠
69696934 1 --落石之径
69696961 1 --产量激增
#714 #714
71401001 2 --蝶现-「启」 71401001 2 --蝶现-「启」
71401008 2 --蝶幻-「胧」 71401008 2 --蝶幻-「胧」
...@@ -1560,6 +1562,7 @@ ...@@ -1560,6 +1562,7 @@
75646618 1 --幻海深渊 伊瑟琳 75646618 1 --幻海深渊 伊瑟琳
75646854 0 --柴郡猫 雷电芽衣 75646854 0 --柴郡猫 雷电芽衣
#770 #770
77000108 0 --君主事件簿 埃尔梅罗二世
77000529 1 --临界精灵 限定灵装 77000529 1 --临界精灵 限定灵装
77000700 1 --眼狩令 77000700 1 --眼狩令
77000703 0 --鸣神永恒 渡来介者 77000703 0 --鸣神永恒 渡来介者
......
...@@ -49,7 +49,8 @@ function cm.initial_effect(c) ...@@ -49,7 +49,8 @@ function cm.initial_effect(c)
end end
function cm.effectfilter(e,ct) function cm.effectfilter(e,ct)
local etype=Duel.GetChainInfo(ct,CHAININFO_EXTTYPE) local etype=Duel.GetChainInfo(ct,CHAININFO_EXTTYPE)
return etype&(TYPE_RITUAL+TYPE_PENDULUM)==TYPE_RITUAL+TYPE_PENDULUM local code=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_CODE)
return etype&(TYPE_RITUAL+TYPE_PENDULUM)==TYPE_RITUAL+TYPE_PENDULUM and code~=m
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsFaceup() and c:IsAbleToRemove() return c:IsFaceup() and c:IsAbleToRemove()
......
--简单的幸福 --简单的幸福
local m=31338007 local m=31338001
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
......
--卡牌大师·逆命
function c69601001.initial_effect(c)
c:EnableReviveLimit()
--select
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69601001,4))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c69601001.slcon)
e1:SetCost(c69601001.slcost)
e1:SetTarget(c69601001.sltg)
e1:SetOperation(c69601001.slop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69601001,5))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DICE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c69601001.negcon)
e2:SetTarget(c69601001.negtg)
e2:SetOperation(c69601001.negop)
c:RegisterEffect(e2)
end
c69601001.toss_dice=true
function c69601001.slcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(69601001)==0 end
c:RegisterFlagEffect(69601001,RESET_CHAIN,0,1)
end
function c69601001.slcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ex=Duel.GetOperationInfo(ev,CATEGORY_DICE)
return c:IsSummonType(SUMMON_TYPE_RITUAL) and ex and rp==tp
end
function c69601001.sltg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsPlayerCanDraw(tp,1) and Duel.GetFlagEffect(tp,69601001)==0
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD,1,nil)
and Duel.GetFlagEffect(tp,69601001+100)==0
local b3=Duel.GetFlagEffect(tp,69601001+200)==0
if chk==0 then return b1 or b2 or b3 end
end
function c69601001.slop(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsPlayerCanDraw(tp,1) and Duel.GetFlagEffect(tp,69601001)==0
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD,1,nil)
and Duel.GetFlagEffect(tp,69601001+100)==0
local b3=Duel.GetFlagEffect(tp,69601001+200)==0
local op=0
if b1 and b2 and b3 then op=Duel.SelectOption(tp,aux.Stringid(69601001,0),aux.Stringid(69601001,1),aux.Stringid(69601001,2))
elseif b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(69601001,0),aux.Stringid(69601001,1))
elseif b2 and b3 then op=Duel.SelectOption(tp,aux.Stringid(69601001,1),aux.Stringid(69601001,2))+1
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(69601001,0))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(69601001,1))+1
elseif b3 then op=Duel.SelectOption(tp,aux.Stringid(69601001,2))+2
else return end
if op==0 then
Duel.Draw(tp,1,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,69601001,RESET_PHASE+PHASE_END,0,1)
elseif op==1 then
local hg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil)
local og=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
if #hg>0 and Duel.SelectYesNo(tp,aux.Stringid(69601001,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=hg:RandomSelect(tp,1)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=og:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
Duel.RegisterFlagEffect(tp,69601001+100,RESET_PHASE+PHASE_END,0,1)
else
Duel.Damage(1-tp,1000,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,69601001+200,RESET_PHASE+PHASE_END,0,1)
end
end
function c69601001.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c69601001.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function c69601001.negop(e,tp,eg,ep,ev,re,r,rp)
if not re:GetHandler():IsRelateToEffect(re) then return end
local d=Duel.TossDice(tp,1)
if d~=6 then
Duel.NegateActivation(ev)
Duel.Destroy(eg,REASON_EFFECT)
end
end
--戏法骗局
function c69601002.initial_effect(c)
aux.AddCodeList(c,69601001)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69601002,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DICE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,69601002+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c69601002.target)
e1:SetOperation(c69601002.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69601002,2))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_STANDBY_PHASE+TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetCondition(c69601002.thcon)
e2:SetTarget(c69601002.thtg)
e2:SetOperation(c69601002.thop)
c:RegisterEffect(e2)
end
c69601002.toss_dice=true
function c69601002.filter(c,e,tp)
if bit.band(c:GetType(),0x81)~=0x81 or not c:IsCode(69601001)
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) then return false end
return true
end
function RUFilter(c,filter,e,tp,m1,m2,lv,greater_or_equal,chk)
if bit.band(c:GetType(),0x81)~=0x81 or (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then
mg:Merge(m2)
end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(c,lv,greater_or_equal)
local res=mg:CheckSubGroup(Auxiliary.RitualCheck,1,lv,tp,c,lv,greater_or_equal)
Auxiliary.GCheckAdditional=nil
return res
end
function c69601002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69601002.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function c69601002.activate(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.TossDice(tp,1)
local num=6-d
if num>6 then return end
local mg=Duel.GetRitualMaterial(tp)
local spflag=true
if num<=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(69601002,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c69601002.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=tg:GetFirst()
if tc then
tc:SetMaterial(nil)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
tc:CompleteProcedure()
end
spflag=false
end
if num<=0 then num=1 end
if num<=6 and spflag and Duel.IsExistingMatchingCard(RUFilter,tp,LOCATION_HAND,0,1,nil,Card.IsCode,e,tp,mg,nil,num,"Greater",69601001) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,RUFilter,tp,LOCATION_HAND,0,1,1,nil,Card.IsCode,e,tp,mg,nil,num,"Greater",69601001)
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
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,num,"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,num,tp,tc,num,"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
end
function c69601002.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c69601002.thfilter(c)
return c.toss_dice and c:IsAbleToHand()
end
function c69601002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69601002.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c69601002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c69601002.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+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TOSS_DICE_NEGATE)
e1:SetCondition(c69601002.dicecon)
e1:SetOperation(c69601002.diceop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c69601002.dicecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,69601002)==0
end
function c69601002.diceop(e,tp,eg,ep,ev,re,r,rp)
local cc=Duel.GetCurrentChain()
local cid=Duel.GetChainInfo(cc,CHAININFO_CHAIN_ID)
if c69601002[0]~=cid and Duel.SelectYesNo(tp,aux.Stringid(69601002,2)) then
Duel.Hint(HINT_CARD,0,69601002)
e:GetHandler():RegisterFlagEffect(69601002,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local dc={Duel.GetDiceResult()}
local ac=1
local ct=bit.band(ev,0xff)+bit.rshift(ev,16)
if ct>1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(69601002,3))
local val,idx=Duel.AnnounceNumber(tp,table.unpack(dc,1,ct))
ac=idx+1
end
dc[ac]=6
Duel.SetDiceResult(table.unpack(dc))
c69601002[0]=cid
end
end
\ No newline at end of file
--算命蟾蜍
function c69601003.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69601003,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE+CATEGORY_DICE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DAMAGE_STEP+TIMING_STANDBY_PHASE)
e1:SetCountLimit(1,69601003)
e1:SetCost(c69601003.cost)
e1:SetTarget(c69601003.tg)
e1:SetOperation(c69601003.op)
c:RegisterEffect(e1)
--become material
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(c69601003.imcon)
e2:SetOperation(c69601003.imop)
c:RegisterEffect(e2)
end
c69601003.toss_dice=true
function c69601003.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c69601003.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function c69601003.op(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local d=Duel.TossDice(tp,1)
if d==6 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c69601003.efilter)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
tc:RegisterFlagEffect(nil,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(69601003,1))
elseif d>=1 and d<=5 then
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end
end
function c69601003.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c69601003.imcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL and not e:GetHandler():IsPreviousLocation(LOCATION_OVERLAY)
end
function c69601003.imop(e,tp,eg,ep,ev,re,r,rp)
local rc=eg:GetFirst()
while rc do
if rc:GetFlagEffect(69601003)==0 then
--unreleaseable
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(69601003,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
rc:RegisterEffect(e2,true)
rc:RegisterFlagEffect(69601003,RESET_EVENT+RESETS_STANDARD,0,1)
end
rc=eg:GetNext()
end
end
--一夫当关
function c69622001.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c69622001.target)
e1:SetOperation(c69622001.activate)
c:RegisterEffect(e1)
end
function c69622001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)==1
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 end
end
function c69622001.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft1=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local ft2=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
if ft1~=1 or ft2~=1 then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
-- immmue effect
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetOwnerPlayer(tp)
e1:SetValue(c69622001.efilter)
e1:SetCondition(c69622001.condition)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
--gain DEF
local e2=Effect.CreateEffect(tc)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(1000)
e2:SetCondition(c69622001.condition)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if not tc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(tc)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
function c69622001.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c69622001.condition(e)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1
end
--暗裔·拉亚斯特
function c69622021.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),2)
c:EnableReviveLimit()
--effect register
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(c69622021.effcon)
e1:SetOperation(c69622021.regop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69622021,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,69622021)
e2:SetCondition(c69622021.descon)
e2:SetTarget(c69622021.destg)
e2:SetOperation(c69622021.desop)
c:RegisterEffect(e2)
--dec atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(c69622021.atkval)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTarget(c69622021.thtg)
e4:SetOperation(c69622021.thop)
c:RegisterEffect(e4)
end
function c69622021.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonLocation(LOCATION_EXTRA)
end
function c69622021.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(69622021,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c69622021.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(69622021)~=0
end
function c69622021.desfilter(c,atk)
return c:GetAttack()<atk
end
function c69622021.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c69622021.desfilter,tp,0,LOCATION_MZONE,nil,e:GetHandler():GetAttack())
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0,nil)
local tc=g:GetFirst()
while tc do
Duel.SetChainLimit(c69622021.chlimit(tc))
tc=g:GetNext()
end
end
function c69622021.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c69622021.desfilter,tp,0,LOCATION_MZONE,nil,e:GetHandler():GetAttack())
if #g<=0 then return end
Duel.Destroy(g,REASON_EFFECT)
end
function c69622021.chlimit(c)
return function (e,ep,tp)
return ep==tp or e:GetHandler()~=c
end
end
function c69622021.atkval(e)
return e:GetHandler():GetEquipCount()*(-500)
end
function c69622021.thfilter(c)
return c:IsRace(RACE_FIEND) and c:IsLevelBelow(4) and c:IsAbleToHand()
end
function c69622021.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69622021.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c69622021.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c69622021.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--凯隐·拉亚斯特之力
function c69622022.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),4,3)
c:EnableReviveLimit()
--self destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SELF_DESTROY)
e1:SetCondition(c69622022.sdcon)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69622022,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c69622022.discost)
e2:SetCondition(c69622022.discon)
e2:SetTarget(c69622022.distg)
e2:SetOperation(c69622022.disop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(69622022,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetTarget(c69622022.sptg)
e3:SetOperation(c69622022.spop)
c:RegisterEffect(e3)
end
function c69622022.sdfilter(c)
return not c:IsSetCard(0x3691)
end
function c69622022.sdcon(e)
return not e:GetHandler():GetOverlayGroup():IsExists(c69622022.sdfilter,1,nil)
end
function c69622022.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x3691)
end
function c69622022.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c69622022.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c69622022.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local atk=tc:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
Duel.AdjustInstantly()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(0)
tc:RegisterEffect(e3)
end
end
function c69622022.spfilter(c,e,tp)
return c:IsCode(69622021) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c69622022.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69622022.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c69622022.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c69622022.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
--圣剑 断钢湖中剑
function c69622023.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c69622023.target)
e1:SetOperation(c69622023.operation)
c:RegisterEffect(e1)
--xyz summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69622023,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,69622023+EFFECT_COUNT_CODE_SINGLE)
e2:SetTarget(c69622023.xyzsptg)
e2:SetOperation(c69622023.xyzspop)
c:RegisterEffect(e2)
--synchro summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(69622023,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,69622023+EFFECT_COUNT_CODE_SINGLE)
e3:SetTarget(c69622023.sysptg)
e3:SetOperation(c69622023.syspop)
c:RegisterEffect(e3)
--Equip limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(c69622023.eqlimit)
c:RegisterEffect(e4)
--equip
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(69622023,2))
e5:SetCategory(CATEGORY_EQUIP)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetRange(LOCATION_GRAVE)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,69622023+100)
e5:SetCondition(c69622023.eqcon)
e5:SetTarget(c69622023.eqtg)
e5:SetOperation(c69622023.eqop)
c:RegisterEffect(e5)
end
function c69622023.eqlimit(e,c)
return c:IsAttribute(ATTRIBUTE_DARK)
end
function c69622023.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK)
end
function c69622023.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c69622023.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c69622023.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c69622023.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c69622023.operation(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
Duel.Equip(tp,c,tc)
end
end
function c69622023.xyzspfilter(c,e,tp,mc)
return c:IsCode(69622022) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c69622023.xyzsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
if chk==0 then return c:GetControler()==ec:GetControler() and aux.MustMaterialCheck(ec,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c69622023.xyzspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,ec) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c69622023.xyzspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
if ec:IsFacedown() or ec:IsControler(1-tp) or ec:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c69622023.xyzspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,ec)
local tc=g:GetFirst()
if tc then
local mg=ec:GetOverlayGroup()
if mg:GetCount()>0 then
Duel.Overlay(tc,mg)
end
tc:SetMaterial(Group.FromCards(ec))
Duel.Overlay(tc,c)
Duel.Overlay(tc,Group.FromCards(ec))
Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c69622023.syspfilter(c,e,tp,mc)
return c:IsCode(69622021) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c69622023.sysptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
if chk==0 then return c:GetControler()==ec:GetControler() and Duel.IsExistingMatchingCard(c69622023.syspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,ec) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c69622023.syspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
local g=Group.FromCards(ec)
g:AddCard(c)
if c:IsRelateToEffect(e) and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) and ec:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c69622023.syspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,ec)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c69622023.eqfilter(c,tp,mc)
return c:IsSummonPlayer(tp) and c:IsSetCard(0x3691) and c:IsFaceup() and mc:CheckEquipTarget(c)
end
function c69622023.tgfilter(c,tp,g)
return g:IsContains(c)
end
function c69622023.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c69622023.eqfilter,1,nil,tp,e:GetHandler())
end
function c69622023.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c69622023.eqfilter,nil,tp,e:GetHandler())
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c69622023.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp,g) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c69622023.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(c69622023.eqfilter,nil,tp,e:GetHandler())
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or not Duel.IsExistingTarget(c69622023.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp,g) then return end
if not c:IsRelateToEffect(e) or #g<=0 then return end
local tg
if #g==1 then
tg=g:Clone()
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
tg=g:Select(tp,1,1,nil)
end
if not c:CheckUniqueOnField(tp) then return end
Duel.Equip(tp,c,tg:GetFirst())
end
--格斗穹顶 赛特迈
function c69690001.initial_effect(c)
--immune effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c69690001.imcon)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
--copy effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69690001,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c69690001.cecost)
e2:SetTarget(c69690001.cetg)
e2:SetOperation(c69690001.ceop)
c:RegisterEffect(e2)
--chain attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65260293,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCountLimit(1)
e3:SetCondition(c69690001.atcon)
e3:SetTarget(c69690001.attg)
e3:SetOperation(c69690001.atop)
c:RegisterEffect(e3)
end
function c69690001.imcon(e)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function c69690001.cecost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c69690001.cefilter(c)
return c:IsAbleToGraveAsCost() and c:IsSetCard(0x3690)
and c:CheckActivateEffect(false,true,false)~=nil
and Duel.GetFlagEffect(tp,c:GetOriginalCode())==0
end
function c69690001.cetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c69690001.cefilter,tp,LOCATION_DECK,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c69690001.cefilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
local cod=tc:GetOriginalCode()
local te,ceg,cep,cev,cre,cr,crp=tc:CheckActivateEffect(false,true,true)
Duel.SendtoGrave(tc,REASON_COST)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
Duel.RegisterFlagEffect(tp,cod,RESET_PHASE+PHASE_END,0,1)
end
function c69690001.ceop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local te=e:GetLabelObject()
if not te or not c:IsFaceup() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
function c69690001.atcon(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
return aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function c69690001.atfilter(c)
return c:IsAbleToDeck() and c:IsSetCard(0xa690)
end
function c69690001.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c69690001.atfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c69690001.atfilter,tp,LOCATION_GRAVE,0,1,nil)
and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c69690001.atfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c69690001.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToBattle() then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e1)
end
end
--格斗技-身灵鹤
function c69690002.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,69690002+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c69690002.condition)
e1:SetTarget(c69690002.target)
e1:SetOperation(c69690002.activate)
c:RegisterEffect(e1)
end
function c69690002.tfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end
function c69690002.condition(e,tp,eg,ep,ev,re,r,rp)
if not (rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c69690002.tfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
and Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function c69690002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c69690002.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
if g:IsExists(Card.IsCode,1,nil,tp,69690001) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
--格斗技-气吞虎
function c69690003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1,69690003+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c69690003.condition)
e1:SetOperation(c69690003.activate)
c:RegisterEffect(e1)
end
function c69690003.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:IsControler(tp) and at:IsRace(RACE_WARRIOR)
end
function c69690003.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local at=Duel.GetAttacker()
local dt=Duel.GetAttackTarget()
if at:IsFaceup() and at:IsRelateToBattle() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
at:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(0,1)
e2:SetValue(1)
e2:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e2,tp)
if at:IsCode(69690001) and dt:IsFaceup() then
Duel.BreakEffect()
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetValue(0)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
dt:RegisterEffect(e3)
end
end
end
--格斗技-势如狮
function c69690004.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetCountLimit(1,69690004+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c69690004.condition)
e1:SetOperation(c69690004.activate)
c:RegisterEffect(e1)
end
function c69690004.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
local dt=Duel.GetAttackTarget()
return dt:IsControler(tp) and dt:IsFaceup() and dt:IsRace(RACE_WARRIOR) and at:IsCanChangePosition()
end
function c69690004.activate(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
local dt=Duel.GetAttackTarget()
Duel.NegateAttack()
if at:IsFaceup() and at:IsCanChangePosition() then
Duel.ChangePosition(at,POS_FACEDOWN_DEFENSE)
if dt:IsCode(69690001) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
--格斗技-心合一
function c69690005.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c69690005.condition)
e1:SetTarget(c69690005.target)
e1:SetOperation(c69690005.activate)
c:RegisterEffect(e1)
end
function c69690005.rmfilter(c)
return c:IsSetCard(0x3690) and c:IsAbleToRemoveAsCost() and not c:IsCode(69690005)
end
function c69690005.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c69690005.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c69690005.rmfilter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return g:CheckSubGroup(aux.dncheck,3,3) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,3,0,0)
end
function c69690005.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local fid=c:GetFieldID()
local turnp=Duel.GetTurnPlayer()
local g=Duel.GetMatchingGroup(c69690005.rmfilter,tp,LOCATION_GRAVE,0,nil)
if not g:CheckSubGroup(aux.dncheck,3,3) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:SelectSubGroup(tp,aux.dncheck,false,3,3)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
Duel.BreakEffect()
Duel.SkipPhase(turnp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_EP)
e1:SetTargetRange(1,1)
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN)
Duel.RegisterEffect(e1,tp)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,69690001)
local tc=g:GetFirst()
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(4000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69690005,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE)
e2:SetCountLimit(1)
e2:SetLabel(fid)
e2:SetOperation(c69690005.desop)
e2:SetReset(RESET_PHASE+PHASE_BATTLE)
Duel.RegisterEffect(e2,tp)
end
function c69690005.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_ATTACK)
Duel.Hint(HINT_CARD,0,69690005)
Duel.Destroy(g,REASON_EFFECT)
end
--穹顶驾临
function c69690006.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c69690006.condition)
e1:SetTarget(c69690006.target)
e1:SetOperation(c69690006.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetCondition(aux.exccon)
e2:SetTarget(c69690006.settg)
e2:SetOperation(c69690006.setop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(69690006,ACTIVITY_SPSUMMON,c69690006.counterfilter)
end
function c69690006.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsRace(RACE_WARRIOR)
end
function c69690006.cfilter(c)
return c:IsFaceup() and c:IsCode(69690001)
end
function c69690006.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c69690006.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function c69690006.spfilter(c,e,tp)
return c:IsCode(69690001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c69690006.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c69690006.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c69690006.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c69690006.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c69690006.setfilter(c)
return c:IsSetCard(0x3690) and c:IsSSetable()
end
function c69690006.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69690006.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c69690006.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c69690006.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
--钟馗大神
local m=69696005
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3,3)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.atkval)
c:RegisterEffect(e2)
--cannot target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(aux.indoval)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetOperation(cm.desop)
c:RegisterEffect(e5)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsAttribute(ATTRIBUTE_DARK) and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.atkval(e,c)
return c:GetLinkedGroup():FilterCount(cm.atkfilter,nil)*500
end
function cm.desfilter(c,tp)
return c:IsControler(tp) and c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(cm.desfilter,1,nil,tp) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
--雷祭神
local m=69696006
local cm=_G["c"..m]
function cm.initial_effect(c)
--equip and spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_EQUIP+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
end
function cm.eqfilter(c,e)
return (c:IsRace(RACE_ZOMBIE) or c:GetPreviousRaceOnField()==RACE_ZOMBIE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsLocation(LOCATION_GRAVE)
and c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:IsCanBeEffectTarget(e) and not c:IsForbidden()
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and cm.eqfilter(chkc,e) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and eg:IsExists(cm.eqfilter,1,nil,e) end
local g=eg:Filter(cm.eqfilter,nil,e)
local tc=nil
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
tc=g:Select(tp,1,1,nil):GetFirst()
else
tc=g:GetFirst()
end
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if c:IsFaceup() and tc:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(atk/2)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e3:SetRange(LOCATION_SZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetCondition(cm.matcon)
e3:SetValue(cm.matval)
tc:RegisterEffect(e3)
end
end
end
function cm.eqlimit(e,c)
return e:GetOwner()==c
end
function cm.matcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),m)==0
end
function cm.mfilter(c,ec)
return c:IsLocation(LOCATION_MZONE) and c==ec
end
function cm.exmfilter(c)
return c:IsLocation(LOCATION_SZONE) and c:IsCode(m)
end
function cm.matval(e,c,mg)
local c=e:GetHandler()
return mg:IsExists(cm.mfilter,1,nil,c:GetEquipTarget()) and not mg:IsExists(cm.exmfilter,1,nil)
end
\ No newline at end of file
--风祭神
local m=69696007
local cm=_G["c"..m]
function cm.initial_effect(c)
--equip and spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_EQUIP+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_SSET+TIMING_END_PHASE)
e2:SetCost(cm.descost)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
end
function cm.eqfilter(c,e)
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsLocation(LOCATION_GRAVE)
and c:IsReason(REASON_EFFECT) and c:IsCanBeEffectTarget(e) and not c:IsForbidden()
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and cm.eqfilter(chkc,e) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and eg:IsExists(cm.eqfilter,1,nil,e) end
local g=eg:Filter(cm.eqfilter,nil,e)
local tc=nil
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
tc=g:Select(tp,1,1,nil):GetFirst()
else
tc=g:GetFirst()
end
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and tc:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c,false) then return end
local typ=tc:GetOriginalType()
e:SetLabel(typ)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(cm.efilter)
e2:SetLabel(typ)
tc:RegisterEffect(e2)
end
end
end
function cm.eqlimit(e,c)
return e:GetOwner()==c
end
function cm.efilter(e,te)
return te:IsActiveType(e:GetLabel()) and te:GetOwner()~=e:GetOwner()
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost()
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--巫祭神
local m=69696008
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,69697008)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCode(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,69695008)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.spfilter(c,ft,tp)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and (ft>0 or (c:GetSequence()<5 and c:IsControler(tp)))
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.spfilter(chkc,ft) end
if chk==0 then return ft>-1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ft,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,ft,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_LINK)
end
function cm.thfilter(c)
return c:IsRace(RACE_ZOMBIE) and (c:IsAttack(0) or c:IsDefense(0)) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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