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

31

parent 3f5de524
No preview for this file type
#[2024.4 DIY]
!2024.4 DIY
#[2024.5 DIY]
!2024.5 DIY
#001
00110015 0 --Fate/Grand Order·Lancer·埃列什基伽勒
......@@ -101,7 +101,6 @@
09310010 0 --旅界神使 单调缘
09310023 1 --单调万圣 白石唯
09310024 1 --相对性单调逻辑
09310030 1 --扭曲植物 形单调味树
09310038 1 --空想邪物 单调雷蛇
09310039 0 --幻兽界神 圣单调白翼
09310054 0 --单调的记忆 灰色
......@@ -614,6 +613,20 @@
21000781 0 --大原满美食汇 - 心爱甜品
21000823 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
21520061 1 --玲珑法师-夕雾
21520066 1 --玲珑法师-鸢尾
......@@ -1493,17 +1506,6 @@
67210104 0 --夏乡追忆 初遇花田
67210112 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
71401001 2 --蝶现-「启」
71401008 2 --蝶幻-「胧」
......@@ -1560,6 +1562,7 @@
75646618 1 --幻海深渊 伊瑟琳
75646854 0 --柴郡猫 雷电芽衣
#770
77000108 0 --君主事件簿 埃尔梅罗二世
77000529 1 --临界精灵 限定灵装
77000700 1 --眼狩令
77000703 0 --鸣神永恒 渡来介者
......
......@@ -49,7 +49,8 @@ function cm.initial_effect(c)
end
function cm.effectfilter(e,ct)
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
function cm.thfilter(c)
return c:IsFaceup() and c:IsAbleToRemove()
......
--简单的幸福
local m=31338007
local m=31338001
local cm=_G["c"..m]
function cm.initial_effect(c)
--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
--祝祭神
local m=69696009
local cm=_G["c"..m]
function c69696009.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,69697009)
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+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,69695009)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.spfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and cm.spfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
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:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(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 m=69696010
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_ZOMBIE),2,2)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--Destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(cm.desreptg)
e2:SetOperation(cm.desrepop)
c:RegisterEffect(e2)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,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 and tc:IsRelateToEffect(e) then
if Duel.Destroy(tc,REASON_EFFECT)==0 or bit.band(tc:GetPreviousRaceOnField(),RACE_ZOMBIE)==0 then return end
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function cm.repfilter(c,e)
return c:IsDestructable(e) and c:IsRace(RACE_ZOMBIE) and c:IsFaceup() and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsReason(REASON_REPLACE) and Duel.IsExistingMatchingCard(cm.repfilter,tp,LOCATION_MZONE,0,1,c,e) end
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,cm.repfilter,tp,LOCATION_MZONE,0,1,1,c,e)
e:SetLabelObject(g:GetFirst())
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true
else return false end
end
function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end
\ No newline at end of file
--再生之王 戎克
local m=69696011
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(cm.matcheck)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.matcheck(e,c)
local c=e:GetHandler()
local g=c:GetMaterial()
local atk=g:GetSum(Card.GetAttack)
local def=g:GetSum(Card.GetDefense)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(def)
c:RegisterEffect(e2)
end
function cm.cfilter1(c,tp)
return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() and c:IsLevelBelow(6)
and Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_GRAVE,0,1,c,c:GetLevel())
end
function cm.cfilter2(c,lv)
return c:IsFaceup() and c:IsNotTuner(nil)() and c:IsLevel(6-lv) and c:IsAbleToRemoveAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_GRAVE,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.cfilter1,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.cfilter2,tp,LOCATION_GRAVE,0,1,1,g1:GetFirst(),g1:GetFirst():GetLevel())
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc~=e:GetHandler() and aux.nzatk(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.nzatk,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.SelectTarget(tp,aux.nzatk,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(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
local atk=tc:GetPreviousAttackOnField()
local def=tc:GetPreviousDefenseOnField()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(atk)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(def)
c:RegisterEffect(e2)
end
end
--防火斗士
local m=69696012
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(cm.regop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetBattleDamage(tp)~=0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetOperation(cm.damop)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
Duel.BreakEffect()
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local dam=ev-1190
if dam>0 then
Duel.ChangeBattleDamage(tp,dam)
else
Duel.ChangeBattleDamage(tp,0)
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)~=0
end
function cm.thfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) 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_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
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_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--碾压墙
local m=69696601
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c,lc)
return c:GetSequence()==lc
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,2,nil) end
local i,j=0,4
local dg=Group.CreateGroup()
while i<3 or j>1 do
if i~=3 then
local g1=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil,i)
if g1:GetCount()>0 then
dg:Merge(g1)
i=3
else i=i+1 end
end
if j~=1 then
local g2=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil,j)
if g2:GetCount()>0 then
dg:Merge(g2)
j=1
else j=j-1 end
end
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,dg,2,0,0)
if Duel.IsExistingMatchingCard(Card.IsPosition,tp,0,LOCATION_MZONE,3,nil,POS_FACEUP) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(cm.chainlm)
end
dg:Clear()
end
function cm.chainlm(e,rp,tp)
return tp==rp and not e:IsActiveType(TYPE_MONSTER)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local i,j=0,4
local dg=Group.CreateGroup()
while i<3 or j>1 do
if i~=3 then
local g1=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil,i)
if g1:GetCount()>0 then
dg:Merge(g1)
i=3
else i=i+1 end
end
if j~=1 then
local g2=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil,j)
if g2:GetCount()>0 then
dg:Merge(g2)
j=1
else j=j-1 end
end
end
if dg:GetCount()>0 then
Duel.SendtoGrave(dg,REASON_RULE)
end
dg:Clear()
end
\ No newline at end of file
--西高德
function c69696901.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),6,2)
c:EnableReviveLimit()
--atk
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:SetCondition(c69696901.con)
e1:SetValue(600)
c:RegisterEffect(e1)
--move
local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69696901,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCategory(CATEGORY_TODECK)
e2:SetCountLimit(1)
e2:SetCost(c69696901.cost)
e2:SetTarget(c69696901.tg)
e2:SetOperation(c69696901.op)
c:RegisterEffect(e2)
end
function c69696901.con(e)
return e:GetHandler():GetColumnGroupCount()==0
end
function c69696901.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c69696901.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 end
end
function c69696901.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsControler(tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
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(c,nseq)
local g=c:GetColumnGroup()
local cg=g:Filter(Card.IsType,nil,TYPE_LINK)
if g:GetCount()>0 then
local seq=0
local tc=cg:GetFirst()
while tc do
if tc:IsControler(tp) then
seq=bit.bor(seq,bit.rshift(tc:GetLinkedZone(),16))
else seq=bit.bor(seq,bit.lshift(tc:GetLinkedZone(),16)) end
tc=cg:GetNext()
end
e:SetLabel(seq)
Duel.BreakEffect()
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetLabel(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetOperation(c69696901.disop)
e:GetHandler():RegisterEffect(e1)
end
end
end
end
function c69696901.disop(e,tp)
return e:GetLabel()
end
--连接之网
function c69696903.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.NOT(aux.FilterBoolFunction(Card.IsLinkType,TYPE_LINK)),1,1)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69696903,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c69696903.drcon)
e1:SetTarget(c69696903.drtg)
e1:SetOperation(c69696903.drop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c69696903.drfilter(c,tp,lg)
return c:GetSummonPlayer()==tp and lg:IsContains(c)
end
function c69696903.drcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(c69696903.drfilter,1,nil,1-tp,lg)
end
function c69696903.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c69696903.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--铁狼 伊森格林
function c69696904.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsType,TYPE_FLIP),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69696904,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,696969041)
e1:SetCondition(c69696904.spcon)
e1:SetTarget(c69696904.sptg)
e1:SetOperation(c69696904.spop)
c:RegisterEffect(e1)
--reveal
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69696904,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,696969042)
e2:SetTarget(c69696904.retg)
e2:SetOperation(c69696904.reop)
c:RegisterEffect(e2)
end
function c69696904.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c69696904.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsType(TYPE_FLIP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c69696904.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c69696904.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c69696904.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c69696904.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 then
Duel.ConfirmCards(1-tp,tc)
end
end
function c69696904.refilter1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c69696904.refilter2(c,ty)
return c:IsSSetable() and c:IsType(ty)
end
function c69696904.refilter3(c)
return c:IsSSetable() and c:IsType(TYPE_FIELD)
end
function c69696904.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(Duel.AnnounceType(tp))
end
function c69696904.reop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
local opt=e:GetLabel()
local ty=TYPE_MONSTER
if opt==1 then ty=TYPE_SPELL end
if opt==2 then ty=TYPE_TRAP end
local ct=g:FilterCount(Card.IsType,nil,ty)
if ct>0 then
local g1=Duel.GetMatchingGroup(c69696904.refilter1,tp,0,LOCATION_HAND,nil,e,tp)
local g2=Duel.GetMatchingGroup(c69696904.refilter2,tp,0,LOCATION_HAND,nil,ty)
local g3=Duel.GetMatchingGroup(c69696904.refilter3,tp,0,LOCATION_HAND,nil)
if opt==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g1:GetCount()>0 then
if Duel.SelectYesNo(tp,aux.Stringid(69696904,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g11=g1:Select(tp,1,1,nil)
local tc=g11:GetFirst()
if tc then
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,tc)
end
end
elseif ((opt==1 and g3:GetCount()>0) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and g2:GetCount()>0 then
if Duel.SelectYesNo(tp,aux.Stringid(69696904,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then
if opt==1 then
local g22=g3:Select(tp,1,1,nil)
local tc=g22:GetFirst()
if tc then
Duel.BreakEffect()
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
end
end
else
local g22=g2:Select(tp,1,1,nil,ty)
local tc=g22:GetFirst()
if tc then
Duel.BreakEffect()
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
end
end
end
end
else Duel.Damage(tp,1000,REASON_EFFECT) end
Duel.ShuffleHand(1-tp)
end
end
\ No newline at end of file
--全副武装
function c69696906.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c69696906.target)
e1:SetOperation(c69696906.operation)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c69696906.eqlimit)
c:RegisterEffect(e2)
--indestructable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e3:SetCountLimit(1)
e3:SetValue(c69696906.valcon)
c:RegisterEffect(e3)
--attack all
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_ATTACK_ALL)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c69696906.eqlimit(e,c)
return c:IsRace(RACE_WARRIOR)
end
function c69696906.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end
function c69696906.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c69696906.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c69696906.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c69696906.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c69696906.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 c69696906.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
--死亡骑士·里德
function c69696908.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),3,2)
c:EnableReviveLimit()
--Overlay
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SEND_REPLACE)
e1:SetTarget(c69696908.reptg)
e1:SetValue(c69696908.repval)
c:RegisterEffect(e1)
local dg=Group.CreateGroup()
dg:KeepAlive()
e1:SetLabelObject(dg)
--atklimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c69696908.atkval)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(69696908,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c69696908.spcost)
e3:SetTarget(c69696908.sptg)
e3:SetOperation(c69696908.spop)
c:RegisterEffect(e3)
end
function c69696908.repfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:GetDestination()==LOCATION_GRAVE and c:IsReason(REASON_DESTROY) and not c:IsType(TYPE_TOKEN) and c:IsAbleToChangeControler() and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c69696908.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local count=eg:FilterCount(c69696908.repfilter,e:GetHandler())
return count>0
end
if Duel.SelectYesNo(tp,aux.Stringid(69696908,0)) then
local g=eg:Filter(c69696908.repfilter,e:GetHandler())
local container=e:GetLabelObject()
container:Clear()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(69696908,2))
local dg=g:Select(tp,1,g:GetCount(),nil)
Duel.HintSelection(dg)
if dg:GetCount()>0 then
local tc=dg:GetFirst()
while tc do
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(e:GetHandler(),Group.FromCards(tc))
tc=dg:GetNext()
end
container:Merge(dg)
end
return true
end
return false
end
function c69696908.repval(e,c)
return e:GetLabelObject():IsContains(c)
end
function c69696908.atkval(e,c)
return Duel.GetOverlayCount(c:GetControler(),1,0)*200
end
function c69696908.spcost(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 c69696908.spfilter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c69696908.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c69696908.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c69696908.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c69696908.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c69696908.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:IsRace(RACE_ZOMBIE) and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 then
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
--黏土怪
function c69696910.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69696910,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,69696910)
e1:SetCondition(c69696910.spcon)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69696910,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,69696010)
e2:SetCondition(c69696910.drcon)
e2:SetTarget(c69696910.drtg)
e2:SetOperation(c69696910.drop)
c:RegisterEffect(e2)
end
function c69696910.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
end
function c69696910.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_FUSION
end
function c69696910.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c69696910.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--黄金手
function c69696913.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)
e1:SetTarget(c69696913.target)
e1:SetOperation(c69696913.operation)
c:RegisterEffect(e1)
--control
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c69696913.ctcon)
e2:SetOperation(c69696913.ctop)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetValue(1)
c:RegisterEffect(e3)
--maintain
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetCondition(c69696913.mtcon)
e4:SetOperation(c69696913.mtop)
c:RegisterEffect(e4)
end
function c69696913.target(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_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c69696913.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c69696913.ctcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget()
return Duel.GetAttacker()==tc and tc:GetBattleTarget() and tc:GetBattleTarget():IsControler(1-tp)
end
function c69696913.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget()
local bc=tc:GetBattleTarget()
if e:GetHandler():IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
if tc:GetRace()==RACE_SPELLCASTER then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local tg=g:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if bc==tc then
Duel.GetControl(tc,tp)
else Duel.GetControl(tc,tp,PHASE_BATTLE,1) end
else
local tg=g:RandomSelect(tp,1)
local tc=tg:GetFirst()
if bc==tc then
Duel.GetControl(tc,tp)
else Duel.GetControl(tc,tp,PHASE_BATTLE,1) end
end
end
end
end
function c69696913.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c69696913.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.CheckLPCost(tp,1000) and Duel.SelectYesNo(tp,aux.Stringid(69696913,0)) then
Duel.PayLPCost(tp,1000)
else
Duel.Destroy(e:GetHandler(),REASON_COST)
end
end
\ No newline at end of file
--迁跃融合
function c69696915.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,69696915+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c69696915.target)
e1:SetOperation(c69696915.activate)
c:RegisterEffect(e1)
end
function c69696915.filter1(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e) and c:IsType(TYPE_MONSTER)
end
function c69696915.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c69696915.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function c69696915.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<5 then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
Duel.ConfirmCards(tp,g)
if g:GetCount()>0 then
local chkf=tp
local mg1=Duel.GetDecktopGroup(tp,5):Filter(c69696915.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c69696915.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c69696915.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if (sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0)) and Duel.IsExistingMatchingCard(c69696915.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.ConfirmCards(tp,sg)
if Duel.SelectYesNo(tp,aux.Stringid(69696915,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc)) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
g:Sub(mat1)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
g:Sub(mat2)
end
tc:CompleteProcedure()
end
end
end
Duel.SortDecktop(tp,tp,g:GetCount())
end
\ No newline at end of file
--星灵虎
function c69696916.initial_effect(c)
--spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69696916,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(c69696916.con)
e2:SetTarget(c69696916.drtg)
e2:SetOperation(c69696916.drop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP)
c:RegisterEffect(e3)
--handes
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(69696916,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e4:SetCondition(c69696916.con)
e4:SetTarget(c69696916.hdtg)
e4:SetOperation(c69696916.hdop)
c:RegisterEffect(e4)
local e3=e4:Clone()
e3:SetCode(EVENT_FLIP)
c:RegisterEffect(e3)
end
function c69696916.con(e,tp,eg,ep,ev,re,r,rp)
local th=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local thp=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
return thp>th
end
function c69696916.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local th=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local thp=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
local ct=thp-th
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c69696916.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local th=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local thp=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
local ct=thp-th
if ct>0 then
Duel.Draw(p,ct,REASON_EFFECT)
end
end
function c69696916.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local th=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local thp=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
local ct=thp-th
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c69696916.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local th=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local thp=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
local ct=thp-th
if ct>0 then
Duel.Draw(p,ct,REASON_EFFECT)
end
end
function c69696916.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local th=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local thp=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
local ct=thp-th
if chk==0 then return ct>0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,ct)
end
function c69696916.hdop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local th=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local thp=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
local ct=thp-th
local g=Duel.GetFieldGroup(p,LOCATION_HAND,0)
if ct>0 then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DISCARD)
local sg=g:FilterSelect(p,Card.IsDiscardable,ct,ct,nil,p)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
end
--星灵符·虎
function c69696917.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,69696917+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c69696917.target)
e1:SetOperation(c69696917.activate)
c:RegisterEffect(e1)
--Atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(800)
c:RegisterEffect(e2)
--destroy/to hand replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetTarget(c69696917.desreptg)
e3:SetOperation(c69696917.desrepop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_SEND_REPLACE)
e4:SetTarget(c69696917.threptg)
e4:SetValue(c69696917.threpval)
c:RegisterEffect(e4)
end
function c69696917.filter(c)
return c:IsSummonable(true,nil,0) and c:IsType(TYPE_SPIRIT)
end
function c69696917.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69696917.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c69696917.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c69696917.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
if Duel.Summon(tp,g:GetFirst(),true,nil)~=0 then
Duel.Equip(tp,e:GetHandler(),g:GetFirst())
--Add Equip limit
local e1=Effect.CreateEffect(g:GetFirst())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetValue(c69696917.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1)
end
end
end
function c69696917.eqlimit(e,c)
return e:GetOwner()==c
end
function c69696917.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tg=c:GetEquipTarget()
if chk==0 then return not c:IsStatus(STATUS_DESTROY_CONFIRMED)
and tg and tg:IsReason(REASON_BATTLE+REASON_EFFECT) and not tg:IsReason(REASON_REPLACE)
and c:IsAbleToHand() and tg:IsCanTurnSet() end
return Duel.SelectYesNo(tp,aux.Stringid(69696917,0))
end
function c69696917.desrepop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=c:GetEquipTarget()
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.RaiseEvent(c,EVENT_TO_HAND,e,REASON_EFFECT,tp,tp,0)
Duel.ChangePosition(tg,POS_FACEDOWN_DEFENSE)
end
function c69696917.threptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tg=c:GetEquipTarget()
if chk==0 then return tg:IsControler(tp) and tg:IsLocation(LOCATION_ONFIELD) and tg:GetDestination()==LOCATION_HAND and not tg:IsReason(REASON_REPLACE) and c:IsAbleToHand() and tg:IsCanTurnSet() end
if Duel.SelectYesNo(tp,aux.Stringid(69696917,1)) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.RaiseEvent(c,EVENT_TO_HAND,e,REASON_EFFECT,tp,tp,0)
Duel.ChangePosition(tg,POS_FACEDOWN_DEFENSE)
return true
else return false end
end
function c69696917.threpval(e,c)
return false
end
--梦魇魔术师
local m=69696918
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
local e01=Effect.CreateEffect(c)
e01:SetDescription(1166)
e01:SetType(EFFECT_TYPE_FIELD)
e01:SetCode(EFFECT_SPSUMMON_PROC)
e01:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e01:SetRange(LOCATION_EXTRA)
e01:SetCondition(cm.LinkCondition(aux.TRUE,2,3,cm.gf))
e01:SetTarget(cm.LinkTarget(aux.TRUE,2,3,cm.gf))
e01:SetOperation(aux.LinkOperation(aux.TRUE,2,3,cm.gf))
e01:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e01)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,6969691)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,6969692)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.gf(g,lc)
return g:IsExists(Card.IsRace,1,nil,RACE_SPELLCASTER)
end
function cm.LConditionFilter(c,f,lc)
if c:IsLocation(LOCATION_EXTRA) then return c:IsCanBeLinkMaterial(lc) and (not f or f(c)) and c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) end
return c:IsCanBeLinkMaterial(lc) and (not f or f(c))
end
function cm.GetLinkMaterials(tp,f,lc)
local mg=Duel.GetMatchingGroup(cm.LConditionFilter,tp,LOCATION_MZONE+LOCATION_EXTRA,0,nil,f,lc)
local mg2=Duel.GetMatchingGroup(aux.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc)
if mg2:GetCount()>0 then mg:Merge(mg2) end
return mg
end
function cm.LinkCondition(f,minc,maxc,gf)
return
function(e,c)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg=cm.GetLinkMaterials(tp,f,c)
local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
local ct=sg:GetCount()
if ct>maxc then return false end
return cm.LCheckGoal(tp,sg,c,minc,ct,gf)
or mg:IsExists(cm.LCheckRecursive,1,sg,tp,sg,mg,c,ct,minc,maxc,gf)
end
end
--
function cm.LCheckGoal(tp,sg,lc,minc,ct,gf)
return ct>=minc and sg:CheckWithSumEqual(aux.GetLinkCount,lc:GetLink(),ct,ct) and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg))
end
function cm.LCheckRecursive(c,tp,sg,mg,lc,ct,minc,maxc,gf)
sg:AddCard(c)
ct=ct+1
local res=cm.LCheckGoal(tp,sg,lc,minc,ct,gf)
or (ct<maxc and mg:IsExists(cm.LCheckRecursive,1,sg,tp,sg,mg,lc,ct,minc,maxc,gf))
sg:RemoveCard(c)
ct=ct-1
return res
end
function cm.LinkTarget(f,minc,maxc,gf)
return
function(e,tp,eg,ep,ev,re,r,rp,chk,c)
local mg=cm.GetLinkMaterials(tp,f,c)
local bg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if #bg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
bg:Select(tp,#bg,#bg,nil)
end
local sg=Group.CreateGroup()
sg:Merge(bg)
local finish=false
while #sg<maxc do
finish=cm.LCheckGoal(tp,sg,c,minc,#sg,gf)
local cg=mg:Filter(cm.LCheckRecursive,sg,tp,sg,mg,c,#sg,minc,maxc,gf)
if #cg==0 then break end
local cancel=not finish
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local tc=cg:SelectUnselect(sg,tp,finish,cancel,minc,maxc)
if not tc then break end
if not bg:IsContains(tc) then
if not sg:IsContains(tc) then
sg:AddCard(tc)
if #sg==maxc then finish=true end
else
sg:RemoveCard(tc)
end
elseif #bg>0 and #sg<=#bg then
return false
end
end
if finish then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.Destroy(tg,REASON_EFFECT)
end
end
function cm.filter22(c,tp)
return c:GetPreviousControler()==tp and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(cm.filter22,e:GetHandler(),tp)
local tc=sg:GetFirst()
if sg:GetCount()==1 then
e:SetLabel(tc:GetPreviousRaceOnField())
return true
else return false end
end
function cm.spfilter(c,e,tp,race)
return c:IsRace(race) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local race=e:GetLabel()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,race) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local race=e:GetLabel()
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,race)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--死冥王 恶魂
local m=69696919
local cm=_G["c"..m]
function cm.initial_effect(c)
--banish / spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.bfilter(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and not c:IsCode(m)
end
function cm.bfilter1(c,e)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemove() and not c:IsCode(m)
end
function cm.bfilter2(c,e)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemove() and c:IsRelateToEffect(e) and not c:IsCode(m)
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.bfilter,1,nil)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(cm.bfilter1,nil)
local b1=eg:FilterCount(cm.bfilter1,nil)>=1 and Duel.GetFlagEffect(tp,m)==0
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetFlagEffect(tp,m+100)==0
if chk==0 then return b1 or b2 end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local b1=eg:FilterCount(cm.bfilter2,nil,e)>=1 and Duel.GetFlagEffect(tp,m)==0
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetFlagEffect(tp,m+100)==0
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,0))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(m,1))+1
else return end
if op==0 then
local g1=eg:Filter(cm.bfilter2,nil,e)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.HintSelection(g)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
g:GetFirst():RegisterEffect(e1,true)
end
Duel.RegisterFlagEffect(tp,m+100,RESET_PHASE+PHASE_END,0,1)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
\ No newline at end of file
--齐备武装的士兵
function c69696920.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69696920,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_START)
e1:SetCondition(c69696920.descon)
e1:SetTarget(c69696920.destg)
e1:SetOperation(c69696920.desop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69696920,2))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,69696920)
e2:SetCost(c69696920.thcost)
e2:SetTarget(c69696920.thtg)
e2:SetOperation(c69696920.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c69696920.descon(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if d==e:GetHandler() then d=Duel.GetAttacker() end
e:SetLabelObject(d)
return d~=nil
end
function c69696920.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local d=e:GetLabelObject()
Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0)
end
function c69696920.desop(e,tp,eg,ep,ev,re,r,rp)
local d=e:GetLabelObject()
if not (Duel.SelectYesNo(1-tp,aux.Stringid(69696920,1)) and Duel.SelectYesNo(tp,aux.Stringid(69696920,1))) then return end
if d:IsRelateToBattle() then
Duel.Destroy(d,REASON_EFFECT)
end
end
function c69696920.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c69696920.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69696920.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c69696920.thfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
end
function c69696920.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c69696920.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
--冰寒寡妇蛛
function c69696921.initial_effect(c)
aux.AddXyzProcedure(c,nil,5,2)
c:EnableReviveLimit()
--disable and reduce ATK
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69696921,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP,0x21e0)
e1:SetCountLimit(1)
e1:SetCost(c69696921.cost)
e1:SetTarget(c69696921.tg)
e1:SetOperation(c69696921.op)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69696921,3))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.bdogcon)
e2:SetTarget(c69696921.sptg)
e2:SetOperation(c69696921.spop)
c:RegisterEffect(e2)
end
function c69696921.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttack(0) and c:IsFaceup()
end
function c69696921.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
local b2=Duel.CheckReleaseGroup(REASON_COST,tp,c69696921.cfilter,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(69696921,1),aux.Stringid(69696921,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(69696921,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(69696921,2))+1
else return end
if op==0 then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
else
local g=Duel.SelectReleaseGroup(REASON_COST,tp,c69696921.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
end
function c69696921.filter(c)
return c:IsFaceup() and (c:IsAttackAbove(1) or aux.disfilter1(c))
end
function c69696921.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c69696921.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c69696921.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c69696921.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c69696921.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetValue(0)
tc:RegisterEffect(e3)
end
end
function c69696921.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,69696922,0,0x4011,0,0,5,RACE_INSECT,ATTRIBUTE_WATER) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c69696921.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,69696922,0,0x4011,0,0,5,RACE_INSECT,ATTRIBUTE_WATER) then return end
local token=Duel.CreateToken(tp,69696922)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
--硬壳圣甲虫
function c69696923.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,c69696923.ovfilter,aux.Stringid(69696923,1),3,c69696923.xyzop)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69696923,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c69696923.descon)
e1:SetTarget(c69696923.destg)
e1:SetOperation(c69696923.desop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c69696923.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(69696923,2))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c69696923.drcon)
e3:SetTarget(c69696923.drtg)
e3:SetOperation(c69696923.drop)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
--atk limit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,LOCATION_MZONE)
e5:SetValue(c69696923.atlimit)
c:RegisterEffect(e5)
--destroy replace
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetCode(EFFECT_DESTROY_REPLACE)
e6:SetRange(LOCATION_MZONE)
e6:SetTarget(c69696923.reptg)
c:RegisterEffect(e6)
end
function c69696923.ovfilter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT) and c:GetCode()~=69696923 and c:IsType(TYPE_XYZ)
end
function c69696923.xyzop(e,tp,chk)
if chk==0 then return true end
e:GetHandler():RegisterFlagEffect(69696923,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)
end
function c69696923.vvfilter(c)
return c:IsType(TYPE_XYZ) and c:IsRankAbove(8)
end
function c69696923.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(c69696923.vvfilter,1,nil) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c69696923.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ and e:GetLabel()==1 and e:GetHandler():GetFlagEffect(69696923)==1
end
function c69696923.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c69696923.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_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c69696923.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ and e:GetLabel()==0 and e:GetHandler():GetFlagEffect(69696923)==1
end
function c69696923.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c69696923.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c69696923.atlimit(e,c)
return c~=e:GetHandler()
end
function c69696923.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
return true
end
\ No newline at end of file
--奇璞
local spnumber=1
function c69696931.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
e1:SetCondition(c69696931.spcon)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--spnumber change
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCondition(c69696931.numbercon)
e2:SetOperation(c69696931.numberop)
c:RegisterEffect(e2)
end
function c69696931.numbercon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function c69696931.numberop(e,tp,eg,ep,ev,re,r,rp)
spnumber=spnumber+1
end
function c69696931.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c69696931.filter,tp,LOCATION_SZONE,0,spnumber,nil)
end
function c69696931.filter(c)
return c:IsFaceup() and ((c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS)) or c:IsType(TYPE_FIELD))
end
\ No newline at end of file
--苍蓝雕纹魔像
function c69696932.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_ROCK),1,1)
--to hand instead of send to grave
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c69696932.thcon)
e1:SetOperation(c69696932.thop)
c:RegisterEffect(e1)
end
function c69696932.thcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
and rc:GetType()==TYPE_SPELL and rc:IsRelateToEffect(re) and rc:IsStatus(STATUS_LEAVE_CONFIRMED)
end
function c69696932.thop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local c=e:GetHandler()
if Duel.SelectEffectYesNo(tp,rc,aux.Stringid(69696932,0)) then
rc:CancelToGrave()
if Duel.SendtoHand(rc,nil,REASON_EFFECT)~=0 and rc:IsLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetLabel(rc:GetCode())
e1:SetValue(c69696932.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e2=Effect.CreateEffect(c)
e2:SetCode(EFFECT_CHANGE_TYPE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e2:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e2)
end
end
end
end
function c69696932.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
\ No newline at end of file
--洞察之冠
function c69696933.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,69696933+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c69696933.activate)
c:RegisterEffect(e1)
--place
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69696933,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetTarget(c69696933.pltg)
e2:SetOperation(c69696933.plop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(69696933,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetTarget(c69696933.sptg)
e3:SetOperation(c69696933.spop)
c:RegisterEffect(e3)
end
function c69696933.thfilter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_ROCK) and c:IsAbleToHand()
end
function c69696933.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c69696933.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(69696933,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c69696933.plfilter(c)
return c:IsRace(RACE_ROCK) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c69696933.pltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69696933.plfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c69696933.plop(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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c69696933.plfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
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
function c69696933.spfilter(c,e,sp)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c69696933.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c69696933.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c69696933.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c69696933.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c69696933.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--落石之径
function c69696934.initial_effect(c)
--Activate(summon)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON)
e1:SetCountLimit(1,69696934+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c69696934.condition)
e1:SetCost(c69696934.cost)
e1:SetTarget(c69696934.target)
e1:SetOperation(c69696934.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(69696934,0))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCost(c69696934.descost)
e3:SetTarget(c69696934.destg)
e3:SetOperation(c69696934.desop)
c:RegisterEffect(e3)
end
function c69696934.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function c69696934.costfilter(c)
return c:IsRace(RACE_ROCK) and c:IsAbleToGraveAsCost()
end
function c69696934.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69696934.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c69696934.costfilter,1,1,REASON_COST)
end
function c69696934.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c69696934.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c69696934.desfilter(c)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and c:IsAbleToGraveAsCost()
end
function c69696934.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69696934.desfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c69696934.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c69696934.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c69696934.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
--力量之种
function c69696935.initial_effect(c)
--rock summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69696935,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,69696935+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c69696935.sptg)
e1:SetOperation(c69696935.spop)
c:RegisterEffect(e1)
--spell summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69696935,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,69696935+EFFECT_COUNT_CODE_OATH)
e2:SetTarget(c69696935.sltg)
e2:SetOperation(c69696935.slop)
c:RegisterEffect(e2)
end
function c69696935.spfilter(c,e,sp)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c69696935.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c69696935.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c69696935.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c69696935.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c69696935.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c69696935.slfilter(c,e,tp)
return c:IsFaceup() and ((c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS)) or c:IsType(TYPE_FIELD))
and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0,TYPES_EFFECT_TRAP_MONSTER,300,700,3,RACE_ROCK,ATTRIBUTE_LIGHT)
and bit.band(c:GetOriginalType(),TYPE_MONSTER)==0
end
function c69696935.sltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c69696935.slfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c69696935.slfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c69696935.slop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,tc:GetCode(),0,TYPES_EFFECT_TRAP_MONSTER,300,700,3,RACE_ROCK,ATTRIBUTE_LIGHT) then return end
tc:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_LIGHT,RACE_ROCK,3,300,700)
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
--蜿蜒长阶
function c69696936.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,69696936+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--send replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_SEND_REPLACE)
e2:SetTarget(c69696936.reptg)
e2:SetValue(c69696936.repval)
c:RegisterEffect(e2)
local g=Group.CreateGroup()
g:KeepAlive()
e2:SetLabelObject(g)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(69696933,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCost(c69696936.thcost)
e3:SetTarget(c69696936.thtg)
e3:SetOperation(c69696936.thop)
c:RegisterEffect(e3)
end
function c69696936.repfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:GetDestination()==LOCATION_GRAVE and c:GetLeaveFieldDest()==0 and c:IsReason(REASON_DESTROY) and c:GetOwner()==tp and c:IsRace(RACE_ROCK) and c:GetReasonPlayer()==1-tp
end
function c69696936.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local count=eg:FilterCount(c69696936.repfilter,e:GetHandler(),tp)
return count>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>=count
end
if Duel.SelectYesNo(tp,aux.Stringid(69696936,1)) then
local container=e:GetLabelObject()
container:Clear()
local g=eg:Filter(c69696936.repfilter,e:GetHandler(),tp)
local tc=g:GetFirst()
while tc do
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
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)
tc=g:GetNext()
end
container:Merge(g)
return true
end
return false
end
function c69696936.repval(e,c)
return e:GetLabelObject():IsContains(c)
end
function c69696936.costfilter(c)
local lv=c:GetLevel()
return lv>0 and c:IsDiscardable() and c:IsRace(RACE_ROCK)
and Duel.IsExistingMatchingCard(c69696936.thfilter,tp,LOCATION_DECK,0,1,nil,lv+1)
end
function c69696936.thfilter(c,lv)
return c:IsLevelAbove(lv) and c:IsRace(RACE_ROCK) and c:IsAbleToHand()
end
function c69696936.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c69696936.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c69696936.costfilter,tp,LOCATION_HAND,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c69696936.costfilter,tp,LOCATION_HAND,0,1,1,nil)
e:SetLabel(g:GetFirst():GetLevel())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c69696936.thop(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c69696936.thfilter,tp,LOCATION_DECK,0,1,1,nil,lv+1)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--大地元素·克里夫
function c69696937.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c69696937.spcon)
c:RegisterEffect(e2)
--disable field
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c69696937.disval)
c:RegisterEffect(e3)
end
function c69696937.disval(e)
local val0,val1,val2,val3,val4,val=0,0,0,0,0,0
local c=e:GetHandler()
if Duel.CheckLocation(1-c:GetControler(),LOCATION_MZONE,0) then seq0=0 else seq0=1 end
if Duel.CheckLocation(1-c:GetControler(),LOCATION_MZONE,1) then seq1=0 else seq1=1 end
if Duel.CheckLocation(1-c:GetControler(),LOCATION_MZONE,2) then seq2=0 else seq2=1 end
if Duel.CheckLocation(1-c:GetControler(),LOCATION_MZONE,3) then seq3=0 else seq3=1 end
if Duel.CheckLocation(1-c:GetControler(),LOCATION_MZONE,4) then seq4=0 else seq4=1 end
local number=seq0*10000+seq1*1000+seq2*100+seq1*10+seq4
if (number==1010 or number==11011) then
val2=aux.SequenceToGlobal(1-c:GetControler(),LOCATION_MZONE,2)
val=val2
elseif number==10100 then
val1=aux.SequenceToGlobal(1-c:GetControler(),LOCATION_MZONE,1)
val=val1
elseif number==101 then
val3=aux.SequenceToGlobal(1-c:GetControler(),LOCATION_MZONE,3)
val=val3
elseif number==10001 then
val1=aux.SequenceToGlobal(1-c:GetControler(),LOCATION_MZONE,1)
val2=aux.SequenceToGlobal(1-c:GetControler(),LOCATION_MZONE,2)
val3=aux.SequenceToGlobal(1-c:GetControler(),LOCATION_MZONE,3)
val=val1|val2|val3
elseif (number==1001 or number==11001) then
val2=aux.SequenceToGlobal(1-c:GetControler(),LOCATION_MZONE,2)
val3=aux.SequenceToGlobal(1-c:GetControler(),LOCATION_MZONE,3)
val=val2|val3
elseif (number==10010 or number==10011) then
val1=aux.SequenceToGlobal(1-c:GetControler(),LOCATION_MZONE,1)
val2=aux.SequenceToGlobal(1-c:GetControler(),LOCATION_MZONE,2)
val=val1|val2
elseif number==10101 then
val1=aux.SequenceToGlobal(1-c:GetControler(),LOCATION_MZONE,1)
val3=aux.SequenceToGlobal(1-c:GetControler(),LOCATION_MZONE,3)
val=val1|val3
end
return val
end
function c69696937.spfilter(c)
return c:IsFaceup() and ((c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS)) or c:IsType(TYPE_FIELD))
end
function c69696937.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.GetMatchingGroupCount(c69696937.spfilter,c:GetControler(),LOCATION_SZONE,0,nil)>=4
end
--熔岩巨兽·墨菲特
function c69696938.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c69696938.spcon)
c:RegisterEffect(e2)
--cannot trigger
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_TRIGGER)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_SZONE)
e3:SetTarget(c69696938.datg)
c:RegisterEffect(e3)
--cannot flip
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(0,1)
c:RegisterEffect(e4)
--set
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(69696938,0))
e5:SetCategory(CATEGORY_DISABLE+CATEGORY_POSITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(c69696938.settg)
e5:SetOperation(c69696938.setop)
c:RegisterEffect(e5)
--negate
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(69696938,1))
e6:SetCategory(CATEGORY_NEGATE+CATEGORY_POSITION)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_CHAINING)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1)
e6:SetCost(c69696938.discost)
e6:SetCondition(c69696938.discon)
e6:SetTarget(c69696938.distg)
e6:SetOperation(c69696938.disop)
c:RegisterEffect(e6)
end
function c69696938.spfilter(c)
return c:IsFaceup() and ((c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS)) or c:IsType(TYPE_FIELD))
end
function c69696938.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.GetMatchingGroupCount(c69696938.spfilter,c:GetControler(),LOCATION_SZONE,0,nil)>=6
end
function c69696938.datg(e,c)
return c:IsFacedown()
end
function c69696938.setfilter(c)
if c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanChangePosition() then return true end
if c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsCanTurnSet() then return true end
if c:IsFaceup() and not c:IsDisabled() then return true end
return false
end
function c69696938.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(c69696938.setfilter,tp,0,LOCATION_ONFIELD,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c69696938.setfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
end
function c69696938.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if tc:IsType(TYPE_MONSTER) and tc:IsCanChangePosition() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
if tc:IsType(TYPE_SPELL+TYPE_TRAP) and tc:IsCanTurnSet() and not tc:IsType(TYPE_PENDULUM) then
Duel.ChangePosition(tc,POS_FACEDOWN)
Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
if tc:IsFaceup() and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
end
end
end
function c69696938.disfilter(c)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and c:IsAbleToGraveAsCost()
end
function c69696938.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69696938.disfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c69696938.disfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c69696938.discon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return bit.band(loc,LOCATION_ONFIELD)~=0 and ep~=tp
and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c69696938.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c69696938.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then
if rc:IsType(TYPE_MONSTER) and rc:IsCanChangePosition() then
Duel.ChangePosition(rc,POS_FACEDOWN_DEFENSE)
end
if rc:IsType(TYPE_SPELL+TYPE_TRAP) and rc:IsCanTurnSet() and not rc:IsType(TYPE_PENDULUM) then
rc:CancelToGrave()
Duel.ChangePosition(rc,POS_FACEDOWN)
Duel.RaiseEvent(rc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
if rc:IsFaceup() then Duel.Remove(rc,POS_FACEUP,REASON_RULE) end
end
end
\ No newline at end of file
--扭曲植物 荆棘蟾蜍
local m=69696941
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(m,1))
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(cm.spcost)
e2:SetCondition(cm.spcon)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,m+100)
e3:SetCondition(cm.descon)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.spfilter(c,e,tp,tid)
return c:IsSetCard(0x3696) and not c:IsCode(m) and c:GetTurnID()==tid and bit.band(c:GetReason(),REASON_DESTROY)~=0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsHasEffect(69696947)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,69696947)==0 end
Duel.Hint(HINT_CARD,0,69696947)
Duel.RegisterFlagEffect(tp,69696947,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local tid=Duel.GetTurnCount()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp,tid) end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,tid) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,tid)
g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0)
end
function cm.spop(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 c:IsCanBeSpecialSummoned(e,0,tp,false,false) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then
local g=Group.FromCards(c,tc)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--扭曲植物 枯林看护
local m=69696942
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(m,1))
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(cm.spcost)
e2:SetCondition(cm.spcon)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,m+100)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsHasEffect(69696947)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,69696947)==0 end
Duel.Hint(HINT_CARD,0,69696947)
Duel.RegisterFlagEffect(tp,69696947,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function cm.spfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x3696) and Duel.GetMZoneCount(tp,c)>0 and not c:IsCode(m)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.spfilter(chkc,tp) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.cfilter(c)
local tid=Duel.GetTurnCount()
return c:GetTurnID()==tid and bit.band(c:GetReason(),REASON_DESTROY)~=0 and c:IsType(TYPE_MONSTER)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0
and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(cm.cfilter,c:GetControler(),LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),ct)
if ft>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,69696949,0,TYPES_TOKEN_MONSTER,500,500,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect()
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local ctn=true
while ft>0 and ctn do
local token=Duel.CreateToken(tp,69696949)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
ft=ft-1
if ft<=0 or not Duel.SelectYesNo(tp,aux.Stringid(m,3)) then ctn=false end
end
Duel.SpecialSummonComplete()
end
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function cm.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3696) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(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
--扭曲植物 树皮吼怪
local m=69696943
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(m,1))
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(cm.spcost)
e2:SetCondition(cm.spcon)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+100)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.spfilter(c,tid)
return c:GetTurnID()==tid and bit.band(c:GetReason(),REASON_DESTROY)~=0 and c:IsType(TYPE_MONSTER) and not c:IsCode(m)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsHasEffect(69696947)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,69696947)==0 end
Duel.Hint(HINT_CARD,0,69696947)
Duel.RegisterFlagEffect(tp,69696947,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local tid=Duel.GetTurnCount()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,tid)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function cm.thfilter(c)
return c:IsSetCard(0x3696) and not c:IsCode(m) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--扭曲植物 游荡树怪
local m=69696944
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon1)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetDescription(aux.Stringid(m,1))
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(cm.spcost)
e3:SetCondition(cm.spcon2)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetDescription(aux.Stringid(m,1))
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(cm.spcost)
e4:SetCondition(cm.spcon2)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCountLimit(1,m+100)
e5:SetCondition(cm.con)
e5:SetTarget(cm.tg)
e5:SetOperation(cm.op)
c:RegisterEffect(e5)
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x3696) and c:IsSummonPlayer(tp) and not c:IsCode(m)
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsHasEffect(69696947) and eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,69696947)==0 end
Duel.Hint(HINT_CARD,0,69696947)
Duel.RegisterFlagEffect(tp,69696947,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
\ No newline at end of file
--扭曲植物 沼地集魂者
local m=69696945
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--xyz summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(function(e,c,og,min,max)
if c==nil then return true end
local tp=c:GetControler()
local zone=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_MZONE,0,nil)
local mg=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_GRAVE,0,nil)
zone:Merge(mg)
return Duel.CheckXyzMaterial(c,cm.xyzfilter,4,3,3,zone)
end)
e0:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og and not min then
return true
end
local mg=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,c,f)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local cancel=Duel.GetCurrentChain()==0
local g=mg:SelectSubGroup(tp,cm.spzfilter,cancel,3,3,mg,tp)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end)
e0:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end)
e0:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e0)
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.discon)
e1:SetCost(cm.cost)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.xyzfilter(c)
local tid=Duel.GetTurnCount()
return (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsSetCard(0x3696)
and ((c:GetTurnID()==tid and bit.band(c:GetReason(),REASON_DESTROY)~=0) or not c:IsLocation(LOCATION_GRAVE))
end
function cm.mfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x3696) and c:IsLocation(LOCATION_ONFIELD)
end
function cm.mfilter2(c)
local tid=Duel.GetTurnCount()
return c:IsSetCard(0x3696) and c:GetTurnID()==tid
and bit.band(c:GetReason(),REASON_DESTROY)~=0 and c:IsLocation(LOCATION_GRAVE)
end
function cm.spzfilter(g,tp)
if Duel.GetMZoneCount(tp,g,tp)<=0 then return false end
return (g:FilterCount(cm.mfilter1,nil)==3 and g:FilterCount(cm.mfilter2,nil)==0)
or (g:FilterCount(cm.mfilter1,nil)==2 and g:FilterCount(cm.mfilter2,nil)==1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
local sg=Duel.GetOperatedGroup()
if Duel.SelectYesNo(tp,aux.Stringid(m,2)) and sg:GetCount()>0 then
Duel.Overlay(c,sg)
end
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3696) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--扭曲植物 蔓生食人藤
local m=69696946
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--xyz summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(function(e,c,og,min,max)
if c==nil then return true end
local tp=c:GetControler()
local zone=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_MZONE,0,nil)
local mg=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_GRAVE,0,nil)
zone:Merge(mg)
return Duel.CheckXyzMaterial(c,cm.xyzfilter,4,3,3,zone)
end)
e0:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og and not min then
return true
end
local mg=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,c,f)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local cancel=Duel.GetCurrentChain()==0
local g=mg:SelectSubGroup(tp,cm.spzfilter,cancel,3,3,mg,tp)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end)
e0:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end)
e0:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e0)
--disable summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_SUMMON)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.descon)
e1:SetCost(cm.descost)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e2)
--des
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,m+100)
e3:SetCondition(cm.con)
e3:SetTarget(cm.tg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
end
function cm.xyzfilter(c)
local tid=Duel.GetTurnCount()
return (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsSetCard(0x3696)
and ((c:GetTurnID()==tid and bit.band(c:GetReason(),REASON_DESTROY)~=0) or not c:IsLocation(LOCATION_GRAVE))
end
function cm.mfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x3696) and c:IsLocation(LOCATION_ONFIELD)
end
function cm.mfilter2(c)
local tid=Duel.GetTurnCount()
return c:IsSetCard(0x3696) and c:GetTurnID()==tid
and bit.band(c:GetReason(),REASON_DESTROY)~=0 and c:IsLocation(LOCATION_GRAVE)
end
function cm.spzfilter(g,tp)
if Duel.GetMZoneCount(tp,g,tp)<=0 then return false end
return (g:FilterCount(cm.mfilter1,nil)==3 and g:FilterCount(cm.mfilter2,nil)==0)
or (g:FilterCount(cm.mfilter1,nil)==2 and g:FilterCount(cm.mfilter2,nil)==1)
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
local tc=c:GetOverlayCount()
e:GetHandler():RemoveOverlayCard(tp,tc,tc,REASON_COST)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and ep~=tp
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function cm.desfilter(c,e,tp)
return c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
if Duel.Destroy(eg,REASON_EFFECT)~=0 then
local sg=Duel.GetOperatedGroup()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local sc=Duel.GetFirstMatchingCard(cm.desfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if sc and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
if sg:GetCount()>0 then
Duel.Overlay(sc,sg)
end
end
end
end
function cm.filter(c)
return c:IsSetCard(0x3696) and c:IsAbleToGrave()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--吸元秘术
local m=69696947
local cm=_G["c"..m]
function cm.initial_effect(c)
--code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetRange(LOCATION_SZONE)
e0:SetTargetRange(LOCATION_GRAVE,0)
e0:SetCode(m)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x3696) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
end
end
\ No newline at end of file
--树苗投掷
local m=69696948
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
if Duel.Destroy(tg,REASON_EFFECT)~=0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,69696949,0,TYPES_TOKEN_MONSTER,500,500,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP) then
Duel.BreakEffect()
local token=Duel.CreateToken(tp,69696949)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
--扭曲树精 茂凯
local m=69696950
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_PLANT),2,2)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.thfilter1(c)
return c:IsSetCard(0x3696) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thfilter2(c,tp)
return c:IsCode(69696948) and c:IsAbleToHand()
end
function cm.thfilter3(c)
return c:IsCode(69696947) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(cm.thfilter3,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,3,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(cm.thfilter1,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(cm.thfilter2,tp,LOCATION_DECK,0,nil)
local g3=Duel.GetMatchingGroup(cm.thfilter3,tp,LOCATION_DECK,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 and g3:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg3=g3:Select(tp,1,1,nil)
sg1:Merge(sg3)
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
end
--MK1型炮台:手摇切割机
function c69696951.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ALSO_BATTLE_DAMAGE)
c:RegisterEffect(e1)
end
--MK2型炮台:扳手机器人
function c69696952.initial_effect(c)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69696952,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_MACHINE))
c:RegisterEffect(e1)
end
--MK3型炮台:安保机器人
function c69696953.initial_effect(c)
--recover
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c69696953.reccon)
e1:SetOperation(c69696953.recop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c69696953.cfilter(c,tp)
return c:IsSummonPlayer(tp)
end
function c69696953.ctfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
function c69696953.reccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c69696953.cfilter,1,nil,1-tp)
end
function c69696953.recop(e,tp,eg,ep,ev,re,r,rp)
local g=GetMatchingGroupCount(c69696953.ctfilter,tp,LOCATION_MZONE,0,nil)
if g<=0 then return end
Duel.Hint(HINT_CARD,0,37582948)
Duel.Damage(1-tp,g*100,REASON_EFFECT)
end
\ No newline at end of file
--MK4型炮台:高精尖炮塔
function c69696954.initial_effect(c)
--attack limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetTarget(c69696954.atktg)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(c69696954.actlimit)
c:RegisterEffect(e2)
end
function c69696954.atktg(e,c)
return c:GetAttack()<e:GetHandler():GetAttack()
end
function c69696954.actlimit(e,re,tp)
local loc=re:GetActivateLocation()
return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetAttack()<e:GetHandler():GetAttack()
end
--MK5型炮台:暴雷抛投手
function c69696955.initial_effect(c)
--double battle damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e1:SetCondition(c69696955.damcon)
e1:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e2)
end
function c69696955.damcon(e)
return e:GetHandler():GetBattleTarget()~=nil
end
\ No newline at end of file
--MK6型炮台:火箭发射台
function c69696956.initial_effect(c)
--actlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1)
e1:SetValue(c69696956.aclimit)
e1:SetCondition(c69696956.actcon)
c:RegisterEffect(e1)
end
function c69696956.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)
end
function c69696956.actcon(e)
return Duel.GetAttacker()==e:GetHandler()
end
\ No newline at end of file
--MK7型炮台:钻地机器人
function c69696957.initial_effect(c)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--damage reduce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetCondition(c69696957.rdcon)
e2:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE))
c:RegisterEffect(e2)
end
function c69696957.rdcon(e)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
return Duel.GetAttackTarget()==nil
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
\ No newline at end of file
--MK8型炮台:装甲剁地炮
function c69696958.initial_effect(c)
--battle indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c69696958.valcon1)
c:RegisterEffect(e2)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetCountLimit(1)
e2:SetValue(c69696958.valcon2)
c:RegisterEffect(e2)
end
function c69696958.valcon1(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end
function c69696958.valcon2(e,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
\ No newline at end of file
--终型炮台:海克斯霸王龙
function c69696959.initial_effect(c)
--boost
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c69696959.atktg)
e1:SetValue(400)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--cannot be target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
end
function c69696959.atktg(e,c)
return c:IsRace(RACE_MACHINE)
end
\ No newline at end of file
--三管蓄能炮
function c69696960.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c69696960.target)
e1:SetOperation(c69696960.activate)
c:RegisterEffect(e1)
end
function c69696960.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c69696960.spfilter1(c,e,tp,lv)
return c:GetOriginalLevel()==lv and c:IsSetCard(0xa696) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c69696960.spfilter2(c,e,tp)
return c:IsCode(69696959) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c69696960.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
local lv=tc:GetOriginalLevel()
local flag=true
if lv>0 then flag=false end
local g1=Duel.GetMatchingGroup(c69696960.spfilter1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp,lv)
local g2=Duel.GetMatchingGroup(c69696960.spfilter2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if lv>0 and lv<=9 and #g1>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(69696960,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g1:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
elseif (flag or lv>9) and #g2>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(69696960,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g2:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--产量激增
function c69696961.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69696961,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_ATTACK)
e1:SetCountLimit(1,69696961+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c69696961.spcost)
e1:SetTarget(c69696961.sptg)
e1:SetOperation(c69696961.spop)
c:RegisterEffect(e1)
end
function c69696961.costfilter(c,e,tp,ft)
local lv=c:GetLevel()
local og=Duel.GetMatchingGroup(aux.NecroValleyFilter(c69696961.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,c,e,tp)
return c:IsRace(RACE_MACHINE) and Duel.GetMZoneCount(tp,c)>0 and og:CheckWithSumEqual(Card.GetLevel,lv,1,ft)
end
function c69696961.spfilter(c,e,tp)
return c:IsSetCard(0xa696) and c:IsLevelAbove(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c69696961.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(c69696961.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp,ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=Duel.SelectMatchingCard(tp,c69696961.costfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,ft):GetFirst()
e:SetLabel(tc:GetLevel())
Duel.SendtoGrave(tc,REASON_DISCARD+REASON_COST)
end
function c69696961.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND)
end
function c69696961.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c69696961.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,nil,e,tp)
if ft<=0 or g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectWithSumEqual(tp,Card.GetLevel,e:GetLabel(),1,ft)
if sg:GetCount()>0 then
local fid=e:GetHandler():GetFieldID()
local tc=sg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(69696961,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
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(c69696961.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c69696961.splimit(e,c)
return not c:IsRace(RACE_MACHINE)
end
\ No newline at end of file
--自适应3000型炮台
function c69696962.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),2,2)
c:EnableReviveLimit()
--get
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69696962,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c69696962.getcon)
e1:SetTarget(c69696962.gettg)
e1:SetOperation(c69696962.getop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(69696962,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,69696962)
e3:SetCondition(c69696962.thcon)
e3:SetTarget(c69696962.thtg)
e3:SetOperation(c69696962.thop)
c:RegisterEffect(e3)
end
function c69696962.getfilter(c,lg)
return c:IsSetCard(0xa696) and not c:IsCode(69696962) and lg:IsContains(c)
end
function c69696962.getcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(c69696962.getfilter,1,nil,lg)
end
function c69696962.gettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
end
function c69696962.efilter(c)
return c:IsSetCard(0xa696) and not c:IsCode(69696962) and c:IsFaceup()
end
function c69696962.getop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lg=e:GetHandler():GetLinkedGroup()
local g=eg:Filter(c69696962.getfilter,nil,lg)
local og=g:Filter(c69696962.efilter,nil)
local mg,atk=og:GetMaxGroup(Card.GetAttack)
if atk>c:GetAttack() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
local tc=og:GetFirst()
while tc do
local code=tc:GetOriginalCode()
if c:GetFlagEffect(code)==0 then
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(code,0))
end
tc=og:GetNext()
end
end
function c69696962.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c69696962.thfilter(c)
return c:IsCode(69696963) and c:IsAbleToHand()
end
function c69696962.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69696962.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c69696962.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c69696962.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
--大发明家 黑默丁格
local spnumber=1
function c69696963.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69696963,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_ATTACK+TIMING_STANDBY_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,69696963)
e1:SetCost(c69696963.spcost)
e1:SetTarget(c69696963.sptg)
e1:SetOperation(c69696963.spop)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69696963,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c69696963.thcon)
e2:SetTarget(c69696963.thtg)
e2:SetOperation(c69696963.thop)
c:RegisterEffect(e2)
if not c69696963.global_flag then
c69696963.global_flag=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c69696963.regop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_SUMMON_SUCCESS)
ge2:SetOperation(c69696963.regop)
Duel.RegisterEffect(ge2,0)
end
end
function c69696963.regop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0xa696) then
spnumber=spnumber+1
end
end
end
function c69696963.spcost(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 c69696963.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xa696) and c:IsLevelBelow(spnumber)
end
function c69696963.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c69696963.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND)
end
function c69696963.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c69696963.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c69696963.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetDrawCount(tp)>0
end
function c69696963.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c69696963.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
aux.DrawReplaceCount=aux.DrawReplaceCount+1
if aux.DrawReplaceCount<=aux.DrawReplaceMax and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
......@@ -79,7 +79,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,2)
e1:SetValue(-100)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
--星宫时子
local m=69660000
local m=81009051
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
......
--独处者·星宫时子
local m=69660001
local m=81009052
local cm=_G["c"..m]
function cm.initial_effect(c)
--tohand
......@@ -43,7 +43,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,e:GetHandler(),tp)
end
function cm.spfilter(c,e,tp)
return ((c:IsRace(RACE_WINDBEAST) and c:IsAttribute(ATTRIBUTE_WATER)) or (c:IsRace(RACE_PLANT) and c:IsAttribute(ATTRIBUTE_DARK))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsRace(RACE_WINDBEAST) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
--蝶之光·星宫时子
local m=69660002
local m=81009053
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
......
--青之泪·星宫时子
local m=69660003
local m=81009054
local cm=_G["c"..m]
function cm.initial_effect(c)
--tohand
......
--雨·星宫时子
local m=69660004
local m=81009055
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
......
--青色之音
local m=69660005
local m=81009056
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
......@@ -31,7 +31,7 @@ function cm.desfilter(c,e,tp)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end
function cm.spfilter(c,e,tp,code)
return ((c:IsRace(RACE_WINDBEAST) and c:IsAttribute(ATTRIBUTE_WATER)) or (c:IsRace(RACE_PLANT) and c:IsAttribute(ATTRIBUTE_DARK)))
return c:IsRace(RACE_WINDBEAST) and c:IsAttribute(ATTRIBUTE_WATER)
and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
--青色之跃
local m=69660006
local m=81009057
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
......
--扭曲植物 形单调味树
function c9310030.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9310030)
e1:SetTarget(c9310030.tg)
e1:SetOperation(c9310030.op)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c9310030.spcon)
c:RegisterEffect(e2)
--nontuner
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_NONTUNER)
e3:SetValue(c9310030.tnval)
c:RegisterEffect(e3)
--To hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,9311030)
e4:SetCondition(c9310030.spcon2)
e4:SetTarget(c9310030.drtg)
e4:SetOperation(c9310030.drop)
c:RegisterEffect(e4)
end
function c9310030.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsHasEffect(69696947)
end
function c9310030.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler())
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c9310030.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler())
if g:GetCount()>0 then
local tg=g:Select(tp,1,1,nil)
local tc=tg:GetFirst()
Duel.Destroy(tc,REASON_EFFECT)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if tc:IsType(TYPE_MONSTER) then
Duel.BreakEffect()
Duel.Recover(tp,tc:GetBaseAttack(),REASON_EFFECT)
end
end
end
function c9310030.tnval(e,c)
return e:GetHandler():IsDefensePos()
end
function c9310030.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY)
end
function c9310030.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,tp,1)
end
function c9310030.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -454,7 +454,7 @@
!counter 0xf3c 幻象指示物
!counter 0xf3f 隐痛指示物
#REIKAI 2404873791 161 0xcc0-0xccf
#REIKAI 2404873791 161
#小桥流水 2466894135 162 0xf00-0xf0f
#AddCodeList(16200003) 单推人衍生物卡名记述
......@@ -1202,12 +1202,6 @@
!counter 0x671 结缘指示物
!counter 0x1673 血指示物
#◇D9 1309183173 696 0x690-0x69f
!setname 0x3690 格斗技
!setname 0x3691 拉亚斯特
!setname 0x3696 扭曲植物
!setname 0xa696 炮台
#翼龙 1253913364 710
#codelist 废柴小红帽
......
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