Commit 0f7e0bec authored by Huangnan's avatar Huangnan

cdb delete add lflist strings update

parent f4a33404
No preview for this file type
#[2025.1.DIY....] #[2025.1.DIY....]
!2025.1.DIY.... !2025.1.DIY....
#001
110015 0 --Fate/Grand Order·Lancer·埃列什基伽勒
110025 0 --Fate/Grand Order·埃尔梅罗Ⅱ世
114514 0 --超级沼气前辈 野兽形态
155567 0 --第三次无限战争
155580 0 --究极魔导之页
155590 0 --神说:要有光
155601 0 --禁忌万物的一滴
166660 0 --星系守护神 长蛇星神
166661 0 --拉伊达 3σ
166662 0 --拉伊达 3σ『龙骑展开』
166670 0 --拟龙贵族·引导龙女
166700 3 --拟龙贵族·谋士龙女
166725 1 --拟龙贵族·复仇龙女
182130 0 --古道登仙·炼龙骨
183570 0 --全能全知的栞啊!回应我的呼唤!
#002 #002
00200001 1 --魔王的剑 00200001 1 --魔王的剑
00200007 0 --青行灯·辉火 00200007 0 --青行灯·辉火
#010 #010
01000376 0 --美丽的公主·姬丝秀忒 01000376 0 --美丽的公主·姬丝秀忒
01000378 1 --美丽善良的金发神明 01000378 1 --美丽善良的金发神明
...@@ -97,11 +115,10 @@ ...@@ -97,11 +115,10 @@
05012601 2 --茵蒂克丝 05012601 2 --茵蒂克丝
05012603 1 --一方通行 05012603 1 --一方通行
05012604 1 --上条当麻 05012604 1 --上条当麻
05012605 0 --奥雷欧斯·伊萨德 05012605 1 --奥雷欧斯·伊萨德
05012609 2 --滨面仕上 05012609 2 --滨面仕上
05012613 1 --欧提努斯 05012613 1 --欧提努斯
05012615 1 --学院都市 05012615 1 --学院都市
05012616 0 --欧雷尔斯
05012622 2 --月咏小萌 05012622 2 --月咏小萌
05012628 1 --科隆尊 05012628 1 --科隆尊
05012630 2 --圣日耳曼 05012630 2 --圣日耳曼
...@@ -594,6 +611,8 @@ ...@@ -594,6 +611,8 @@
16362069 2 --英雄传说 神话 16362069 2 --英雄传说 神话
16362070 2 --英雄传说 复仇者 16362070 2 --英雄传说 复仇者
16372009 2 --山菊·花信 16372009 2 --山菊·花信
16349310 1 --中坚骑士 骑士兽
16372008 1 --玉桂·花信
#164 #164
16400039 0 --独裁者的计谋 16400039 0 --独裁者的计谋
16400040 1 --Geass-逃避的战斗 16400040 1 --Geass-逃避的战斗
...@@ -637,6 +656,29 @@ ...@@ -637,6 +656,29 @@
16400130 1 --Knightmare-红莲 16400130 1 --Knightmare-红莲
16400131 1 --Knightmare-兰斯洛特 16400131 1 --Knightmare-兰斯洛特
16400370 1 --光之战士 布鲁 跃水 16400370 1 --光之战士 布鲁 跃水
# 光之战士系列
16400310 1 --光之战士 欧布 原生
16400272 1 --光之战士 杰克
16400291 1 --光之战士 赛文
16400374 1 --光之战士 泽塔 原始
16400289 1 --光之战士 阿斯特拉
16400286 1 --光之战士 奥特曼
16400379 1 --光之战士 泽塔 德尔塔天爪
16400337 1 --光之战士 捷德 刚燃
16400316 1 --光之战士 欧布 三重
16400390 1 --光之战士 罗布
16400295 1 --等离子火花塔
16400296 1 --宇宙警备队 本部
16400329 1 --奥特宇宙港
16400330 1 --奥特竞技场
16400331 1 --奥特技术实验室
# 光之战士系列(限制为2)
16400270 2 --光之战士 希卡利
16400305 2 --光之战士 迪迦
16400365 2 --光之战士 特利迦
16400278 2 --光之战士 维克特利
16400322 2 --光之战士 奈克赛斯
16400297 2 --光之战士 出动
#170 #170
17020410 0 --失落的火焰 17020410 0 --失落的火焰
17030610 1 --火神龙 17030610 1 --火神龙
...@@ -703,7 +745,7 @@ ...@@ -703,7 +745,7 @@
17243306 0 --米勒山谷 狼巫 17243306 0 --米勒山谷 狼巫
17243322 0 --基金会 编号682 17243322 0 --基金会 编号682
17243327 0 --基金会 编号173 17243327 0 --基金会 编号173
17243329 2 --基金会 编号294 17243329 1 --基金会 编号294
17243339 0 --基金会 博士Clef 17243339 0 --基金会 博士Clef
17243344 0 --传说的黑夜 耀月龙 17243344 0 --传说的黑夜 耀月龙
17243349 0 --恩佐·内洛法 17243349 0 --恩佐·内洛法
...@@ -719,6 +761,7 @@ ...@@ -719,6 +761,7 @@
17243617 1 --剑与魔法石 天鹅座 17243617 1 --剑与魔法石 天鹅座
17243056 1 --势卫吴疆 17243056 1 --势卫吴疆
17243060 1 --破军杀敌 17243060 1 --破军杀敌
17243312 1 --米勒山谷 石像鬼
#173 #173
17300007 0 --Arcaea 绝对的理性 咲弥 17300007 0 --Arcaea 绝对的理性 咲弥
17300011 0 --Arcaea 记忆回响的世界 17300011 0 --Arcaea 记忆回响的世界
...@@ -766,7 +809,7 @@ ...@@ -766,7 +809,7 @@
18700055 1 --血罪灵骸·业罪骨 18700055 1 --血罪灵骸·业罪骨
18700062 2 --血罪灵骸·嗔罪骸蛇 18700062 2 --血罪灵骸·嗔罪骸蛇
18700067 1 --天魔血罪·万千苦厄皆呓语·十恶埋骨·原罪骸灵 18700067 1 --天魔血罪·万千苦厄皆呓语·十恶埋骨·原罪骸灵
18700087 0 --灾绝灭术·归鸿 18700087 1 --灾绝灭术·归鸿
18700090 0 --奇物-16 真相没于虚假 18700090 0 --奇物-16 真相没于虚假
18700130 0 --奇物-36 蓝槿罗之华 18700130 0 --奇物-36 蓝槿罗之华
18700132 1 --无常戏伶 芙蕾娜·维尔薇特 18700132 1 --无常戏伶 芙蕾娜·维尔薇特
...@@ -852,6 +895,7 @@ ...@@ -852,6 +895,7 @@
21113820 1 --芳青之梦 写彩 21113820 1 --芳青之梦 写彩
21113835 1 --芳青之梦 幻天使 21113835 1 --芳青之梦 幻天使
21113810 1 --芳青之梦 天弦声 21113810 1 --芳青之梦 天弦声
21185665 0 --HP 自闭宅
#215 #215
21520061 1 --玲珑法师-夕雾 21520061 1 --玲珑法师-夕雾
21520066 1 --玲珑法师-鸢尾 21520066 1 --玲珑法师-鸢尾
...@@ -1004,26 +1048,6 @@ ...@@ -1004,26 +1048,6 @@
30052005 0 --克里斯汀·罗森塔尔-633cae 30052005 0 --克里斯汀·罗森塔尔-633cae
30052011 0 --克里斯汀·罗森塔尔-22b15d 30052011 0 --克里斯汀·罗森塔尔-22b15d
30052073 0 --感知现实镜面 30052073 0 --感知现实镜面
#306
30610015 0 --Fate/Grand Order·Lancer·埃列什基伽勒
30610025 0 --Fate/Grand Order·埃尔梅罗Ⅱ世
30614514 0 --超级沼气前辈 野兽形态
30655567 0 --第三次无限战争
30655580 0 --究极魔导之页
30655590 0 --神说:要有光
30655601 0 --禁忌万物的一滴
30666660 0 --星系守护神 长蛇星神
30666661 0 --拉伊达 3σ
30666662 0 --拉伊达 3σ『龙骑展开』
30666670 0 --拟龙贵族·引导龙女
30666700 3 --拟龙贵族·谋士龙女
30666725 1 --拟龙贵族·复仇龙女
30682130 0 --古道登仙·炼龙骨
30683110 0 --M·A·L·Hydra
30683305 0 --M·A·L·Growth Wedge
30683425 0 --M·A·L——Null
30683435 0 --M·A·L·Hive balloon
30683570 0 --全能全知的栞啊!回应我的呼唤!
#305 #305
30553214 0 --墟界天使紊乱 30553214 0 --墟界天使紊乱
30553252 1 --浮世苍景 30553252 1 --浮世苍景
...@@ -1306,6 +1330,7 @@ ...@@ -1306,6 +1330,7 @@
33538036 1 --下午茶会 苹果茶会 33538036 1 --下午茶会 苹果茶会
33538061 0 --少女绘梦 图仓 33538061 0 --少女绘梦 图仓
33538067 0 --少女绘梦 梦想衣橱 33538067 0 --少女绘梦 梦想衣橱
33500939 0 --水晶洞窟 无名者之墓
#337 #337
33700001 1 --上级Protoform 乞力马扎罗 33700001 1 --上级Protoform 乞力马扎罗
33700028 1 --Proto-Protoform 33700028 1 --Proto-Protoform
...@@ -1507,10 +1532,16 @@ ...@@ -1507,10 +1532,16 @@
36700010 1 --三重小队·风马-神速残像 36700010 1 --三重小队·风马-神速残像
36700001 2 --三重小队·光之勇者-泰迦 36700001 2 --三重小队·光之勇者-泰迦
36700016 2 --泰迦光饰·钥匙 36700016 2 --泰迦光饰·钥匙
36700018 2 --泰迦火花 36700018 1 --泰迦火花
36700013 1 --太阳之子-泰罗 36700013 1 --太阳之子-泰罗
36700034 1 --极星光波手里剑 36700034 1 --极星光波手里剑
36700031 1 --泰迦光饰·钥匙·形态切换 36700031 1 --泰迦光饰·钥匙·形态切换
36700239 1 --乱炖龙仔-究极龙 新星
36700242 1 --乱炖龙仔-无牙龙 黑爆裂
36700245 1 --乱炖龙仔-杰庞顿
36700250 1 --乱炖龙仔-猛烈凶魇
36700253 1 --乱炖龙仔-邪恶双头龙
#375 #375
37564012 0 --元灵毁灭者·Aya Ayane 37564012 0 --元灵毁灭者·Aya Ayane
37564041 0 --阎-少女之梦·虚无的世界 37564041 0 --阎-少女之梦·虚无的世界
...@@ -1611,7 +1642,7 @@ ...@@ -1611,7 +1642,7 @@
47370104 0 --饕灵魔暗伏 47370104 0 --饕灵魔暗伏
47390001 2 --LCB=司机 卡戎 47390001 2 --LCB=司机 卡戎
47390004 1 --In Hell We Live, Lament 47390004 1 --In Hell We Live, Lament
47390035 0 --绽放E.G.O::燃气捕鲸叉 亚哈 47390035 1 --绽放E.G.O::燃气捕鲸叉 亚哈
47390036 0 --魔王希斯克利夫 47390036 0 --魔王希斯克利夫
47390254 1 --Dieci协会南部4科 鸿璐 47390254 1 --Dieci协会南部4科 鸿璐
47310307 0 --残赫照灵 熔火无穷 47310307 0 --残赫照灵 熔火无穷
...@@ -1693,6 +1724,11 @@ ...@@ -1693,6 +1724,11 @@
51419716 0 --地狱的狂气女神-赫卡提亚 51419716 0 --地狱的狂气女神-赫卡提亚
51419718 0 --地狱的时尚女神-赫卡提亚 51419718 0 --地狱的时尚女神-赫卡提亚
51419720 0 --地狱的三球女神-赫卡提亚 51419720 0 --地狱的三球女神-赫卡提亚
#523
52300105 1 --无名者·牺牲
52300110 1 --无名者·精灵
#527 #527
52700103 1 --百群骑士 血腥独角仙 52700103 1 --百群骑士 血腥独角仙
52700106 1 --百群骑士 格拉法 52700106 1 --百群骑士 格拉法
...@@ -1709,7 +1745,8 @@ ...@@ -1709,7 +1745,8 @@
52700706 0 --伏魔月影 52700706 0 --伏魔月影
52700709 0 --报复之鬼 忍·鬼 大星 52700709 0 --报复之鬼 忍·鬼 大星
52700712 1 --忍·妖 玉雪 52700712 1 --忍·妖 玉雪
52700715 0 --忍·兽 鹿雷 52700715 0 --忍·兽 鹿雷
52700697 1 --鬼行大道而世人惮之 忍·鬼 猩猩童子
#537 #537
53705018 0 --超极幻海袭 丰之黄金 53705018 0 --超极幻海袭 丰之黄金
53707016 0 --清响 抄染扉 53707016 0 --清响 抄染扉
...@@ -1925,20 +1962,23 @@ ...@@ -1925,20 +1962,23 @@
61000009 0 --霞烈之魔妖 火取魔 61000009 0 --霞烈之魔妖 火取魔
61000101 1 --“敬畏” 61000101 1 --“敬畏”
#612 #612
61200001 0 --云轮之界域 云轮界 61200001 1 --云轮之界域 云轮界
61200002 1 --至高之器 云轮之玄 61200002 1 --至高之器 云轮之玄
61200003 1 --至高之器 云轮之元 61200003 1 --至高之器 云轮之元
61200004 1 --云轮大榜 道古玄碑 61200004 1 --云轮大榜 道古玄碑
61200005 0 --云轮王证 流云令 61200005 1 --云轮王证 流云令
61200101 1 --前尘轮转 悲戚云轮之愚者 61200101 1 --前尘轮转 悲戚云轮之愚者
61200110 1 --玄元尊仪 云轮之云落 61200110 1 --玄元尊仪 云轮之云落
61200000 1 --瀚古云轮之秘仪 61200000 1 --瀚古云轮之秘仪
61200201 1 --五剑一心 云轮之白夜 61200201 1 --五剑一心 云轮之白夜
61200310 0 --执我酌光 云轮之月曦 61200310 1 --执我酌光 云轮之月曦
61200105 1 --前尘轮转 引领云轮之歌者 61200105 1 --前尘轮转 引领云轮之歌者
61200207 1 --云轮秘造 殇 61200207 1 --云轮秘造 殇
61200205 1 --云轮铸造 赤璃玄霜 61200205 1 --云轮铸造 赤璃玄霜
61200202 1 --云轮伴剑 白夜 61200202 1 --云轮伴剑 白夜
61200103 1 --前尘轮转 协同云轮之奏者
61200006 1 --青夜弧光 云轮夜未央
#639 #639
63924105 0 --米诺陶诺斯 63924105 0 --米诺陶诺斯
63924110 1 --米诺陶诺斯-无法走出的迷宫 63924110 1 --米诺陶诺斯-无法走出的迷宫
...@@ -2079,10 +2119,12 @@ ...@@ -2079,10 +2119,12 @@
65899905 0 --抽1!抽1!再抽1 65899905 0 --抽1!抽1!再抽1
65899920 0 --反多元防空炮 65899920 0 --反多元防空炮
65899935 0 --甲虫武士 65899935 0 --甲虫武士
65870030 0 ----Protoss·黑暗圣堂武士 65870030 1 ----Protoss·黑暗圣堂武士
65870055 1 --Protoss·执政官 65870055 1 --Protoss·执政官
65870110 1 --Protoss·黑暗执政官 65870110 1 --Protoss·黑暗执政官
65870025 1 --Protoss·母舰核心 65870025 1 --Protoss·母舰核心
65899940 0 --万虫希冀之手
#666 #666
66600000 0 --夜行的领路人 滑头鬼 66600000 0 --夜行的领路人 滑头鬼
66600002 0 --百鬼夜行 滑头鬼 66600002 0 --百鬼夜行 滑头鬼
...@@ -2223,7 +2265,7 @@ ...@@ -2223,7 +2265,7 @@
81902106 1 --TC.105 隐匿于幕后的禁忌门扉 摩多罗隐岐奈 81902106 1 --TC.105 隐匿于幕后的禁忌门扉 摩多罗隐岐奈
81902107 1 --TC.106 赛之河原的弃子 戎璎花 81902107 1 --TC.106 赛之河原的弃子 戎璎花
81902112 1 --TC.111 孤立无援的造形神 埴安神袿姬 81902112 1 --TC.111 孤立无援的造形神 埴安神袿姬
81903100 0 --未确认幻想少女 81903100 1 --未确认幻想少女
81905005 1 --八云友·侍 丁礼田舞&尔子田里乃 81905005 1 --八云友·侍 丁礼田舞&尔子田里乃
81905013 0 --八云友 西行寺幽幽子 81905013 0 --八云友 西行寺幽幽子
81905014 0 --境界的妖怪 八云紫 81905014 0 --境界的妖怪 八云紫
......
--M·A·L·Gladiator
local m=183011
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(cm.adval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
end
function cm.counterfilter(c)
return c:IsSetCard(0xc19)
end
function cm.thfilter(c)
return c:IsSetCard(0xc19) and c:IsAbleToHand() and not c:IsCode(m) and c:IsType(TYPE_MONSTER)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
KanKan.MALcanntspm(e:GetHandler())
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
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>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
function cm.adval(e,c)
return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),LOCATION_MZONE+LOCATION_GRAVE,0,c)*500
end
--M·A·L·Tracker
local m=183015
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return c:IsSetCard(0xc19)
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0xc19) and not c:IsCode(m)
end
function cm.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(cm.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function cm.costfilter(c)
return c:IsSetCard(0xc19) and c:IsAbleToRemoveAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
KanKan.MALcanntspm(e:GetHandler())
end
function cm.target(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.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--M·A·L·Breakthrough
local m=183020
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--change level
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SPSUMMON_COST)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(cm.lvop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1)
e3:SetCost(cm.cost)
e3:SetTarget(cm.settg)
e3:SetOperation(cm.setop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return c:IsSetCard(0xc19)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc19)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.lvop(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_LEVEL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(4)
e1:SetReset(RESET_EVENT+0x7f0000)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1500)
e2:SetReset(RESET_EVENT+0x7f0000)
c:RegisterEffect(e2)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
KanKan.MALcanntspm(e:GetHandler())
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.filter(c)
return c:IsSetCard(0xc19) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and c:GetType()~=TYPE_SPELL
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
--M·A·L·Metal Squad
local m=183025
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--change level
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SPSUMMON_COST)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(cm.lvop)
c:RegisterEffect(e2)
--double attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,m+1)
e3:SetTarget(cm.datg)
e3:SetOperation(cm.daop)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.lvop(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_LEVEL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(4)
e1:SetReset(RESET_EVENT+0x7f0000)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(500)
e2:SetReset(RESET_EVENT+0x7f0000)
c:RegisterEffect(e2)
end
function cm.dafilter(c)
return c:IsFaceup() and c:IsSetCard(0xc19)
end
function cm.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.dafilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.dafilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.dafilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.daop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local atk=tc:GetAttack()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(atk*2)
tc:RegisterEffect(e1)
end
end
--M·A·L·Cathode Ray Tube
local m=183030
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(cm.adval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
end
function cm.counterfilter(c)
return c:IsSetCard(0xc19)
end
function cm.thfilter(c)
return c:IsSetCard(0xc19) and c:IsAbleToHand() and not c:IsCode(m) and c:IsType(TYPE_MONSTER)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
KanKan.MALcanntspm(e:GetHandler())
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xc19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(m) and c:IsType(TYPE_MONSTER)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.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_DEFENSE)
end
end
function cm.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.adval(e,c)
return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),LOCATION_ONFIELD+LOCATION_GRAVE,0,c)*300
end
--M·A·L
local m=183035
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--hand link
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,m+1)
e3:SetValue(cm.matval)
c:RegisterEffect(e3)
--search
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetCountLimit(1,m+2)
e4:SetCondition(cm.thcon)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
end
function cm.counterfilter(c)
return c:IsSetCard(0xc19)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
KanKan.MALcanntspm(e:GetHandler())
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.tgfilter(c)
return c:IsSetCard(0xc19) and not c:IsCode(m) and c:IsAbleToGrave()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.mfilter(c)
return c:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c:IsSetCard(0xc19)
end
function cm.exmfilter(c)
return c:IsLocation(LOCATION_HAND) and c:IsCode(m)
end
function cm.matval(e,lc,mg,c,tp)
if not lc:IsSetCard(0xc19) then return false,nil end
return true,not mg or mg:IsExists(cm.mfilter,1,nil) and not mg:IsExists(cm.exmfilter,1,nil)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:SetLabel(0)
if c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0xc19) then
if c:IsPreviousLocation(LOCATION_ONFIELD) then
e:SetLabel(1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
return true
else
return false
end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if (e:GetLabel()==0 or Duel.SelectOption(tp,1003,1100)==0) then
local sg1=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_SZONE,LOCATION_SZONE,nil)
Duel.Destroy(sg1,REASON_EFFECT)
else
local sg2=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_SZONE,nil)
Duel.Destroy(sg2,REASON_EFFECT)
end
end
--M·A·L
local m=183040
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--pendulum set
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,m)
e0:SetCost(cm.pccost)
e0:SetTarget(cm.pctg)
e0:SetOperation(cm.pcop)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m+1)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.settg)
e1:SetOperation(cm.setop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
KanKan.MALPleave(c,m)
end
function cm.counterfilter(c)
return c:IsSetCard(0xc19)
end
function cm.pcfilter1(c)
return c:IsDiscardable()
end
function cm.pccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.pcfilter1,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter1,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function cm.pcfilter0(c)
return c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and c:IsSetCard(0xc19)
end
function cm.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(cm.pcfilter0,tp,LOCATION_DECK,0,1,nil) end
end
function cm.pcop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter0,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
KanKan.MALcanntspm(e:GetHandler())
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.filter(c)
return c:IsSetCard(0xc19) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--M·A·L Riot
local m=183045
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,m)
e0:SetCondition(cm.spcon)
e0:SetTarget(KanKan.MALFusionPEXtg)
e0:SetOperation(KanKan.MALFusionPEXop)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m+1)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.pentg)
e1:SetOperation(cm.penop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--set
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_EXTRA)
e4:SetCountLimit(1,m+2)
e4:SetCost(cm.lpcost)
e4:SetTarget(cm.tftg)
e4:SetOperation(cm.tfop)
c:RegisterEffect(e4)
end
function cm.counterfilter(c)
return c:IsSetCard(0xc19)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
KanKan.MALcanntspm(e:GetHandler())
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.penfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.penfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_PZONE)
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.penfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function cm.lpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.tffilter(c)
return c:IsSetCard(0xc19) and not c:IsForbidden() and c:IsType(TYPE_MONSTER)
end
function cm.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_DECK,0,1,nil) end
end
function cm.tfop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.tffilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(TYPE_SPELL+TYPE_TRAP+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--M·A·L Arsenal Crab
local m=183050
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(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_PZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+1)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--Summon
KanKan.MALSZSpm(c,m)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToDeckAsCost()
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xc19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_EXTRA,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_EXTRA,0,3,3,nil)
Duel.SendtoDeck(g,nil,3,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsSetCard(0xc19)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--M·A·L Titan
local m=183055
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,m)
e0:SetTarget(cm.rptg)
e0:SetOperation(cm.rpop)
c:RegisterEffect(e0)
--act limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,5))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,m+3)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--Summon
KanKan.MALSZSpm(c,m)
KanKan.MALPleave(c,m)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xc19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.rptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function cm.rpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(Duel.AnnounceType(tp))
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
if e:GetLabel()==0 then
e1:SetDescription(aux.Stringid(m,2))
e1:SetValue(cm.aclimit1)
elseif e:GetLabel()==1 then
e1:SetDescription(aux.Stringid(m,3))
e1:SetValue(cm.aclimit2)
else
e1:SetDescription(aux.Stringid(m,4))
e1:SetValue(cm.aclimit3)
end
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.aclimit1(e,re,tp)
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_HAND) and re:IsActiveType(TYPE_MONSTER)
end
function cm.aclimit2(e,re,tp)
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_HAND) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
end
function cm.aclimit3(e,re,tp)
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_HAND) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP)
end
--M·A·L Army Space Fleet
local m=183060
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCost(cm.spcost)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(1)
e2:SetCondition(cm.actcon)
c:RegisterEffect(e2)
--ATK
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.atkcon)
e3:SetTarget(cm.atktg)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
--immune
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetValue(cm.efilter1)
c:RegisterEffect(e5)
--immune
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_IMMUNE_EFFECT)
e6:SetValue(cm.efilter2)
c:RegisterEffect(e6)
end
cm.spchecks=aux.CreateChecks(Card.IsType,{TYPE_RITUAL,TYPE_FUSION,TYPE_SYNCHRO,TYPE_XYZ,TYPE_PENDULUM,TYPE_LINK})
function cm.counterfilter(c)
return c:IsSetCard(0xc19)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc19)
end
function cm.spcostfilter(c)
return c:IsFaceup() and c:IsAbleToDeckOrExtraAsCost() and c:IsType(TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_PENDULUM+TYPE_LINK) and c:IsSetCard(0xc19) and c:IsType(TYPE_MONSTER)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.spcostfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
return g:CheckSubGroupEach(cm.spchecks,aux.mzctcheck,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(cm.spcostfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroupEach(tp,cm.spchecks,true,aux.mzctcheck,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function cm.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function cm.efilter1(e,te)
return (te:GetHandler():GetType()&TYPE_RITUAL~=0 or te:GetHandler():GetType()&TYPE_FUSION~=0 or te:GetHandler():GetType()&TYPE_SYNCHRO~=0 or te:GetHandler():GetType()&TYPE_XYZ~=0 or te:GetHandler():GetType()&TYPE_PENDULUM~=0 or te:GetHandler():GetType()&TYPE_LINK~=0) and te:GetOwner()~=e:GetOwner()
end
function cm.efilter2(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,e:GetHandler()):GetSum(Card.GetAttack)>0 end
end
function cm.filter1(c)
return c:IsType(TYPE_XYZ) and c:GetOverlayCount()>0
end
function cm.filter2(c)
return c:IsType(TYPE_MONSTER) and c:IsAttackAbove(0)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,c):GetSum(Card.GetAttack)
local g2=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local atk2=0
if g2:GetCount()>0 then
local tc2=g2:GetFirst()
while tc2 do
local cg=tc2:GetOverlayGroup()
local sg=cg:Filter( cm.filter2,nil)
if sg:GetCount()>0 then
local tc3=sg:GetFirst()
while tc3 do
atk2=atk2+tc3:GetAttack()
tc3=sg:GetNext()
end
end
tc2=g2:GetNext()
end
end
local atk=atk1+atk2
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(atk)
c:RegisterEffect(e1)
end
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e0:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetTargetRange(LOCATION_MZONE,0)
e0:SetTarget(cm.ftarget)
e0:SetLabel(c:GetFieldID())
e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,tp)
end
function cm.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
--M·A·L·Imperial Chief
local m=183085
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--ev
KanKan.MALritual(c,m,cm.descon)
KanKan.MALSZSpm(c,m,183085)
KanKan.MALeffectgain(c,m,cm.effop)
--to hand
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e0:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,m+1)
e0:SetTarget(cm.thtg)
e0:SetOperation(cm.thop)
c:RegisterEffect(e0)
end
function cm.filter(c)
return c:IsSetCard(0xc19) and c:IsDiscardable(REASON_DISCARD)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return false end
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
local ph=Duel.GetCurrentPhase()
return rp~=tp and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_GRAVE+LOCATION_REMOVED
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) and not (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetDescription(aux.Stringid(m,4))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.reascon)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
rc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetDescription(aux.Stringid(m,4))
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,1)
e2:SetCondition(function (e,rc)
return Duel.IsExistingMatchingCard(function (c)
return c:IsFaceup() and c==e:GetHandler()
end,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end)
e2:SetValue(cm.limval)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
rc:RegisterEffect(e2,true)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,4))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(cm.reptg)
e4:SetReset(RESET_EVENT+RESETS_REDIRECT)
rc:RegisterEffect(e4,true)
if not Auxiliary.HackIsAbleToGrave then
Auxiliary.HackIsAbleToGrave=true
HackIsAbleToGrave=Card.IsAbleToGrave
HackIsAbleToGraveAsCost=Card.IsAbleToGraveAsCost
function Card.IsAbleToGrave(c)
if rc:IsFaceup() then
return false
end
end
function Card.IsAbleToGraveAsCost(c)
if rc:IsFaceup() then
return false
end
end
end
if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,4))
end
function cm.reascon(e,tp,eg,ep,ev,re,r,rp)
return not (r==REASON_SYNCHRO or r==REASON_FUSION or r==REASON_LINK or r==REASON_XYZ)
end
function cm.limval(e,te)
local ex=Duel.GetOperationInfo(ev,CATEGORY_TOGRAVE)
return te:IsHasCategory(CATEGORY_TOGRAVE) or ex
or te:IsHasCategory(CATEGORY_DECKDES)
or te:IsHasCategory(CATEGORY_HANDES)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
function cm.thfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) 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+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) and e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
if c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
end
--M·A·L·Orion
local m=183090
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--ev
KanKan.MALritual(c,m,cm.descon)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.atkcon)
e2:SetTarget(cm.atktg)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsSetCard(0xc19) and c:IsDiscardable(REASON_DISCARD)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return false end
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
local ph=Duel.GetCurrentPhase()
return rp~=tp and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_HAND and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) and not (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.atktgfilter1(c,tp)
return c:IsFaceup() and Duel.IsExistingTarget(cm.atktgfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function cm.atktgfilter2(c)
return c:IsFaceup()
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.atktgfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.atktgfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.atktgfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g)
end
function cm.atkfilter(c,e)
return c:IsRelateToEffect(e) and c:IsFaceup()
end
function cm.atkupfilter(c,g)
return g:FilterCount(cm.atktgfilter2,c)>0
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(cm.atkfilter,nil,e)
if #g==2 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local hc=g:FilterSelect(tp,cm.atkupfilter,1,1,nil,g):GetFirst()
if not hc then return end
local tc=g:Filter(aux.TRUE,hc):GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(tc:GetAttack())
hc:RegisterEffect(e1)
end
end
--M·A·L·Command Chief
local m=183095
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--ev
KanKan.MALritual(c,m,cm.descon)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsSetCard(0xc19) and c:IsDiscardable(REASON_DISCARD)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return false end
local ph=Duel.GetCurrentPhase()
return rp~=tp and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) and not (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
function cm.thfilter1(c,lv)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsLevelAbove(1)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local lv=c:GetLevel()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter1(chkc,lv) end
if chk==0 then return c:IsLevelAbove(1) and c:IsRelateToEffect(e)
and Duel.IsExistingTarget(cm.thfilter1,tp,LOCATION_GRAVE,0,1,nil,lv) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter1,tp,LOCATION_GRAVE,0,1,1,nil,lv)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local lv=tc:GetLevel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
Duel.BreakEffect()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--M·A·L·Ground Roar
local m=183100
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,2,true)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--to extra
local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOEXTRA)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(cm.tecon)
e2:SetTarget(cm.tetg)
e2:SetOperation(cm.teop)
c:RegisterEffect(e2)
end
function cm.ffilter(c)
return c:IsSetCard(0xc19)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xc19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.tecon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
end
function cm.teop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
--M·A·L·Enfocer
local m=183105
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,cm.matfilter1,cm.matfilter2,true)
--cannot be target
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e0:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e0:SetRange(LOCATION_MZONE)
e0:SetTargetRange(LOCATION_MZONE,0)
e0:SetCondition(cm.imcon)
e0:SetTarget(cm.imval)
e0:SetValue(cm.imfilter)
c:RegisterEffect(e0)
--position
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_POSITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.immval)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(cm.valcheck)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(cm.atkcon)
e4:SetOperation(cm.atkop)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function cm.matfilter1(c)
return c:IsFusionSetCard(0xc19) and c:IsType(TYPE_FUSION)
end
function cm.matfilter2(c)
return c:IsRace(RACE_MACHINE)
end
function cm.imcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.imval(e,c)
return c~=e:GetHandler()
end
function cm.imfilter(e,re,rp)
return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_MONSTER)
end
function cm.immval(e,re)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and re:IsActivated() and re:GetActivateLocation()==LOCATION_MZONE
and (rc:IsRelateToEffect(re) and rc:IsAttackPos() or not rc:IsRelateToEffect(re) and rc:IsPreviousPosition(POS_ATTACK))
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
local atk=0
local tc=g:GetFirst()
while tc do
local lk
if tc:IsLevelAbove(1) then lk=tc:GetLevel()
elseif tc:IsRankAbove(1) then lk=tc:GetRank()
elseif tc:IsLinkAbove(1) then lk=tc:GetLink()
end
atk=atk+lk
tc=g:GetNext()
end
e:SetLabel(atk)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=e:GetLabelObject():GetLabel()*300
if atk>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
end
--M·A·L·Hydra
local m=183110
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,2,true)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
KanKan.MALeffectgain(c,m,cm.effop)
end
function cm.ffilter(c)
return c:IsSetCard(0xc19) and c:IsType(TYPE_LINK)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.thfilter1(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToHand() and c:IsSetCard(0xc19)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,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.thfilter1,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 cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
--M·A·L·Cheiron
local m=183115
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--fusion material
aux.AddFusionProcFunFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0xc19),aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),1,99,true,true)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
KanKan.MALeffectgain(c,m,cm.effop)
KanKan.MALPleave(c,m)
--pendulum set
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,m+1)
e0:SetTarget(cm.pctg)
e0:SetOperation(cm.pcop)
c:RegisterEffect(e0)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost1)
e1:SetCondition(cm.spcon1)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+3)
e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop)
c:RegisterEffect(e3)
end
function cm.pcfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_SZONE)
end
function cm.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end
end
function cm.pcop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function cm.counterfilter(c)
return c:IsSetCard(0xc19)
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
KanKan.MALcanntspm(e:GetHandler())
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.spfilter1(c)
return c:IsCode(183530) and c:IsSSetable()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_DECK,0,1,nil) end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and cm.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local ct=e:GetHandler():GetMaterialCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(g,REASON_EFFECT)
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetDescription(aux.Stringid(m,1))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_TO_DECK)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
--M·A·L 【Centaur】
local m=183120
local cm=_G["c"..m]
cm.dfc_front_side=183120
cm.dfc_back_side=183445
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,cm.lcheck)
c:EnableReviveLimit()
c:SetUniqueOnField(1,0,m)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(99)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.spcost)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--selfdes(Excessive idling)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e7:SetRange(LOCATION_MZONE)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(cm.descon1)
c:RegisterEffect(e7)
--atkdown
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,m+1)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(cm.atkcost)
e2:SetCondition(cm.atkcon)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
end
function cm.lcheck(g,lc)
return g:IsExists(cm.lkfilter1,1,nil)
end
function cm.lkfilter1(c)
return c:IsLinkType(TYPE_FUSION) and c:IsSetCard(0xc19)
end
function cm.costfilter(c)
return c:IsDiscardable()
end
function cm.spcost(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
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND,0,0,99,nil)
if Duel.SendtoGrave(g1,REASON_COST+REASON_DISCARD)~=0 then
local gc=g1:GetCount()
e:SetLabel(gc)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local gc=e:GetLabel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(gc*2000)
c:RegisterEffect(e1)
end
Duel.BreakEffect()
if c:GetFlagEffect(m)>=3 then
Duel.Hint(24,0,aux.Stringid(m,11))
Duel.Hint(24,0,aux.Stringid(m,11))
Duel.Hint(24,0,aux.Stringid(m,11))
end
Duel.BreakEffect()
if c:IsAttackAbove(6000) then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
end
end
function cm.descon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(m)>=4
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBaseAttack()>=4000
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
end
---
---
---
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g11=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g11:GetFirst()
local atk1=tc:GetAttack()
local atkac=c:GetBaseAttack()
local atkwtf=math.floor(((c:GetAttack()-6000)/1000)/2)
local atkmax=atkwtf*10
if tc then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(-atkac)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
Duel.BreakEffect()
if tc:IsAttack(0) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if c:GetAttack()<6000 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(24,0,aux.Stringid(m,13))
Duel.BreakEffect()
Duel.Hint(24,0,aux.Stringid(m,14))
local tcode=c.dfc_back_side
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,1,183445)
end
elseif tc:IsAttack(atk1) then
Duel.Remove(tc,POS_FACEDOWN,REASON_RULE)
if c:GetAttack()<6000 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(24,0,aux.Stringid(m,13))
Duel.BreakEffect()
Duel.Hint(24,0,aux.Stringid(m,14))
local tcode=c.dfc_back_side
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,1,183445)
end
end
if c:GetAttack()>=6000 then
if tc:IsAttack(0) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if not KanKan.resultnumber then
local result=0
local g=Duel.GetFieldGroup(0,0xff,0xff):RandomSelect(0,8)
local ct={}
local c=g:GetFirst()
for i=0,7 do
ct[c]=i
c=g:GetNext()
end
for i=0,10 do
result=result+(ct[g:RandomSelect(2,1):GetFirst()]<<(3*i))
end
g:DeleteGroup()
KanKan.resultnumber=result&0xffffffff
end
local dice1=KanKan.odds(1,10)
e:GetHandler():SetTurnCounter(dice1)
local dice2=KanKan.odds(1,10)
e:GetHandler():SetTurnCounter(dice2)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
if dice1==10 and dice2~=10 then dice1=0 end
if dice1~=10 and dice2==10 then dice2=0 end
local x=(dice1*10)+dice2
if dice1==10 and dice2==10 then x=100 end
if x>50-atkmax then
Duel.Hint(24,0,aux.Stringid(m,12))
Duel.Hint(24,0,aux.Stringid(m,12))
Duel.Hint(24,0,aux.Stringid(m,12))
Duel.BreakEffect()
Duel.SendtoGrave(c,REASON_RULE)
else
if Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(24,0,aux.Stringid(m,13))
Duel.BreakEffect()
Duel.Hint(24,0,aux.Stringid(m,14))
local tcode=c.dfc_back_side
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,1,183445)
end
end
end--(结算完毕开始骰)
elseif tc:IsAttack(atk1) then
Duel.Remove(tc,POS_FACEDOWN,REASON_RULE)
if not KanKan.resultnumber then
local result=0
local g=Duel.GetFieldGroup(0,0xff,0xff):RandomSelect(0,8)
local ct={}
local c=g:GetFirst()
for i=0,7 do
ct[c]=i
c=g:GetNext()
end
for i=0,10 do
result=result+(ct[g:RandomSelect(2,1):GetFirst()]<<(3*i))
end
g:DeleteGroup()
KanKan.resultnumber=result&0xffffffff
end
local dice1=KanKan.odds(1,10)
e:GetHandler():SetTurnCounter(dice1)
local dice2=KanKan.odds(1,10)
e:GetHandler():SetTurnCounter(dice2)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
if dice1==10 and dice2~=10 then dice1=0 end
if dice1~=10 and dice2==10 then dice2=0 end
local x=(dice1*10)+dice2
if dice1==10 and dice2==10 then x=100 end
if x>50-atkmax then
Duel.Hint(24,0,aux.Stringid(m,12))
Duel.Hint(24,0,aux.Stringid(m,12))
Duel.Hint(24,0,aux.Stringid(m,12))
Duel.BreakEffect()
Duel.SendtoGrave(c,REASON_RULE)
else
if Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(24,0,aux.Stringid(m,13))
Duel.BreakEffect()
Duel.Hint(24,0,aux.Stringid(m,14))
local tcode=c.dfc_back_side
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,1,183445)
end
end
end--(结算完毕开始骰)
end--(2种除外的结算)
end--
end
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
--M——A——L
local m=183125
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2FunRep(c,183215,183345,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),1,99,true,true)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_MATERIAL+REASON_FUSION)
--immune
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCode(EFFECT_IMMUNE_EFFECT)
e0:SetValue(cm.efilter)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(cm.adjustop)
c:RegisterEffect(e1)
KanKan.MAL(c)
--disable field
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD)
e9:SetCode(EFFECT_DISABLE_FIELD)
e9:SetRange(LOCATION_MZONE)
e9:SetValue(cm.disval)
c:RegisterEffect(e9)
--multi
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e10:SetCode(EVENT_SPSUMMON_SUCCESS)
e10:SetOperation(cm.atk)
c:RegisterEffect(e10)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e11)
end
function cm.efilter(e,te)
local tc=te:GetHandler()
local c=e:GetHandler()
return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner() and (tc:GetAttack()<=c:GetAttack() or tc:GetDefense()<=c:GetDefense())
end
function cm.adjustfilter(c)
return not c:IsType(TYPE_FIELD)
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
local g=Duel.GetMatchingGroup(cm.adjustfilter,tp,LOCATION_ONFIELD,0,c)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_RULE)
Duel.Readjust()
end
end
function cm.disval(e)
local tp=e:GetOwnerPlayer()
local val1,val2,val3,val4,val5,val6,val7,val8,val9,val10=0,0,0,0,0,0,0,0,0,0
val1=aux.SequenceToGlobal(tp,LOCATION_MZONE,0)
val2=aux.SequenceToGlobal(tp,LOCATION_MZONE,1)
val3=aux.SequenceToGlobal(tp,LOCATION_MZONE,2)
val4=aux.SequenceToGlobal(tp,LOCATION_MZONE,3)
val5=aux.SequenceToGlobal(tp,LOCATION_MZONE,4)
val6=aux.SequenceToGlobal(tp,LOCATION_SZONE,0)
val7=aux.SequenceToGlobal(tp,LOCATION_SZONE,1)
val8=aux.SequenceToGlobal(tp,LOCATION_SZONE,2)
val9=aux.SequenceToGlobal(tp,LOCATION_SZONE,3)
val10=aux.SequenceToGlobal(tp,LOCATION_SZONE,4)
return val1|val2|val3|val4|val5|val6|val7|val8|val9|val10
end
function cm.atk(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetMaterialCount()
--ATK
local e10=Effect.CreateEffect(c)
e10:SetDescription(aux.Stringid(m,1))
e10:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e10:SetType(EFFECT_TYPE_QUICK_O)
e10:SetCode(EVENT_FREE_CHAIN)
e10:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e10:SetHintTiming(TIMING_DAMAGE_STEP,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e10:SetRange(LOCATION_MZONE)
e10:SetCountLimit(ct)
e10:SetOperation(cm.atkop)
e10:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e10)
c:SetTurnCounter(ct)
end
function cm.filter1(c)
return c:IsType(TYPE_XYZ) and c:GetOverlayCount()>0
end
function cm.filter2(c)
return c:IsType(TYPE_MONSTER) and (c:IsAttackAbove(0) or c:IsDefenseAbove(0))
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,nil):GetSum(Card.GetAttack)
local def1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,nil):GetSum(Card.GetDefense)
local g2=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local atk2=0
local def2=0
if g2:GetCount()>0 then
local tc2=g2:GetFirst()
while tc2 do
local cg=tc2:GetOverlayGroup()
local sg=cg:Filter( cm.filter2,nil)
if sg:GetCount()>0 then
local tc3=sg:GetFirst()
while tc3 do
atk2=atk2+tc3:GetAttack()
def2=def2+tc3:GetDefense()
tc3=sg:GetNext()
end
end
tc2=g2:GetNext()
end
end
local atk=atk1+atk2
local def=def1+def2
local catk=c:GetAttack()
local cdef=c:GetDefense()
if catk>=1070000000 then
--attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(2147480000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
else
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(atk)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4)
end
if cdef>=1070000000 then
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SET_DEFENSE_FINAL)
e6:SetValue(2147480000)
e6:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e6)
else
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_UPDATE_DEFENSE)
e5:SetValue(def)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e5)
end
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
end
function cm.efilter(e,te)
return not te:GetOwner():IsSetCard(0xc19) and
(te:GetCode()&EFFECT_SET_ATTACK~=0
or te:GetCode()&EFFECT_SET_ATTACK_FINAL~=0
or te:GetCode()&EFFECT_SET_BASE_ATTACK~=0
or te:GetCode()&EFFECT_SET_BASE_ATTACK_FINAL~=0
or te:GetCode()&EFFECT_SET_BATTLE_ATTACK~=0
or te:GetCode()&EFFECT_UPDATE_ATTACK~=0
or te:GetCode()&EFFECT_SET_DEFENSE~=0
or te:GetCode()&EFFECT_SET_DEFENSE_FINAL~=0
or te:GetCode()&EFFECT_SET_BASE_DEFENSE~=0
or te:GetCode()&EFFECT_SET_BASE_DEFENSE_FINAL~=0
or te:GetCode()&EFFECT_SET_BATTLE_DEFENSE~=0
or te:GetCode()&EFFECT_UPDATE_DEFENSE~=0)
end
--M·A·L·Surveillance Crawler
local m=183200
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xc19),aux.NonTuner(nil),1,1)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost1)
e1:SetCondition(cm.spcon1)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
KanKan.MALeffectgain(c,m,cm.effop)
end
function cm.counterfilter(c)
return c:IsSetCard(0xc19)
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
KanKan.MALcanntspm(e:GetHandler())
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.spfilter1(c)
return c:IsCode(183500) and c:IsSSetable()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_DECK,0,1,nil) end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetDescription(aux.Stringid(m,1))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
--M·A·L·Dominant Pillar
local m=183205
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(cm.sfilter1),aux.NonTuner(nil),1,1)
c:EnableReviveLimit()
--negate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e0:SetType(EFFECT_TYPE_QUICK_O)
e0:SetCode(EVENT_CHAINING)
e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e0:SetCountLimit(1,m)
e0:SetRange(LOCATION_MZONE)
e0:SetCost(cm.negcost)
e0:SetCondition(cm.negcon)
e0:SetTarget(cm.negtg)
e0:SetOperation(cm.negop)
c:RegisterEffect(e0)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,m+1)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.sfilter1(c)
return c:IsSetCard(0xc19) and c:IsType(TYPE_SYNCHRO)
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then
ec:CancelToGrave()
if Duel.SendtoDeck(ec,nil,2,REASON_EFFECT)~=0 and ec:IsLocation(LOCATION_DECK) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(cm.aclimit)
e1:SetLabelObject(ec)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.aclimit(e,re,tp)
local c=re:GetHandler()
local ec=e:GetLabelObject()
return c:IsOriginalCodeRule(ec:GetOriginalCodeRule())
end
function cm.filter(c,e,tp,g)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsPreviousLocation(LOCATION_HAND) and c:IsPreviousControler(1-tp) and g:IsContains(c)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp,eg) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,eg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp,eg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc,c=Duel.GetFirstTarget(),e:GetHandler()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
--M·A·L·α·β·γ·Δ
local m=183210
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
KanKan.MALSynchro(c)
KanKan.MALPleave(c,code)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.rptg)
e1:SetOperation(cm.rpop)
c:RegisterEffect(e1)
--special summon
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetRange(LOCATION_PZONE)
e5:SetCode(EVENT_DESTROYED)
e5:SetCountLimit(1,m+1)
e5:SetCondition(cm.spcon)
e5:SetTarget(cm.sptg)
e5:SetOperation(cm.spop)
c:RegisterEffect(e5)
--disable attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(3,m+2)
e2:SetCondition(cm.atkcon)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetCondition(cm.atkcon2)
e3:SetTarget(cm.atktg2)
e3:SetOperation(cm.atkop2)
c:RegisterEffect(e3)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
end
function cm.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.atktg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.nzatk(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.nzatk,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,1,nil)
end
function cm.atkop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE,EFFECT_FLAG2_WICKED)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xc19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.rptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function cm.rpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then
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.spfilter),tp,LOCATION_GRAVE+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
end
function cm.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsSetCard(0xc19)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--M·A·L·Cathode Ray Tube MAX!
local m=183215
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(cm.sfilter1),aux.NonTuner(nil),1,1)
c:EnableReviveLimit()
--act limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.regcon)
e1:SetOperation(cm.regop)
c:RegisterEffect(e1)
--avoid damage
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CHANGE_DAMAGE)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetValue(cm.damval)
c:RegisterEffect(e0)
KanKan.MALeffectgain(c,m,cm.effop)
end
function cm.sfilter1(c)
return c:IsSetCard(0xc19) and c:IsType(TYPE_SYNCHRO)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.regop(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:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc19))
e1:SetCondition(cm.condition)
e1:SetValue(cm.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCurrentChain()
return not ct or ct<3
end
function cm.efilter(e,te)
return e:GetOwnerPlayer()~=te:GetOwnerPlayer() and te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function cm.damval(e,re,val,r,rp,rc)
local atk=e:GetHandler():GetDefense()
if val<=atk then return 0 else return val end
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
--
--avoid damage
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CHANGE_DAMAGE)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetValue(cm.damval2)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e0,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetDescription(aux.Stringid(m,1))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
function cm.damval2(e,re,val,r,rp,rc)
local atk=e:GetHandler():GetAttack()
if val<=atk then return 0 else return val end
end
--M·A·L·MALB
local m=183220
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
---
KanKan.MALSynchro(c,m)
KanKan.MALeffectgain(c,m,cm.effop)
KanKan.MALPleave(c,m)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,m+1)
e2:SetRange(LOCATION_PZONE)
e2:SetTarget(cm.sttg)
e2:SetOperation(cm.stop)
c:RegisterEffect(e2)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function cm.costfilter(c,e,tp)
return c:IsType(TYPE_SYNCHRO) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel(),e:GetHandler(),c:GetCode())
end
function cm.spfilter(c,e,tp,lv,ec,code)
return c:IsLevel(lv) and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0xc19) and not c:IsCode(code)
and Duel.GetLocationCountFromEx(tp,tp,ec,c)>0
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end
function cm.sptg(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 aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil,e,tp)
end
e:SetLabel(0)
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil,e,tp)
Duel.Release(g,REASON_COST)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetLevel(),nil):GetFirst()
if sc then
sc:SetMaterial(nil)
if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
sc:CompleteProcedure()
end
end
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetDescription(aux.Stringid(m,1))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PIERCE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
function cm.stfilter(c,tp)
local seq=c:GetSequence()
return seq<=4 and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function cm.sttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.stfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.stfilter,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,4))
Duel.SelectTarget(tp,cm.stfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
end
function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and not tc:IsImmuneToEffect(e)) then return end
local zone=1<<tc:GetSequence()
local oc=Duel.GetMatchingGroup(cm.seqfilter,tp,0,LOCATION_SZONE,nil,tc:GetSequence()):GetFirst()
if oc then
Duel.Destroy(oc,REASON_RULE)
end
if Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true,zone) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
function cm.seqfilter(c,seq)
return c:GetSequence()==seq
end
--M·A·L·Merciless
local m=183300
local cm=_G["c"..m]
Duel.LoadScript("c100000.lua")
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--rank up/down
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m+1)
e2:SetCost(cm.cost2)
e2:SetCondition(cm.spcon2)
e2:SetTarget(cm.sptg2)
e2:SetOperation(cm.spop2)
c:RegisterEffect(e2)
KanKan.MALeffectgain(c,m,cm.effop)
end
function cm.counterfilter(c)
return c:IsSetCard(0xc19)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
KanKan.MALcanntspm(e:GetHandler())
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.filter(c,e,tp,mc)
return c:IsRank(mc:GetRank()) and c:IsSetCard(0xc19) and c:IsType(TYPE_XYZ)
and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local tc=g:GetFirst()
if tc then
local mg=c:GetOverlayGroup()
if mg:GetCount()>0 then
Duel.Overlay(tc,mg)
end
tc:SetMaterial(Group.FromCards(c))
Duel.Overlay(tc,Group.FromCards(c))
if Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)~=0 then
tc:CompleteProcedure()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
Duel.RegisterEffect(e1,tp)
end
end
end
end
function cm.ctfilter(c)
return c:IsSetCard(0xc19) and c:GetOriginalType()&TYPE_MONSTER==TYPE_MONSTER
end
function cm.ctcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(cm.ctfilter,1,nil)
end
function cm.ctval(e,c)
return e:GetHandler():GetOverlayGroup():FilterCount(cm.ctfilter,nil)-1
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
KanKan.MALcanntspm(e:GetHandler())
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetOverlayGroup():IsExists(cm.ctfilter,1,nil) and c:IsPreviousLocation(LOCATION_MZONE)
end
function cm.spfilter2(c,e,tp)
return c:IsSetCard(0xc19) and c:IsType(TYPE_XYZ) and not c:IsCode(30683300) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and e:GetHandler():IsCanOverlay() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetDescription(aux.Stringid(m,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment