Commit 4b09ca44 authored by Nemo Ma's avatar Nemo Ma

upd 231119

parent 38837d90
......@@ -3045,7 +3045,6 @@
25000404 0
33701420 0
33701505 1
40009386 0
60000014 0
60000015 0
#220710
......@@ -8986,7 +8985,6 @@
40009322 1
40009340 1
40009385 0
40009386 0
40009389 0
40009391 1
40009398 0
......
No preview for this file type
expansions/pics/11451485.jpg

13.1 KB | W: | H:

expansions/pics/11451485.jpg

54.7 KB | W: | H:

expansions/pics/11451485.jpg
expansions/pics/11451485.jpg
expansions/pics/11451485.jpg
expansions/pics/11451485.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451486.jpg

13.4 KB | W: | H:

expansions/pics/11451486.jpg

55.4 KB | W: | H:

expansions/pics/11451486.jpg
expansions/pics/11451486.jpg
expansions/pics/11451486.jpg
expansions/pics/11451486.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451709.jpg

48.1 KB | W: | H:

expansions/pics/11451709.jpg

33.5 KB | W: | H:

expansions/pics/11451709.jpg
expansions/pics/11451709.jpg
expansions/pics/11451709.jpg
expansions/pics/11451709.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451881.jpg

203 KB | W: | H:

expansions/pics/11451881.jpg

15.5 KB | W: | H:

expansions/pics/11451881.jpg
expansions/pics/11451881.jpg
expansions/pics/11451881.jpg
expansions/pics/11451881.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451882.jpg

213 KB | W: | H:

expansions/pics/11451882.jpg

16.4 KB | W: | H:

expansions/pics/11451882.jpg
expansions/pics/11451882.jpg
expansions/pics/11451882.jpg
expansions/pics/11451882.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451883.jpg

210 KB | W: | H:

expansions/pics/11451883.jpg

15.8 KB | W: | H:

expansions/pics/11451883.jpg
expansions/pics/11451883.jpg
expansions/pics/11451883.jpg
expansions/pics/11451883.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000320.jpg

48.2 KB | W: | H:

expansions/pics/15000320.jpg

50 KB | W: | H:

expansions/pics/15000320.jpg
expansions/pics/15000320.jpg
expansions/pics/15000320.jpg
expansions/pics/15000320.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000321.jpg

44.2 KB | W: | H:

expansions/pics/15000321.jpg

45.9 KB | W: | H:

expansions/pics/15000321.jpg
expansions/pics/15000321.jpg
expansions/pics/15000321.jpg
expansions/pics/15000321.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000322.jpg

45.3 KB | W: | H:

expansions/pics/15000322.jpg

46.9 KB | W: | H:

expansions/pics/15000322.jpg
expansions/pics/15000322.jpg
expansions/pics/15000322.jpg
expansions/pics/15000322.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000323.jpg

41.1 KB | W: | H:

expansions/pics/15000323.jpg

42.7 KB | W: | H:

expansions/pics/15000323.jpg
expansions/pics/15000323.jpg
expansions/pics/15000323.jpg
expansions/pics/15000323.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000324.jpg

45 KB | W: | H:

expansions/pics/15000324.jpg

46.7 KB | W: | H:

expansions/pics/15000324.jpg
expansions/pics/15000324.jpg
expansions/pics/15000324.jpg
expansions/pics/15000324.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000330.jpg

50.3 KB | W: | H:

expansions/pics/15000330.jpg

52.3 KB | W: | H:

expansions/pics/15000330.jpg
expansions/pics/15000330.jpg
expansions/pics/15000330.jpg
expansions/pics/15000330.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000331.jpg

51.1 KB | W: | H:

expansions/pics/15000331.jpg

50.3 KB | W: | H:

expansions/pics/15000331.jpg
expansions/pics/15000331.jpg
expansions/pics/15000331.jpg
expansions/pics/15000331.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000332.jpg

51.7 KB | W: | H:

expansions/pics/15000332.jpg

53.7 KB | W: | H:

expansions/pics/15000332.jpg
expansions/pics/15000332.jpg
expansions/pics/15000332.jpg
expansions/pics/15000332.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000337.jpg

53.8 KB | W: | H:

expansions/pics/15000337.jpg

56 KB | W: | H:

expansions/pics/15000337.jpg
expansions/pics/15000337.jpg
expansions/pics/15000337.jpg
expansions/pics/15000337.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000338.jpg

49 KB | W: | H:

expansions/pics/15000338.jpg

51 KB | W: | H:

expansions/pics/15000338.jpg
expansions/pics/15000338.jpg
expansions/pics/15000338.jpg
expansions/pics/15000338.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000339.jpg

47.9 KB | W: | H:

expansions/pics/15000339.jpg

49.6 KB | W: | H:

expansions/pics/15000339.jpg
expansions/pics/15000339.jpg
expansions/pics/15000339.jpg
expansions/pics/15000339.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000340.jpg

48.1 KB | W: | H:

expansions/pics/15000340.jpg

49.8 KB | W: | H:

expansions/pics/15000340.jpg
expansions/pics/15000340.jpg
expansions/pics/15000340.jpg
expansions/pics/15000340.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000341.jpg

47 KB | W: | H:

expansions/pics/15000341.jpg

48.7 KB | W: | H:

expansions/pics/15000341.jpg
expansions/pics/15000341.jpg
expansions/pics/15000341.jpg
expansions/pics/15000341.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000342.jpg

46.4 KB | W: | H:

expansions/pics/15000342.jpg

48.1 KB | W: | H:

expansions/pics/15000342.jpg
expansions/pics/15000342.jpg
expansions/pics/15000342.jpg
expansions/pics/15000342.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/22348195.jpg

183 KB | W: | H:

expansions/pics/22348195.jpg

15.8 KB | W: | H:

expansions/pics/22348195.jpg
expansions/pics/22348195.jpg
expansions/pics/22348195.jpg
expansions/pics/22348195.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/22348224.jpg

186 KB | W: | H:

expansions/pics/22348224.jpg

16.2 KB | W: | H:

expansions/pics/22348224.jpg
expansions/pics/22348224.jpg
expansions/pics/22348224.jpg
expansions/pics/22348224.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/22348235.jpg

201 KB | W: | H:

expansions/pics/22348235.jpg

16.2 KB | W: | H:

expansions/pics/22348235.jpg
expansions/pics/22348235.jpg
expansions/pics/22348235.jpg
expansions/pics/22348235.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/22348236.jpg

207 KB | W: | H:

expansions/pics/22348236.jpg

16.6 KB | W: | H:

expansions/pics/22348236.jpg
expansions/pics/22348236.jpg
expansions/pics/22348236.jpg
expansions/pics/22348236.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/22348237.jpg

200 KB | W: | H:

expansions/pics/22348237.jpg

16 KB | W: | H:

expansions/pics/22348237.jpg
expansions/pics/22348237.jpg
expansions/pics/22348237.jpg
expansions/pics/22348237.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/22348238.jpg

206 KB | W: | H:

expansions/pics/22348238.jpg

16.9 KB | W: | H:

expansions/pics/22348238.jpg
expansions/pics/22348238.jpg
expansions/pics/22348238.jpg
expansions/pics/22348238.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/22348239.jpg

194 KB | W: | H:

expansions/pics/22348239.jpg

15.2 KB | W: | H:

expansions/pics/22348239.jpg
expansions/pics/22348239.jpg
expansions/pics/22348239.jpg
expansions/pics/22348239.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50203105.jpg

66.3 KB | W: | H:

expansions/pics/50203105.jpg

66.9 KB | W: | H:

expansions/pics/50203105.jpg
expansions/pics/50203105.jpg
expansions/pics/50203105.jpg
expansions/pics/50203105.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002143.jpg

32.7 KB | W: | H:

expansions/pics/60002143.jpg

17.6 KB | W: | H:

expansions/pics/60002143.jpg
expansions/pics/60002143.jpg
expansions/pics/60002143.jpg
expansions/pics/60002143.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -170,7 +170,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local tg=sg:Select(1-tp,1,1,nil)
local tg=sg:RandomSelect(1-tp,1,1,nil)
sg:Sub(tg)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
if e:GetHandler():IsRelateToEffect(e) then Duel.Overlay(e:GetHandler(),sg) end
......
......@@ -163,7 +163,7 @@ function cm.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,tp)
end
function cm.cfilter(c,tp)
return (c:IsType(TYPE_FIELD) or (c:GetType()&0x20004==0x20004 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0)) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
return (c:IsType(TYPE_FIELD) or ((c:IsType(TYPE_CONTINUOUS) or c:IsHasEffect(EFFECT_REMAIN_FIELD)) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0)) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function cm.costcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==e:GetLabel()+1
......
--“由一瞬所积聚的一生”
local cm,m=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--sp
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(cm.reop)
c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
for i=0,6 do
cm[1<<i]=0
end
local ge0=Effect.CreateEffect(c)
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge0:SetCode(EVENT_LEAVE_DECK)
ge0:SetOperation(cm.regop)
Duel.RegisterEffect(ge0,0)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge1:SetOperation(cm.clear)
Duel.RegisterEffect(ge1,0)
end
end
function cm.filter(c)
local re=c:GetReasonEffect()
if not (c:IsType(TYPE_MONSTER) and not c:IsStatus(STATUS_TO_HAND_WITHOUT_CONFIRM) and re) then return false end
local rc=re:GetOwner()
return rc:IsOriginalSetCard(0xc976) and rc:GetOriginalType()&0x1>0
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.filter,nil)
if not Duel.GetFlagEffectLabel(0,m) then Duel.RegisterFlagEffect(0,m,RESET_PHASE+PHASE_END,0,1) end
for tc in aux.Next(g) do
Duel.SetFlagEffectLabel(0,m,Duel.GetFlagEffectLabel(0,m)|tc:GetAttribute())
end
end
function cm.clear(e,tp,eg,ep,ev,re,r,rp)
for i=0,6 do
cm[1<<i]=0
end
end
function cm.mfilter(c)
return c:IsFaceup() and c:IsSetCard(0x44f)
end
function cm.afilter(c,e,tp,attr)
return c:GetAttribute()~=attr and c:IsSetCard(0xc976) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:IsActiveType(TYPE_MONSTER) then return end
local mg=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local _,ct=mg:GetMaxGroup(Card.GetTurnCounter)
local ct=ct or 0
local rc=re:GetHandler()
local attr=rc:GetAttribute()
local b2=false
for i=0,6 do
if attr&(1<<i)>0 and cm[1<<i]>ct then return end
if attr&(1<<i)>0 and Duel.GetFlagEffectLabel(0,m) and Duel.GetFlagEffectLabel(0,m)&(1<<i)>0 then b2=Duel.IsChainDisablable(ev) end
end
local g=Duel.GetMatchingGroup(cm.afilter,tp,LOCATION_DECK,0,nil,e,tp,attr)
if #g==0 and not b2 then return end
local off=1
local ops={}
local opval={}
if #g>0 then
ops[off]=aux.Stringid(m,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(m,1)
opval[off-1]=2
off=off+1
end
ops[off]=aux.Stringid(m,2)
opval[off-1]=3
Duel.HintSelection(Group.FromCards(c))
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]<=2 then
for i=0,6 do
if attr&(1<<i)>0 then
cm[1<<i]=cm[1<<i]+1
c:RegisterFlagEffect(0,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,i+3))
end
end
end
if opval[op]==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=g:Select(tp,1,1,nil)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
g:GetFirst():RegisterFlagEffect(m,RESET_CHAIN,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(function() return ev==Duel.GetCurrentChain() end)
e1:SetValue(function(e,te) return te:GetCode()==EVENT_CHAINING and te:IsHasType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_QUICK_F) end)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
g:GetFirst():RegisterEffect(e1)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_CHAIN_SOLVED)
e6:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e6:SetLabelObject(g:GetFirst())
e6:SetCondition(cm.descon)
e6:SetOperation(cm.desop)
e6:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e6,tp)
local e7=e6:Clone()
e7:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e7,tp)
end
elseif opval[op]==2 then
Duel.NegateEffect(ev)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(m)~=0 then
return Duel.GetCurrentChain()==1
else
e:Reset()
return false
end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
\ No newline at end of file
fpjdiy={}
zhc_lhq_xw='统御群星的至高至上之神||于星云辉灿之处割裂昏晓,以无匹的伟力制裁邪恶!||群星的君王!龙辉巧-仙王流星=CEP!光临!!'
zhc_lhq_xw_1='暗淡的星,再次开始闪烁'
zhc_lhq_xw_2='无数的光辉合而为一,现在,我们可吞噬万物'
zhc_lhq_tx='隐匿于星辰晦暗之处,且以光明为饵||行绝命之构陷藏于,螯针之中的猛毒!||龙仪巧-天蝎流星=SCO!光临!!'
zhc_lhq_lh='以猎弓射落煌煌大日,栖身于星云璀璨之地||以流星击坠来犯之敌!||龙仪巧-猎户流星=QRI!光临!'
zhc_lhq_by='着无暇之毫庇护良善||以星之荣光救赎灾厄,化作永恒闪耀的新星!||龙仪巧-白羊流星=ARI!光临!!'
zhc_lhq_mj='足踏暗夜的仁君||以光明之锋芒划破黑暗,将希望播撒至宇宙的尽头!||龙仪巧-摩羯流星=CAP!光临!!'
zhc_lhq_ss='承群星之荣冕者||以智慧之光染尽黑暗,将永恒的深邃化作璀璨的星光!||龙仪巧-射手流星=SAG!光临!!'
zhc_lhq_cn='幽深黑暗中潜形的冥后||待回归广袤星空之时,此处必然群星闪耀!||龙仪巧-处女流星=AIR!光临!!'
zhc_lhq_tc='端居于星辰正位之处||将群星的正义贯彻执行,以光明制衡黑暗!||龙仪巧-天秤流星=LIB!光临!!'
zhc_lhq_tq='于希望聚集的天穹之上奏响正义的凯歌||琴音所至邪恶无所遁形,以圣乐击破所有污秽!||龙仪巧-天琴流星=LYR!光临!!'
zhc_lhq_sp='宇宙中如梦似幻的伟岸身姿||于黑暗之中散发希望之光!||龙仪巧-水瓶流星=AOU!光临!!'
zhc_lhq_zs='霸揽星图的无双霸者||以无穷的伟力击退邪恶,应群星的誓约战至黑暗散却!||龙仪巧-狮子流星=LEO!光临!!'
zhc_lhq_sz='星空中身形飘渺的双子星||为迷途之人指明前路!||龙仪巧-双子流星=GEM!光临!!'
zhc_lhq_xy='执掌星图的无上存在||以雄姿威慑邪恶,此刻正是群星闪耀之时!||龙仪巧-仙英流星=PER!光临!!'
zhc_lhq_jn='追随光明之后的使者||为世界带来新生的黎明,为邪恶送上终结的丧钟!||龙仪巧-金牛流星=TAU!光临!!'
zhc_lhq_jx='以巨螯牵制混沌,以伟躯散播光明||光明与希望的支配者在此显现!||龙仪巧-巨蟹流星=CAN!光临!!'
zhc_lhq_sy='于无尽的星图间穿梭跳跃,群星的观测者||以全知全视之眼洞悉黑暗所在,以光影斑斓之翼引导光明!||龙仪巧-双鱼流星=PIS!光临!!'
zhc_lhq_xx='跨越千年时光的两道光芒于此交辉||以永恒闪耀的极北之光制裁邪恶!||龙仪巧-小熊流星=URS——光临!!'
zhc_lhq_fh='自堙灭之处降诞的流星||割断星空的明晦,将无尽星图浇作烈火吧!||龙仪巧-凤凰流星=PHO——光临!!'
zhc_lhq_cw='拨动星迹的远航之帆||开赴广袤宇宙之外的无限混沌,将光明染尽黑暗吧!||龙仪巧-船尾流星=PUP——光临!!'
zhc_lhq_ql='如利刃般以光芒闪爆黑暗||栖身于群星闪耀之所的至仁,让光明洒遍大地!||龙仪巧-麒麟流星=MON——光临!!'
zhc_lhq_dp='持星辉之力守护此方||屹立于星图之上的至古存在,不朽无败,||龙仪巧-盾牌流星=SCU——光临!!'
zhc_lhq_fm='于常暗崩灭处诞临||以光翼制裁黑暗,将星辉遍洒银河!||龙仪巧-飞马流星=PEG——光临!!'
zhc_lhq_jy='统御极天与邃渊的巨兽||其息仿若星云,其辉仿若恒星!||龙仪巧-鲸鱼流星=CET——光临!!'
zhc_lhq_wx='以力制胜,征服诸天的无上霸者||以星辰崩摧之伟力摇撼宇宙!||龙仪巧-武仙流星=HER——光临!!'
zhc_lhq_wx_2='「这恐怕是乳海」'
zhc_lhq_wy='恒星之主的使徒||散布欺瞒一切都谎言,为万物染上悲剧的色彩吧!||龙仪巧-乌鸦流星=COR——光临!!'
--
--召唤词函数,传入card和文本,用 | 换行
function fpjdiy.Zhc(c,text)
local e99=Effect.CreateEffect(c)
e99:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e99:SetCode(EVENT_SPSUMMON_SUCCESS)
e99:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e99:SetCondition(fpjdiy.skipcon)
e99:SetOperation(fpjdiy.skipop(text))
c:RegisterEffect(e99)
return e99
end
function fpjdiy.skipcon(e,tp,eg,ep,ev,re,r,rp)
return fpjdiy.isNormalSpecialSummoned(e:GetHandler())
end
function fpjdiy.skipop(text)
return function(e,tp,eg,ep,ev,re,r,rp)
return fpjdiy.printLines(text)
--if not c:IsRelateToEffect(e) then return end
--if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then func(e,tp) end
end
end
--检测是否为正规特招出场
function fpjdiy.isNormalSpecialSummoned(card)
local summonType = card:GetSummonType()
local cardType = card:GetType()
if summonType == SUMMON_TYPE_NORMAL and bit.band(cardType, TYPE_MONSTER) ~= 0 then
return true
elseif summonType == SUMMON_TYPE_RITUAL and bit.band(cardType, TYPE_RITUAL) ~= 0 then
return true
elseif summonType == SUMMON_TYPE_FUSION and bit.band(cardType, TYPE_FUSION) ~= 0 then
return true
elseif summonType == SUMMON_TYPE_SYNCHRO and bit.band(cardType, TYPE_SYNCHRO) ~= 0 then
return true
elseif summonType == SUMMON_TYPE_XYZ and bit.band(cardType, TYPE_XYZ) ~= 0 then
return true
elseif summonType == SUMMON_TYPE_LINK and bit.band(cardType, TYPE_LINK) ~= 0 then
return true
elseif card:IsCode(11612634) then
return true
else
return false
end
end
--检测是否为正规特招出场
function fpjdiy.splitString(inputString, separator)
local result = {}
local i = 1
for str in string.gmatch(inputString, "([^" .. separator .. "]+)") do
result[i] = str
i = i + 1
end
return result
end
function fpjdiy.printLines(inputString)
local lines = fpjdiy.splitString(inputString, "||")
for i, line in ipairs(lines) do
Debug.Message(line)
end
end
......@@ -38,7 +38,7 @@ function c11612639.initial_effect(c)
e2:SetTargetRange(0,1)
c:RegisterEffect(e2)
--sucai
local e3=Effect.CreateEffect(c)
--[[local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11612639,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
......@@ -49,7 +49,7 @@ function c11612639.initial_effect(c)
e3:SetCondition(c11612639.xyzcon)
e3:SetTarget(c11612639.xyztg)
e3:SetOperation(c11612639.xyzop)
c:RegisterEffect(e3)
c:RegisterEffect(e3)--]]
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......@@ -57,6 +57,17 @@ function c11612639.initial_effect(c)
e3:SetCondition(c11612639.matcon)
e3:SetOperation(c11612639.matop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_SEND_REPLACE)
e4:SetCondition(c11612639.xyzcon)
e4:SetTarget(c11612639.reptg)
e4:SetValue(c11612639.repval)
c:RegisterEffect(e4)
local g=Group.CreateGroup()
g:KeepAlive()
e4:SetLabelObject(g)
e0:SetLabelObject(e3)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -70,6 +81,72 @@ function c11612639.initial_effect(c)
c:RegisterEffect(e1)
end
function c11612639.repfilter(c,tp)
return c:GetOwner()==1-tp and c:GetDestination()==LOCATION_GRAVE and c:GetLeaveFieldDest()==0 and c:IsReason(REASON_DESTROY)
end
function c11612639.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c11612639.repfilter,1,nil,tp) end
if 1==1 then
local container=e:GetLabelObject()
container:Clear()
local g=eg:Filter(c11612639.repfilter,nil,tp)
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(11612639,RESET_EVENT+0x1fe0000-RESET_TOHAND-RESET_TODECK-RESET_LEAVE+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetValue(0x154)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOHAND-RESET_TODECK-RESET_LEAVE)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1)
e1:SetCondition(c11612639.thcon2)
e1:SetOperation(c11612639.thop2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.SendtoHand(g,tp,REASON_EFFECT)
container:Merge(g)
return true
else return false end
end
function c11612639.repval(e,c)
return e:GetLabelObject():IsContains(c)
end
function c11612639.thfilter2(c)
return c:GetFlagEffect(11612639)~=0
end
function c11612639.thcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11612639.thfilter2,1,nil)
end
function c11612639.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(c11612639.thfilter2,nil)
Duel.ConfirmCards(1-tp,g)
g=g:Filter(Card.IsType,nil,TYPE_MONSTER)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_MACHINE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
Duel.ShuffleHand(tp)
end
function c11612639.rmlimit(e,c,p)
return c:IsControler(tp)
end
......
......@@ -38,12 +38,12 @@ function c11612644.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11612644,1))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c11612644.indcon)
e3:SetOperation(c11612644.atkop)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
--[[local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11612644,2))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
......@@ -54,7 +54,7 @@ function c11612644.initial_effect(c)
e1:SetCondition(c11612644.thcon)
e1:SetTarget(c11612644.thtg)
e1:SetOperation(c11612644.thop)
c:RegisterEffect(e1)
c:RegisterEffect(e1)--]]
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......@@ -63,6 +63,47 @@ function c11612644.initial_effect(c)
e3:SetOperation(c11612644.matop)
c:RegisterEffect(e3)
e0:SetLabelObject(e3)
--add counter
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCondition(c11612644.thcon)
e3:SetOperation(c11612644.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVED)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c11612644.damcon)
e4:SetOperation(c11612644.damop)
c:RegisterEffect(e4)
if not c11612644.chkkkkk then
c11612644.chkkkkk=true
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_LEAVE_FIELD_P)
--e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetOperation(c11612644.regop2)
Duel.RegisterEffect(e5,0)
local e51=e5:Clone()
Duel.RegisterEffect(e51,1)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_TO_GRAVE)
e6:SetProperty(EFFECT_FLAG_DELAY)
--e6:SetRange(LOCATION_MZONE)
e6:SetCondition(c11612644.thcon2)
e6:SetOperation(c11612644.thop2)
e6:SetLabelObject(e5)
Duel.RegisterEffect(e6,0)
local e61=e6:Clone()
e61:SetLabelObject(e51)
Duel.RegisterEffect(e61,1)
end
--token
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(11612644,3))
......@@ -76,6 +117,56 @@ function c11612644.initial_effect(c)
e5:SetOperation(c11612644.spop)
c:RegisterEffect(e5)
end
function c11612644.regop2(e,tp,eg,ep,ev,re,r,rp)
local sum=0
for c in aux.Next(eg) do
if c:GetDestination()==LOCATION_GRAVE and c:GetLeaveFieldDest()==0 or c:GetLeaveFieldDest()==LOCATION_GRAVE then
local ct=c:GetCounter(0x1162)
sum=sum+ct
if ct>0 then c:RegisterFlagEffect(116126440,RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOGRAVE,0,1) end
end
end
e:SetLabel(sum)
end
function c11612644.chcc(c,tp)
return c:GetFlagEffect(116126440)>0 and c:IsPreviousControler(1-tp)
end
function c11612644.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabelObject():GetLabel()
return ct>0 and eg:IsExists(c11612644.chcc,1,nil,tp)
end
function c11612644.thfilter1(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToHand()
end
function c11612644.thop2(e,tp,eg,ep,ev,re,r,rp)
for c in aux.Next(eg) do
c:ResetFlagEffect(116126440)
end
local c=e:GetHandler()
local ct=e:GetLabelObject():GetLabel()
if ct>=3 then Duel.DiscardDeck(1-tp,ct//3,REASON_EFFECT) end
if ct>=6 then local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) if #g>0 then g=g:RandomSelect(tp,math.min(#g,ct//6)) Duel.Destroy(g,REASON_EFFECT) end end
if ct==Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) then Duel.Draw(tp,1,REASON_EFFECT) end
end
function c11612644.regop(e,tp,eg,ep,ev,re,r,rp)
if rp==1-tp then
e:GetHandler():RegisterFlagEffect(11612644,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
end
end
function c11612644.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetFlagEffect(11612644)~=0
end
function c11612644.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,11612644)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0x1162,1)
tc=g:GetNext()
end
end
function c11612644.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
......
......@@ -44,7 +44,7 @@ function c11612646.initial_effect(c)
e6:SetDescription(aux.Stringid(11612646,1))
e6:SetCategory(CATEGORY_DECKDES)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_BATTLED)
e6:SetCode(EVENT_DAMAGE_STEP_END)
e6:SetRange(LOCATION_MZONE)
--e6:SetCountLimit(1,11612648)
e6:SetTarget(c11612646.detg)
......@@ -120,17 +120,12 @@ function c11612646.detg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=c:GetBattledGroup()
local tc=g:GetFirst()
local p=tc:GetControler()
if chk==0 then return Duel.IsPlayerCanDiscardDeck(p,6) and Duel.GetAttackTarget()~=nil end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,p,6)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(1-tp,4) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,4)
end
function c11612646.deop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetBattledGroup()
local tc=g:GetFirst()
while tc do
if tc==c then tc=g:GetNext() end
local p=tc:GetControler()
Duel.DiscardDeck(p,6,REASON_EFFECT)
Duel.DiscardDeck(1-tp,4,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
for oc in aux.Next(og) do
local e3=Effect.CreateEffect(c)
......@@ -139,8 +134,6 @@ function c11612646.deop(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
oc:RegisterEffect(e3)
end
tc=g:GetNext()
end
end
function c11612646.damval(e,re,val,r,rp,rc)
local val=Duel.GetBattleDamage(1)
......
......@@ -9,6 +9,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.sscon)
e1:SetTarget(cm.sstg)
e1:SetOperation(cm.ssop)
......
......@@ -16,7 +16,7 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_MSET)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.con)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
......@@ -37,6 +37,7 @@ function cm.initial_effect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_DESTROYED)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCountLimit(1,m)
e6:SetTarget(cm.fltg)
e6:SetOperation(cm.flop)
c:RegisterEffect(e6)
......
......@@ -16,6 +16,7 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.setcost)
e1:SetTarget(cm.settg)
e1:SetOperation(cm.setop)
c:RegisterEffect(e1)
......@@ -48,6 +49,13 @@ function cm.EoS(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_EoS
end
function cm.costfilter(c)
return cm.EoS(c) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function cm.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end
function cm.filter(c)
return c:IsFaceup() and c:IsCanTurnSet() and not c:IsLocation(LOCATION_PZONE)
end
......
......@@ -16,7 +16,7 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.con)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
......@@ -26,6 +26,7 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.fltg)
e3:SetOperation(cm.flop)
c:RegisterEffect(e3)
......
......@@ -30,25 +30,24 @@ function cm.initial_effect(c)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:GetHandler():IsSetCard(0xf39) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
return e:GetHandler():IsReason(REASON_COST) and (re:GetHandler():IsSetCard(0xf39) or (re:GetHandler():IsRace(RACE_FIEND) and re:GetHandler():IsAttribute(ATTRIBUTE_DARK) and re:GetHandler():IsType(TYPE_MONSTER)))
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
return (e:GetHandler():IsReason(REASON_BATTLE) or e:GetHandler():IsReason(REASON_EFFECT)) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsPlayerAffectedByEffect(tp,15000330)
return (e:GetHandler():IsReason(REASON_BATTLE) or e:GetHandler():IsReason(REASON_EFFECT)) and Duel.IsPlayerAffectedByEffect(tp,15000330)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xf39) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local tp=e:GetHandler():GetControler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
if chk==0 then return true end
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local tc=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if tc and tc:IsLocation(LOCATION_GRAVE) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -30,11 +30,11 @@ function cm.initial_effect(c)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:GetHandler():IsSetCard(0xf39) and Duel.IsExistingMatchingCard(cm.spfilter,tp,0,LOCATION_ONFIELD,1,nil,e,tp)
return e:GetHandler():IsReason(REASON_COST) and (re:GetHandler():IsSetCard(0xf39) or (re:GetHandler():IsRace(RACE_FIEND) and re:GetHandler():IsAttribute(ATTRIBUTE_DARK) and re:GetHandler():IsType(TYPE_MONSTER)))
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
return (e:GetHandler():IsReason(REASON_BATTLE) or e:GetHandler():IsReason(REASON_EFFECT)) and Duel.IsExistingMatchingCard(cm.spfilter,tp,0,LOCATION_ONFIELD,1,nil,e,tp) and Duel.IsPlayerAffectedByEffect(tp,15000330)
return (e:GetHandler():IsReason(REASON_BATTLE) or e:GetHandler():IsReason(REASON_EFFECT)) and Duel.IsPlayerAffectedByEffect(tp,15000330)
end
function cm.spfilter(c)
return c:IsAbleToGrave()
......@@ -42,7 +42,7 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tp=e:GetHandler():GetControler()
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and cm.spfilter(chkc,e,tp) end
if chk==0 then return true end
if chk==0 then return Duel.IsExistingTarget(cm.spfilter,tp,0,LOCATION_ONFIELD,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,1-tp,LOCATION_ONFIELD)
......
......@@ -30,7 +30,7 @@ function cm.initial_effect(c)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:GetHandler():IsSetCard(0xf39)
return e:GetHandler():IsReason(REASON_COST) and (re:GetHandler():IsSetCard(0xf39) or (re:GetHandler():IsRace(RACE_FIEND) and re:GetHandler():IsAttribute(ATTRIBUTE_DARK) and re:GetHandler():IsType(TYPE_MONSTER)))
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
......
......@@ -49,11 +49,11 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:GetHandler():IsSetCard(0xf39) and Duel.IsPlayerCanDraw(tp,1)
return e:GetHandler():IsReason(REASON_COST) and (re:GetHandler():IsSetCard(0xf39) or (re:GetHandler():IsRace(RACE_FIEND) and re:GetHandler():IsAttribute(ATTRIBUTE_DARK) and re:GetHandler():IsType(TYPE_MONSTER)))
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
return (e:GetHandler():IsReason(REASON_BATTLE) or e:GetHandler():IsReason(REASON_EFFECT)) and Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerAffectedByEffect(tp,15000330)
return (e:GetHandler():IsReason(REASON_BATTLE) or e:GetHandler():IsReason(REASON_EFFECT)) and Duel.IsPlayerAffectedByEffect(tp,15000330)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local tp=e:GetHandler():GetControler()
......
......@@ -12,11 +12,13 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
--e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1,15000331)
e2:SetCondition(aux.exccon)
e2:SetCost(cm.atkcost)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
......@@ -48,35 +50,33 @@ function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
--setatk
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetTarget(aux.TargetBoolFunction(cm.atkfilter))
e1:SetValue(cm.atkval)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetCondition(cm.dis2con)
e2:SetOperation(cm.dis2op)
Duel.RegisterEffect(e2,tp)
end
function cm.atkfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
local c=e:GetHandler()
local dg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
local dc=dg:GetFirst()
while dc do
if aux.NegateEffectMonsterFilter(dc) then
Duel.NegateRelatedChain(dc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
dc: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+RESET_PHASE+PHASE_END)
dc:RegisterEffect(e2)
end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetValue(cm.atkval)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e3)
dc=dg:GetNext()
end
end
function cm.atkval(e,c)
return c:GetBaseAttack()*2
end
\ No newline at end of file
function cm.dis2con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
return re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and p~=tp
end
function cm.dis2op(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
......@@ -113,20 +113,21 @@ end
function cm.ov2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tp=c:GetControler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(Card.IsCanOverlay),tp,LOCATION_GRAVE+LOCATION_EXTRA,LOCATION_EXTRA,1,nil) end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsCanOverlay),tp,LOCATION_GRAVE+LOCATION_EXTRA,LOCATION_EXTRA,nil)
if g:IsExists(Card.IsControler,1,nil,tp) and g:IsExists(Card.IsControler,1,nil,1-tp) then c:RegisterFlagEffect(15000339,RESET_CHAIN,0,1) end
if g:IsExists(Card.IsControler,1,nil,tp) and not g:IsExists(Card.IsControler,1,nil,1-tp) then c:RegisterFlagEffect(15010339,RESET_CHAIN,0,1) end
if g:IsExists(Card.IsControler,1,nil,1-tp) and not g:IsExists(Card.IsControler,1,nil,tp) then c:RegisterFlagEffect(15020339,RESET_CHAIN,0,1) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,LOCATION_GRAVE+LOCATION_EXTRA,LOCATION_EXTRA,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsCanOverlay,tp,LOCATION_GRAVE+LOCATION_EXTRA,LOCATION_EXTRA,nil)
if g:IsExists(Card.IsControler,1,nil,tp) and g:IsExists(Card.IsControler,1,nil,1-tp) then e:SetLabel(1) end
if g:IsExists(Card.IsControler,1,nil,tp) and not g:IsExists(Card.IsControler,1,nil,1-tp) then e:SetLabel(2) end
if g:IsExists(Card.IsControler,1,nil,1-tp) and not g:IsExists(Card.IsControler,1,nil,tp) then e:SetLabel(3) end
end
function cm.ov2op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
if not c:IsFaceup() then return end
if not (c:IsRelateToChain() and c:IsType(TYPE_XYZ)) then return end
local x=0
if c:GetFlagEffect(15000339)~=0 then x=1 end
if c:GetFlagEffect(15010339)~=0 then x=2 end
if c:GetFlagEffect(15020339)~=0 then x=3 end
if e:GetLabel()==1 then x=1 end
if e:GetLabel()==2 then x=2 end
if e:GetLabel()==3 then x=3 end
local p=tp
if x==1 then
local y=Duel.SelectOption(tp,aux.Stringid(m,3),aux.Stringid(m,4))
......@@ -137,7 +138,7 @@ function cm.ov2op(e,tp,eg,ep,ev,re,r,rp)
if x==3 then p=1-tp end
if p==tp then
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsCanOverlay),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil):GetFirst()
if c:IsFaceup() and not tc:IsImmuneToEffect(e) then
if tc and not tc:IsImmuneToEffect(e) then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
......@@ -146,8 +147,8 @@ function cm.ov2op(e,tp,eg,ep,ev,re,r,rp)
end
end
if p==1-tp then
local tc=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsCanOverlay),tp,0,LOCATION_EXTRA,nil):RandomSelect(tp,1):GetFirst()
if c:IsFaceup() then
local tc=Duel.GetMatchingGroup(Card.IsCanOverlay,tp,0,LOCATION_EXTRA,nil):RandomSelect(tp,1):GetFirst()
if tc then
Duel.Overlay(c,Group.FromCards(tc))
tc:CancelToGrave()
end
......
......@@ -61,19 +61,20 @@ function cm.tnop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
Debug.Message("被虚构的神啊!从深渊之暗中穿梭前来,逆转寂灭的虚饰吧!")
Debug.Message("超量召唤,如浮冰般纯净的内核,阶级1!内核主 欧翡拉·模因!")
--Debug.Message("被虚构的神啊!从深渊之暗中穿梭前来,逆转寂灭的虚饰吧!")
--Debug.Message("超量召唤,如浮冰般纯净的内核,阶级1!内核主 欧翡拉·模因!")
end
function cm.ovcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsCanOverlay,tp,LOCATION_MZONE+LOCATION_SZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_SZONE+LOCATION_GRAVE,1,c) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local tp=c:GetControler()
if chk==0 then return Duel.IsExistingTarget(Card.IsCanOverlay,tp,LOCATION_MZONE+LOCATION_SZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_SZONE+LOCATION_GRAVE,1,c) end
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanOverlay,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectTarget(tp,Card.IsCanOverlay,tp,LOCATION_MZONE+LOCATION_SZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_SZONE+LOCATION_GRAVE,1,1,c)
local g=Duel.SelectTarget(tp,Card.IsCanOverlay,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,c)
if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
......
......@@ -60,14 +60,15 @@ function cm.tnop(e,tp,eg,ep,ev,re,r,rp)
e3:SetCost(cm.discost)
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
Debug.Message("异界的龙啊!挣碎罪业掀起的无尽虚空,从收容的裂缝中飞出吧!")
Debug.Message("超量召唤,如灵魂般纯白的内核,阶级1!内核龙 卡欧斯·情景!")
--Debug.Message("异界的龙啊!挣碎罪业掀起的无尽虚空,从收容的裂缝中飞出吧!")
--Debug.Message("超量召唤,如灵魂般纯白的内核,阶级1!内核龙 卡欧斯·情景!")
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainDisablable(ev)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......@@ -75,13 +76,14 @@ function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsAbleToGrave() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,eg,1,0,0)
end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then
Duel.SendtoGrave(ec,REASON_EFFECT)
end
end
\ No newline at end of file
--转生王女-艾妮斯菲亚
function c15100001.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c15100001.spcon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(15100001,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,15100001)
e2:SetTarget(c15100001.thtg)
e2:SetOperation(c15100001.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(15100001,2))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetCountLimit(1,15200001)
e4:SetCondition(c15100001.ctcon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c15100001.cttg)
e4:SetOperation(c15100001.ctop)
c:RegisterEffect(e4)
end
function c15100001.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c15100001.thfilter(c)
return c:IsSetCard(0x510) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c15100001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c15100001.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c15100001.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c15100001.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c15100001.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION and e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD)
end
function c15100001.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c15100001.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and (tc:IsLocation(LOCATION_GRAVE) or tc:IsFaceup()) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(15100001,3)) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,tp,REASON_EFFECT)
end
end
\ No newline at end of file
--转生王女-尤菲莉亚
function c15100002.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(15100002,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,15100002)
e1:SetTarget(c15100002.thtg)
e1:SetOperation(c15100002.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(15100002,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,15200002)
e3:SetCondition(c15100002.ctcon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c15100002.cttg)
e3:SetOperation(c15100002.ctop)
c:RegisterEffect(e3)
end
function c15100002.thfilter(c)
return c:IsSetCard(0x510) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c15100002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c15100002.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c15100002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c15100002.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 c15100002.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION and e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD)
end
function c15100002.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c15100002.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and (tc:IsLocation(LOCATION_GRAVE) or tc:IsFaceup()) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(15100002,2)) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,tp,REASON_EFFECT)
end
end
\ No newline at end of file
--转生王女-亚尔加德
function c15100003.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(15100003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetRange(LOCATION_HAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,15100003)
e1:SetTarget(c15100003.target)
e1:SetOperation(c15100003.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(15100003,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,15200003)
e2:SetTarget(c15100003.sptg)
e2:SetOperation(c15100003.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(15100003,2))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetCountLimit(1,15300003)
e4:SetCondition(c15100003.ctcon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c15100003.cttg)
e4:SetOperation(c15100003.ctop)
c:RegisterEffect(e4)
end
function c15100003.filter(c)
return c:IsFaceup() and c:IsAbleToGrave()
end
function c15100003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c15100003.filter(chkc) 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.IsExistingTarget(c15100003.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c15100003.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c15100003.operation(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 tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
function c15100003.filter2(c,e,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c15100003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c15100003.filter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c15100003.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(c15100003.filter2),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c15100003.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION and e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD)
end
function c15100003.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c15100003.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and (tc:IsLocation(LOCATION_GRAVE) or tc:IsFaceup()) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(15100003,3)) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,tp,REASON_EFFECT)
end
end
\ No newline at end of file
--融合连携
function c15100004.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c15100004.target)
e1:SetOperation(c15100004.activate)
c:RegisterEffect(e1)
end
function c15100004.filter1(c,e)
return c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)
end
function c15100004.filter2(c,e,tp,m,f,chkf)
if not (c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)) then return false end
aux.FCheckAdditional=c.red_eyes_fusion_check or c15100004.fcheck
local res=c:CheckFusionMaterial(m,nil,chkf)
aux.FCheckAdditional=nil
return res
end
function c15100004.fcheck(tp,sg,fc)
return (sg:Filter(Card.IsLocation,1,nil,LOCATION_DECK):GetCount()<=1 and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) or not Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) and sg:Filter(Card.IsLocation,1,nil,LOCATION_DECK):GetCount()==0) and sg:Filter(Card.IsSetCard,1,nil,0x510):GetCount()~=0
end
function c15100004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c15100004.filter1,tp,LOCATION_DECK,0,nil,e)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c15100004.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c15100004.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c15100004.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c15100004.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c15100004.filter1,tp,LOCATION_DECK,0,nil,e)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c15100004.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local sg2=nil
local mg3=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c15100004.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
aux.FCheckAdditional=tc.red_eyes_fusion_check or c15100004.fcheck
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--转生王女之祈愿
function c15100005.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,15100005)
e1:SetOperation(c15100005.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(15100005,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,15200005)
e2:SetCondition(c15100005.thcon)
e2:SetTarget(c15100005.thtg)
e2:SetOperation(c15100005.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetOperation(c15100005.chainop)
c:RegisterEffect(e3)
end
function c15100005.thfilter1(c)
return c:IsSetCard(0x510) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c15100005.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c15100005.thfilter1,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(15100005,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tg=Duel.SelectMatchingCard(tp,c15100005.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if tg:GetCount()<=0 then return end
local tc=tg:GetFirst()
if tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
function c15100005.cfilter(c,tp)
return c:IsControler(tp) and c:IsType(TYPE_FUSION)
and c:IsSummonType(SUMMON_TYPE_FUSION)
end
function c15100005.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c15100005.cfilter,1,nil,tp)
end
function c15100005.thfilter(c,eg)
local tc=eg:GetFirst()
local tg=nil
while tc do
if tc:IsSummonType(SUMMON_TYPE_FUSION) and c:GetReasonCard()==tc then
tg=tc
end
tc=eg:GetNext()
end
return tg and c:IsAbleToHand() and c:GetReason()&(REASON_FUSION+REASON_MATERIAL)==(REASON_FUSION+REASON_MATERIAL) and c:IsLocation(LOCATION_GRAVE)
end
function c15100005.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg and Duel.IsExistingMatchingCard(c15100005.thfilter,tp,LOCATION_GRAVE,0,1,nil,eg) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c15100005.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c15100005.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,eg)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c15100005.chainop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp and re:IsHasCategory(CATEGORY_FUSION_SUMMON) then
Duel.SetChainLimit(c15100005.chainlm)
end
end
function c15100005.chainlm(e,rp,tp)
return tp==rp
end
\ No newline at end of file
--转生王女「友情羁绊」
function c15100008.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x510),aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_LIGHT),true)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(15100008,0))
e1:SetCategory(CATEGORY_TOEXTRA)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c15100008.tdcon)
e1:SetTarget(c15100008.tdtg)
e1:SetOperation(c15100008.tdop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(15100008,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,15100008)
e2:SetCondition(c15100008.spcon)
e2:SetTarget(c15100008.sptg)
e2:SetOperation(c15100008.spop)
c:RegisterEffect(e2)
end
function c15100008.tdcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c15100008.filter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) and c:IsAbleToExtra()
end
function c15100008.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c15100008.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c15100008.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c15100008.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
end
function c15100008.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)
end
end
function c15100008.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c15100008.spfilter(c,e,tp)
return c:IsSetCard(0x510) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c15100008.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c15100008.spfilter(chkc,e,tp) and chkc~=e:GetHandler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c15100008.spfilter,tp,LOCATION_REMOVED,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c15100008.spfilter,tp,LOCATION_REMOVED,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c15100008.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
......@@ -2,14 +2,6 @@
local m=22348195
local cm=_G["c"..m]
function cm.initial_effect(c)
--attribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_ADD_RACE)
e1:SetRange(0xff)
e1:SetValue(RACE_FAIRY)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22348195,1))
......@@ -30,6 +22,7 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,22349195)
e3:SetTarget(c22348195.tg)
e3:SetOperation(c22348195.op)
c:RegisterEffect(e3)
......@@ -52,7 +45,15 @@ end
function c22348195.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)
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 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_DECKBOT)
c:RegisterEffect(e1)
end
end
end
function c22348195.tgfilter(c)
......
......@@ -14,14 +14,22 @@ function cm.initial_effect(c)
e0:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e0)
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCode(EFFECT_DISABLE)
e1:SetCondition(c22348224.dacon)
e1:SetTarget(c22348224.datg)
c:RegisterEffect(e1)
-- local e1=Effect.CreateEffect(c)
-- e1:SetType(EFFECT_TYPE_FIELD)
-- e1:SetRange(LOCATION_MZONE)
-- e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
-- e1:SetCode(EFFECT_DISABLE)
-- e1:SetCondition(c22348224.dacon)
-- e1:SetTarget(c22348224.datg)
-- c:RegisterEffect(e1)
--disable
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c22348224.discon)
e5:SetOperation(c22348224.disop)
c:RegisterEffect(e5)
--spsm
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22348224,0))
......@@ -50,6 +58,19 @@ function c22348224.datg(e,c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsFaceup() and not c:IsAttack(c:GetBaseAttack())
end
function c22348224.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return c:IsSummonType(SUMMON_TYPE_ADVANCE)
and rc:IsSummonType(SUMMON_TYPE_SPECIAL) and rc:IsFaceup() and not rc:IsAttack(rc:GetBaseAttack())
end
function c22348224.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c22348224.filter(c,e,tp)
return c:IsSetCard(0x708) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -18,7 +18,7 @@ function cm.initial_effect(c)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22348235,2))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
......@@ -62,7 +62,6 @@ end
function c22348235.recon(e,tp,eg,ep,ev,re,r,rp)
return (e:GetHandler():GetFlagEffect(m)>0 or e:GetCode()~=EVENT_CHAIN_NEGATED)
end
-- Duel.GetCurrentChain()==1 and
function c22348235.reop(e,tp,eg,ep,ev,re,r,rp)
local ng=Group.CreateGroup()
for i=1,ev do
......@@ -80,10 +79,10 @@ function c22348235.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c22348235.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c22348235.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c22348235.filter,tp,0,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsOnField() and c22348235.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22348235.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c22348235.filter,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,c22348235.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c22348235.efop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -121,14 +120,10 @@ function c22348235.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c22348235.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rec=c:GetBaseAttack()/2
local rec=c:GetAttack()/2
if rec>0 and Duel.Recover(1-tp,rec,REASON_EFFECT)>0 then
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,nil)
if g:GetCount()==0 then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,1,nil)
Duel.Destroy(sg,REASON_EFFECT)
Duel.Destroy(c,REASON_EFFECT)
end
end
function c22348235.costfilter(c)
......@@ -144,10 +139,8 @@ function c22348235.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c22348235.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Draw(p,1,REASON_EFFECT)
Duel.Recover(p,500,REASON_EFFECT)
end
......@@ -75,10 +75,10 @@ function c22348236.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c22348236.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c22348236.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c22348236.filter,tp,0,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsOnField() and c22348236.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22348236.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c22348236.filter,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,c22348236.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c22348236.efop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -113,33 +113,31 @@ function c22348236.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1)
end
function c22348236.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rec=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)*200
if rec>0 and Duel.Recover(1-tp,rec,REASON_EFFECT)>0 then
Duel.BreakEffect()
if Duel.Draw(1-tp,1,REASON_EFFECT)==1 then
Duel.ShuffleHand(1-tp)
Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
Duel.Draw(1-tp,1,REASON_EFFECT)
end
end
function c22348236.thfilter(c)
return c:IsSetCard(0x709) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(22348236)
return c:IsSetCard(0x709) and c:IsAbleToHand() and not c:IsCode(22348236)
end
function c22348236.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22348236.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
if chk==0 then return Duel.IsExistingMatchingCard(c22348236.thfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500)
end
function c22348236.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22348236.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c22348236.thfilter),tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
Duel.Recover(tp,500,REASON_EFFECT)
end
......@@ -23,7 +23,7 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22349237)
e2:SetCost(aux.bfgcost)
e2:SetCondition(c22348237.reccon)
-- e2:SetCondition(c22348237.reccon)
e2:SetTarget(c22348237.rectg)
e2:SetOperation(c22348237.recop)
c:RegisterEffect(e2)
......@@ -88,10 +88,10 @@ function c22348237.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c22348237.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c22348237.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c22348237.filter,tp,0,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsOnField() and c22348237.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22348237.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c22348237.filter,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,c22348237.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c22348237.efop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -156,7 +156,7 @@ function c22348237.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(p,d,REASON_EFFECT)
end
function c22348237.sppcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
return ep==tp and Duel.IsExistingMatchingCard(c22348237.reccfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c22348237.spptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -79,10 +79,10 @@ function c22348238.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c22348238.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c22348238.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c22348238.filter,tp,0,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsOnField() and c22348238.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22348238.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c22348238.filter,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,c22348238.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c22348238.efop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -76,10 +76,10 @@ function c22348239.effilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c22348239.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c22348239.effilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c22348239.effilter,tp,0,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsOnField() and c22348239.effilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22348239.effilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c22348239.effilter,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,c22348239.effilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c22348239.efop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -43,8 +43,30 @@ function cm.initial_effect(c)
e4:SetTarget(c22348326.thctg)
e4:SetOperation(c22348326.thcop)
c:RegisterEffect(e4)
--count
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EVENT_ADJUST)
e5:SetRange(LOCATION_MZONE)
e5:SetOperation(c22348326.adjustop)
c:RegisterEffect(e5)
end
function c22348326.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c22348326.thhfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,Duel.GetTurnCount())
local tc=g:GetFirst()
while tc do
Card.ResetFlagEffect(tc,22348326)
local ex=Effect.CreateEffect(tc)
ex:SetType(EFFECT_TYPE_SINGLE)
tc:RegisterFlagEffect(22348326,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(22348326,1))
tc=g:GetNext()
end
end
function c22348326.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
local g=e:GetHandler():GetOverlayGroup()
......@@ -99,9 +121,6 @@ end
function c22348326.spsfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED)
end
function c22348326.xyzfilter(c,mg)
return c:IsXyzSummonable(mg,1,99)
end
function c22348326.spsop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=0 then return end
local g=e:GetHandler():GetCardTarget()
......@@ -110,13 +129,6 @@ function c22348326.spsop(e,tp,eg,ep,ev,re,r,rp)
if tgc>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<tgc then return end
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
Duel.AdjustAll()
local xyzg=Duel.GetMatchingGroup(c22348326.xyzfilter,tp,LOCATION_EXTRA,0,nil,g)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,tg)
end
end
......
--叮 噹 天 使
local m=22348332
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2)
c:EnableReviveLimit()
--change damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c22348332.regop)
c:RegisterEffect(e1)
--Draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c22348332.drcon)
e2:SetTarget(c22348332.drtg)
e2:SetOperation(c22348332.drop)
c:RegisterEffect(e2)
end
function c22348332.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)0
end0
function c22348332.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c22348332.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 c22348332.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
--白 之 兔 诺 登
local m=22348333
local cm=_G["c"..m]
function cm.initial_effect(c)
--Synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22348333,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c22348333.rmcost)
e1:SetTarget(c22348333.rmtg)
e1:SetOperation(c22348333.rmop)
c:RegisterEffect(e1)
--td
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22348333,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c22348333.tdcost)
e2:SetTarget(c22348333.tdtg)
e2:SetOperation(c22348333.tdop)
c:RegisterEffect(e2)
end
function c22348333.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2500) end
Duel.PayLPCost(tp,2500)
end
function c22348333.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,5000) end
Duel.PayLPCost(tp,5000)
end
function c22348333.rmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c22348333.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c22348333.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local c=e:GetHandler()
local tc=g:GetFirst()
local fid=c:GetFieldID()
if tc and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
tc:RegisterFlagEffect(22348333,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c22348333.retcon)
e1:SetOperation(c22348333.retop)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e2,tp)
end
end
function c22348333.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(22348333)==e:GetLabel() then
return Duel.GetCurrentChain()==1
else
e:Reset()
return false
end
end
function c22348333.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.ReturnToField(tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(c22348333.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
e:Reset()
end
function c22348333.aclimit(e,re,tp)
return re:GetHandler():IsOnField() and re:IsHasType(EFFECT_TYPE_SINGLE) and re:GetCode()==EVENT_REMOVE
end
function c22348333.tdfilter(c)
return (c:IsLocation(0x3e) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM))) and c:IsAbleToDeck()
end
function c22348333.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp) and Duel.IsPlayerCanDraw(1-tp) end
local g=Duel.GetMatchingGroup(c22348333.tdfilter,tp,0x7e,0x7e,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0x7e)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,0,10)
Duel.SetChainLimit(aux.FALSE)
end
function c22348333.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c22348333.tdfilter,tp,0x7e,0x7e,nil)
if not aux.NecroValleyNegateCheck(g) then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end
local ht1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local ht2=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)
if ht1<5 or ht2<5 then
Duel.Draw(tp,5-ht1,REASON_EFFECT)
Duel.Draw(1-tp,5-ht2,REASON_EFFECT)
end
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_END,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_EP)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
--晶导算使 差值麦纳斯
xpcall(function() require("expansions/script/c33201401") end,function() require("script/c33201401") end)
function c33201402.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(33201402,0))
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,33201402)
e0:SetCondition(c33201402.tdcon1)
e0:SetTarget(c33201402.sptg)
e0:SetOperation(c33201402.spop)
c:RegisterEffect(e0)
local e5=e0:Clone()
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e5:SetCondition(c33201402.tdcon2)
c:RegisterEffect(e5)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33201402,1))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,33201402+10000)
e1:SetTarget(c33201402.atktg)
e1:SetOperation(c33201402.atkop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(33201402,2))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c33201402.descon)
e4:SetTarget(c33201402.destg)
e4:SetOperation(c33201402.desop)
c:RegisterEffect(e4)
VHisc_JDSS.addcheck(c)
end
c33201402.SetCard_JDSS=true
function c33201402.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,33201408)
end
function c33201402.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon() and Duel.IsPlayerAffectedByEffect(tp,33201408)
end
function c33201402.filter1(c,e,tp)
return c:IsLevelAbove(0)
and Duel.IsExistingMatchingCard(c33201402.filter2,tp,LOCATION_HAND,0,1,c,e,tp,c:GetLevel())
end
function c33201402.filter2(c,e,tp,lv)
return c:IsLevelAbove(0)
and Duel.IsExistingMatchingCard(c33201402.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,math.abs(c:GetLevel()-lv))
end
function c33201402.spfilter(c,e,tp,lv)
return c.SetCard_JDSS and c:IsLevel(lv)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33201402.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33201402.filter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g1=Duel.SelectMatchingCard(tp,c33201402.filter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g2=Duel.SelectMatchingCard(tp,c33201402.filter2,tp,LOCATION_HAND,0,1,1,g1:GetFirst(),e,tp,g1:GetFirst():GetLevel())
g1:Merge(g2)
Duel.ConfirmCards(1-tp,g1)
Duel.ShuffleHand(tp)
--
local x=math.abs(g1:GetFirst():GetOriginalLevel()-g1:GetNext():GetOriginalLevel())
e:SetLabel(x)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c33201402.spop(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c33201402.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c33201402.releasefilter(c)
return c.SetCard_JDSS and c:IsFaceup()
end
function c33201402.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33201402.releasefilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33201402.releasefilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c33201402.releasefilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c33201402.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc1 in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-tc:GetAttack())
tc1:RegisterEffect(e1)
end
end
end
--
function c33201402.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(33201401)~=0 and ep==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsLocation(LOCATION_HAND+LOCATION_ONFIELD) and re:GetHandler():GetAttack()<e:GetHandler():GetAttack() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c33201402.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function c33201402.desop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
\ No newline at end of file
--
xpcall(function() require("expansions/script/c33201401") end,function() require("script/c33201401") end)
function c33201403.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
VHisc_JDSS.addcheck(c)
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(33201403,0))
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,33201403)
e0:SetCondition(c33201403.tdcon1)
e0:SetTarget(c33201403.sptg)
e0:SetOperation(c33201403.spop)
c:RegisterEffect(e0)
local e5=e0:Clone()
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e5:SetCondition(c33201403.tdcon2)
c:RegisterEffect(e5)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33201403,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,33201403+10000)
e1:SetCost(c33201403.spcost1)
e1:SetTarget(c33201403.sptg1)
e1:SetOperation(c33201403.spop1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(33201403,2))
e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCountLimit(1)
e4:SetCondition(c33201403.descon)
e4:SetTarget(c33201403.destg)
e4:SetOperation(c33201403.desop)
c:RegisterEffect(e4)
end
c33201403.SetCard_JDSS=true
function c33201403.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,33201408)
end
function c33201403.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon() and Duel.IsPlayerAffectedByEffect(tp,33201408)
end
function c33201403.filter1(c,e,tp)
return c:IsLevelAbove(0)
and Duel.IsExistingMatchingCard(c33201403.filter2,tp,LOCATION_HAND,0,1,c,e,tp,c:GetLevel())
end
function c33201403.filter2(c,e,tp,lv)
--if not math.mod(lv,c:GetLevel())==0 then return end
return c:IsLevelAbove(0)
and Duel.IsExistingMatchingCard(c33201403.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,lv/c:GetLevel())
end
function c33201403.spfilter(c,e,tp,lv)
return c.SetCard_JDSS and c:IsLevel(lv)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33201403.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33201403.filter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g1=Duel.SelectMatchingCard(tp,c33201403.filter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g2=Duel.SelectMatchingCard(tp,c33201403.filter2,tp,LOCATION_HAND,0,1,1,g1:GetFirst(),e,tp,g1:GetFirst():GetLevel())
g1:Merge(g2)
Duel.ConfirmCards(1-tp,g1)
Duel.ShuffleHand(tp)
--
local x=0
local y=0
local tc=g1:GetFirst():GetOriginalLevel()
local tc2=g1:GetNext():GetOriginalLevel()
if tc<tc2 then
x=tc2/tc
else
x=tc/tc2
end
e:SetLabel(x)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c33201403.spop(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c33201403.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c33201403.thfilter(c)
return c.SetCard_JDSS and not c:IsCode(33201403) and c:IsAbleToHand()
end
function c33201403.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function c33201403.costfilter(c,e,tp)
return c:IsFaceup() and c:GetOriginalLevel()>0 and Duel.IsExistingMatchingCard(c33201403.spfilter1,tp,LOCATION_DECK,0,2,nil,c,e,tp)
and Duel.GetMZoneCount(tp,c)>1
end
function c33201403.spfilter1(c,tc,e,tp)
return c.SetCard_JDSS and c:GetOriginalLevel()==tc:GetOriginalLevel()/2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33201403.sptg1(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(c33201403.costfilter,tp,LOCATION_MZONE+LOCATION_PZONE,0,1,nil,e,tp) and not Duel.IsPlayerAffectedByEffect(tp,59822133)
end
e:SetLabel(0)
local g=Duel.SelectMatchingCard(tp,c33201403.costfilter,tp,LOCATION_MZONE+LOCATION_PZONE,0,1,1,nil,e,tp)
Duel.Release(g,REASON_COST)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c33201403.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.GetMatchingGroup(c33201403.spfilter1,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,tc,e,tp)
if sg:GetCount()==0 then return end
local hg=sg:Select(tp,1,1,nil)
sg:RemoveCard(hg:GetFirst())
sg=sg:Filter(Card.IsCode,nil,hg:GetFirst():GetCode())
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
hg:Merge(tg)
Duel.SpecialSummon(hg,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c33201403.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(33201401)~=0 and eg:IsExists(c33201403.cfilter,1,nil,1-tp) and rp==1-tp
end
function c33201403.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c33201403.cfilter,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,eg:GetCount(),0,0)
end
function c33201403.cfilter(c)
return c:IsSummonLocation(LOCATION_EXTRA)
end
function c33201403.filter(c,e)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c33201403.cfilter(c) and c:IsRelateToEffect(e)
end
function c33201403.desop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c33201403.filter,nil,e)
local tc=g:GetFirst()
while tc do
local atk=tc:GetAttack()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(0)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
end
--晶导算使 倍联姆缇普莱
xpcall(function() require("expansions/script/c33201401") end,function() require("script/c33201401") end)
function c33201404.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
VHisc_JDSS.addcheck(c)
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(33201404,0))
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,33201404)
e0:SetCondition(c33201404.tdcon1)
e0:SetTarget(c33201404.sptg)
e0:SetOperation(c33201404.spop)
c:RegisterEffect(e0)
local e5=e0:Clone()
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e5:SetCondition(c33201404.tdcon2)
c:RegisterEffect(e5)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33201404,1))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,33201404+10000)
e1:SetTarget(c33201404.sptg1)
e1:SetOperation(c33201404.spop1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(33201404,2))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCondition(c33201404.stcon)
e4:SetCost(c33201404.stcost)
e4:SetTarget(c33201404.sttg)
e4:SetOperation(c33201404.stop)
c:RegisterEffect(e4)
end
c33201404.SetCard_JDSS=true
function c33201404.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,33201408)
end
function c33201404.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon() and Duel.IsPlayerAffectedByEffect(tp,33201408)
end
function c33201404.filter1(c,e,tp)
return c:IsLevelAbove(0)
and Duel.IsExistingMatchingCard(c33201404.filter2,tp,LOCATION_HAND,0,1,c,e,tp,c:GetLevel())
end
function c33201404.filter2(c,e,tp,lv)
--if not math.mod(lv,c:GetLevel())==0 then return end
return c:IsLevelAbove(0)
and Duel.IsExistingMatchingCard(c33201404.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,lv*c:GetLevel())
end
function c33201404.spfilter(c,e,tp,lv)
return c.SetCard_JDSS and c:IsLevel(lv)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33201404.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33201404.filter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g1=Duel.SelectMatchingCard(tp,c33201404.filter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g2=Duel.SelectMatchingCard(tp,c33201404.filter2,tp,LOCATION_HAND,0,1,1,g1:GetFirst(),e,tp,g1:GetFirst():GetLevel())
g1:Merge(g2)
Duel.ConfirmCards(1-tp,g1)
Duel.ShuffleHand(tp)
--
local x=0
local y=0
local tc=g1:GetFirst():GetOriginalLevel()
local tc2=g1:GetNext():GetOriginalLevel()
if tc<tc2 then
x=tc2/tc
else
x=tc*tc2
end
e:SetLabel(x)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c33201404.spop(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c33201404.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c33201404.desfilter(c)
return c:IsFaceup() and c:IsLevelAbove(0)
end
function c33201404.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_PZONE+LOCATION_MZONE) and c33201404.desfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c33201404.desfilter,tp,LOCATION_PZONE+LOCATION_MZONE,LOCATION_PZONE+LOCATION_MZONE,1,1,nil)
end
function c33201404.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(c:GetLevel()*tc:GetLevel()*100)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
--
function c33201404.stcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(33201401)~=0
end
function c33201404.refilter(c)
return c:IsFaceup() and c:GetOriginalType()&TYPE_PENDULUM~=0
end
function c33201404.stcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33201404.refilter,tp,LOCATION_PZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c33201404.refilter,tp,LOCATION_PZONE,0,1,1,nil)
e:SetLabel(g:GetFirst():GetLevel())
Duel.Release(g,REASON_COST)
end
function c33201404.thfilter(c,lv)
return c:IsFaceup() and c.SetCard_JDSS and c:IsType(TYPE_PENDULUM) and c:GetOriginalLevel()~=lv and not c:IsForbidden()
end
function c33201404.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=e:GetLabel()
if chk==0 then return Duel.IsExistingMatchingCard(c33201404.thfilter,tp,LOCATION_EXTRA,0,1,nil,lv) end
end
function c33201404.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lv=e:GetLabel()
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33201404,3))
local g=Duel.SelectMatchingCard(tp,c33201404.thfilter,tp,LOCATION_EXTRA,0,1,1,nil,lv)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
\ No newline at end of file
--晶导算使 逻辑与门
xpcall(function() require("expansions/script/c33201401") end,function() require("script/c33201401") end)
function c33201405.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
VHisc_JDSS.addcheck(c)
--pendulum set
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,32201405)
e0:SetCondition(c33201405.tdcon1)
e0:SetTarget(c33201405.sptg)
e0:SetOperation(c33201405.spop)
c:RegisterEffect(e0)
local e5=e0:Clone()
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e5:SetCondition(c33201405.tdcon2)
c:RegisterEffect(e5)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,33201405+10000)
e1:SetCondition(c33201405.sdcon)
e1:SetTarget(c33201405.sdtg)
e1:SetOperation(c33201405.sdop)
c:RegisterEffect(e1)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33201405,2))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,33201405+20000)
e1:SetCondition(c33201405.descon)
e1:SetTarget(c33201405.destg)
e1:SetOperation(c33201405.desop)
c:RegisterEffect(e1)
end
c33201405.SetCard_JDSS=true
function c33201405.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,33201408)
end
function c33201405.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon() and Duel.IsPlayerAffectedByEffect(tp,33201408)
end
function c33201405.cfilter1(c,e,tp,scale)
return c.SetCard_JDSS and c:GetLeftScale()==scale and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33201405.pencon(e,tp,eg,ep,ev,re,r,rp)
local scale=e:GetHandler():GetLeftScale()
return Duel.IsExistingMatchingCard(c33201405.cfilter1,tp,LOCATION_PZONE,0,1,e:GetHandler(),e,tp,scale)
end
function c33201405.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local scale=e:GetHandler():GetLeftScale()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33201405.cfilter1,tp,LOCATION_PZONE,0,1,c,e,tp,scale) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c33201405.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local scale=e:GetHandler():GetLeftScale()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c33201405.cfilter1,tp,LOCATION_PZONE,0,1,1,c,e,tp,scale)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c33201405.c3filter(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function c33201405.sdcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c33201405.c3filter,e:GetHandlerPlayer(),LOCATION_PZONE,0,nil)
if g:GetCount()~=2 then return false end
local cc=g:GetFirst()
local lsc=cc:GetLeftScale()
local dc=g:GetNext()
local l2sc=dc:GetLeftScale()
return lsc==l2sc and Duel.GetLocationCount(e:GetHandlerPlayer(),LOCATION_MZONE)>0
end
function c33201405.sdtg(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) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_PZONE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_PZONE)
end
function c33201405.sdop(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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_PZONE,0,1,1,e:GetHandler()):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
--
function c33201405.cfilter(c,scale)
return c:IsFaceup()
and c.SetCard_JDSS and c:GetLeftScale()==scale
end
function c33201405.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local scale=c:GetLeftScale()
return eg:IsExists(c33201405.cfilter,1,c,scale) and re and re:GetHandler().SetCard_JDSS
end
function c33201405.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c33201405.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--晶导算使 逻辑与门
xpcall(function() require("expansions/script/c33201401") end,function() require("script/c33201401") end)
function c33201406.initial_effect(c)
--pendulum summon
VHisc_JDSS.addcheck(c)
aux.EnablePendulumAttribute(c)
--pendulum set
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,33201406)
e0:SetCondition(c33201406.tdcon1)
e0:SetTarget(c33201406.sptg)
e0:SetOperation(c33201406.spop)
c:RegisterEffect(e0)
local e5=e0:Clone()
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e5:SetCondition(c33201406.tdcon2)
c:RegisterEffect(e5)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,33201406+10000)
e1:SetCondition(c33201406.sdcon)
e1:SetTarget(c33201406.sdtg)
e1:SetOperation(c33201406.sdop)
c:RegisterEffect(e1)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33201406,2))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,33201406+20000)
e1:SetCondition(c33201406.descon)
e1:SetTarget(c33201406.destg)
e1:SetOperation(c33201406.desop)
c:RegisterEffect(e1)
end
c33201406.SetCard_JDSS=true
function c33201406.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,33201408)
end
function c33201406.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon() and Duel.IsPlayerAffectedByEffect(tp,33201408)
end
function c33201406.cfilter1(c,e,tp,scale)
return c.SetCard_JDSS and c:GetLeftScale()~=scale and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33201406.pencon(e,tp,eg,ep,ev,re,r,rp)
local scale=e:GetHandler():GetLeftScale()
return Duel.IsExistingMatchingCard(c33201406.cfilter1,tp,LOCATION_PZONE,0,1,e:GetHandler(),e,tp,scale)
end
function c33201406.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local scale=e:GetHandler():GetLeftScale()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33201406.cfilter1,tp,LOCATION_PZONE,0,1,c,e,tp,scale) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c33201406.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local scale=e:GetHandler():GetLeftScale()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c33201406.cfilter1,tp,LOCATION_PZONE,0,1,1,c,e,tp,scale)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
sg:GetFirst():RegisterFlagEffect(33201401,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33201401,1))
end
end
--
function c33201406.c3filter(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function c33201406.sdcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c33201406.c3filter,e:GetHandlerPlayer(),LOCATION_PZONE,0,nil)
if g:GetCount()~=2 then return false end
local cc=g:GetFirst()
local lsc=cc:GetLeftScale()
local dc=g:GetNext()
local l2sc=dc:GetLeftScale()
return lsc~=l2sc and Duel.GetLocationCount(e:GetHandlerPlayer(),LOCATION_MZONE)>0
end
function c33201406.sdtg(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) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_PZONE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_PZONE)
end
function c33201406.sdop(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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_PZONE,0,1,1,e:GetHandler()):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
--
function c33201406.cfilter(c,scale)
return c:IsFaceup()
and c.SetCard_JDSS and c:GetLeftScale()~=scale
end
function c33201406.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local scale=c:GetLeftScale()
return eg:IsExists(c33201406.cfilter,1,c,scale) and re and re:GetHandler().SetCard_JDSS
end
function c33201406.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c33201406.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--晶导算使 逻辑或门
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
xpcall(function() require("expansions/script/c33201401") end,function() require("script/c33201401") end)
function c33201407.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
VHisc_JDSS.addcheck(c)
--scale change
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(33201407,0))
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1)
e0:SetCondition(c33201407.tdcon1)
e0:SetTarget(c33201407.sctg)
e0:SetOperation(c33201407.scop)
c:RegisterEffect(e0)
local e5=e0:Clone()
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e5:SetCondition(c33201407.tdcon2)
c:RegisterEffect(e5)
--cannot target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c33201407.tgtg)
e1:SetValue(1)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33201407,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_EXTRA)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,33201407)
e2:SetCondition(c33201407.spcon1)
e2:SetTarget(c33201407.sptg1)
e2:SetOperation(c33201407.spop1)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33201407,2))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMING_EQUIP+TIMING_END_PHASE)
e3:SetCondition(c33201407.discon)
e3:SetTarget(c33201407.distg)
e3:SetOperation(c33201407.disop)
c:RegisterEffect(e3)
end
c33201407.SetCard_JDSS=true
function c33201407.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,33201408)
end
function c33201407.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon() and Duel.IsPlayerAffectedByEffect(tp,33201408)
end
function c33201407.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetLeftScale()~=0 end
end
function c33201407.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LSCALE)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e2)
end
--
function c33201407.tgtg(e,c)
local g=Duel.GetMatchingGroup(aux.TRUE,e:GetHandlerPlayer(),LOCATION_PZONE,0,nil)
return c:GetLeftScale()==g:GetFirst():GetLeftScale() or c:GetLeftScale()==g:GetNext():GetLeftScale()
end
--
function c33201407.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup()
end
function c33201407.relfilter(c,sc,tp)
return c:IsReleasableByEffect() and c:IsType(TYPE_PENDULUM) and Duel.IsExistingMatchingCard(c33201407.tefilter,tp,LOCATION_EXTRA,0,1,sc,c:GetLeftScale())
end
function c33201407.tefilter(c,scale)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:GetLeftScale()==scale and c.SetCard_JDSS and c:IsAbleToDeck()
end
function c33201407.tefilter2(c,tc,scale)
return c~=tc and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:GetLeftScale()==scale and c.SetCard_JDSS and c:IsAbleToDeck()
end
function c33201407.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_PZONE) end
if chk==0 then return Duel.IsExistingTarget(c33201407.relfilter,tp,LOCATION_PZONE,0,1,nil,e:GetHandler(),tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTarget(tp,c33201407.relfilter,tp,LOCATION_PZONE,0,1,1,nil,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c33201407.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and Duel.Release(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c33201407.tefilter2,tp,LOCATION_EXTRA,0,1,1,c,tc,tc:GetLeftScale())
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
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)
e:GetHandler():RegisterEffect(e1,true)
end
end
end
--
function c33201407.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(33201401)~=0
end
function c33201407.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsDisabled()
end
function c33201407.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33201407.disfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,LOCATION_SZONE)
end
function c33201407.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,c33201407.disfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
if #g>0 then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
--晶导算使 二极晶体管
local m=33201409
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c33201401") end,function() require("script/c33201401") end)
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
VHisc_JDSS.addcheck(c)
--disable search
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_TO_HAND)
e0:SetRange(LOCATION_PZONE)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_EXTRA))
c:RegisterEffect(e0)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.tdcon1)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e6=e1:Clone()
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e6:SetCondition(cm.tdcon2)
c:RegisterEffect(e6)
--ignore
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+10000)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCondition(cm.econ)
e3:SetTargetRange(0,1)
e3:SetTarget(cm.sumlimit)
c:RegisterEffect(e3)
--remove
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_TO_HAND_REDIRECT)
e4:SetTargetRange(0,LOCATION_ONFIELD+LOCATION_GRAVE)
e4:SetCondition(cm.econ)
e4:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_TO_DECK_REDIRECT)
e5:SetTargetRange(0,LOCATION_ONFIELD+LOCATION_GRAVE)
e5:SetCondition(cm.econ)
e5:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e5)
end
c33201409.SetCard_JDSS=true
function cm.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,33201408)
end
function cm.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon() and Duel.IsPlayerAffectedByEffect(tp,33201408)
end
--e1
function cm.thfilter(c,code)
return c.SetCard_JDSS and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(code)
end
function cm.tdfilter(c,tp)
return c.SetCard_JDSS and c:IsType(TYPE_PENDULUM) and c:IsAbleToExtra() and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_HAND,0,1,nil,tp) 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_SELECT)
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
if g:GetCount()>0 then
local code=g:GetFirst():GetCode()
Duel.SendtoExtraP(g,nil,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local thg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,code)
Duel.SendtoHand(thg,nil,REASON_EFFECT)
end
end
--e2
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
if sg:GetCount()==0 then return end
for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(re)
e1:SetValue(cm.efilter)
tc:RegisterEffect(e1)
end
end
function cm.efilter(e,te)
local ige=e:GetLabelObject()
return te==ige
end
--e345
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER)
end
function cm.econ(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(33201401)~=0
end
\ No newline at end of file
--瓶中之人
local cm,m,o=GetID()
function cm.initial_effect(c)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetOperation(cm.tgop)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_REMOVE)
e3:SetOperation(cm.tgop2)
c:RegisterEffect(e3)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,REASON_EFFECT)
end
function cm.tgop2(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)~=0
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
--spsm
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_REMOVE)
e1:SetOperation(cm.spop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
for i=1,#eg do
if Duel.GetFlagEffect(tp,m+10000000)==3 then
Duel.ResetFlagEffect(tp,m+10000000)
local rc=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_REMOVED,0,nil):RandomSelect(tp,1)
Duel.SendtoHand(rc,tp,REASON_EFFECT)
else
Duel.RegisterFlagEffect(tp,m+10000000,RESET_PHASE+PHASE_END,0,1)
end
end
end
\ No newline at end of file
--天堂殒落于此
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
if not cm.ttylyc_change_operation then
cm.ttylyc_change_operation=true
cm._remove=Duel.Remove
Duel.Remove=function (g,pos,reason,...)
if pos=POS_FACEDOWN and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_HAND,0,1,nil) then
if aux.GetValueType(g)=="Card" then
local ttylyc=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_HAND,0,1,1,nil)
local e1=Effect.CreateEffect(ttylyc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
ttylyc:RegisterEffect(e1)
cm._remove(g,POS_FACEUP,reason,...)
local e1=Effect.CreateEffect(ttylyc)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetOperation(cm.disop)
Duel.RegisterEffect(e1,tp)
elseif aux.GetValueType(cg)=="Group" then
local cc=g:Select(tp,1,1,nil)
g:RemoveCard(cc)
local ttylyc=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_HAND,0,1,1,nil)
local e1=Effect.CreateEffect(ttylyc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
ttylyc:RegisterEffect(e1)
cm._remove(g,pos,reason,...)
cm._remove(cc,POS_FACEUP,reason,...)
local e1=Effect.CreateEffect(ttylyc)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetOperation(cm.disop)
Duel.RegisterEffect(e1,tp)
end
else
cm._remove(g,pos,reason,...)
end
return Duel.GetOperatedGroup():GetCount()
end
end
function cm.fil(c)
return c:IsCode(m) and not c:IsPublic()
end
function cm.disop(e,tp)
local c=Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)
if c==0 then return end
local dis1=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
return dis1
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_REMOVED,0,nil)>=15
end
function cm.filter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_REMOVED,0,1,nil) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_REMOVED,0,nil)
Duel.ConfirmCards(tp,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
--瀚海晏霞 谕告的潮音
local cm,m,o=GetID()
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:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.discon)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--control
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_CONTROL)
e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCountLimit(1,m+10000000)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_REMOVED,0,10,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()
local bg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_REMOVED,0,nil)
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>0 and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil)==Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
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)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousControler(tp) and rp==1-tp
end
function cm.filter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_REMOVED,0,1,nil) and Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_REMOVED,0,1,nil) and Duel.IsExistingTarget(Card.IsAttribute,tp,LOCATION_GRAVE,0,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_REMOVED,0,1,10,nil)
local qg=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
Duel.ConfirmCards(tp,qg)
local gg=qg:Select(tp,1,10,nil)
g:Merge(gg)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
local sc=Duel.SelectTarget(tp,Card.IsAttribute,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--瀚海晏霞 公子
local cm,m,o=GetID()
function cm.initial_effect(c)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(35818851,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+10000000)
e2:SetTarget(cm.thtg2)
e2:SetOperation(cm.thop2)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return c:IsSetCard(0x6ac) 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)
local rc=Duel.GetDecktopGroup(tp,1)
Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)
end
end
function cm.filter(c)
return c:IsFacedown() and c:IsAbleToDeck()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--瀚海晏霞 兰生幽谷
local cm,m,o=GetID()
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,cm.mfilter,1)
c:SetSPSummonOnce(m)
c:EnableReviveLimit()
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_COST)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCost(cm.spcost)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.mfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.spcost(e,c,tp,st)
if bit.band(st,SUMMON_TYPE_LINK)~=SUMMON_TYPE_LINK then return true end
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>0 and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil)==Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m)==0 then
--spsm
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetOperation(cm.spop)
Duel.RegisterEffect(e1,tp)
--spsm
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetOperation(cm.spop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--spsm
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetOperation(cm.spop2)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
\ No newline at end of file
--瀚海晏霞 少年春衫
local cm,m,o=GetID()
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(cm.con)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,1)
if chk==0 then return #g~=0 end
local op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
if op==0 then
Duel.Remove(g,POS_FACEUP,REASON_COST)
elseif op==1 then
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
end
function cm.spop(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 and Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>0 and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil)==Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil) then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil)
local qg=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
Duel.ConfirmCards(tp,qg)
g:Merge(qg)
local thg=g:Filter(Card.IsSetCard,nil,0x6ac):Select(tp,1,1,nil)
Duel.SendtoHand(thg,tp,REASON_EFFECT)
end
end
function cm.con(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>0 and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil)==Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
end
\ No newline at end of file
--瀚海晏霞 不休独舞
local cm,m,o=GetID()
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--Equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.cttg)
e2:SetOperation(cm.ctop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetTarget(cm.remtg)
e3:SetOperation(cm.remop)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(cm.remtg)
e3:SetOperation(cm.remop)
c:RegisterEffect(e3)
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(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x6ac) end
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.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local tp=e:GetHandlerPlayer()
local sg=Duel.GetDecktopGroup(1-tp,3)
if chk==0 then return #sg==3 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>0 and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil)==Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil) and e:GetHandler():GetEquipCount()==0 end
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
local c=e:GetHandler()
Duel.ConfirmDecktop(1-tp,3)
local sg=Duel.GetDecktopGroup(1-tp,3)
local ec=sg:GetFirst()
local u=0
for i=1,#sg do
if ec:IsType(TYPE_MONSTER) then
if Duel.Equip(tp,ec,c) then
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(c)
e1:SetValue(cm.eqlimit)
ec:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(ec)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(500)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e2)
u=u+1
end
end
ec=sg:GetNext()
end
local ag=Duel.GetDecktopGroup(tp,u)
Duel.Remove(ag,POS_FACEDOWN,REASON_EFFECT)
end
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
function cm.filter(c,tp)
return c:IsSummonPlayer(1-tp) and c:IsLocation(LOCATION_MZONE)
end
function cm.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tp=e:GetHandlerPlayer()
local c=e:GetHandler()
if chk==0 then return eg:IsExists(cm.filter,1,nil,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>0 and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil)==Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
and Duel.GetFlagEffect(tp,m)==0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
function cm.remop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
local c=e:GetHandler()
local ec=c:GetEquipGroup():Select(tp,1,1,nil)
local dc=Duel.GetDecktopGroup(tp,1)
ec:Merge(dc)
if Duel.Remove(dc,POS_FACEUP,REASON_EFFECT)~=0 then
local des=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(des,REASON_EFFECT)
end
end
\ No newline at end of file
--瀚海晏霞 真珠之智
local cm,m,o=GetID()
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,cm.lcheck)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.thcon1)
e1:SetTarget(cm.thtg1)
e1:SetOperation(cm.thop1)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.lcheck(g)
return g:IsExists(Card.IsLinkAttribute,1,nil,ATTRIBUTE_WATER)
end
function cm.thcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.thfilter1(c)
return c:IsSetCard(0x6ac) and c:IsAbleToRemove()
end
function cm.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_DECK,0,1,nil) end
end
function cm.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)~=0 then
local rg=Duel.GetDecktopGroup(tp,1)
Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)
end
end
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>0 and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil)==Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil) and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_REMOVED,0,1,nil,ATTRIBUTE_WATER) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local bg=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
Duel.ConfirmCards(tp,bg)
local g=Duel.GetMatchingGroup(Card.IsAttribute,tp,LOCATION_REMOVED,0,nil,ATTRIBUTE_WATER):Select(tp,1,1,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--瀚海晏霞 闪耀偶像
local cm,m,o=GetID()
function cm.initial_effect(c)
--sp summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.tgcon)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+10000000)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function cm.tgtg(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.tgop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 then
local rg=Duel.GetDecktopGroup(tp,1)
Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCurrentChain()
if ct<2 then return false end
local te,p=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if not te then return false end
local b1=te:GetHandler():IsSetCard(0x6ac) and not te:GetHandler():IsCode(m)
return b1 and p==tp and rp==1-tp
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil):Filter(Card.IsSetCard,nil,0x6ac):Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP)
if chk==0 then return #g~=0 end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil):Filter(Card.IsSetCard,nil,0x6ac):Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP)
local athg=g:Select(tp,1,1,nil)
Duel.SendtoHand(athg,nil,REASON_EFFECT)
end
\ No newline at end of file
--瀚海晏霞 星天水镜
local cm,m,o=GetID()
function cm.initial_effect(c)
--summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(96570609,2))
e4:SetCategory(CATEGORY_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_HAND)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.sumcon)
e4:SetTarget(cm.sumtg)
e4:SetOperation(cm.sumop)
c:RegisterEffect(e4)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>0 and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil)==Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
end
function cm.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_REMOVED,0,nil)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g~=0 end
end
function cm.sumop(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 g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_REMOVED,0,nil):Select(tp,1,1,nil)
if Duel.SSet(tp,g:GetFirst())~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCondition(cm.accon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
function cm.accon(e,tp,eg,ep,ev,re,r,rp)
return MerlinTC.YSERemoved(tp)
end
\ No newline at end of file
--万世流涌大典
function c60002420.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c60002420.operation)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c60002420.srtg)
e2:SetOperation(c60002420.srop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--set
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_REMOVE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(LOCATION_HAND)
e4:SetCondition(c60002420.setcon)
e4:SetOperation(c60002420.setop)
c:RegisterEffect(e4)
end
function c60002420.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCost(c60002420.rmcost)
e1:SetTarget(c60002420.rmtg)
e1:SetOperation(c60002420.rmop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c60002420.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil,POS_FACEDOWN) end
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil,POS_FACEDOWN)
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function c60002420.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
if chk==0 then return tc and tc:IsAbleToRemove(POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,tp,LOCATION_DECK)
end
function c60002420.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
if tc then
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end
function c60002420.pbfil(c,e,tp)
return not c:IsPublic() and c:IsAttribute(ATTRIBUTE_WATER) and Duel.IsExistingMatchingCard(c60002420.thfil,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c60002420.thfil(c,code)
if not (c:IsAbleToHand() and c:IsSetCard(0x6ac) and c:IsType(TYPE_MONSTER)) then return false end
if code==nil then
return true
else
return not c:IsCode(code) end
end
function c60002420.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60002420.pbfil,tp,LOCATION_HAND,0,1,nil,e,tp) and e:GetHandler():GetFlagEffect(60002420)==0 end
e:GetHandler():RegisterFlagEffect(60002420,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local tc=Duel.SelectMatchingCard(tp,c60002420.pbfil,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst()
Duel.ConfirmCards(1-tp,tc)
local code=tc:GetCode()
e:SetLabel(code)
Duel.ShuffleHand(tp)
end
function c60002420.srop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local code=e:GetLabel()
if Duel.IsExistingMatchingCard(c60002420.thfil,tp,LOCATION_DECK,0,1,nil,code) then
local sg=Duel.SelectMatchingCard(tp,c60002420.thfil,tp,LOCATION_DECK,0,1,1,nil,code)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c60002420.stfil(c,tp)
return c:GetReasonPlayer()==tp and c:IsFacedown()
end
function c60002420.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c60002420.stfil,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c60002420.thfil,tp,LOCATION_DECK,0,1,nil,nil) and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==1-tp
end
function c60002420.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c60002420.setcon(e,tp,eg,ep,ev,re,r,rp) then
if Duel.SelectEffectYesNo(tp,c,aux.Stringid(60002420,0)) then
Duel.Hint(HINT_CARD,0,60002420)
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
c60002420.srop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
--静水流涌之辉
function c60002421.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c60002421.operation)
c:RegisterEffect(e1)
--immuse
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(c60002421.imcon)
e2:SetTarget(c60002421.imtg)
e2:SetOperation(c60002421.imop)
c:RegisterEffect(e2)
--set
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_REMOVE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(LOCATION_HAND)
e4:SetCondition(c60002421.setcon)
e4:SetOperation(c60002421.setop)
c:RegisterEffect(e4)
end
function c60002421.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCost(c60002421.rmcost)
e1:SetTarget(c60002421.rmtg)
e1:SetOperation(c60002421.rmop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c60002421.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c60002421.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
if chk==0 then return tc and tc:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,tp,LOCATION_DECK)
end
function c60002421.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c60002421.pbfil(c,e,tp)
return not c:IsPublic() and c:IsAttribute(ATTRIBUTE_WATER) and Duel.IsExistingMatchingCard(c60002421.thfil,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c60002421.imcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>0 and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil)==Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
end
function c60002421.imtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c60002421.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(function(e,c)
return c:IsSetCard(0x6ac) end)
e1:SetValue(function(e,te)
return e:GetOwnerPlayer()~=te:GetOwnerPlayer() and te:IsActivated() end)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c60002421.stfil(c,tp)
return c:GetReasonPlayer()==tp and c:IsFaceup()
end
function c60002421.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c60002421.stfil,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==1-tp
end
function c60002421.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c60002421.setcon(e,tp,eg,ep,ev,re,r,rp) then
if Duel.SelectEffectYesNo(tp,c,aux.Stringid(60002421,0)) then
Duel.Hint(HINT_CARD,0,60002421)
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
c60002421.imop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
--仿若无因飘落的细雨
function c60002422.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c60002422.condition)
e1:SetTarget(c60002422.target)
e1:SetOperation(c60002422.activate)
c:RegisterEffect(e1)
end
function c60002422.condition(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>0 and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil)==Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)) then return false end
if not Duel.IsChainNegatable(ev) then return false end
return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c60002422.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetDecktopGroup(tp,1):GetFirst() and Duel.GetDecktopGroup(tp,1):GetFirst():IsAbleToRemove(POS_FACEDOWN) and Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsAbleToHand() and c:IsSetCard(0x6ac) and c:IsType(TYPE_MONSTER) end,tp,LOCATION_REMOVED,0,1,nil)
local b2=Duel.GetDecktopGroup(tp,1):GetFirst() and Duel.GetDecktopGroup(tp,1):GetFirst():IsAbleToRemove() and Duel.IsExistingMatchingCard(function(c) return c:IsFacedown() and c:IsAbleToHand() and c:IsSetCard(0x6ac) and c:IsType(TYPE_SPELL+TYPE_TRAP) end,tp,LOCATION_REMOVED,0,1,nil)
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c60002422.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
local tc=eg:GetFirst()
if tc then
--activate limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetLabelObject(tc)
e1:SetValue(c60002422.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
local b1=Duel.GetDecktopGroup(tp,1):GetFirst() and Duel.GetDecktopGroup(tp,1):GetFirst():IsAbleToRemove(POS_FACEDOWN) and Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsAbleToHand() and c:IsSetCard(0x6ac) and c:IsType(TYPE_MONSTER) end,tp,LOCATION_REMOVED,0,1,nil)
local b2=Duel.GetDecktopGroup(tp,1):GetFirst() and Duel.GetDecktopGroup(tp,1):GetFirst():IsAbleToRemove() and Duel.IsExistingMatchingCard(function(c) return c:IsFacedown() and c:IsAbleToHand() and c:IsSetCard(0x6ac) and c:IsType(TYPE_SPELL+TYPE_TRAP) end,tp,LOCATION_REMOVED,0,1,nil)
if b1 or b2 then
local op=2
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(60002422,1),aux.Stringid(60002422,2))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(60002422,1))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(60002422,2))+1
end
if op==0 then
local sg=Duel.SelectMatchingCard(tp,function(c) return c:IsFaceup() and c:IsAbleToHand() and c:IsSetCard(0x6ac) and c:IsType(TYPE_MONSTER) end,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
elseif op==1 then
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
Duel.ConfirmCards(tp,g)
Duel.ConfirmCards(1-tp,g)
local sg=Duel.SelectMatchingCard(tp,function(c) return c:IsFacedown() and c:IsAbleToHand() and c:IsSetCard(0x6ac) and c:IsType(TYPE_SPELL+TYPE_TRAP) end,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
if c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
end
function c60002422.actlimit(e,re,tp)
local tc=e:GetLabelObject()
return re:GetHandler():GetOriginalCodeRule()==tc:GetOriginalCodeRule()
end
--最后的遗荣
function c60002423.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60002423,3))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetTarget(c60002423.rmtg)
e1:SetOperation(c60002423.rmop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60002423,4))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCondition(c60002423.spcon)
e2:SetTarget(c60002423.sptg)
e2:SetOperation(c60002423.spop)
c:RegisterEffect(e2)
end
function c60002423.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
local b1=tc and tc:IsAbleToRemove()
local b2=tc and tc:IsAbleToRemove(POS_FACEDOWN)
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,tp,LOCATION_DECK)
end
function c60002423.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
if tc then
local b1=tc and tc:IsAbleToRemove()
local b2=tc and tc:IsAbleToRemove(POS_FACEDOWN)
local op=2
if b1 or b2 then
local op=2
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(60002423,1),aux.Stringid(60002423,2))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(60002423,1))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(60002423,2))+1
end
if op==0 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif op==1 then
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end
end
end
function c60002423.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>0 and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil)==Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
end
function c60002423.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60002423.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c60002423.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c60002423.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60002423.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--净界遗歌 傲慢之路西法
local cm,m,o=GetID()
function cm.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
if not cm.jjygone then
cm.jjygone=true
cm._send_to_hand=Duel.SendtoHand
Duel.SendtoHand=function (c,tp,rea,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._send_to_hand(ac,tp,rea,...)
Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m)
else
cm._send_to_hand(c,tp,rea,...)
end
end
end
function cm.fil(c)
return c:IsCode(m) and c:IsPosition(POS_FACEUP_DEFENSE)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoDeck(e:GetHandler(),1-tp,2,REASON_COST)
e:GetHandler():ReverseInDeck()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(1-tp,m,RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
--净界遗歌 嫉妒之利维坦
local cm,m,o=GetID()
function cm.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
if not cm.jjygtwo then
cm.jjygtwo=true
cm._special_summon=Duel.SpecialSummon
Duel.SpecialSummon=function (c,way,tp1,tp2,tf1,tf2,pos,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) and (c:IsLocation(LOCATION_DECK) or c:IsLocation(LOCATION_EXTRA)) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._special_summon(ac,way,tp1,tp2,tf1,tf2,pos,...)
Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m)
else
cm._special_summon(c,way,tp1,tp2,tf1,tf2,pos,...)
end
end
cm._special_summon_step=Duel.SpecialSummonStep
Duel.SpecialSummonStep=function (c,way,tp1,tp2,tf1,tf2,pos,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) and (c:IsLocation(LOCATION_DECK) or c:IsLocation(LOCATION_EXTRA)) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._special_summon_step(ac,way,tp1,tp2,tf1,tf2,pos,...)
Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m)
else
cm._special_summon_step(c,way,tp1,tp2,tf1,tf2,pos,...)
end
end
end
function cm.fil(c)
return c:IsCode(m) and c:IsPosition(POS_FACEUP_DEFENSE)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoDeck(e:GetHandler(),1-tp,2,REASON_COST)
e:GetHandler():ReverseInDeck()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(1-tp,m,RESET_PHASE+PHASE_END,0,1)
end
--净界遗歌 怠惰之贝尔芬格
local cm,m,o=GetID()
function cm.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
if not cm.jjygthree then
cm.jjygthree=true
cm._remove=Duel.Remove
Duel.Remove=function (c,pos,rea,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._remove(ac,pos,rea,...)
Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m)
else
cm._remove(c,pos,rea,...)
end
end
end
function cm.fil(c)
return c:IsCode(m) and c:IsPosition(POS_FACEUP_DEFENSE)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoDeck(e:GetHandler(),1-tp,2,REASON_COST)
e:GetHandler():ReverseInDeck()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(1-tp,m,RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
--净界遗歌 暴怒之萨麦尔
local cm,m,o=GetID()
function cm.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
if not cm.jjygfour then
cm.jjygfour=true
cm._destroy=Duel.Destroy
Duel.Destroy=function (c,rea,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._destroy(ac,rea,...)
Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m)
else
cm._destroy(c,rea,...)
end
end
end
function cm.fil(c)
return c:IsCode(m) and c:IsPosition(POS_FACEUP_DEFENSE)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoDeck(e:GetHandler(),1-tp,2,REASON_COST)
e:GetHandler():ReverseInDeck()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(1-tp,m,RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
--净界遗歌 色孽之阿斯莫德
local cm,m,o=GetID()
function cm.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
if not cm.jjygfive then
cm.jjygfive=true
cm._special_summon=Duel.SpecialSummon
Duel.SpecialSummon=function (c,way,tp1,tp2,tf1,tf2,pos,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) and (c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_GRAVE)) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._special_summon(ac,way,tp1,tp2,tf1,tf2,pos,...)
Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m)
else
cm._special_summon(c,way,tp1,tp2,tf1,tf2,pos,...)
end
end
cm._special_summon_step=Duel.SpecialSummonStep
Duel.SpecialSummonStep=function (c,way,tp1,tp2,tf1,tf2,pos,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) and (c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_GRAVE)) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._special_summon_step(ac,way,tp1,tp2,tf1,tf2,pos,...)
Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m)
else
cm._special_summon_step(c,way,tp1,tp2,tf1,tf2,pos,...)
end
end
end
function cm.fil(c)
return c:IsCode(m) and c:IsPosition(POS_FACEUP_DEFENSE)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoDeck(e:GetHandler(),1-tp,2,REASON_COST)
e:GetHandler():ReverseInDeck()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(1-tp,m,RESET_PHASE+PHASE_END,0,1)
end
--净界遗歌 暴食之别西卜
local cm,m,o=GetID()
function cm.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
if not cm.jjygsix then
cm.jjygsix=true
cm._release=Duel.Release
Duel.Release=function (c,rea,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._release(ac,rea,...)
Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m)
else
cm._release(c,rea,...)
end
end
end
function cm.fil(c)
return c:IsCode(m) and c:IsPosition(POS_FACEUP_DEFENSE)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoDeck(e:GetHandler(),1-tp,2,REASON_COST)
e:GetHandler():ReverseInDeck()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(1-tp,m,RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
--净界遗歌 贪婪之玛门
local cm,m,o=GetID()
function cm.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
if not cm.jjygseven then
cm.jjygseven=true
cm._send_to_grave=Duel.SendtoGrave
Duel.SendtoGrave=function (c,rea,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._send_to_grave(ac,rea,...)
Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m)
else
cm._send_to_grave(c,rea,...)
end
end
end
function cm.fil(c)
return c:IsCode(m) and c:IsPosition(POS_FACEUP_DEFENSE)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoDeck(e:GetHandler(),1-tp,2,REASON_COST)
e:GetHandler():ReverseInDeck()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(1-tp,m,RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
--红色战钢 技师
function c88881075.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,88881075)
e1:SetTarget(c88881075.thtg)
e1:SetOperation(c88881075.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function c88881075.thfilter(c)
return (c:IsSetCard(0xc00) and c:IsType(TYPE_MONSTER) or c:IsSetCard(0xc00) and c:IsType(TYPE_QUICKPLAY)) and c:IsAbleToHand()
end
function c88881075.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88881075.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1800)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1800)
end
function c88881075.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88881075.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.Recover(tp,1800,REASON_EFFECT)
end
end
\ No newline at end of file
--单调秘械
function c9310075.initial_effect(c)
aux.AddMaterialCodeList(c,15005130)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,15005130),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9310075,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,9310075)
e1:SetTarget(c9310075.target)
e1:SetOperation(c9310075.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_REMOVE)
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(c9310075.tnval)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(9310075,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_DECK)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,9311075)
e4:SetCondition(c9310075.spcon)
e4:SetTarget(c9310075.sptg)
e4:SetOperation(c9310075.spop)
c:RegisterEffect(e4)
end
function c9310075.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_MONSTER,OPCODE_ISTYPE,TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT,OPCODE_AND}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function c9310075.spfilter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9310075.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or not Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
local sc=Duel.GetFieldCard(tp,LOCATION_DECK,0)
Duel.ConfirmCards(tp,sc)
Duel.ConfirmCards(1-tp,sc)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if sc:IsCode(ac) and sc:IsAbleToHand() then
Duel.DisableShuffleCheck()
if Duel.SendtoHand(sc,nil,REASON_EFFECT)~=0
and sc:IsLocation(LOCATION_HAND) and sc:IsType(TYPE_TUNER)
and (sc:IsCanBeSpecialSummoned(e,0,tp,false,false) or Duel.IsExistingMatchingCard(c9310075.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp))
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(9310075,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=Duel.GetMatchingGroup(c9310075.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
sg:Merge(Group.FromCards(sc))
tc=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.ShuffleHand(tp)
else
Duel.ShuffleHand(tp)
end
else
Duel.ShuffleDeck(tp)
Duel.ShuffleDeck(1-tp)
end
end
function c9310075.tnval(e,c)
return e:GetHandler():IsDefensePos()
end
function c9310075.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c9310075.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9310075.cfilter,1,nil,tp)
end
function c9310075.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 c9310075.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--热炎融合异种 单调慈鲷
function c9310076.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_FIRE),aux.FilterBoolFunction(Card.IsRace,RACE_FISH),true)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9310076,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,9310076)
e1:SetTarget(c9310076.sptg)
e1:SetOperation(c9310076.spop)
c:RegisterEffect(e1)
--nontuner
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_NONTUNER)
e2:SetValue(c9310076.tnval)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9310076,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,9311076)
e3:SetOperation(c9310076.tgop)
c:RegisterEffect(e3)
end
function c9310076.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (re:IsActiveType(TYPE_SPELL)
or e:GetHandler():GetFlagEffect(33332257)~=0)
and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_MONSTER,OPCODE_ISTYPE,TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT,OPCODE_AND}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function c9310076.spfilter(c,e,tp,ac)
return c:IsCode(ac) and c:IsCanBeSpecialSummoned(e,0,1-tp,false,false)
end
function c9310076.spfilter1(c,e,tp,ac)
return c:IsCode(ac) and c:GetOwner()==tp and c:IsCanBeSpecialSummoned(e,0,1-tp,false,false)
end
function c9310076.spfilter2(c,e,tp,ac)
return c:IsCode(ac) and c:GetOwner()==1-tp and c:IsCanBeSpecialSummoned(e,0,1-tp,false,false)
end
function c9310076.cfilter(c,g,mc)
return g:CheckSubGroup(c9310076.mtfilter,1,#g,mc,c)
end
function c9310076.mtfilter(g,mc,c)
local sg=g:Clone()
sg:AddCard(mc)
return sg:GetSum(Card.GetSynchroLevel,c)==c:GetLevel() and c:IsSynchroSummonable(nil,sg)
and c:IsType(TYPE_TUNER)
end
function c9310076.spop(e,tp,eg,ep,ev,re,r,rp)
local kc=e:GetHandler()
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local sg=Duel.GetMatchingGroup(c9310076.spfilter,tp,0,LOCATION_HAND,nil,e,tp,ac)
local sg1=Duel.GetMatchingGroup(c9310076.spfilter1,tp,0,LOCATION_HAND,nil,e,tp,ac)
local sg2=Duel.GetMatchingGroup(c9310076.spfilter2,tp,0,LOCATION_HAND,nil,e,tp,ac)
Duel.ConfirmCards(tp,hg)
if g:GetCount()>0 then
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if ft1<=0 and ft2<=0 then return end
if ft1>0 and ft2>0 and sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local sc=sg:Select(1-tp,1,1,nil):GetFirst()
Duel.SpecialSummon(sc,0,1-tp,sc:GetOwner(),false,false,POS_FACEUP)
elseif ft1>0 and ft2<=0 and sg1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local oc=sg1:Select(1-tp,1,1,nil):GetFirst()
Duel.SpecialSummon(oc,0,1-tp,oc:GetOwner(),false,false,POS_FACEUP)
elseif ft1<=0 and ft2>0 and sg2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local tc=sg2:Select(1-tp,1,1,nil):GetFirst()
Duel.SpecialSummon(tc,0,1-tp,tc:GetOwner(),false,false,POS_FACEUP)
end
else
local dg=Duel.GetMatchingGroup(Card.IsCanBeSynchroMaterial,tp,LOCATION_MZONE,0,kc)
local kg=Duel.GetMatchingGroup(c9310076.cfilter,tp,LOCATION_EXTRA,0,nil,dg,kc)
if kg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9310076,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local dc=kg:Select(tp,1,1,nil):GetFirst()
local dg1=dg:SelectSubGroup(tp,c9310076.mtfilter,false,1,#dg,kc,dc)
dg1:Merge(Group.FromCards(kc))
dc:SetMaterial(dg1)
Duel.SynchroSummon(tp,dc,nil,dg1)
dc:CompleteProcedure()
end
end
Duel.ShuffleHand(1-tp)
end
function c9310076.tnval(e,c)
return e:GetHandler():IsDefensePos()
end
function c9310076.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE)
and c:IsRace(RACE_FISH) and c:IsLevelBelow(4) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c9310076.tgop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCountLimit(1)
e1:SetCondition(c9310076.thcon)
e1:SetOperation(c9310076.operation)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c9310076.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9310076.tgfilter,tp,LOCATION_DECK,0,1,nil)
end
function c9310076.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c9310076.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
\ No newline at end of file
--点火骑士·爱国者
function c98920696.initial_effect(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c98920696.splimit)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,98920696)
e2:SetCondition(c98920696.spcon)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920696,0))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,98930696)
e3:SetCondition(c98920696.condition)
e3:SetTarget(c98920696.target)
e3:SetOperation(c98920696.operation)
c:RegisterEffect(e3)
end
function c98920696.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0xc8)
end
function c98920696.spcon(e,c)
if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end
return Duel.GetMatchingGroup(c98920696.spfilter,c:GetControler(),LOCATION_EXTRA,0,nil):GetClassCount(Card.GetCode)>=3
end
function c98920696.spfilter(c)
return c:IsSetCard(0xc8) and c:IsFaceup()
end
function c98920696.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c98920696.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920696.filter,tp,LOCATION_EXTRA,0,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c98920696.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
if Duel.Destroy(eg,REASON_EFFECT) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(98920696,0))
local g=Duel.SelectMatchingCard(tp,c98920696.filter,tp,LOCATION_EXTRA,0,3,3,nil)
if g:GetCount()<3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
g:Sub(sg)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
function c98920696.filter(c)
return c:IsSetCard(0xc8) and c:IsAbleToHand() and c:IsFaceup()
end
\ No newline at end of file
......@@ -1085,6 +1085,9 @@
!setname 0x3eec 灵械姬
!setname 0x3eef 折剑
#???
!setname 0xf39 ʯ�
#TYGOC Submissions
#Desruc_6872 987
!counter 0x57b Scarlet Counter
......
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