Commit 39dab5e2 authored by Tachibana's avatar Tachibana

得得得得得

parent 36bb5412
Pipeline #13255 canceled with stages
in 5 minutes and 13 seconds
......@@ -4,8 +4,8 @@ stages:
variables:
GIT_DEPTH: "1"
LAST_UPDATE_DATE: "2022.5.9"
CURRENT_UPDATE_DATE: "2022.5.23"
LAST_UPDATE_DATE: "2022.5.24"
CURRENT_UPDATE_DATE: "2022.5.28"
redtext:
stage: prepare
......
No preview for this file type
......@@ -44,7 +44,6 @@
01170018 1 --天阁
01171001 1 --诺札利亚 辉琉里
#42
04210018 2 --猫耳天堂-幼猫的约定
04210020 1 --猫耳天堂-幼猫的梦想
04210031 1 --猫耳天堂-偶像红豆
04210049 0 --手冲魔女-救救猫猫
......@@ -476,6 +475,7 @@
16172022 0 --煌世破
16199520 0 --华丽的降神
16199522 0 --礼物A
16199523 0 --暴发户的赠礼
#162
16200001 0 --单推人宣言
16200008 0 --单推单推单推人
......@@ -681,7 +681,7 @@
26807023 0 --水之未眠
26818000 1 --九条璃雨
26818008 1 --命运的指引 卡维
26818009 1 --凉宫杏树
26818009 2 --凉宫杏树
26818010 0 --小鸟游雏田
26818011 0 --全力竞速 抚子
26818016 0 --暗之舞姬 莎拉
......@@ -695,13 +695,11 @@
#283
28308004 0 --不被吓个半死是不可能的
28316012 0 --黑野紫
28316021 2 --女仆长·鸣野凪子
28316022 1 --青叶由爱·主播女孩
28318008 1 --全力·有栖川亚里沙
28319006 0 --下垣鸣海凛央奈 Single
28321002 1 --失格天使·白鸟芽衣
28321007 0 --田园精灵·白鸟芽衣
28328005 2 --三水小雪·抹茶
#300
30000200 0 --暗魔力的爆发
30000205 0 --不灭的黑暗
......@@ -740,7 +738,7 @@
30558013 0 --破灭幻械 注魂
#306
30614514 0 --超级沼气前辈 野兽形态
30655561 0 --闪耀之人
30655561 2 --闪耀之人
30655567 0 --第三次无限战争
30666660 0 --星系守护神 长蛇星神
30666661 0 --拉伊达 3σ
......@@ -776,7 +774,7 @@
#332
33200251 1 --机略纵横 鲁子敬
33200431 1 --魔力联合 紫鸢尾
33200512 1 --逆转检事 戈多
33200512 2 --逆转检事 戈多
33200907 1 --寒霜灵兽 玛狃拉
33200912 1 --寒霜灵兽 象牙猪
33200913 1 --寒霜灵兽 冰鬼护
......@@ -818,7 +816,7 @@
33330080 0 --CRuritor FluWers
33330083 0 --对立性骤降之月
33330086 1 --混沌饿融合鱼
33330087 1 --死魂收割者
33330087 2 --死魂收割者
33330089 0 --水宫残照
33330092 0 --水灵守护 天使
33330093 0 --Grey wings·Clan
......@@ -844,7 +842,6 @@
33331110 2 --天降小狐 狐星雨
33331551 1 --天体神秘学
33331554 0 --天体圣所 自转仪
33331556 2 --天体坠击
33339011 2 --星锁之环 跃迁之门
33339013 2 --星锁精灵 降生
33340002 0 --增殖的瓜
......@@ -942,6 +939,7 @@
33503509 1 --Ham编码启动机器
33503511 1 --Ham编码纠正器
#337
33700001 0 --上级Protoform 乞力马扎罗
33700028 0 --Proto-Protoform
33700058 0 --砂之星之奇迹
33700065 1 --动物朋友 PPP 金图企鹅
......@@ -1166,18 +1164,21 @@
#502
50218129 1 --数码兽的初遇
50221425 0 --符龙王-魔咒
#513
51300071 0 --异夕光物 鹏海星
51300081 0 --异夕光物 梅花鹿捕蝇草
51300091 0 --异夕光物 海象覆盆子
#514
51414050 0 --地底幽魂的断罪之魂
51414052 0 --审判所有的黑白阎罗
51414056 0 --冥渡幽魂的悠闲之人
51414080 0 --难得的幽魂假日
51414050 1 --地底幽魂的断罪之魂
51414052 1 --审判所有的黑白阎罗
51414056 1 --冥渡幽魂的悠闲之人
51414080 1 --难得的幽魂假日
#515
51562803 0 --星之国 阿莉耶丝
#525
52520007 1 --自然女王·莉莉
52520014 0 --恋色织静·莉莉
#537
53700002 2 --引怒雷
53705018 0 --超极幻海袭 丰之黄金
53707016 0 --清响 抄染扉
53716001 0 --断片折光 幻想匿国
......@@ -1191,7 +1192,6 @@
53719005 1 --侵吞之茧
53719006 1 --吞天铠 芳醇装甲
53719007 1 --吞天铠 诱引刃虫
53724004 2 --迫真空手武神 AKYS
53726017 0 --异族的少女 玛娜
53728001 0 --迅征啼鸟 火星之春
53731001 1 --狂喑祭月
......@@ -1292,12 +1292,12 @@
64800088 0 --猫猫拳
64800096 0 --樱花星王
64800097 1 --神代丰
64800105 1 --神代丰的激斗 二千坚尼大赛
64800105 2 --神代丰的激斗 二千坚尼大赛
64800109 1 --神代丰的领域 香山竞马场
64800113 0 --樱花丰王
64800131 0 --芥川龙之介的河童之国
64800133 1 --万人要求的海盗狗
64800134 1 --超绝超频电子天使
64800134 2 --超绝超频电子天使
64830002 0 --幻梦迷境 维斯
64830004 0 --幻梦迷境 超高速
64830006 0 --幻梦迷境 斯坦奇卡
......@@ -1417,7 +1417,6 @@
#729
72979222 1 --雪之洗礼
72979224 1 --雪之冥王
72979226 2 --雪之神圣
#751
75122916 0 --械龙机
75124541 0 --械龙铠·辉凤铠
......
--晶属念灵体-起源
local m=35700200
local cm=_G["c"..m]
mask_crystal=mask_crystal or {}
local mc=mask_crystal
---------------------------------------------------------------main effect
function mc.CRE(c,f,v,reg)
local e=mask_crystal.any(mask_crystal.eff["CRE"](c),f,v)
if not reg then c:RegisterEffect(e) end
return e
end
function mc.c_loc(loc)
local v = 0
loc = type(loc) == "table" and loc or {loc}
for i,l in ipairs(loc) do
l = type(l) == "string" and mc.loc[l] or l
v = v + l
end
return v
end
function mc.T(c,loc,con,tg,f,v)
--注册一个在loc触发的诱发选发效果
con = type(con) == "table" and con or {con}
local e = {}
for i,l in ipairs(con) do
e[i]=mc.CRE(c,{"TYP","RAN",mc.con[l],mc.tg[tg],mc.any},{EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD,loc,nil,nil,{f,v}})
end
return table.unpack(e)
end
function mc.Q(c,loc,cod,con,tg,f,v)
--注册一个在loc触发的诱发效果
local e=mc.CRE(c,{"TYP","COD","RAN",mc.tg[tg],mc.any},{EFFECT_TYPE_QUICK_O,cod or EVENT_FREE_CHAIN,loc,nil,{f,v}},true)
if con then e:SetCondition(con) end
c:RegisterEffect(e)
return e
end
function mc.SS_L(c,val)
--这张卡不能通常召唤,满足val才能特殊召唤
c:EnableReviveLimit()
local e=mc.CRE(c,{"PRO","TYP","COD","VAL"},{EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE,EFFECT_TYPE_SINGLE,EFFECT_SPSUMMON_CONDITION,val})
return e
end
function mc.SR_D(c,con)
--这张卡只要在怪兽区域存在,战斗发生的对自己的战斗伤害变成0
local e=mc.SR(c,EFFECT_AVOID_BATTLE_DAMAGE,LOCATION_MZONE,con)
return e
end
function mc.SR_R(c)
--这张卡只要在怪兽区域存在,不能解放,不能作为同调·超量·连接素材
local e={mc.SR(c,{EFFECT_UNRELEASABLE_SUM,EFFECT_UNRELEASABLE_NONSUM,EFFECT_CANNOT_BE_XYZ_MATERIAL,EFFECT_CANNOT_BE_SYNCHRO_MATERIAL,EFFECT_CANNOT_BE_LINK_MATERIAL},LOCATION_MZONE,nil,1)}
return table.unpack(e)
end
function mc.SR_V(c)
--这张卡的攻击力·守备力上升这张卡装备的怪兽的原本的攻击力·守备力各自合计数值
local e={mc.SR(c,{EFFECT_UPDATE_ATTACK,EFFECT_UPDATE_DEFENSE},LOCATION_MZONE)}
e[1]:SetValue(mc.Up_Attack)
e[2]:SetValue(mc.Up_Defense)
return table.unpack(e)
end
function mc.SR_D_R(c,op,f,rea)
--这张卡被破坏的场合,作为代替把这张卡装备的1张怪兽卡XX
local e1=mc.CRE(c,{"PRO","TYP","COD","RAN","TG","OP"},{EFFECT_FLAG_SINGLE_RANGE,EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE,EFFECT_DESTROY_REPLACE,LOCATION_MZONE,mc.SR_D_R_tg(f,rea),op})
return e1
end
---------------------------------------------------------------con
mc.con = {
["A"] = function(e)
--对方的怪兽的的攻击宣言时触发
mc.any(e,{"COD","CON"},{EVENT_ATTACK_ANNOUNCE,mc.con_A_con})
end,
["E"] = function(e)
--对方把卡的效果发动的场合触发
mc.any(e,{"COD","PRO","CON"},{EVENT_CHAINING,EFFECT_FLAG_DELAY,mc.con_E_con})
end,
["S"] = function(e)
--对方场上有怪兽召唤的场合触发
mc.any(e,{"COD","PRO","CON"},{EVENT_SUMMON_SUCCESS,EFFECT_FLAG_DELAY,mc.con_S_con})
end,
["SP"] = function(e)
--对方场上有怪兽特殊召唤的场合触发
mc.any(e,{"COD","PRO","CON"},{EVENT_SPSUMMON_SUCCESS,EFFECT_FLAG_DELAY,mc.con_S_con})
end
}
function mc.Zero_Equip(e)
--这张卡没有装备卡的场合
local eg=e:GetHandler():GetEquipGroup()
return eg:GetCount()==0
end
---------------------------------------------------------------cat & tg & op
mc.tg = {
["SS"] = function(e)
--这张卡特殊召唤
mc.any(e,{"DES","CAT","TG","OP"},{aux.Stringid(m,0),CATEGORY_SPECIAL_SUMMON,mc.tg_SS_tg,mc.tg_SS_op})
end,
["S"] = function(e)
--从卡组选1只4星以下的「晶属念灵体」怪兽或者1张「晶属念灵体」魔法卡加入手卡
mc.any(e,{"DES","CAT","TG","OP"},{aux.Stringid(m,1),CATEGORY_TOHAND+CATEGORY_SEARCH,mc.tg_S_tg,mc.tg_S_op})
end,
["EA"] = function(e)
--那些怪兽任意数量当作装备卡使用给这张卡装备
mc.any(e,{"DES","CAT","TG","OP"},{aux.Stringid(m,2),CATEGORY_EQUIP,mc.tg_EA_tg,mc.tg_EA_op})
end,
["EOT"] = function(e)
--那只怪兽当作装备卡使用给这张卡装备(取对象)
local pro = (e:GetProperty() or 0) + EFFECT_FLAG_CARD_TARGET
mc.any(e,{"DES","CAT","PRO","TG","OP"},{aux.Stringid(m,3),CATEGORY_EQUIP,pro,mc.tg_EOT_tg,mc.tg_EOT_op})
end,
["EO"] = function(e)
--那只怪兽当作装备卡使用给这张卡装备(不取对象)
mc.any(e,{"DES","CAT","TG","OP"},{aux.Stringid(m,4),CATEGORY_EQUIP,mc.tg_EO_tg,mc.tg_EO_op})
end,
["DS"] = function(e)
--场上的这张卡返回卡组,从卡组选1张「晶属念灵体」魔法卡加入手卡。
mc.any(e,{"DES","CAT","TG","OP"},{aux.Stringid(m,5),CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK,mc.tg_DS_tg,mc.tg_DS_op})
end
}
---------------------------------------------------------------another function
function mc.Origin_Monster(c)
--是怪兽卡
return c:GetOriginalType()&TYPE_MONSTER~=0 and c:IsFaceup() and c:IsType(TYPE_EQUIP)
end
function mc.any(e,f,v)
--对所有e做f,参数为v
e = type(e) == "table" and e or {e}
f = type(f) == "table" and f or {f}
v = type(v) == "table" and v or {v}
for i,a in ipairs(e) do
if #f==1 then
if type(f[1]) == "string" then mc.eff[f[1]](a,table.unpack(v or {}))
else f[1](a,table.unpack(v or {})) end
else
for j,b in ipairs(f) do
v[j] = type(v[j]) == "table" and v[j] or {v[j]}
if type(b) == "string" then mc.eff[b](a,table.unpack(v[j] or {}))
else b(a,table.unpack(v[j] or {})) end
end
end
end
return table.unpack(e)
end
function mc.SS_Cos(e,count)
--让自己场上count只「晶属念灵体」怪兽回到卡组才能发动。
mc.any(e,{"COS","TG","OP"},{mc.SS_Cos_cos(count),mc.SS_Cos_tg,mc.SS_Cos_op})
end
function mc.SR(c,code,loc,con,val)
--注册一个code的只对自己有效的效果
code = type(code) == "table" and code or {code}
local e = {}
for i,cod in ipairs(code) do
e[i]=mc.CRE(c,{"TYP","COD","PRO","RAN"},{EFFECT_TYPE_SINGLE,cod,EFFECT_FLAG_SINGLE_RANGE,loc},true)
if con then e[i]:SetCondition(con) end
if val then e[i]:SetValue(val) end
c:RegisterEffect(e[i])
end
return table.unpack(e)
end
function mc.Equip_Limit(c,tc)
--装备对象限制
local e=mc.CRE(c,{"TYP","PRO","COD","VAL","RES"},{EFFECT_TYPE_SINGLE,EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE,EFFECT_EQUIP_LIMIT,mc.Equip_Limit_val,RESET_EVENT+RESETS_STANDARD},true)
tc:RegisterEffect(e)
end
function mc.SS_L_val(e,se,sp,st)
--用「晶属念灵体」卡的效果才能特殊召唤
return se:GetHandler():IsSetCard(0xb72)
end
function mc.SS_L_EX_val(e,se,sp,st)
--用「晶属念灵体的融合吞噬」或者「晶属念灵体的融合缠结」的效果才能融合召唤
return se:GetHandler():IsCode(35700211) or se:GetHandler():IsCode(35700212) or st&SUMMON_TYPE_FUSION==0
end
---------------------------------------------------------------
mc.eff = {
["CRE"] = Effect.CreateEffect,
["DES"] = Effect.SetDescription,
["CAT"] = Effect.SetCategory,
["TYP"] = Effect.SetType,
["COD"] = Effect.SetCode,
["CTL"] = Effect.SetCountLimit,
["PRO"] = Effect.SetProperty,
["RAN"] = function(e,loc) Effect.SetRange(e,mc.c_loc(loc)) end,
["CON"] = Effect.SetCondition,
["COS"] = Effect.SetCost,
["TG"] = Effect.SetTarget,
["OP"] = Effect.SetOperation,
["VAL"] = Effect.SetValue,
["RES"] = Effect.SetReset,
["TRAN"]= Effect.SetTargetRange,
["LAB"]= Effect.SetLabel,
["LABOBJ"]= Effect.SetLabelObject
}
mc.loc = {
["H"] = LOCATION_HAND,
["G"] = LOCATION_GRAVE,
["M"] = LOCATION_MZONE,
["S"] = LOCATION_SZONE
}
---------------------------------------------------------------support function
function mc.con_A_con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function mc.con_E_con(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp
end
function mc.con_S_con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function mc.tg_SS_tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function mc.tg_SS_op(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
function mc.tg_S_below4(c)
return c:IsSetCard(0xb72) and c:IsAbleToHand() and (c:IsLevelBelow(4) or c:IsType(TYPE_SPELL))
end
function mc.tg_S_tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(mc.tg_S_below4,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function mc.tg_S_op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,mc.tg_S_below4,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 mc.tg_EA_tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(Card.IsControler,nil,1-tp):Filter(Card.IsLocation,nil,LOCATION_MZONE)
if chk==0 then return g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,eg:FilterCount(Card.IsControler,1,nil,1-tp),nil,0)
if e:GetHandler():IsCode(35700207) then Duel.SetChainLimit(mc.Chain_Limit_Filter) end
end
function mc.tg_EA_op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(Card.IsControler,nil,1-tp):Filter(Card.IsLocation,nil,LOCATION_MZONE)
if c:IsRelateToEffect(e) and g:GetCount()>0 then
g=g:SelectSubGroup(tp,nil,false,1,Duel.GetLocationCount(tp,LOCATION_SZONE))
local tc=g:GetFirst()
while tc and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 do
if Duel.Equip(tp,tc,c) then
mc.Equip_Limit(c,tc)
end
if
tc=g:GetNext()
end
end
end
function mc.tg_EOT_tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsType(TYPE_MONSTER) and chkc:IsFaceup() and not chkc==c end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
if e:GetHandler():IsCode(35700207) then Duel.SetChainLimit(mc.Chain_Limit_Filter) end
end
function mc.tg_EOT_op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
if tc then
if not Duel.Equip(tp,tc,c) then return end
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0)
e:SetLabelObject(tc)
mask_crystal.Equip_Limit(c,tc)
end
end
function mc.tg_EO_tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
if e:GetHandler():IsCode(35700207) then Duel.SetChainLimit(mc.Chain_Limit_Filter) end
end
function mc.tg_EO_op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()):GetFirst()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
if tc then
if not Duel.Equip(tp,tc,c) then return end
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0)
e:SetLabelObject(tc)
mask_crystal.Equip_Limit(c,tc)
end
end
function mc.tg_DS_tg_f(c)
return c:IsSetCard(0xb72) and c:IsAbleToHand() and c:IsType(TYPE_SPELL)
end
function mc.tg_DS_tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(mc.tg_DS_tg_f,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function mc.tg_DS_op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,mc.tg_DS_tg_f,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function mc.SS_Cos_cos_Filter(g,n)
return g:GetSum(Card.GetLevel)>=n and g:GetCount()<(n==1 and 2 or 99)
end
function mc.SS_Cos_cos(count)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0xb72):Filter(Card.IsAbleToDeckAsCost,nil):Filter(Card.IsType,nil,TYPE_MONSTER)
if chk==0 then return g:CheckSubGroup(mc.SS_Cos_cos_Filter,1,99,count) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
g=g:SelectSubGroup(tp,mc.SS_Cos_cos_Filter,false,1,99,count)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
end
function mc.SS_Cos_tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function mc.SS_Cos_op(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP)~=0 then e:GetHandler():CompleteProcedure() end
end
function mc.Up_Attack(e)
local eg=e:GetHandler():GetEquipGroup():Filter(mc.Origin_Monster,nil)
return eg:GetSum(Card.GetBaseAttack)
end
function mc.Up_Defense(e)
local eg=e:GetHandler():GetEquipGroup():Filter(mc.Origin_Monster,nil)
return eg:GetSum(Card.GetBaseDefense)
end
function mc.Equip_Limit_val(e,c)
return e:GetOwner()==c
end
function mc.SR_D_R_tg_Filter(c,e,f)
return (not f or f(c,e)) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) and mc.Origin_Monster(c)
end
function mc.SR_D_R_tg(f,rea)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetEquipGroup():Filter(mc.SR_D_R_tg_Filter,nil,e,f)
local x=REASON_BATTLE
if rea then x=x+rea end
if chk==0 then return not e:GetHandler():IsReason(REASON_REPLACE) and g:GetCount()>0 and e:GetHandler():IsReason(x) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
g=g:Select(tp,1,1,nil):GetFirst()
e:SetLabelObject(g)
return true
end
end
function mc.Chain_Limit_Filter(e,ep,tp)
return tp==ep
end
---------------------------------------------------------------
if not cm then return end
function cm.initial_effect(c)
local e1 = {mc.T(c,"H",{"A","E"},"SS")}
local e2 = {mc.SR_R(c)}
local e3 = {mc.T(c,"M",{"A","E"},"SS",{"CTL","COS","TG","OP"},{{1,m},cm.cos,cm.tg,cm.op})}
end
function cm.cos(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function cm.tgf(c,e,tp)
return c:IsSetCard(0xb72) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsLevelBelow(4) and c:IsType(TYPE_MONSTER)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>(-1) and Duel.IsExistingMatchingCard(cm.tgf,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tgf),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--晶属念灵体-感应
local m=35700201
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700200") end) then require("script/c35700200") end
function cm.initial_effect(c)
local e1 = {mask_crystal.T(c,"H",{"S","SP"},"SS")}
local e2 = {mask_crystal.SR_R(c)}
local e3 = mask_crystal.SR_D(c)
local e4 = mask_crystal.T(c,"M","E","S","CTL",{2,m})
end
\ No newline at end of file
--晶属念灵体-探索
local m=35700202
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700200") end) then require("script/c35700200") end
function cm.initial_effect(c)
local e1 = mask_crystal.T(c,"H","E","SS")
local e2 = {mask_crystal.SR_R(c)}
local e3 = mask_crystal.SR_D(c)
local e4 = {mask_crystal.T(c,"M",{"S","SP"},"S","CTL",{2,m})}
end
\ No newline at end of file
--晶属念灵体-构联
local m=35700203
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700200") end) then require("script/c35700200") end
function cm.initial_effect(c)
local e1 = mask_crystal.SS_L(c,mask_crystal.SS_L_val)
local e2 = {mask_crystal.T(c,{"H","G"},{"S","SP","E"},"SS",mask_crystal.SS_Cos,1)}
local e3 = {mask_crystal.SR_R(c)}
local e4 = mask_crystal.SR_D(c)
local e5 = {mask_crystal.T(c,"M",{"A","E"},"S",{"CTL","TG","OP"},{{2,m},cm.tg,cm.op})}
end
function cm.tgf(c)
return c:IsSetCard(0xb72) and c:IsAbleToHand()
end
function cm.filter(c,tp)
return c:GetType()==0x20002 and c:GetActivateEffect():IsActivatable(tp)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgf,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,cm.tgf,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc then
if cm.filter(tc,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
\ No newline at end of file
--晶属念灵体-孕育
local m=35700204
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700200") end) then require("script/c35700200") end
function cm.initial_effect(c)
local e1 = mask_crystal.SS_L(c,mask_crystal.SS_L_val)
local e2 = {mask_crystal.T(c,{"H","G"},{"S","SP","E"},"SS",mask_crystal.SS_Cos,4)}
local e3 = {mask_crystal.SR_R(c)}
local e4 = mask_crystal.SR_D(c,mask_crystal.Zero_Equip)
local e5 = mask_crystal.SR(c,EFFECT_INDESTRUCTABLE_EFFECT)
local e6 = {mask_crystal.SR_V(c)}
local e7 = mask_crystal.Q(c,LOCATION_MZONE,nil,cm.con,"EOT","CTL",1)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject()
return (ec==nil or ec:GetFlagEffect(35700200)==0) and Duel.GetTurnPlayer()~=tp
end
\ No newline at end of file
--晶属念灵体-降临
local m=35700205
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700200") end) then require("script/c35700200") end
function cm.initial_effect(c)
Auxiliary.AddFusionProcMix(c,false,true,aux.FilterBoolFunction(Card.IsFusionCode,35700204),cm.fuf)
local e1 = mask_crystal.SS_L(c,mask_crystal.SS_L_EX_val)
local e2 = {mask_crystal.SR_R(c)}
local e3 = mask_crystal.SR_D(c,mask_crystal.Zero_Equip)
local e4 = mask_crystal.SR(c,EFFECT_INDESTRUCTABLE_EFFECT,mask_crystal.Zero_Equip)
local e5 = {mask_crystal.SR_V(c)}
local e6 = mask_crystal.Q(c,"M",nil,cm.con6,"EOT","CTL",1)
local e7 = mask_crystal.SR_D_R(c,cm.op7,cm.tgf7,REASON_EFFECT)
end
cm.material_setcode=0xb72
--fu
function cm.fuf(c,fc)
return c:IsType(TYPE_EQUIP) and c:GetOriginalType()&TYPE_MONSTER~=0
end
--e6
function cm.con6(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject()
return (ec==nil or ec:GetFlagEffect(m)==0)
end
--e7
function cm.tgf7(c,e)
return c:IsDestructable(e)
end
function cm.op7(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE)
end
\ No newline at end of file
--晶属念灵体-绝对
local m=35700206
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700200") end) then require("script/c35700200") end
function cm.initial_effect(c)
Auxiliary.AddFusionProcMix(c,false,true,aux.FilterBoolFunction(Card.IsFusionCode,35700205),aux.FilterBoolFunction(Card.IsFusionSetCard,0xb72),cm.fuf)
local e1 = mask_crystal.SS_L(c,mask_crystal.SS_L_EX_val)
local e2 = {mask_crystal.SR_R(c)}
local e3 = mask_crystal.SR_D(c)
local e4 = mask_crystal.SR(c,EFFECT_INDESTRUCTABLE_EFFECT,LOCATION_MZONE,nil,1)
local e5 = {mask_crystal.SR_V(c)}
local e6 = mask_crystal.SR_D_R(c,cm.op6,cm.tgf6)
local e7 = mask_crystal.Q(c,"M",nil,nil,"EOT","CTL",1)
local e8 = {mask_crystal.T(c,"M",{"S","SP"},"EA","COS",cm.cos8)}
end
cm.material_setcode=0xb72
--fu
function cm.fuf(c,fc)
return c:IsType(TYPE_EQUIP) and c:GetOriginalType()&TYPE_MONSTER~=0
end
--e6
function cm.tgf6(c,e)
return c:IsAbleToGrave()
end
function cm.op6(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REPLACE)
end
--e8
function cm.cos8(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(m)<1 end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
--晶属念灵体-神恩
local m=35700207
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700200") end) then require("script/c35700200") end
function cm.initial_effect(c)
aux.AddFusionProcCodeFunRep(c,35700206,cm.fuf,1,63,true,true)
local e1 = mask_crystal.SS_L(c,mask_crystal.SS_L_EX_val)
local e2 = {mask_crystal.SR_R(c)}
local e3 = mask_crystal.SR_D(c)
local e4 = mask_crystal.SR(c,EFFECT_IMMUNE_EFFECT,"M",nil,cm.val4)
local e5 = {mask_crystal.SR_V(c)}
local e6 = mask_crystal.SR_D_R(c,cm.op6,cm.tgf6)
local e7 = {mask_crystal.T(c,"M",{"S","SP","E"},"EA","COS",cm.cos7)}
local e8 = mask_crystal.CRE(c,{"TYP","COD",mask_crystal.tg["EO"]},{EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O,EVENT_SPSUMMON_SUCCESS})
local e9 = mask_crystal.Q(c,"M",nil,nil,"EO","CTL",1)
local e10= mask_crystal.CRE(c,{"DES","TYP","CAT","PRO","RAN","CTL","TG","OP"},
{aux.Stringid(m,1),EFFECT_TYPE_IGNITION,CATEGORY_SPECIAL_SUMMON,EFFECT_FLAG_CARD_TARGET,LOCATION_MZONE,1,cm.tg10,cm.op10})
end
cm.material_setcode=0xb72
--fu
function cm.fuf_filter21(c)
return c:IsType(TYPE_EQUIP) and c:GetOriginalType()&TYPE_MONSTER~=0
end
function cm.fuf_filter1(c)
return not ((c:IsType(TYPE_EQUIP) and c:GetOriginalType()&TYPE_MONSTER~=0) or (c:IsType(TYPE_MONSTER) and c:IsFusionSetCard(0xb72)))
end
function cm.fuf_filter2(g)
local fg=g:Filter(Card.IsType,nil,TYPE_MONSTER):Filter(Card.IsFusionSetCard,nil,0xb72)
local sg=g:Filter(cm.fuf_filter21,nil)
local tol=0
local tc=sg:GetFirst()
while tc do
tc=Duel.CreateToken(0,tc:GetCode())
tol=tol+(tc:IsType(TYPE_XYZ) and tc:GetRank() or (tc:IsType(TYPE_LINK) and tc:GetLink() or tc:GetLevel()))
tc=sg:GetNext()
end
return fg:GetSum(Card.GetLevel)>=4 and tol>=12 and (#fg + #sg == #g)
end
function cm.fuf(c,fc,sub,mg,sg)
if not sg then return true end
return not sg:IsExists(cm.fuf_filter1,1,nil) and sg:CheckSubGroup(cm.fuf_filter2,1,99)
end
--e4
function cm.val4(e,te)
return te:GetOwner()~=e:GetOwner()
end
--e6
function cm.tgf6(c,e)
return c:IsAbleToRemove()
end
function cm.op6(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT+REASON_REPLACE)
end
--e7
function cm.cos7(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(m)<1 end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
--e10
function cm.tgf10(c,e,tp,g)
if c:IsFacedown() or c:GetOriginalType()&TYPE_MONSTER==0 then return end
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Group.Equal(Group.__band(g,c),Group.FromCards(c))
end
function cm.tg10(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=e:GetHandler():GetEquipGroup()
if chkc then return cm.tgf10(chkc,e,tp,g) end
if chk==0 then return Duel.IsExistingTarget(cm.tgf10,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e,tp,g) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.tgf10,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e,tp,g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetChainLimit(mask_crystal.Chain_Limit_Filter)
end
function cm.op10(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=mask_crystal.CRE(c,{"TYP","COD","PRO","RES","VAL"},
{EFFECT_TYPE_SINGLE,EFFECT_LEAVE_FIELD_REDIRECT,EFFECT_FLAG_CANNOT_DISABLE,RESET_EVENT+RESETS_REDIRECT,1,LOCATION_REMOVED},true)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--晶属念灵体-调配
local m=35700208
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700200") end) then require("script/c35700200") end
function cm.initial_effect(c)
local e1 = mask_crystal.SS_L(c,mask_crystal.SS_L_val)
local e2 = {mask_crystal.T(c,{"H","G"},{"S","SP","E"},"SS",mask_crystal.SS_Cos,1)}
local e3 = {mask_crystal.SR_R(c)}
local e4 = mask_crystal.SR_D(c)
local e5 = {mask_crystal.Trigger(c,"M",{"A","E"},"EO",{"CTL","TG","OP"},{{2,m},cm.tg,cm.op})}
local e6 = mask_crystal.CRE(c,{"TYP","COD","RAN","TRAN","TG","VAL"},{EFFECT_TYPE_FIELD,EFFECT_INDESTRUCTABLE_EFFECT,"M",{LOCATION_SZONE,0},1,cm.indtg,cm.indval})
end
--e5
function cm.tgf(c)
return c:IsSetCard(0xb72) and c:IsAbleToHand()
end
function cm.filter(c,tp)
return c:GetType()==0x20002 and c:GetActivateEffect():IsActivatable(tp)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,TYPE_MONSTER) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,TYPE_MONSTER):GetFirst()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1 = mask_crystal.CRE(tc,{"TYP","COD","VAL","RES"},{EFFECT_TYPE_EQUIP,EFFECT_UPDATE_ATTACK,tc:GetBaseAttack(),RESET_EVENT+RESETS_STANDARD})
mask_crystal.Equip_Limit(c,tc)
end
end
--e6
function cm.indtg(e,c)
return mask_crystal.Origin_Monster(c)
end
function cm.indval(e,te)
return te:GetHandler():IsType(TYPE_EFFECT+TYPE_SPELL)
end
\ No newline at end of file
--晶属念灵体的粘附衍生
local m=35700210
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700200") end) then require("script/c35700200") end
mask_crystal=mask_crystal or {}
local mc=mask_crystal
function mc.CS(c,code)
--「」在自己场上只能有1张表侧表示存在。这张卡不会被这张卡以外的卡的效果破坏,回合结束时,自己场上没有「晶属念灵体」怪兽的场合这张卡破坏。
c:SetUniqueOnField(1,1,aux.FilterBoolFunction(Card.IsCode,code),LOCATION_SZONE)
aux.AddCodeList(code)
local e1 = mc.CRE(c,{"TYP","COD"},{EFFECT_TYPE_ACTIVATE,EVENT_FREE_CHAIN})
local e2 = mc.SR(c,EFFECT_INDESTRUCTABLE_EFFECT,"S",nil,mc.Indes_val)
local e3 = mc.SR(c,EFFECT_SELF_DESTROY,"S",mc.DesS_con,nil)
return e1,e2,e3
end
function mc.Q_S(c)
--自己·对方回合1次,可以发动。场上的这张卡返回卡组,从卡组选1张「晶属念灵体」魔法卡加入手卡。
return mc.Q(c,"S",nil,nil,"DS","CTL",1)
end
function mc.QF(c)
--每次自己场上的「晶属念灵体」怪兽被战斗·效果破坏的场合发动,对方场上的表侧表示怪兽全部放置1个念灵体指示物。
return mc.CRE(c,{"TYP","COD","CAT","PRO","RAN","CON","TG","OP"},
{EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F,EVENT_DESTROYED,CATEGORY_COUNTER,EFFECT_FLAG_DELAY,"S",mc.QF_con,mc.QF_tg,mc.QF_op})
end
---------------------------------------------------------------support function
function mc.Indes_val(e,re,tp)
return re:GetHandler()~=e:GetOwner()
end
function mc.DesS_con_f(c)
return c:IsFaceup() and c:IsSetCard(0xb72)
end
function mc.DesS_con(e)
return not Duel.IsExistingMatchingCard(mc.DesS_con_f,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) and Duel.GetCurrentPhase()==PHASE_END
end
function mc.QF_con_f(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSetCard(0xb72)
end
function mc.QF_con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(mc.QF_con_f,1,nil,tp)
end
function mc.QF_tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,1,0,0)
end
function mc.QF_op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if #g==0 then return end
local tc=g:GetFirst()
for tc in aux.Next(g) do
tc:AddCounter(0x1b72,1)
end
end
---------------------------------------------------------------
if not cm then return end
function cm.initial_effect(c)
local e1 = {mc.CS(c,m)}
local e2 = mc.Q_S(c)
local e3 = mc.QF(c)
local e4 = mc.CRE(c,{"CAT","TYP","COD","PRO","RAN","CTL","CON","TG","OP"},
{CATEGORY_SPECIAL_SUMMON,EFFECT_TYPE_QUICK_O,EVENT_FREE_CHAIN,EFFECT_FLAG_CARD_TARGET,"S",{2,m},cm.con4,cm.tg4,cm.op4}
end
--e4
function cm.conf4(c)
return c:GetCounter(0x1b72)>=3
end
function cm.con4(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.conf4,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function cm.tgf4(c,e,tp)
return c:IsSetCard(0xb72) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function cm.tg4(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local count=Duel.GetMatchingGroupCount(cm.conf4,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.tgf4(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>=count
and Duel.IsExistingTarget(cm.tgf4,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.tgf4,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,count,tp,0)
end
function cm.op4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0) then return end
local g=Duel.GetMatchingGroup(cm.conf4,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 and #g>0 then
g=g:Select(tp,1,#g,nil)
local sc=g:GetFirst()
while sc and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 do
if Duel.Equip(tp,sc,tc) then
mask_crystal.Equip_Limit(tc,sc)
end
sc=g:GetNext()
end
end
end
\ No newline at end of file
--晶属念灵体的融合吞噬
local m=35700211
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700200") end) then require("script/c35700200") end
function cm.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:SetCondition(cm.con)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2 = {mask_crystal.T(c,"G",{"S","SP"},"S",{"CTL","COS","TG","OP"},{{1,m},cm.cos2,cm.tg2,cm.op2})}
end
--e1
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function cm.exfilter1(c,e)
return cm.filter0(c) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function cm.filter0(c)
return c:IsFaceup() and c:GetOriginalType()&TYPE_MONSTER==TYPE_MONSTER and c:IsType(TYPE_EQUIP)
end
function cm.filter1(c,e)
return c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListSetCard(c,0xb72) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.fcheck(tp,sg,fc)
return sg:IsExists(Card.IsFusionSetCard,1,nil,0xb72)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsAbleToGrave,nil):Filter(Card.IsOnField,nil)
if Duel.IsExistingMatchingCard(cm.filter0,tp,LOCATION_SZONE,0,1,nil) then
local sg=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_SZONE,0,nil)
if sg:GetCount()>0 then
mg1:Merge(sg)
aux.FCheckAdditional=cm.fcheck
end
end
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter1,nil,e):Filter(Card.IsOnField,nil)
if Duel.IsExistingMatchingCard(cm.filter0,tp,LOCATION_SZONE,0,1,nil) then
local sg=Duel.GetMatchingGroup(cm.exfilter1,tp,LOCATION_SZONE,0,nil,e)
if sg:GetCount()>0 then
mg1:Merge(sg)
exmat=true
end
end
if exmat then
aux.FCheckAdditional=cm.fcheck
end
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,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()
mg1:RemoveCard(tc)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if exmat then
aux.FCheckAdditional=cm.fcheck
end
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
aux.FCheckAdditional=nil
tc:SetMaterial(mat1)
local rg=mat1:Filter(Card.IsLocation,nil,LOCATION_SZONE)
mat1:Sub(rg)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.SendtoGrave(rg,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--e2
function cm.cos2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function cm.tgf2(c,e,tp)
return c:IsSetCard(0xb72) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsType(TYPE_MONSTER)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.tgf2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND)
end
function cm.op2(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 tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tgf2),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--晶属念灵体的融合缠结
local m=35700212
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700200") end) then require("script/c35700200") end
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
mask_crystal.con["S"](e1)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
mask_crystal.con["SP"](e2)
c:RegisterEffect(e2)
local e3=e1:Clone()
mask_crystal.con["E"](e3)
c:RegisterEffect(e3)
end
--e1
function cm.exfilter1(c,e)
return cm.filter0(c) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function cm.filter0(c)
return c:IsFaceup() and c:GetOriginalType()&TYPE_MONSTER==TYPE_MONSTER and c:IsType(TYPE_EQUIP)
end
function cm.filter1(c,e)
return c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListSetCard(c,0xb72) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.fcheck(tp,sg,fc)
return sg:IsExists(Card.IsFusionSetCard,1,nil,0xb72)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
if Duel.IsExistingMatchingCard(cm.filter0,tp,LOCATION_SZONE,0,1,nil) then
local sg=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_SZONE,0,nil)
if sg:GetCount()>0 then
mg1:Merge(sg)
aux.FCheckAdditional=cm.fcheck
end
end
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil):Filter(cm.filter1,nil,e)
if Duel.IsExistingMatchingCard(cm.filter0,tp,LOCATION_SZONE,0,1,nil) then
local sg=Duel.GetMatchingGroup(cm.exfilter1,tp,LOCATION_SZONE,0,nil,e)
if sg:GetCount()>0 then
mg1:Merge(sg)
exmat=true
end
end
if exmat then
aux.FCheckAdditional=cm.fcheck
end
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,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()
mg1:RemoveCard(tc)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if exmat then
aux.FCheckAdditional=cm.fcheck
end
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
aux.FCheckAdditional=nil
tc:SetMaterial(mat1)
local rg=mat1:Filter(Card.IsLocation,nil,LOCATION_SZONE)
mat1:Sub(rg)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.SendtoGrave(rg,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,true,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
if Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,tc) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sc=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc):GetFirst()
if sc then
if not Duel.Equip(tp,sc,tc) then return end
mask_crystal.Equip_Limit(tc,sc)
end
end
end
end
\ No newline at end of file
--晶属念灵体的增乱爆发
local m=35700213
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700210") end) then require("script/c35700210") end
function cm.initial_effect(c)
local e1 = {mask_crystal.CS(c,m)}
local e2 = mask_crystal.Q_S(c)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
mask_crystal.con["SP"](e3)
e3:SetCountLimit(2,m)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.con3)
e3:SetTarget(cm.tg3)
e3:SetOperation(cm.op3)
c:RegisterEffect(e3)
end
--e3
function cm.conf3(c,tp)
return c:IsSetCard(0xb72) and c:IsLevelAbove(4) and c:IsControler(tp) and c:IsType(TYPE_MONSTER)
end
function cm.con3(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.conf3,1,nil,tp)
end
function cm.tgf3(c,e,tp)
return c:IsSetCard(0xb72) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and c:IsLevelBelow(2) and c:IsType(TYPE_MONSTER)
end
function cm.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.tgf3,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.op3(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 tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tgf3),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--晶属念灵体的绝望初遇
local m=35700215
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700210") end) then require("script/c35700210") end
function cm.initial_effect(c)
local e1 = mask_crystal.CRE(c,{"CAT","TYP","COD","CTL","TG","OP"},{CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP,EFFECT_TYPE_ACTIVATE,EVENT_FREE_CHAIN,{1,m+EFFECT_COUNT_CODE_DUEL},cm.tg,cm.op})
end
function cm.tgf3(c,e,tp)
return c:IsSetCard(0xb72) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and c:IsType(TYPE_MONSTER)
end
function cm.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.tgf3,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,2,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.op3(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 c = e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,cm.tgf3,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,2,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,2,2,nil):GetFirst()
local sc = g:GetFirst()
while sc do
if Duel.Equip(tp,sc,tc) then
local e1 = mask_crystal.CRE(sc,{"TYP","COD","VAL","RES"},{EFFECT_TYPE_EQUIP,EFFECT_UPDATE_ATTACK,sc:GetBaseAttack(),RESET_EVENT+RESETS_STANDARD})
mask_crystal.Equip_Limit(tc,sc)
end
sc=g:GetNext()
end
end
end
\ No newline at end of file
--晶属念灵体的干涉毁坏
local m=35700216
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700210") end) then require("script/c35700210") end
function cm.initial_effect(c)
local e1 = {mc.CS(c,m)}
local e2 = mc.Q_S(c)
local e3 = mc.QF(c)
local e4 = mc.CRE(c,{"CAT","TYP","COD","PRO","RAN","CTL","CON","COS","TG","OP"},
{CATEGORY_DISABLE,EFFECT_TYPE_QUICK_O,EVENT_CHAINING,"S",{2,m},cm.con4,cm.cos4,cm.tg4,cm.op4})
end
function cm.con4(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():GetCounter(0x1b72)>=2
end
function cm.cos4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsCanRemoveCounter(tp,0x1,1,REASON_COST) end
re:GetHandler():RemoveCounter(tp,0x1,1,REASON_COST)
end
function cm.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not re:GetHandler():IsDisabled() end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function cm.op4(e,tp,eg,ep,ev,re,r,rp)
local tc = re:GetHandler()
Duel.NegateEffect(ev)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetTargetRange(0,1)
e1:SetTarget(cm.distg)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.distg(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0)
end
\ No newline at end of file
......@@ -829,6 +829,7 @@
#TwelveSMask 286114376 357 0xb70-0xb7f
!setname 0xb71 翼战机
!setname 0x3b71 交锋翼战机
!setname 0xb72 晶属念灵体
!setname 0xb75 独行骑兵
!counter 0x1b72 念灵体指示物
......
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