Commit 709ab979 authored by nanahira's avatar nanahira

2020.6.21

parent 7ac93cc3
......@@ -4,6 +4,8 @@ stages:
variables:
GIT_DEPTH: "1"
LAST_UPDATE_DATE: "2020.6.11"
CURRENT_UPDATE_DATE: "2020.6.21"
redtext:
stage: prepare
......@@ -54,13 +56,12 @@ pack:
- mkdir -p dist/archive dist/contents
- git clone --depth=1 https://code.mycard.moe/alstroemeria-silentlove/ygopro-222DIY-sound sound
- wget -O update/filelist.txt https://cdn01.moecube.com/ygopro-222DIY/contents/filelist.txt || rm -rf update/filelist.txt
#- wget -O dist/archive/ygopro-222DIY-data.7z https://cdn01.moecube.com/ygopro-222DIY/archive/ygopro-222DIY-data.7z || rm -rf dist/archive/ygopro-222DIY-data.7z
#- wget -O dist/archive/ygopro-222DIY-sound.7z https://cdn01.moecube.com/ygopro-222DIY/archive/ygopro-222DIY-sound.7z || rm -rf dist/archive/ygopro-222DIY-sound.7z
- rm -rf .*.yml .git* sound/.git*
- cd update
- ./update-server.sh
- cd ..
- 7z a -mx9 dist/archive/ygopro-222DIY-data.7z expansions update ygopro.exe
- git log --pretty=%H --since=$LAST_UPDATE_DATE | xargs -I {} git diff-tree --no-commit-id --name-only --diff-filter=ACMR -r {} | sed "/sound\//d;/update\//d;/.yml/d" | sort | uniq | sed "s/^/'/g;s/\$/'/g" | xargs 7z a -mx9 dist/archive/ygopro-222DIY-update.7z || true
- 7z a -mx9 dist/archive/ygopro-222DIY-data.7z expansions update ygopro.exe
- 7z a -mx9 dist/archive/ygopro-222DIY-sound.7z sound
- ls -1 | sed '/dist/d' | xargs -I {} mv {} dist/contents/
artifacts:
......@@ -97,6 +98,8 @@ upload_to_minio:
image: python
script:
- pip install -U -i https://mirrors.aliyun.com/pypi/simple/ awscli
- cp dist/archive/ygopro-222DIY-data.7z dist/archive/ygopro-222DIY-data-$CURRENT_UPDATE_DATE.7z
- cp dist/archive/ygopro-222DIY-update.7z dist/archive/ygopro-222DIY-update-$CURRENT_UPDATE_DATE.7z
- aws s3 --endpoint=https://minio.mycard.moe:9000 sync --delete dist/ s3://mycard/ygopro-222DIY > /dev/null
only:
- master
#created by Player
#main
17052935
17052938
17052939
17060945
17060946
19100000
19100001
19100004
26803009
26803010
26818001
26818003
26818004
26818005
26818006
26818008
26818015
26821017
30000200
30000205
30000220
33330080
53799047
53799048
53799052
75646002
75646007
75646015
75646270
75646301
#extra
17052940
75646052
75646060
75646064
75646066
75646075
!side
#created by Player
#main
81005065
81005067
81010045
81010046
81011059
81017028
81022015
81022016
81022017
81022018
81022019
81022020
81022021
81022022
81022023
81027020
81027021
81027022
81041033
87000011
87000012
87000013
87000014
87000015
87000016
87000017
87000020
87000021
87000022
87000023
#extra
81005066
81005068
81005069
81005070
81005071
87000018
87000019
87000024
!side
#created by Player
#main
111001
111002
1000406
1008000
1008001
1008002
1008003
1008007
1008008
1008014
1008015
1008020
1008021
1008022
1008023
1008024
1008025
1008026
1008027
1008037
1008038
14370001
14370007
14370010
14370013
14370016
14370019
14370022
14370025
14370028
14370031
#extra
1000364
1000370
1008010
1008011
1008032
1008033
1009011
1009012
1009014
14370004
14370037
14370040
!side
#created by Player
#main
14700001
14700002
14700003
14700004
14700005
16104200
16104202
16104204
16104206
16104208
16104210
16104212
16104214
16104216
16104218
16104220
16104224
16104226
16104228
16104230
26803011
26810022
30556820
33330100
#extra
14700006
14700007
14700008
14700009
26802007
26802008
26802009
26810021
26816012
33330101
33330109
!side
#created by Player
#main
33500102
33500202
33500204
33500208
65060023
65060024
65060025
65060026
65060027
65060028
65060029
65060030
81009031
81013026
81013027
81013028
81013030
81013032
81013033
81013035
81016023
81016024
81016025
81018050
81022024
81027023
81027024
#extra
33500211
33500307
33500308
33500310
81005072
81013029
81013031
81013034
81022025
87090001
87090002
!side
No preview for this file type
......@@ -31,6 +31,7 @@
01009030 1 --物语纪录·北白蛇神社
01009033 1 --物语纪录·囮
01009036 1 --物语纪录·猫
01009001 1 --腼腆妹·千石抚子
#11
01150023 0 --仙女的水滴·夏
01150024 0 --仙女的水滴·冬
......@@ -94,10 +95,7 @@
10905002 2 --离苦的记忆 小河坂千波
10905006 2 --轮回的记忆 乙津梦
10905003 1 --群星的记忆 苍衣铃
10969998 2 --御魂术
10919000 0 --叛逆的魔女 花菱
10907000 2 --花寄女子寮
10907001 2 --花寄女子Live
10900014 0 --无限之天使
10908008 1 --国家宝藏 万岁通天帖
10908010 1 --国家宝藏 云纹铜禁
......@@ -152,7 +150,7 @@
12008011 2 --双色的轮舞
12008014 2 --回转的悲凉 波恋达斯
12008025 1 --极限的螺旋 波恋达斯
12017002 1 --忍妖 玉雪
12017002 0 --忍妖 玉雪
12017003 1 --忍妖 粟子姬
12010003 1 --LA Da''ath 理解的亚夫结
12010034 0 --静仪式 记忆之海
......@@ -164,7 +162,6 @@
12010016 2 --LA SG Wrath 艾拉斯
12033001 2 --舞台 momoko
12033012 1 --忧物 momoko
12033002 2 --初见 momoko
12033006 1 --女仆 momoko
12004025 0 --智慧之泉 拉结尔
12008031 2 --双色的幼指
......@@ -199,6 +196,9 @@
12037003 0 --战场的巫鸣鸟 迦陵频伽
12037052 0 --极丽六鸟 紧那罗
12038003 1 --偶像P 普利兹姆
12017000 0 --忍妖 粉雪
12017001 0 --忍妖 绵雪
12017020 0 --忍妖 变化之术
#140
14000509 2 --异态魔女·过去式
14000510 2 --异态魔女·进行时
......@@ -245,6 +245,8 @@
14140013 0 --广有射怪鸟事
14140018 0 --悲哀·布洛妮娅
14140021 0 --新生·八重樱
#143
14370004 0 --灰烬少女的原核
#148
14801035 1 --灾厄猛兽 布莱克王
14801308 0 --奥特战士 梦比优斯
......@@ -288,8 +290,9 @@
16100009 0 --像素熊 黑白熊病毒
16101101 0 --天空的威胁
16101105 0 --黑暗之门
16102003 1 --SCP基金会 Doctors
16102003 0 --SCP基金会 Doctors
16102007 1 --SCP-247 无害的小猫
16102011 0 --SCP-2000 机械降神
#170
17011101 1 --医生 姬塔
17060914 1 --妖精 伊甸
......@@ -425,12 +428,7 @@
26805012 0 --少女水天·黛冬优子
26807061 1 --高空平地摔
26809005 0 --太阳歌姬·莱拉
26810000 2 --如月千早
26810002 2 --苍蓝之声·如月千早
26810003 2 --游园地·如月千早
26810009 1 --雪之花·如月千早
26805008 2 --雨落树荫
26807029 2 --不堪回忆之梦
26801001 0 --菲诺蒙丹帕-娜美塞拉
26801002 0 --五十铃娜美-未成年魔导
26809020 0 --KOTO-DAMA
......@@ -449,7 +447,6 @@
26809026 0 --Precious Sword
26810010 2 --无限冲击·如月千早
26805014 0 --哥特风·杜野凛世
26809034 2 --Nightmare
26805005 2 --心结·风野灯织
26818000 2 --九条璃雨
26818010 2 --小鸟游雏田
......@@ -477,6 +474,7 @@
30556011 2 --空中都市计划 —[Dispersal]—
30556808 1 --回应朝霞的呼唤
30558013 0 --破灭幻械 注魂
30556820 0 --天球的观测者
#314
31400001 0 --超热血捕手
31400012 0 --永恒的温柔
......@@ -509,7 +507,7 @@
33330502 2 --末氏空骨 彼临
33330503 2 --末氏空骨 救赎
33330504 2 --末氏空骨 赤核
33330506 2 --末氏空骨 再笙
33330506 1 --末氏空骨 再笙
33330508 1 --末氏空骨 骸使
33330509 2 --末氏空骨的暗日
33330512 1 --末氏空骨的转化
......@@ -520,7 +518,6 @@
33330601 1 --相对性理论武装
33330602 1 --相对性理性缺失
33330107 1 --造神计划7 赤游鱼
33310101 2 --恶魔的提线魔术
33310103 2 --可可莉柯特·兽耳布偶
33310158 1 --临魔浮生
33310161 0 --临魔终形
......@@ -545,11 +542,13 @@
33310212 1 --空想寒晶 冰凰
33310213 0 --空想祈羽 虚龙
33310200 0 --空想融合
33350015 0 --传说之魂 诚信
33350016 0 --传说之魂 耐心
33330505 1 --末氏空骨 献祭
33330507 1 --末氏空骨 心渊
#334
33400037 1 --D.A.L-时崎狂三-ALTER
33400222 2 --D.A.L-本条二亚-ALTER
33400300 2 --夜刀神十香 初遇
33400303 2 --夜刀神十香 月夜礼服
33400355 1 --夜刀神-烈战
33400360 1 --第十领域-血战之域
33400001 1 --时崎狂三 惜时
......@@ -581,24 +580,25 @@
33500005 2 --珈百璃 发呆
33500006 1 --珈百璃 牧师
33500103 0 --毁灭前奏
33500204 0 --萨塔妮亚-校服
33500208 0 --萨塔妮亚-夏日泳装
33500204 2 --萨塔妮亚-校服
33501000 1 --星空下的投影
33500011 1 --珈百璃 哭泣
33500012 1 --珈百璃 小熊
33500108 1 --以恶魔之名
33500102 0 --珈百璃·薇奈特的休闲时光
33500102 1 --珈百璃·薇奈特的休闲时光
33500110 1 --薇奈特-魔女法术
33500202 0 --萨塔妮亚-中二
33500202 1 --萨塔妮亚-中二
33500205 1 --萨塔妮亚-圣诞老人
33500211 0 --萨塔妮亚-知性美人
33500307 0 --薇奈特-纯真恶魔
33500308 0 --薇奈特-魔法变身
33500310 0 --薇奈特-恶魔形态
33500211 1 --萨塔妮亚-知性美人
33500307 2 --薇奈特-纯真恶魔
33500308 1 --薇奈特-魔法变身
33500310 2 --薇奈特-恶魔形态
33500603 0 --约会大作战 影月
33500609 0 --恶魔情人 无敌
33500020 0 --珈百璃 治愈
33501002 0 --海行 漫游
33500501 0 --GGO 华丽剑舞-桐子
33500502 0 --GGO 二刀流-桐子
#337
33700036 0 --Protoform 咲夜
33700040 0 --绝对的妖精 李斯特
......@@ -610,11 +610,10 @@
33700175 0 --朱雀的净化
33700186 0 --动物朋友 九州长尾林鸮
33700200 0 --天降妹抖 VIVIT
33700311 2 --慧心花姬 翠
33700405 1 --切缘
33700746 0 --动物朋友 白头鹰&苍鹰&游隼
33700747 0 --动物朋友 黑背胡狼
33700784 1 --VOICEROID
33700784 2 --VOICEROID
33700785 0 --VOICEROID
33700786 0 --VOICEROID 俊子
33700787 0 --VOICEROID 切蒲英
......@@ -634,6 +633,7 @@
33700902 0 --磷光的荒野 ~旅途开始之地~
33700929 0 --豪赌一发?!
33700352 0 --虚拟YouTuber 猫宫Hinata
33700028 0 --Proto-Protoform
#345
34503020 1 --仰望星空的少女
34503030 1 --憧憬星空的少女
......@@ -644,7 +644,6 @@
34511200 0 --月岛夕莉
#375
37564012 0 --元灵毁灭者·Aya Ayane
37564023 2 --天空元灵·翠黛伦
37564041 0 --阎-少女之梦·虚无的世界
37564307 0 --隐藏这片叶子
37564308 1 --Black Lotus
......@@ -788,6 +787,7 @@
53799018 0 --仰望地面而诅咒幸福的桥姬
53799021 0 --束缚丝线而操纵人形的魔女
53799040 1 --第三种存在
53799041 0 --霁望龙护者
#573
57300012 1 --库拉丽丝-心配
57320001 2 --少女人偶师·穆森
......@@ -797,7 +797,6 @@
57320013 1 --少女人偶师·幽幽
57340001 0 --灵樱的永眠
#601
60150901 2 --FantasiaT Origin
60150919 2 --FantasiaT the Temptation of Mona
60150931 1 --Unlimited Cloister
60150932 1 --FT the Ice Sill
......@@ -834,7 +833,6 @@
62210002 0 --赤百合与骷髅与初梦的他
#650-1
65000000 0 --副语音乐家 克兰贝莉
65010034 0 --幻梦迷境 羽菜
65010042 0 --幻梦迷境 小玉
65010051 0 --幻梦迷境 硬芯爱丽丝
65010074 0 --终末旅者指挥 海勒
......@@ -896,8 +894,6 @@
65050146 1 --闪耀侍者换装打扮
65050121 2 --闪耀侍者 烦恼之黄铁
65020044 1 --暮色居城 不祥
65020102 2 --三千幻花 丽蝶
65020150 2 --一页曲形-神使-
65040012 2 --逆海长龙
65040046 0 --深晦的原海
65071159 0 --光之种
......@@ -919,7 +915,7 @@
75646414 1 --Sweet Ice Cream 鹿乃
75646137 2 --幻海的祈灵者
75646159 0 --崩坏神格 樱华
75646407 1 --极北星辰 鹿乃
75646407 0 --极北星辰 鹿乃
75646408 1 --HelloHow are you 鹿乃
75646410 2 --Walk This Way!鹿乃
75646413 2 --Good Hello 鹿乃
......@@ -933,11 +929,12 @@
75646618 1 --幻海深渊 伊瑟琳
75646534 0 --神权 安洁利亚
75646900 1 --变色龙发卡
75646401 1 --Nowhere 鹿乃
75646401 0 --Nowhere 鹿乃
75646418 2 --Day by Day 鹿乃
75646423 2 --Hope 鹿乃
75646611 1 --科学的原点 PAIN
75646546 1 --终末之死斑
75646419 0 --Alstroemeria 鹿乃
#761
76121011 0 --记忆森林-艾琳
#777
......@@ -955,8 +952,6 @@
81011102 2 --橘花音·午后之音
81019012 2 --逆流茶会
81009024 2 --风纪委员·冴岛清美
81015001 2 --偶像·北上丽花
81015005 2 --完美老师·北上丽花
81015011 1 --MS-765改·北上丽花
81015012 2 --思想者·北上丽花
81015016 2 --上课小动作·北上丽花
......@@ -965,12 +960,7 @@
81040016 2 --警戒地带·周子
81040022 2 --每日锻炼·周子
81040037 1 --冬日回忆·周子
81040019 2 --周子·红叶秋风
81041016 2 --那一片真实的天空
81041024 2 --国见洸太郎 & 四条凛香
81011008 2 --薇薇安·伊文捷琳 ω
81011104 2 --橘花音·约会之音
81011110 2 --宫水静香
81011119 2 --橘花音·弥足之音
81000004 1 --大轮之华·桑山千雪
81010027 1 --高空坠落
......@@ -981,11 +971,9 @@
81011044 1 --落花邀约·梦前菜菜
81019017 1 --小恶魔·SUKIA
81014027 0 --薇薇安·伊文捷琳 θ
81005023 2 --谢礼 momoko
81005032 2 --八宫一月
81005033 2 --八宫一月·夜
81005035 1 --八宫一月·朝
81005036 2 --八宫·一月
81005035 2 --八宫一月·朝
81005061 2 --一月·八宫
81011053 0 --水晶艾蕾娜·花海
81006022 1 --身负枷锁的魔女
......@@ -1027,6 +1015,9 @@
82228497 0 --战之精灵王 盖亚
82228498 0 --暗之精灵王 布莱克
82228499 1 --超能之精灵王 缪斯
#870
87090001 0 --喜欢呱太的猫掌柜
87090002 0 --白绯八岐大蛇
#889
88946426 0 --折幸 智语
88946425 0 --折幸 压制
......
expansions/pics/1000364.jpg

88.1 KB | W: | H:

expansions/pics/1000364.jpg

81 KB | W: | H:

expansions/pics/1000364.jpg
expansions/pics/1000364.jpg
expansions/pics/1000364.jpg
expansions/pics/1000364.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/1000370.jpg

62 KB | W: | H:

expansions/pics/1000370.jpg

90.1 KB | W: | H:

expansions/pics/1000370.jpg
expansions/pics/1000370.jpg
expansions/pics/1000370.jpg
expansions/pics/1000370.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -101,10 +101,10 @@ function c1000406.hsptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c1000406.hspop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(1000406,0))
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(1000406,0))
end
end
function c1000406.cfilter1(c)
......
--罪恶王冠 樱满集
function c1008001.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--change target and destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1008001,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c1008001.tgcon)
e1:SetOperation(c1008001.tgop)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1008001,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetTarget(c1008001.sptg)
e3:SetOperation(c1008001.spop)
c:RegisterEffect(e3)
--void
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(1008001,3))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(c1008001.target)
e5:SetOperation(c1008001.activate)
c:RegisterEffect(e5)
--void back
-- local e6=Effect.CreateEffect(c)
-- e6:SetDescription(aux.Stringid(1008001,6))
-- e6:SetType(EFFECT_TYPE_IGNITION)
-- e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
-- e6:SetRange(LOCATION_MZONE)
-- e6:SetCountLimit(1)
-- e6:SetTarget(c1008001.vbtg)
-- e6:SetOperation(c1008001.vbop)
-- c:RegisterEffect(e6)
end
function c1008001.tcfilter(c,tp)
return c:IsCode(1008002) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsFaceup()
end
function c1008001.tgcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end--rp==tp or
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or not g:IsExists(c1008001.tcfilter,1,nil,tp) then return false end
local tc=g:GetFirst()
while tc and not tc:GetCode()==1008002 do
tc=g:GetNext()
end
if tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsLocation(LOCATION_MZONE) or not tc:GetCode()==1008002 then return false end
e:SetLabelObject(tc)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetLabelObject():IsAbleToDeck()
end
function c1008001.dfilter(c)
return c:IsDestructable() and not ((c:IsSetCard(0x320e) or c:IsSetCard(0x520e)) and c:IsFaceup())
end
function c1008001.tgop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SendtoDeck(e:GetLabelObject(),nil,2,REASON_EFFECT)
Duel.BreakEffect()
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 or not Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)then return end
local sg=Duel.GetMatchingGroup(c1008001.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if sg and sg:GetCount()>0 then
ct=Duel.Destroy(sg,REASON_EFFECT)
if c:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*200)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
function c1008001.sfilter(c,e,tp)
return c:IsSetCard(0x320e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(1008001)
end
function c1008001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1008001.sfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c1008001.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,c1008001.sfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
end
function c1008001.vfilter(c,e,tp)
return (c:IsCode(1008014) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1)
or ((c:IsSetCard(0x320e)and c:GetCode()~=1008014) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and c:GetFlagEffect(10080011)==0 and c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:GetCode()~=1008001
end
function c1008001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) (chkc:IsCode(1008014) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1)
or ((chkc:IsSetCard(0x320e)and chkc:GetCode()~=1008014) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and chkc:GetFlagEffect(10080011)==0 and chkc:IsFaceup() and chkc:IsType(TYPE_MONSTER) and chkc:GetCode()~=1008001 end
if chk==0 then return Duel.IsExistingTarget(c1008001.vfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c1008001.vfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c1008001.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if (tc:IsCode(1008014) and Duel.GetLocationCount(tp,LOCATION_MZONE)<2)
or ((tc:IsSetCard(0x320e)and tc:GetCode()~=1008014) and Duel.GetLocationCount(tp,LOCATION_SZONE)<1) then return false end
if tc:IsFaceup() then
Duel.RaiseSingleEvent(tc,1008001,e,0,0,0,0)
end
end
-- function c1008001.vbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
-- if chk==0 then return Duel.IsExistingTarget(c1008001.tgfilter2,tp,LOCATION_MZONE,0,1,nil) end
-- local g=Duel.SelectTarget(tp,c1008001.tgfilter2,tp,LOCATION_MZONE,0,1,1,nil)
-- end
-- function c1008001.tgfilter2(c)
-- return c:IsSetCard(0xf9) and c:IsFaceup() and not c:IsCode(1008001) and c:GetFlagEffect(10080011)~=0 and c:GetCardTargetCount()~=0
-- end
-- function c1008001.vbop(e,tp,eg,ep,ev,re,r,rp)
-- local tc=Duel.GetFirstTarget()
-- if tc:GetCardTargetCount()==0 then return false end
-- if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetFlagEffect(10080011)~=0 then
-- Duel.RaiseSingleEvent(tc,10080011,e,0,0,0,0)
-- Duel.Destroy(tc:GetFirstCardTarget(),REASON_EFFECT)
-- end
-- end
\ No newline at end of file
--罪恶王冠 楪祈
function c1008002.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetOperation(c1008002.bgm)
c:RegisterEffect(e0)
--change target
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1008002,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c1008002.tgcon)
e1:SetTarget(c1008002.sptg)
e1:SetOperation(c1008002.tgop)
c:RegisterEffect(e1)
--change battle target
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1008002,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(c1008002.cbcon)
e2:SetTarget(c1008002.sptg)
e2:SetOperation(c1008002.cbop)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_PZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x320e))
e3:SetValue(300)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--creat void
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(1008002,1))
e5:SetCategory(CATEGORY_EQUIP)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_SINGLE)
e5:SetCode(1008001)
e5:SetRange(LOCATION_MZONE)
e5:SetTarget(c1008002.voidtg)
e5:SetOperation(c1008002.voidop)
c:RegisterEffect(e5)
--pendulum set
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(4104,0))
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_MZONE)
e6:SetCost(c1008002.thcost)
e6:SetTarget(c1008002.thtg)
e6:SetOperation(c1008002.thop)
c:RegisterEffect(e6)
end
function c1008002.bgm(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(1008002,3))
end
function c1008002.cbcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
return c~=tc and tc:IsFaceup() and tc:IsControler(tp)and tc:IsSetCard(0x320e) and tc:GetCode()~=1008002
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c1008002.cbcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
return c~=tc and tc:IsFaceup() and tc:IsControler(tp)and tc:IsSetCard(0x320e) and tc:GetCode()~=1008002
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c1008002.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,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_PZONE)
end
function c1008002.cbop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP)>0 then
Duel.BreakEffect()
Duel.ChangeAttackTarget(e:GetHandler())
end
end
function c1008002.tgcon(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()~=1 then return false end
local tc=g:GetFirst()
if tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsLocation(LOCATION_MZONE)or not tc:IsSetCard(0x320e)
or tc:GetCode()==1008002 then return false end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c1008002.tgop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local c=e:GetHandler()
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)>0 and c:IsFaceup() then
Duel.BreakEffect()
local g=Group.CreateGroup()
g:AddCard(c)
Duel.ChangeTargetCard(ev,g)
end
end
function c1008002.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 c1008002.penfilter(c,tp)
return c:IsSetCard(0x320e) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c1008002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local a1=(Duel.GetFieldCard(tp,LOCATION_SZONE,6))
local a2=(Duel.GetFieldCard(tp,LOCATION_SZONE,7))
if chk==0 then return Duel.IsExistingMatchingCard(c1008002.penfilter,tp,LOCATION_DECK,0,1,nil,tp)
and not (a1 and a2) end
end
function c1008002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(1008002,4))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1008002,2))
local tc=Duel.SelectMatchingCard(tp,c1008002.penfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
local fc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6)
local fc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7)
if fc1 and fc2 then return end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function c1008002.voidfilter(c)
return c:IsSetCard(0x320e) and c:IsFaceup()
end
function c1008002.voidtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c1008002.voidfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():IsLocation(LOCATION_MZONE) and e:GetHandler():IsFaceup() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
Duel.Hint(8,tp,1008004)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Duel.SelectTarget(tp,c1008002.voidfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
function c1008002.voidop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
c:RegisterFlagEffect(10080011,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(1008001,4))
local token=Duel.CreateToken(tp,1008004)
Duel.MoveToField(token,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
token:CancelToGrave()
local e1_1=Effect.CreateEffect(token)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CHANGE_TYPE)
e1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_1:SetValue(TYPE_EQUIP+TYPE_SPELL)
e1_1:SetReset(RESET_EVENT+0x1fc0000)
token:RegisterEffect(e1_1,true)
local e1_2=Effect.CreateEffect(token)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_EQUIP_LIMIT)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetValue(1)
token:RegisterEffect(e1_2,true)
token:CancelToGrave()
if Duel.Equip(tp,token,tc,false) then
local e1_3=Effect.CreateEffect(c)
e1_3:SetType(EFFECT_TYPE_EQUIP)
e1_3:SetCode(EFFECT_UPDATE_ATTACK)
e1_3:SetValue(700)
token:RegisterEffect(e1_3,true)
local e1_4=Effect.CreateEffect(c)
e1_4:SetType(EFFECT_TYPE_EQUIP)
e1_4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1_4:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e1_4:SetValue(1)
token:RegisterEffect(e1_4,true)
local e1_5=Effect.CreateEffect(c)
e1_5:SetType(EFFECT_TYPE_EQUIP)
e1_5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1_5:SetValue(1)
token:RegisterEffect(e1_5,true)
local e1_6=Effect.CreateEffect(c)
e1_6:SetDescription(aux.Stringid(11471117,0))
e1_6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1_6:SetCategory(CATEGORY_REMOVE)
e1_6:SetCode(EVENT_BATTLED)
e1_6:SetRange(LOCATION_SZONE)
e1_6:SetCondition(c1008002.rmcon)
e1_6:SetTarget(c1008002.rmtg)
e1_6:SetOperation(c1008002.rmop)
token:RegisterEffect(e1_6,true)
else
Duel.SendtoGrave(token,REASON_RULE)
end
end
end
function c1008002.rmcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
local c=e:GetHandler():GetEquipTarget()
local bc=c:GetBattleTarget()
return d and (a==c or d==c) and bc and bit.band(bc:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c1008002.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tc=e:GetHandler():GetEquipTarget():GetBattleTarget()
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
end
function c1008002.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--罪恶王冠 樱满真名
function c1008007.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--actlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c1008007.actcon)
e1:SetOperation(c1008007.actop)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetCode(EVENT_BE_BATTLE_TARGET)
c:RegisterEffect(e3)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x520e))
e2:SetValue(c1008007.efilter)
c:RegisterEffect(e2)
--send to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c1008007.target)
e4:SetOperation(c1008007.operation)
c:RegisterEffect(e4)
--creat void
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(1008002,1))
e5:SetCategory(CATEGORY_EQUIP)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_SINGLE)
e5:SetCode(1008001)
e5:SetRange(LOCATION_MZONE)
e5:SetTarget(c1008007.voidtg)
e5:SetOperation(c1008007.voidop)
c:RegisterEffect(e5)
end
function c1008007.actcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
return tc and tc:IsControler(tp) and tc:IsSetCard(0x320e)
end
function c1008007.actop(e,tp,eg,ep,ev,re,r,rp)
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(1)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
function c1008007.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() --and re:IsActiveType(TYPE_SPELL)
end
function c1008007.reptarget(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetDestination()==LOCATION_GRAVE end
return true
end
function c1008007.repoperation(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
function c1008007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleTohand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleTohand,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingTarget(c1008007.xfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsAbleTohand,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c1008007.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local seq=tc:GetSequence()
if tc:IsControler(1-tp) then seq=seq+16 end
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetLabel(seq)
e1:SetCondition(c1008007.discon)
e1:SetOperation(c1008007.disop)
e1:SetReset(0)
Duel.RegisterEffect(e1,tp)
end
end
function c1008007.xfilter(c)
return c:IsFaceup() and c:IsSetCard(0x320e)
end
function c1008007.discon(e)
if Duel.IsExistingMatchingCard(c1008007.xfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) then
return true
end
e:Reset()
return false
end
function c1008007.disop(e,tp)
return bit.lshift(0x1,e:GetLabel())
end
function c1008007.voidfilter(c)
return c:IsSetCard(0x320e) and c:IsFaceup()
end
function c1008007.voidtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c1008007.voidfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():IsLocation(LOCATION_MZONE) and e:GetHandler():IsFaceup() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
Duel.Hint(8,tp,1008009)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Duel.SelectTarget(tp,c1008007.voidfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
function c1008007.voidop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
c:RegisterFlagEffect(10080011,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(1008001,4))
local token=Duel.CreateToken(tp,1008009)
Duel.MoveToField(token,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
token:CancelToGrave()
local e1_1=Effect.CreateEffect(token)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CHANGE_TYPE)
e1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_1:SetValue(TYPE_EQUIP+TYPE_SPELL)
e1_1:SetReset(RESET_EVENT+0x1fc0000)
token:RegisterEffect(e1_1,true)
local e1_2=Effect.CreateEffect(token)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_EQUIP_LIMIT)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetValue(1)
token:RegisterEffect(e1_2,true)
token:CancelToGrave()
if Duel.Equip(tp,token,tc,false) then
local e1_3=Effect.CreateEffect(c)
e1_3:SetType(EFFECT_TYPE_EQUIP)
e1_3:SetCode(EFFECT_UPDATE_ATTACK)
e1_3:SetValue(700)
token:RegisterEffect(e1_3,true)
local e1_4=Effect.CreateEffect(c)
e1_4:SetType(EFFECT_TYPE_EQUIP)
e1_4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1_4:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e1_4:SetValue(1)
token:RegisterEffect(e1_4,true)
local e1_5=Effect.CreateEffect(c)
e1_5:SetType(EFFECT_TYPE_EQUIP)
e1_5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1_5:SetValue(1)
token:RegisterEffect(e1_5,true)
local e1_6=Effect.CreateEffect(c)
e1_6:SetDescription(aux.Stringid(11471117,0))
e1_6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1_6:SetCategory(CATEGORY_REMOVE)
e1_6:SetCode(EVENT_BATTLED)
e1_6:SetRange(LOCATION_SZONE)
e1_6:SetCondition(c1008007.rmcon)
e1_6:SetTarget(c1008007.rmtg)
e1_6:SetOperation(c1008007.rmop)
token:RegisterEffect(e1_6,true)
else
Duel.SendtoGrave(token,REASON_RULE)
end
end
end
function c1008007.rmcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
local c=e:GetHandler():GetEquipTarget()
local bc=c:GetBattleTarget()
return d and (a==c or d==c) and bc and bit.band(bc:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c1008007.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tc=e:GetHandler():GetEquipTarget():GetBattleTarget()
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
end
function c1008007.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--罪恶王冠 恙神涯
function c1008010.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x320e),4,2)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--xyz summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1008010,3))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c1008010.thcost)
e2:SetTarget(c1008010.thtg)
e2:SetOperation(c1008010.thop)
c:RegisterEffect(e2)
--sp summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1008010,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_SPSUMMON_SUCCESS)
e1:SetCondition(c1008010.psumcon)
e1:SetTarget(c1008010.psumtg)
e1:SetOperation(c1008010.psumop)
c:RegisterEffect(e1)
--spsummon self
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1008010,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(c1008010.spcon)
e2:SetTarget(c1008010.sptg)
e2:SetOperation(c1008010.spop)
c:RegisterEffect(e2)
--pendulum
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCondition(c1008010.sccon)
e4:SetTarget(c1008010.pentg)
e4:SetOperation(c1008010.penop)
c:RegisterEffect(e4)
--creat void
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(1008010,1))
e5:SetCategory(CATEGORY_EQUIP)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_SINGLE)
e5:SetCode(1008001)
e5:SetRange(LOCATION_MZONE)
e5:SetTarget(c1008010.voidtg)
e5:SetOperation(c1008010.voidop)
c:RegisterEffect(e5)
--spsummon limit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_SPSUMMON_CONDITION)
e5:SetRange(LOCATION_EXTRA)
e5:SetCondition(c1008010.spcon1)
e5:SetValue(c1008010.splimit)
c:RegisterEffect(e5)
end
c1008010.pendulum_level=4
function c1008010.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c1008010.thfilter(c)
return c:IsSetCard(0x320e) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1008010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1008010.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1008010.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1008010.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(1008010,2)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1008010.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1008010.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
--Duel.SetTargetCard(g)
if g:GetCount()==1 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_REMOVED)
g:GetFirst():RegisterEffect(e1,true)
end
end
end
function c1008010.psumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()~=SUMMON_TYPE_XYZ
end
function c1008010.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x320e) and c:IsType(TYPE_MONSTER)
end
function c1008010.psumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c1008010.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c1008010.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c1008010.psumop(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)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
end
function c1008010.selffilter(c)
return c:IsSetCard(0x320e) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_PENDULUM)
end
function c1008010.spcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c1008010.selffilter,1,nil,1008007)
end
function c1008010.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 c1008010.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP)
end
end
function c1008010.sccon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end
function c1008010.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local lsc=Duel.GetFieldCard(tp,LOCATION_SZONE,6)
local rsc=Duel.GetFieldCard(tp,LOCATION_SZONE,7)
local g=Group.FromCards(lsc,rsc)--:Filter(Card.IsDestructable,nil)
if chk==0 then return g:GetCount()<2 end
end
function c1008010.penop(e,tp,eg,ep,ev,re,r,rp)
local lsc=Duel.GetFieldCard(tp,LOCATION_SZONE,6)
local rsc=Duel.GetFieldCard(tp,LOCATION_SZONE,7)
local g=Group.FromCards(lsc,rsc)
if g:GetCount()<2 then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function c1008010.voidfilterc(c)
return c:IsSetCard(0x320e) and c:IsFaceup()
end
function c1008010.voidtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c1008010.voidfilterc,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():IsLocation(LOCATION_MZONE) and e:GetHandler():IsFaceup() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
Duel.Hint(8,tp,1008012)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Duel.SelectTarget(tp,c1008010.voidfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
function c1008010.voidop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
c:RegisterFlagEffect(10080011,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(1008001,4))
local token=Duel.CreateToken(tp,1008012)
Duel.MoveToField(token,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
token:CancelToGrave()
local e1_1=Effect.CreateEffect(token)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CHANGE_TYPE)
e1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_1:SetValue(TYPE_EQUIP+TYPE_SPELL)
e1_1:SetReset(RESET_EVENT+0x1fc0000)
token:RegisterEffect(e1_1,true)
local e1_2=Effect.CreateEffect(token)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_EQUIP_LIMIT)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetValue(1)
token:RegisterEffect(e1_2,true)
token:CancelToGrave()
if Duel.Equip(tp,token,tc,false) then
local e1_3=Effect.CreateEffect(c)
e1_3:SetDescription(aux.Stringid(1008012,0))
e1_3:SetType(EFFECT_TYPE_IGNITION)
e1_3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1_3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1_3:SetRange(LOCATION_SZONE)
e1_3:SetCountLimit(1,10080101)
e1_3:SetTarget(c1008010.attg)
e1_3:SetOperation(c1008010.atop)
token:RegisterEffect(e1_3,true)
--void
local e1_4=Effect.CreateEffect(c)
e1_4:SetDescription(aux.Stringid(1008001,3))
e1_4:SetType(EFFECT_TYPE_IGNITION)
e1_4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1_4:SetRange(LOCATION_SZONE)
e1_4:SetCountLimit(1,10080102)
e1_4:SetTarget(c1008010.target)
e1_4:SetOperation(c1008010.activate)
token:RegisterEffect(e1_4,true)
else
Duel.SendtoGrave(token,REASON_RULE)
end
end
end
function c1008010.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,1008013,0x520e,0x4011,1000,1000,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c1008010.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<1 or not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e)
and Duel.IsPlayerCanSpecialSummonMonster(tp,1008013,0x520e,0x4011,1000,1000,1,RACE_FIEND,ATTRIBUTE_DARK) then
local token=Duel.CreateToken(tp,1008013)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP)
tc:SetCardTarget(token)
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(tc)
e1:SetDescription(aux.Stringid(1008001,4))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(10080011,RESET_EVENT+0x1fe0000,0,1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c1008010.desop)
tc:RegisterEffect(e2,true)
--Destroy2
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c1008010.descon2)
e3:SetOperation(c1008010.desop2)
tc:RegisterEffect(e3,true)
end
end
function c1008010.desfilter(c,rc)
return rc:IsHasCardTarget(c)
end
function c1008010.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1008010.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
Duel.Destroy(g,REASON_RULE)
end
function c1008010.dfilter(c,sg)
return sg:IsContains(c)
end
function c1008010.descon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetCardTargetCount()==0 then return false end
return c:GetCardTarget():IsExists(c1008010.dfilter,1,nil,eg)
end
function c1008010.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_RULE)
end
function c1008010.vfilter(c,e,tp)
return (c:IsCode(1008014) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1)
or ((c:IsSetCard(0x320e)and c:GetCode()~=1008014 and c:GetCode()~=1008001) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and c:GetFlagEffect(10080011)==0 and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c1008010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c1008010.vfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c1008010.vfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c1008010.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if (tc:IsCode(1008014) and Duel.GetLocationCount(tp,LOCATION_MZONE)<2)
or ((tc:IsSetCard(0x320e)and tc:GetCode()~=1008014 and tc:GetCode()~=1008001) and Duel.GetLocationCount(tp,LOCATION_SZONE)<1) then return false end
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.RaiseSingleEvent(tc,1008001,e,0,0,0,0)
local e1=Effect.CreateEffect(tc)
e1:SetDescription(aux.Stringid(1008001,4))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(10080011,RESET_EVENT+0x1fe0000,0,1)
end
end
function c1008010.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup()
end
function c1008010.splimit(e,se,sp,st)
return e:GetHandler():IsStatus(STATUS_PROC_COMPLETE) and bit.band(st,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
\ No newline at end of file
--void-剑
function c277611.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c277611.target)
e1:SetOperation(c277611.operation)
c:RegisterEffect(e1)
--Atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(700)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c277611.eqlimit)
c:RegisterEffect(e3)
--destroy sub
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e4:SetValue(1)
c:RegisterEffect(e4)
--Untargetable
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetValue(1)
c:RegisterEffect(e5)
--battle indestructable
local e6=e5:Clone()
e6:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e6)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11471117,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetCode(EVENT_BATTLED)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c277611.rmcon)
e3:SetTarget(c277611.rmtg)
e3:SetOperation(c277611.rmop)
c:RegisterEffect(e3)
end
function c277611.eqlimit(e,c)
return c:IsSetCard(0x320e)
end
function c277611.filter(c)
return c:IsFaceup() and c:IsSetCard(0x320e)
end
function c277611.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c277611.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c277611.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c277611.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c277611.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c277611.rmcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
local c=e:GetHandler():GetEquipTarget()
local bc=c:GetBattleTarget()
return d and (a==c or d==c) and bc and bit.band(bc:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c277611.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tc=e:GetHandler():GetEquipTarget():GetBattleTarget()
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
end
function c277611.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--罪恶王冠 校条祭
function c1008014.initial_effect(c)
--void
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1008014,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_QUICK_O)
e1:SetCode(1008001)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c1008014.tg)
e1:SetOperation(c1008014.op)
c:RegisterEffect(e1)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(1008014,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetCountLimit(1,10080142)
e5:SetTarget(c1008014.sptg)
e5:SetOperation(c1008014.spop)
c:RegisterEffect(e5)
end
function c1008014.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,1008016,0x320e,0x4011,0,2100,6,RACE_FAIRY,ATTRIBUTE_LIGHT)
and e:GetHandler():IsLocation(LOCATION_MZONE) and e:GetHandler():IsFaceup() end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c1008014.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 or not c:IsRelateToEffect(e) then return end
if not c:IsLocation(LOCATION_MZONE) or not c:IsFaceup() then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,1008016,0x320e,0x4011,0,2100,6,RACE_FAIRY,ATTRIBUTE_LIGHT) then
c:RegisterFlagEffect(10080011,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(1008001,4))
local token=Duel.CreateToken(tp,1008016)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
c:SetCardTarget(token)
local token2=Duel.CreateToken(tp,1008017)
Duel.SpecialSummonStep(token2,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
c:SetCardTarget(token2)
Duel.SpecialSummonComplete()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c1008014.vtg)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e2)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c1008014.desop)
c:RegisterEffect(e2,true)
--Destroy2
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c1008014.descon2)
e3:SetOperation(c1008014.desop2)
c:RegisterEffect(e3,true)
end
end
function c1008014.vtg(e,c)
local g=Duel.GetMatchingGroup(Card.IsCode,0,LOCATION_MZONE,LOCATION_MZONE,nil,1008016)
if g:GetCount()<2 then return false end
local maxs=g:GetMaxGroup(Card.GetSequence):GetFirst():GetSequence()
local mins=g:GetMinGroup(Card.GetSequence):GetFirst():GetSequence()
return c:GetSequence()>mins and c:GetSequence()<maxs and c:IsFaceup() and c:IsSetCard(0x320e)
end
function c1008014.desfilter(c,rc)
return rc:IsHasCardTarget(c)
end
function c1008014.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1008014.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
Duel.Destroy(g,REASON_RULE)
end
function c1008014.dfilter(c,sg)
return sg:IsContains(c)
end
function c1008014.descon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetCardTargetCount()==0 then return false end
return c:GetCardTarget():IsExists(c1008014.dfilter,1,nil,eg) and re and not re:GetHandler():IsSetCard(0x320e)
end
function c1008014.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_RULE)
end
function c1008014.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1008014.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end
function c1008014.spfilter(c,e,tp)
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x320e)
end
function c1008014.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c1008014.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--void-枪
function c277615.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--void token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(277615,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,2776151)
e2:SetTarget(c277615.attg)
e2:SetOperation(c277615.atop)
c:RegisterEffect(e2)
--void
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(1008001,3))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1,2776152)
e5:SetTarget(c277615.target)
e5:SetOperation(c277615.activate)
c:RegisterEffect(e5)
end
function c277615.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,1008017,0x520e,0x4011,1000,1000,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c277615.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<1 or not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e)
and Duel.IsPlayerCanSpecialSummonMonster(tp,1008017,0x520e,0x4011,1000,1000,1,RACE_FIEND,ATTRIBUTE_DARK) then
local token=Duel.CreateToken(tp,1008017)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP)
tc:SetCardTarget(token)
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(tc)
e1:SetDescription(aux.Stringid(1008001,4))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(10080011,RESET_EVENT+0x1fe0000,0,1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c277615.desop)
tc:RegisterEffect(e2,true)
--Destroy2
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c277615.descon2)
e3:SetOperation(c277615.desop2)
tc:RegisterEffect(e3,true)
end
end
function c277615.desfilter(c,rc)
return rc:IsHasCardTarget(c)
end
function c277615.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c277615.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
Duel.Destroy(g,REASON_RULE)
end
function c277615.dfilter(c,sg)
return sg:IsContains(c)
end
function c277615.descon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetCardTargetCount()==0 then return false end
return c:GetCardTarget():IsExists(c277615.dfilter,1,nil,eg)
end
function c277615.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_RULE)
end
function c277615.vfilter(c,e,tp)
return (c:IsCode(1008004) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1)
or ((c:IsSetCard(0x320e)and c:GetCode()~=1008004 and c:GetCode()~=1008001) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and c:GetFlagEffect(10080011)==0 and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c277615.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c277615.vfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c277615.vfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c277615.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if (tc:IsCode(1008004) and Duel.GetLocationCount(tp,LOCATION_MZONE)<2)
or ((tc:IsSetCard(0x320e)and tc:GetCode()~=1008004 and tc:GetCode()~=1008001) and Duel.GetLocationCount(tp,LOCATION_SZONE)<1) then return false end
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.RaiseSingleEvent(tc,1008001,e,0,0,0,0)
local e1=Effect.CreateEffect(tc)
e1:SetDescription(aux.Stringid(1008001,4))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(10080011,RESET_EVENT+0x1fe0000,0,1)
end
end
\ No newline at end of file
--Guilty Crown
function c1008021.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c1008021.target)
e1:SetOperation(c1008021.operation)
c:RegisterEffect(e1)
--Atk Change
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_SET_ATTACK)
e2:SetValue(c1008021.value)
c:RegisterEffect(e2)
--Disable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e3)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c1008021.eqlimit)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1008021,0))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCost(c1008021.cost)
e4:SetTarget(c1008021.thtg)
e4:SetOperation(c1008021.thop)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(1008001,3))
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetRange(LOCATION_SZONE)
e5:SetTarget(c1008021.tg)
e5:SetOperation(c1008021.op)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e6)
end
c1008021.DescSetName = 0x320e
function c1008021.filter(c)
return c:IsFaceup() and c:IsSetCard(0x320e) and c:GetBaseAttack()<=2000
end
function c1008021.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c1008021.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1008021.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c1008021.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c1008021.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c1008021.value(e,c)
return c:GetBaseAttack()*2
end
function c1008021.eqlimit(e,c)
return c:IsSetCard(0x320e) and c:GetBaseAttack()<=2000
end
function c1008021.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c1008021.thfilter(c)
return c:IsSetCard(0x320e) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1008021.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1008021.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1008021.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1008021.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c1008021.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) and eg:IsExists(c1008021.ttfilter,1,nil,e,tp) end
local g=eg:Filter(c1008021.ttfilter,nil,e,tp)
Duel.SetTargetCard(g)
end
function c1008021.ttfilter(c,e,tp)
return (c:IsCode(1008014) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1)
or ((c:IsSetCard(0x320e)and c:GetCode()~=1008014 and c:GetCode()~=1008001) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and c:IsControler(tp) and c:IsFaceup()and c:IsType(TYPE_MONSTER)
end
function c1008021.op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=eg:Filter(c1008021.ttfilter,nil,e,tp)
local tc=g:GetFirst()
while tc do
local a=0
if (tc:GetCode()==1008014 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1)
or ((tc:IsSetCard(0x320e)and tc:GetCode()~=1008014 and tc:GetCode()~=1008001) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then a=1 end
if a==1 and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.RaiseSingleEvent(tc,1008001,e,0,0,0,0)
local e1=Effect.CreateEffect(tc)
e1:SetDescription(aux.Stringid(1008001,4))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(10080011,RESET_EVENT+0x1fe0000,0,1)
end
tc=g:GetNext()
end
end
\ No newline at end of file
--Lost Christmas
function c1008022.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(96029576,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c1008022.target)
e1:SetOperation(c1008022.activate)
e1:SetCountLimit(1,1008022+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
end
function c1008022.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x320e) and c:GetLeftScale()>=4
end
function c1008022.desfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x320e) and c:GetLeftScale()<=4
end
function c1008022.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c1008022.desfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(c1008022.desfilter2,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c1008022.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c1008022.desfilter2,tp,LOCATION_MZONE,0,1,1,nil)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c1008022.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(1008022,0))
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
if Duel.Destroy(sg,REASON_EFFECT)==0 then return end
local seq=0
local og=Duel.GetOperatedGroup()
local tc=og:GetFirst()
while tc do
seq=bit.replace(seq,0x1,tc:GetPreviousSequence())
tc=og:GetNext()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetLabel(seq*0x10000)
e1:SetOperation(c1008022.disop)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c1008022.disop(e,tp)
return e:GetLabel()
end
\ No newline at end of file
--罪恶王冠 鸫
function c1008024.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetRange(LOCATION_PZONE)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetTargetRange(1,0)
e0:SetTarget(c1008024.splimit)
e0:SetCondition(c1008024.splimcon)
c:RegisterEffect(e0)
--scale change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1008024,0))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
e2:SetCondition(c1008024.sccon)
e2:SetOperation(c1008024.scop)
c:RegisterEffect(e2)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
-- e2:SetOwnerPlayer(tp)
e2:SetTarget(c1008024.limtg)
e2:SetValue(c1008024.efilter)
c:RegisterEffect(e2)
if not c1008024.global_check then
c1008024.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetRange(LOCATION_MZONE)
ge1:SetCondition(c1008024.checkcon)
ge1:SetOperation(c1008024.checkop)
c:RegisterEffect(ge1)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(ge2)
end
--creat void
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(1008024,1))
e5:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_SINGLE)
e5:SetCode(1008001)
e5:SetRange(LOCATION_MZONE)
e5:SetTarget(c1008024.voidtg)
e5:SetOperation(c1008024.voidop)
c:RegisterEffect(e5)
--synchro custom
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e7:SetTarget(c1008024.syntg)
e7:SetValue(1)
e7:SetOperation(c1008024.synop)
c:RegisterEffect(e7)
end
c1008024.tuner_filter=aux.FilterBoolFunction(Card.IsSetCard,0x320e)
function c1008024.splimit(e,c,sump,sumtype,sumpos,targetp)
if c:IsSetCard(0x320e) then return false end
return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c1008024.splimcon(e)
return not e:GetHandler():IsForbidden()
end
function c1008024.synfilter(c,syncard,tuner,f)
return c:IsFaceup() and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) and c:IsSetCard(0x320e) and (f==nil or f(c))
end
function c1008024.syntg(e,syncard,f,minc,maxc)
local c=e:GetHandler()
local lv=syncard:GetLevel()-c:GetLevel()
if lv<=0 then return false end
local g=Duel.GetMatchingGroup(c1008024.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f)
local res=g:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc,maxc,syncard)
return res
end
function c1008024.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc)
local c=e:GetHandler()
local lv=syncard:GetLevel()-c:GetLevel()
local g=Duel.GetMatchingGroup(c1008024.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local sg=g:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,minc,maxc,syncard)
Duel.SetSynchroMaterial(sg)
end
function c1008024.sccon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq)
return tc and tc:IsSetCard(0x320e) and Duel.IsExistingTarget(c1008024.scfilter,tp,LOCATION_EXTRA,0,1,nil)
end
function c1008024.scfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function c1008024.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.SelectTarget(tp,c1008024.scfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LSCALE)
e1:SetValue(tc:GetOriginalLeftScale())
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RSCALE)
e2:SetValue(tc:GetOriginalRightScale())
c:RegisterEffect(e2)
end
function c1008024.checkcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler())
end
function c1008024.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
tc:RegisterFlagEffect(10080240,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function c1008024.limtg(e,c)
return c:IsSetCard(0x320e) and c:GetFlagEffect(10080240)~=0
end
function c1008024.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c1008024.voidfilter(c)
return c:IsSetCard(0x320e) and c:IsFaceup()
end
function c1008024.voidtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c1008024.voidfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():IsLocation(LOCATION_MZONE) and e:GetHandler():IsFaceup() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
Duel.Hint(8,tp,1008026)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Duel.SelectTarget(tp,c1008024.voidfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
function c1008024.voidop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
c:RegisterFlagEffect(10080011,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(1008001,4))
local token=Duel.CreateToken(tp,1008026)
Duel.MoveToField(token,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
token:CancelToGrave()
local e1_1=Effect.CreateEffect(token)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CHANGE_TYPE)
e1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_1:SetValue(TYPE_EQUIP+TYPE_SPELL)
e1_1:SetReset(RESET_EVENT+0x1fc0000)
token:RegisterEffect(e1_1,true)
local e1_2=Effect.CreateEffect(token)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_EQUIP_LIMIT)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetValue(1)
token:RegisterEffect(e1_2,true)
token:CancelToGrave()
if Duel.Equip(tp,token,tc,false) then
local e1_3=Effect.CreateEffect(c)
e1_3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1_3:SetType(EFFECT_TYPE_IGNITION)
e1_3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1_3:SetRange(LOCATION_SZONE)
e1_3:SetTarget(c1008024.target)
e1_3:SetOperation(c1008024.activate)
token:RegisterEffect(e1_3,true)
else
Duel.SendtoGrave(token,REASON_RULE)
end
end
end
function c1008024.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and Card.IsFaceup(chkc) end
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,1008039,0,0x4023,1000,1000,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c1008024.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)<1 then return end
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,1008039,0,0x4023,1000,1000,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsType(TYPE_TOKEN) then
local gl=c:GetOwnerTarget()
local link=gl:GetFirst()
c:AddMonsterAttribute(TYPE_SPELL)
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
if link and link:IsLocation(LOCATION_MZONE) then
link:SetCardTarget(c)
end
local code=tc:GetOriginalCode()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1008024,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
c:RegisterEffect(e1)
if not tc:IsType(TYPE_TRAPMONSTER) then
c:CopyEffect(code,RESET_EVENT+0x1fe0000,1)
end
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--罪恶王冠 筱宫绫濑
function c1008027.initial_effect(c)
--creat void
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(1008027,1))
e5:SetCategory(CATEGORY_EQUIP)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_SINGLE)
e5:SetCode(1008001)
e5:SetRange(LOCATION_MZONE)
e5:SetTarget(c1008027.voidtg)
e5:SetOperation(c1008027.voidop)
c:RegisterEffect(e5)
end
function c1008027.voidfilter(c)
return c:IsSetCard(0x320e) and c:IsFaceup()
end
function c1008027.voidtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c1008027.voidfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():IsLocation(LOCATION_MZONE) and e:GetHandler():IsFaceup() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
Duel.Hint(8,tp,1008029)
local g=Duel.SelectTarget(tp,c1008027.voidfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c1008027.voidop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
c:RegisterFlagEffect(10080011,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(1008001,4))
local token=Duel.CreateToken(tp,1008029)
Duel.MoveToField(token,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
token:CancelToGrave()
local e1_1=Effect.CreateEffect(token)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CHANGE_TYPE)
e1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_1:SetValue(TYPE_EQUIP+TYPE_SPELL)
e1_1:SetReset(RESET_EVENT+0x1fc0000)
token:RegisterEffect(e1_1,true)
local e1_2=Effect.CreateEffect(token)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_EQUIP_LIMIT)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetValue(1)
token:RegisterEffect(e1_2,true)
token:CancelToGrave()
if Duel.Equip(tp,token,tc,false) then
--Atk Def up
local e1_3=Effect.CreateEffect(c)
e1_3:SetType(EFFECT_TYPE_EQUIP)
e1_3:SetCode(EFFECT_UPDATE_ATTACK)
e1_3:SetValue(500)
token:RegisterEffect(e1_3,true)
e1_4=e1_3:Clone()
e1_4:SetCode(EFFECT_UPDATE_DEFENSE)
token:RegisterEffect(e1_4,true)
--battle Untargetable
local e1_5=Effect.CreateEffect(c)
e1_5:SetType(EFFECT_TYPE_EQUIP)
e1_5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1_5:SetValue(1)
token:RegisterEffect(e1_5,true)
--direct attack
local e1_6=Effect.CreateEffect(c)
e1_6:SetType(EFFECT_TYPE_EQUIP)
e1_6:SetCode(EFFECT_DIRECT_ATTACK)
token:RegisterEffect(e1_6,true)
--damage reduce
local e1_7=Effect.CreateEffect(c)
e1_7:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1_7:SetRange(LOCATION_SZONE)
e1_7:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1_7:SetCondition(c1008027.rdcon)
e1_7:SetOperation(c1008027.rdop)
token:RegisterEffect(e1_7,true)
--change target
local e1_8=Effect.CreateEffect(c)
e1_8:SetDescription(aux.Stringid(1008029,0))
e1_8:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1_8:SetType(EFFECT_TYPE_QUICK_O)
e1_8:SetRange(LOCATION_SZONE)
e1_8:SetCountLimit(1)
e1_8:SetCode(EVENT_FREE_CHAIN)
e1_8:SetTarget(c1008027.ctg)
e1_8:SetOperation(c1008027.operation)
token:RegisterEffect(e1_8,true)
else
Duel.SendtoGrave(token,REASON_RULE)
end
end
end
function c1008027.rdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler():GetEquipTarget()
return ep~=tp and c==Duel.GetAttacker() and Duel.GetAttackTarget()==nil
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c1008027.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
function c1008027.filter(c)
return c:IsFaceup() and c:IsSetCard(0x320e)
end
function c1008027.ctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler():GetEquipTarget()
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and c1008027.filter(chkc) and not c end
if chk==0 then return Duel.IsExistingTarget(c1008027.filter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c1008027.filter,tp,LOCATION_MZONE,0,1,1,c)
end
function c1008027.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
\ No newline at end of file
--罪恶王冠 守墓人
function c1008032.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x320e),aux.FilterBoolFunction(Card.IsSetCard,0x520e),true)
--spsummon condition
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e11:SetCode(EFFECT_SPSUMMON_CONDITION)
e11:SetValue(c1008032.splimit2)
c:RegisterEffect(e11)
--special summon rule
local e22=Effect.CreateEffect(c)
e22:SetType(EFFECT_TYPE_FIELD)
e22:SetCode(EFFECT_SPSUMMON_PROC)
e22:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e22:SetRange(LOCATION_EXTRA)
e22:SetCondition(c1008032.sprcon)
e22:SetOperation(c1008032.sprop)
c:RegisterEffect(e22)
local g=Group.CreateGroup()
g:KeepAlive()
--Negate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetCountLimit(1)
e1:SetValue(c1008032.effcon1)
e1:SetLabel(1)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1008032,3))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetLabel(2)
e2:SetCountLimit(1)
e2:SetCondition(c1008032.effcon2)
e2:SetCost(c1008032.cost2)
e2:SetTarget(c1008032.drtg)
e2:SetOperation(c1008032.drop)
c:RegisterEffect(e2)
--disable field
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1008032,4))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(3)
e3:SetCountLimit(1)
e3:SetCondition(c1008032.effcon3)
e3:SetOperation(c1008032.disop1)
c:RegisterEffect(e3)
--activate limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(4)
e3:SetCondition(c1008032.effcon4)
e3:SetOperation(c1008032.aclimit1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_CHAIN_NEGATED)
e4:SetRange(LOCATION_MZONE)
e4:SetLabel(4)
e4:SetCondition(c1008032.effcon4)
e4:SetOperation(c1008032.aclimit2)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_ACTIVATE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,1)
e5:SetCondition(c1008032.econ)
e5:SetValue(c1008032.elimit)
c:RegisterEffect(e5)
--creat void
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(1008032,1))
e6:SetCategory(CATEGORY_EQUIP)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_SINGLE)
e6:SetCode(1008001)
e6:SetRange(LOCATION_MZONE)
e6:SetTarget(c1008032.voidtg)
e6:SetOperation(c1008032.voidop)
c:RegisterEffect(e6)
end
function c1008032.splimit2(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function c1008032.spfilter1(c,tp)
return c:IsSetCard(0x320e) and c:IsCanBeFusionMaterial()
and (Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,c,0x520e)
or Duel.IsExistingMatchingCard(c1008032.spfilter3,tp,LOCATION_SZONE,0,1,c,tp))
end
function c1008032.spfilter3(c,tp)
return c:IsSetCard(0x520e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
end
function c1008032.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c1008032.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c1008032.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c1008032.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<-1 then
g2=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_SZONE,0,1,1,g1:GetFirst(),0x520e)
else
g2=Duel.SelectMatchingCard(tp,c1008032.spfilter3,tp,LOCATION_ONFIELD,0,1,1,g1:GetFirst(),tp)
end
g1:Merge(g2)
c:SetMaterial(g1)
Duel.SendtoGrave(g1,REASON_COST)
end
function c1008032.filtereff1(c,e,tp)
return c:IsSetCard(0x520e) and c:IsControler(tp)
end
function c1008032.effcon1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1008032.filtereff1,e:GetHandlerPlayer(),LOCATION_SZONE,0,nil,e,tp)
local ct=g:GetClassCount(Card.GetCode)
return ct>=1
end
function c1008032.effcon2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1008032.filtereff1,e:GetHandlerPlayer(),LOCATION_SZONE,0,nil,e,tp)
local ct=g:GetClassCount(Card.GetCode)
return ct>=2
end
function c1008032.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0x320e) end
local sg=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0x320e)
Duel.Release(sg,REASON_COST)
end
function c1008032.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c1008032.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c1008032.effcon3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1008032.filtereff1,e:GetHandlerPlayer(),LOCATION_SZONE,0,nil,e,tp)
local ct=g:GetClassCount(Card.GetCode)
return ct>=3
end
function c1008032.disop1(e,tp)
local ct=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
if ct==0 then return end
local c=e:GetHandler()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_DISABLE_FIELD)
e3:SetReset(RESET_EVENT+0x1fe0000)
e3:SetOperation(c1008032.disop)
c:RegisterEffect(e3,tp)
end
function c1008032.effcon4(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1008032.filtereff1,e:GetHandlerPlayer(),LOCATION_SZONE,0,nil,e,tp)
local ct=g:GetClassCount(Card.GetCode)
return ct>=4
end
function c1008032.disop(e,tp)
local dis1=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0)
return dis1
end
function c1008032.aclimit1(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or not re:IsActiveType(TYPE_MONSTER) then return end
e:GetHandler():RegisterFlagEffect(10080321,RESET_EVENT+0x3ff0000+RESET_PHASE+PHASE_END,0,1)
end
function c1008032.aclimit2(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or not re:IsActiveType(TYPE_MONSTER) then return end
e:GetHandler():ResetFlagEffect(10080321)
end
function c1008032.econ(e)
return e:GetHandler():GetFlagEffect(10080321)~=0
end
function c1008032.elimit(e,te,tp)
return te:IsActiveType(TYPE_MONSTER)
end
function c1008032.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_ONFIELD) then
Duel.Destroy(tc,REASON_RULE)
end
end
function c1008032.descon2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
return tc and eg:IsContains(tc) and re and not re:GetHandler():IsSetCard(0x320e)
end
function c1008032.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_RULE)
end
function c1008032.voidfilter(c)
return c:IsSetCard(0x320e) and c:IsFaceup()
end
function c1008032.voidtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c1008032.voidfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():IsLocation(LOCATION_MZONE) and e:GetHandler():IsFaceup() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
Duel.Hint(8,tp,1008034)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Duel.SelectTarget(tp,c1008032.voidfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
function c1008032.voidop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
c:RegisterFlagEffect(10080011,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(1008001,4))
local token=Duel.CreateToken(tp,1008034)
Duel.MoveToField(token,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
token:CancelToGrave()
local e1_1=Effect.CreateEffect(token)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CHANGE_TYPE)
e1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_1:SetValue(TYPE_EQUIP+TYPE_SPELL)
e1_1:SetReset(RESET_EVENT+0x1fc0000)
token:RegisterEffect(e1_1,true)
local e1_2=Effect.CreateEffect(token)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_EQUIP_LIMIT)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetValue(1)
token:RegisterEffect(e1_2,true)
token:CancelToGrave()
if Duel.Equip(tp,token,tc,false) then
--Atk up
local e1_3=Effect.CreateEffect(c)
e1_3:SetType(EFFECT_TYPE_EQUIP)
e1_3:SetCode(EFFECT_UPDATE_ATTACK)
e1_3:SetValue(300)
token:RegisterEffect(e1_3,true)
e1_4=e1_3:Clone()
e1_4:SetCode(EFFECT_UPDATE_DEFENSE)
token:RegisterEffect(e1_4,true)
--immune
local e1_5=Effect.CreateEffect(c)
e1_5:SetType(EFFECT_TYPE_EQUIP)
e1_5:SetCode(EFFECT_IMMUNE_EFFECT)
e1_5:SetValue(c1008032.efilter)
token:RegisterEffect(e1_5,true)
--set monster
local e1_6=Effect.CreateEffect(c)
e1_6:SetDescription(aux.Stringid(1008032,0))
e1_6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1_6:SetCode(EVENT_ATTACK_ANNOUNCE)
e1_6:SetRange(LOCATION_SZONE)
e1_6:SetCondition(c1008032.setcon)
e1_6:SetOperation(c1008032.setop)
token:RegisterEffect(e1_6,true)
else
Duel.SendtoGrave(token,REASON_RULE)
end
end
end
function c1008032.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER)
end
function c1008032.setcon(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
local c=e:GetHandler():GetEquipTarget()
local bc=c:GetBattleTarget()
return d and a==c and bc and bc~=c and Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0
end
function c1008032.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetAttackTarget()
if tc:IsImmuneToEffect(e) then return end
local pos=POS_FACEUP
if tc:IsPosition(POS_FACEDOWN) then pos=POS_FACEDOWN end
if tc:IsType(TYPE_PENDULUM) then
local bseq=0
while Duel.CheckLocation(1-tp,LOCATION_SZONE,bseq)==0 and bseq<5 do
bseq=bseq+1
end
Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,pos,true)
Duel.MoveSequence(tc,bseq)
else
Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,pos,true)
end
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+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
Duel.NegateAttack()
end
\ No newline at end of file
--王之模式
function c1008037.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1008037+EFFECT_COUNT_CODE_DUEL)
e1:SetCost(c1008037.cost)
e1:SetTarget(c1008037.target)
e1:SetOperation(c1008037.activate)
c:RegisterEffect(e1)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_DESTROYED)
e1:SetCondition(c1008037.thcon)
e1:SetTarget(c1008037.thtg)
e1:SetOperation(c1008037.thop)
c:RegisterEffect(e1)
end
c1008037.DescSetName = 0x320e
local voids ={}
for i = 0,10 do
voids[i] = 0
end
function c1008037.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c1008037.filter(c,e,tp)
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_PENDULUM) and c:GetOriginalLeftScale()>4 and c:IsSetCard(0x320e)
end
function c1008037.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c1008037.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c1008037.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end
function c1008037.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c1008037.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(2500)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1008037,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(0xff)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
tc:RegisterEffect(e1)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c1008037.sumlimit)
tc:RegisterEffect(e1)
local ve1=Effect.CreateEffect(c)
ve1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ve1:SetCode(EVENT_LEAVE_FIELD)
ve1:SetRange(LOCATION_MZONE)
ve1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
ve1:SetCondition(c1008037.checkcon)
ve1:SetOperation(c1008037.checkop)
tc:RegisterEffect(ve1)
Duel.SpecialSummonComplete()
end
end
function c1008037.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x320e)and c:IsLocation(LOCATION_EXTRA)
end
function c1008037.vfilter(c,tp)
return c:IsSetCard(0x320e) and c:GetCode()~=1008001 and c:IsType(TYPE_MONSTER) and c:GetPreviousLocation()==LOCATION_MZONE -- c:IsControler(tp)
end
function c1008037.checkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1008037.vfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c1008037.checkop(e,tp,eg,ep,ev,re,r,rp)
local vg=eg:Filter(c1008037.vfilter,nil,tp)
local tc=vg:GetFirst()
local flag=1
while tc do
flag=1
for i=0,10 do
if voids[i] == tc:GetCode() then
flag=0
break
end
end
if flag==1 then
voids[e:GetLabel()] = tc:GetCode()
--gain void
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetDescription(aux.Stringid(voids[e:GetLabel()],1))
e0:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
if voids[e:GetLabel()]==1008002 or voids[e:GetLabel()]==1008027 or voids[e:GetLabel()]==1008032
or voids[e:GetLabel()]==1008007 then
e0:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET)
e0:SetCategory(CATEGORY_EQUIP)
end
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_MZONE)
e0:SetLabel(voids[e:GetLabel()])
e0:SetCountLimit(1)
e0:SetTarget(c1008037.voidtg)
e0:SetOperation(c1008037.voidop)
e:GetHandler():RegisterEffect(e0)
e:SetLabel(e:GetLabel()+1)
-- local e1=Effect.CreateEffect(e:GetHandler())
-- e1:SetType(EFFECT_TYPE_SINGLE)
-- e1:SetCode(EFFECT_SET_BASE_ATTACK)
-- e1:SetValue(e:GetHandler():GetBaseAttack()-300)
-- e:GetHandler():RegisterEffect(e1)
end
tc=vg:GetNext()
end
if flag==1 then Duel.Hint(10,0,1008037) end
end
function c1008037.voidfilter(c)
return c:IsSetCard(0x320e) and c:IsFaceup()
end
function c1008037.voidtg(e,tp,eg,ep,ev,re,r,rp,chk)
local pass=0
if e:GetCategory()==CATEGORY_EQUIP
and Duel.IsExistingTarget(c1008037.voidfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
then pass=1
elseif e:GetLabel()==1008014 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2
or not Duel.IsPlayerCanSpecialSummonMonster(tp,1008016,0x320e,0x4011,0,2500,6,RACE_FAIRY,ATTRIBUTE_LIGHT) then return false end
pass=1
elseif e:GetCategory()~=CATEGORY_EQUIP and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
then pass=1
end
if chk==0 then return pass==1 and e:GetHandler():IsLocation(LOCATION_MZONE) end
Duel.Hint(8,tp,e:GetLabel()+2)
if e:GetCategory()==CATEGORY_EQUIP then
local g=Duel.SelectTarget(tp,c1008037.voidfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
end
function c1008037.vtg(e,c)
local g=Duel.GetMatchingGroup(Card.IsCode,0,LOCATION_MZONE,LOCATION_MZONE,nil,1008016)
if g:GetCount()<2 then return false end
local maxs=g:GetMaxGroup(Card.GetSequence):GetFirst():GetSequence()
local mins=g:GetMinGroup(Card.GetSequence):GetFirst():GetSequence()
return c:GetSequence()>mins and c:GetSequence()<maxs and c:IsFaceup() and c:IsSetCard(0x320e)
end
function c1008037.voidop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local code = e:GetLabel()+2
if not c:IsLocation(LOCATION_MZONE) or not c:IsFaceup() then return end
if e:GetLabel()==1008014 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 or not c:IsRelateToEffect(e) then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,1008016,0x320e,0x4011,0,2500,6,RACE_FAIRY,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,1008016)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
local token2=Duel.CreateToken(tp,1008017)
Duel.SpecialSummonStep(token2,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
Duel.SpecialSummonComplete()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c1008037.vtg)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e2)
return
end
end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 or not c:IsRelateToEffect(e) then return end
if e:GetCategory()==CATEGORY_EQUIP then
local eqc=Duel.GetFirstTarget()
if eqc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Group.FromCards(Duel.CreateToken(tp,code))
local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.BreakEffect()
Duel.Equip(tp,tc,eqc,true)
end
else
local g=Group.FromCards(Duel.CreateToken(tp,code))
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function c1008037.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEDOWN)
end
function c1008037.tfilter(c)
local code=c:GetOriginalCode()
local mt=_G["c" .. code]
return mt and mt.DescSetName == 0x320e and c:IsAbleToHand() and c:IsType(TYPE_SPELL)
end
function c1008037.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1008037.tfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1008037.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1008037.tfilter,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
......@@ -31,18 +31,6 @@ function c1009011.initial_effect(c)
e1:SetTarget(c1009011.target)
e1:SetOperation(c1009011.operation)
c:RegisterEffect(e1)
--Damage
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(1009011,1))
e5:SetCategory(CATEGORY_DAMAGE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c1009011.damcon)
e5:SetTarget(c1009011.damtg)
e5:SetOperation(c1009011.damop)
c:RegisterEffect(e5)
--spsummon bgm
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -74,17 +62,5 @@ function c1009011.operation(e,tp,eg,ep,ev,re,r,rp)
if atk<0 then atk=0 end
Duel.BreakEffect()
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
Duel.Hint(HINT_MUSIC,0,aux.Stringid(1009011,0))
end
function c1009011.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
end
function c1009011.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,4000)
end
function c1009011.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,4000,REASON_EFFECT,true)
Duel.RDComplete()
end
......@@ -69,7 +69,7 @@ function c1009012.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c1009012.atkval(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*1000
return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*300
end
function c1009012.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
......
......@@ -51,7 +51,7 @@ function c1009014.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c1009014.filter(c,e,sp)
return c:IsAttackBelow(3000) and (c:IsAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_REPTILE)) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
return c:IsAttackBelow(3000) and c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c1009014.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......@@ -71,37 +71,6 @@ function c1009014.operation(e,tp,eg,ep,ev,re,r,rp)
if ft<=0 or tg:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,ft,ft,nil)
local c=e:GetHandler()
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(500)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1009014,2))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_START)
e1:SetCondition(c1009014.descon2)
e1:SetTarget(c1009014.destg2)
e1:SetOperation(c1009014.desop2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
......
--灰 烬 之 地
function c14370001.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--inactivatable
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_FIELD)
ea:SetCode(EFFECT_CANNOT_INACTIVATE)
ea:SetRange(LOCATION_FZONE)
ea:SetValue(c14370001.efilter)
c:RegisterEffect(ea)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_SZONE,0)
e3:SetTarget(c14370001.indtg)
e3:SetValue(aux.indoval)
c:RegisterEffect(e3)
--atk&def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1437))
e2:SetValue(300)
c:RegisterEffect(e2)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c14370001.indtg2)
e4:SetValue(c14370001.indct2)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_FZONE)
e5:SetCountLimit(1)
e5:SetCost(c14370001.thcost)
e5:SetTarget(c14370001.thtg)
e5:SetOperation(c14370001.thop)
c:RegisterEffect(e5)
end
--e4
function c14370001.indtg2(e,c)
return c:IsSummonType(SUMMON_TYPE_ADVANCE) and c:IsSetCard(0x1437)
end
function c14370001.indct2(e,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then
return 1
else return 0 end
end
--e2
function c14370001.efilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local tc=te:GetHandler()
return (te:IsActiveType(TYPE_SPELL) or te:IsActiveType(TYPE_TRAP)) and tc:IsSetCard(0x1437)
end
--e3
function c14370001.indtg(e,c)
return c:IsSetCard(0x1437) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end
--e5
function c14370001.costfilter(c)
return c:IsSetCard(0x1437) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsType(TYPE_CONTINUOUS) and (c:IsFaceup() or not c:IsLocation(LOCATION_SZONE)) and c:IsAbleToGraveAsCost()
end
function c14370001.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14370001.costfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c14370001.costfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c14370001.thfilter1(c)
return c:IsSetCard(0x1437) and c:IsAbleToHand()
end
function c14370001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14370001.thfilter1,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c14370001.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c14370001.thfilter1,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--灰 烬 骑 士 A.S.H
function c14370004.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c14370004.mfilter,2,2,c14370004.lcheck)
c:EnableReviveLimit()
--xyz summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,14370004)
e2:SetCondition(c14370004.spcon)
e2:SetTarget(c14370004.sptg)
e2:SetOperation(c14370004.spop)
c:RegisterEffect(e2)
--set
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
ea:SetCode(EVENT_CHAINING)
ea:SetRange(LOCATION_MZONE)
ea:SetCountLimit(1,14370005)
ea:SetCondition(c14370004.setcon)
ea:SetOperation(c14370004.setop)
c:RegisterEffect(ea)
end
function c14370004.mfilter(c)
return c:IsLevelAbove(1)
end
function c14370004.lcheck(g,lc)
return g:GetClassCount(Card.GetLevel)==1
end
--e2
function c14370004.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c14370004.spfilter(c,e,tp)
return c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c14370004.fselect(g,tp)
return g:GetClassCount(Card.GetLocation)==g:GetCount() and g:GetClassCount(Card.GetLevel)==1
and Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,g,2,2)
end
function c14370004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c14370004.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and g:CheckSubGroup(c14370004.fselect,2,2,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c14370004.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c14370004.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 or g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c14370004.fselect,false,2,2,tp)
if sg and sg:GetCount()==2 then
local tc1=sg:GetFirst()
local tc2=sg:GetNext()
Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc1:RegisterEffect(e1)
local eb=e1:Clone()
tc2:RegisterEffect(eb)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc1:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetValue(1)
tc1:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_DISABLE_EFFECT)
tc2:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e5:SetValue(1)
tc2:RegisterEffect(e5)
Duel.SpecialSummonComplete()
end
end
--e3
function c14370004.setcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_XYZ) and rc:IsControler(tp)
end
function c14370004.setfilter(c)
return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c14370004.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c14370004.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--灰 烬 少 女 莉 莉
function c14370007.initial_effect(c)
--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)
e1:SetCountLimit(1,14370007)
e1:SetCondition(c14370007.sprcon)
e1:SetOperation(c14370007.sprop)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14370007,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,14370008)
e2:SetOperation(c14370007.activate)
c:RegisterEffect(e2)
local ea=e2:Clone()
ea:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(ea)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14370007,1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c14370007.drcon)
e3:SetTarget(c14370007.drtg)
e3:SetOperation(c14370007.drop)
c:RegisterEffect(e3)
end
--e1
function c14370007.spcfilter(c)
return c:IsSetCard(0x1437) and (c:IsType(TYPE_TRAP) or c:IsType(TYPE_SPELL)) and not c:IsPublic()
end
function c14370007.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c14370007.spcfilter,tp,LOCATION_HAND,0,1,nil)
end
function c14370007.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c14370007.spcfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
--e2
function c14370007.filter1(c,tp)
return c:IsDiscardable() and ((c14370007.filter2(c) and c:IsAbleToGraveAsCost())
or Duel.IsExistingMatchingCard(c14370007.filter2,tp,LOCATION_DECK,0,1,c))
end
function c14370007.filter2(c)
return c:IsSetCard(0x1437) and (c:IsType(TYPE_TRAP) or c:IsType(TYPE_SPELL)) and c:IsType(TYPE_CONTINUOUS) and c:IsSSetable()
end
function c14370007.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c14370007.filter2),tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c14370007.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c14370007.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_DARK)
end
--e3
function c14370007.drcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0x1437)
end
function c14370007.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c14370007.drop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.Draw(tp,1,REASON_EFFECT)
end
\ No newline at end of file
--灰 烬 少 女 艾 莉 丝
function c14370010.initial_effect(c)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14370010,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,14370011)
e2:SetOperation(c14370010.activate)
c:RegisterEffect(e2)
local ea=e2:Clone()
ea:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(ea)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14370010,1))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,14370012)
e1:SetCondition(c14370010.tgcon)
e1:SetTarget(c14370010.tgtg)
e1:SetOperation(c14370010.tgop)
c:RegisterEffect(e1)
end
--e1
function c14370010.tgcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0x1437)
end
function c14370010.tgfilter(c)
return c:IsSetCard(0x1437) and c:IsAbleToGrave()
end
function c14370010.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14370010.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c14370010.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c14370010.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--e2
function c14370010.filter1(c,tp)
return c:IsDiscardable() and ((c14370010.filter2(c) and c:IsAbleToGraveAsCost())
or Duel.IsExistingMatchingCard(c14370010.filter2,tp,LOCATION_GRAVE,0,1,c))
end
function c14370010.filter2(c)
return c:IsSetCard(0x1437) and (c:IsType(TYPE_TRAP) or c:IsType(TYPE_SPELL)) and c:IsType(TYPE_CONTINUOUS) and c:IsSSetable()
end
function c14370010.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c14370010.filter2),tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c14370010.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c14370010.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_DARK)
end
\ No newline at end of file
--灰 烬 少 女 芙 洛 拉
function c14370013.initial_effect(c)
--xyzmaterial
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14370013,0))
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,14370014)
e1:SetTarget(c14370013.xyztg)
e1:SetOperation(c14370013.xyzop)
c:RegisterEffect(e1)
local e4=e1:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14370013,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,14370015)
e2:SetCondition(c14370013.descon)
e2:SetTarget(c14370013.destg)
e2:SetOperation(c14370013.desop)
c:RegisterEffect(e2)
end
--e2
function c14370013.descon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0x1437)
end
function c14370013.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsType(TYPE_SPELL+TYPE_TRAP) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c14370013.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c14370013.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_DARK)
end
--e1
function c14370013.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c14370013.matfilter(c)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x1437) and c:IsCanOverlay()
end
function c14370013.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c14370013.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14370013.tgfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c14370013.matfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c14370013.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c14370013.xyzop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c14370013.matfilter,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then
Duel.Overlay(tc,g)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c14370013.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
end
\ No newline at end of file
--灰 烬 少 女 林
function c14370016.initial_effect(c)
--SPSUMMON
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14370016,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,14370017)
e1:SetTarget(c14370016.sptg)
e1:SetOperation(c14370016.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--special summon2
local ea=Effect.CreateEffect(c)
ea:SetDescription(aux.Stringid(14370016,1))
ea:SetCategory(CATEGORY_SPECIAL_SUMMON)
ea:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
ea:SetCode(EVENT_SUMMON_SUCCESS)
ea:SetCountLimit(1,14370018)
ea:SetCondition(c14370016.spcon1)
ea:SetTarget(c14370016.sptg1)
ea:SetOperation(c14370016.spop1)
c:RegisterEffect(ea)
local e4=ea:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
--ea
function c14370016.spcon1(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0x1437)
end
function c14370016.spfilter1(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x1437) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c14370016.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c14370016.spfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c14370016.spop1(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,c14370016.spfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c14370016.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_DARK)
end
--e1
function c14370016.spfilter(c,e,tp)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x1437)
and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x1437,0x11,1500,2000,4,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP)
end
function c14370016.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c14370016.spfilter,tp,LOCATION_DECK,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c14370016.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local g=Duel.GetMatchingGroup(c14370016.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tg=sg:GetFirst()
if Duel.IsPlayerCanSpecialSummonMonster(tp,0,0x1437,0x11,1500,2000,4,RACE_MACHINE,ATTRIBUTE_DARK) then
tg:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
Duel.SpecialSummon(tg,0,tp,tp,true,false,POS_FACEUP)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c14370016.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
\ No newline at end of file
--灰 烬 骑 士 零 一
function c14370019.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,14370019+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--act in set turn
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e4:SetCondition(c14370019.actcon)
c:RegisterEffect(e4)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14370019,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,14370019)
e2:SetTarget(c14370019.thtg)
e2:SetOperation(c14370019.thop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14370019,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,14370020)
e3:SetCondition(c14370019.spcon)
e3:SetTarget(c14370019.sptg)
e3:SetOperation(c14370019.spop)
c:RegisterEffect(e3)
end
--e4
function c14370019.actcon(e)
return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_REMOVED,0,1,nil,TYPE_SPELL)
end
--e2
function c14370019.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=3 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(Duel.AnnounceType(tp))
end
function c14370019.thop(e,tp,eg,ep,ev,re,r,rp)
local opt=e:GetLabel()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=2 then return end
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
local tg=Group.CreateGroup()
for tc in aux.Next(g) do
if ((opt==0 and tc:IsType(TYPE_MONSTER)) or (opt==1 and tc:IsType(TYPE_SPELL)) or (opt==2 and tc:IsType(TYPE_TRAP))) and tc:IsSetCard(0x1437) and tc:IsAbleToHand() then
tg:AddCard(tc)
end
end
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
Duel.ShuffleDeck(tp)
end
--e3
function c14370019.spfilter(c)
return c:IsFaceup() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x1437)
end
function c14370019.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c14370019.spfilter,tp,LOCATION_SZONE,0,1,e:GetHandler())
end
function c14370019.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,14370019,0x1437,0x11,1500,2000,4,RACE_MACHINE,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c14370019.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1437) and not c:IsSetCard(0x1438)
end
function c14370019.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,14370019,0x1437,0x11,1500,2000,4,RACE_MACHINE,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(c14370019.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(14370019,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
\ No newline at end of file
--灰 烬 骑 士 基 尔 德
function c14370022.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,14370022+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--lock
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14370022,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,14370022)
e2:SetTarget(c14370022.target)
e2:SetOperation(c14370022.operation)
c:RegisterEffect(e2)
--act in set turn
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e4:SetCondition(c14370022.actcon)
c:RegisterEffect(e4)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14370022,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,14370023)
e3:SetCondition(c14370022.spcon)
e3:SetTarget(c14370022.sptg)
e3:SetOperation(c14370022.spop)
c:RegisterEffect(e3)
end
--e4
function c14370022.actcon(e)
return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_REMOVED,0,1,nil,TYPE_SPELL)
end
--e2
function c14370022.cfilter(c)
return c:IsFacedown() and c:GetSequence()<5
end
function c14370022.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_SZONE) and c14370022.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14370022.cfilter,tp,0,LOCATION_SZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(14370022,2))
local g=Duel.SelectTarget(tp,c14370022.cfilter,tp,0,LOCATION_SZONE,1,1,e:GetHandler())
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
g:GetFirst():RegisterFlagEffect(14370023,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1,cid)
end
function c14370022.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if c:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsRelateToEffect(e) and tc:GetFlagEffectLabel(14370023)==cid then
c:SetCardTarget(tc)
e:SetLabelObject(tc)
c:ResetFlagEffect(14370022)
tc:ResetFlagEffect(14370022)
local fid=c:GetFieldID()
c:RegisterFlagEffect(14370022,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc:RegisterFlagEffect(14370022,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DRAW)
e1:SetLabelObject(tc)
e1:SetCondition(c14370022.rcon)
e1:SetValue(1)
tc:RegisterEffect(e1)
--End of e1
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DRAW)
e2:SetLabel(fid)
e2:SetLabelObject(e1)
e2:SetCondition(c14370022.rstcon)
e2:SetOperation(c14370022.rstop)
Duel.RegisterEffect(e2,tp)
--send to grave
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DRAW)
e3:SetLabel(fid)
e3:SetLabelObject(tc)
e3:SetCondition(c14370022.agcon)
e3:SetOperation(c14370022.agop)
Duel.RegisterEffect(e3,1-tp)
--activate check
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_CHAINING)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DRAW)
e4:SetLabel(fid)
e4:SetLabelObject(e3)
e4:SetOperation(c14370022.rstop2)
Duel.RegisterEffect(e4,tp)
end
end
function c14370022.rcon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler()) and e:GetHandler():GetFlagEffect(14370022)~=0
end
function c14370022.rstcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject():GetLabelObject()
if tc:GetFlagEffectLabel(14370022)==e:GetLabel()
and c:GetFlagEffectLabel(14370022)==e:GetLabel() then
return not c:IsDisabled()
else
e:Reset()
return false
end
end
function c14370022.rstop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
te:Reset()
Duel.HintSelection(Group.FromCards(e:GetHandler()))
end
function c14370022.agcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(14370022)==e:GetLabel()
and c:GetFlagEffectLabel(14370022)==e:GetLabel() then
return not c:IsDisabled()
else
e:Reset()
return false
end
end
function c14370022.agop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Remove(tc,POS_FACEUP,REASON_RULE)
end
function c14370022.rstop2(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:GetFlagEffectLabel(14370022)~=e:GetLabel() then return end
local c=e:GetHandler()
c:CancelCardTarget(tc)
local te=e:GetLabelObject()
tc:ResetFlagEffect(14370022)
if te then te:Reset() end
end
--e3
function c14370022.spfilter(c)
return c:IsFaceup() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x1437)
end
function c14370022.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c14370022.spfilter,tp,LOCATION_SZONE,0,1,e:GetHandler())
end
function c14370022.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,14370022,0x1437,0x11,1500,2000,4,RACE_MACHINE,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c14370022.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1437) and not c:IsSetCard(0x1438)
end
function c14370022.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,14370022,0x1437,0x11,1500,2000,4,RACE_MACHINE,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(c14370022.filter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(14370022,5)) then
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
end
\ No newline at end of file
--灰 烬 骑 士 卢 卡 斯
function c14370025.initial_effect(c)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,14370025+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e2)
--act in set turn
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e4:SetCondition(c14370025.actcon)
c:RegisterEffect(e4)
--Change atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14370025,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,14370025)
e1:SetTarget(c14370025.atktg)
e1:SetOperation(c14370025.atkop)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14370025,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,14370026)
e3:SetCondition(c14370025.spcon)
e3:SetTarget(c14370025.sptg)
e3:SetOperation(c14370025.spop)
c:RegisterEffect(e3)
end
--e4
function c14370025.actcon(e)
return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_REMOVED,0,1,nil,TYPE_SPELL)
end
--e1
function c14370025.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1437)
end
function c14370025.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c14370025.atkfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
Duel.SelectTarget(tp,c14370025.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
e:SetLabelObject(g:GetFirst())
end
function c14370025.atkop(e,tp,eg,ep,ev,re,r,rp)
local hc=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
if tc==hc then tc=g:GetNext() end
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
if hc:IsFaceup() and hc:IsRelateToEffect(e) then
Duel.BreakEffect()
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK_FINAL)
e2:SetValue(math.ceil(hc:GetAttack()/2))
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
hc:RegisterEffect(e2)
end
end
end
--e3
function c14370025.atkfilter(c)
return c:IsFaceup() and c:GetAttack()>0
end
function c14370025.spfilter(c)
return c:IsFaceup() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x1437)
end
function c14370025.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c14370025.spfilter,tp,LOCATION_SZONE,0,1,e:GetHandler())
end
function c14370025.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,14370025,0x1437,0x11,1500,2000,4,RACE_MACHINE,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c14370025.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1437) and not c:IsSetCard(0x1438)
end
function c14370025.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,14370025,0x1437,0x11,1500,2000,4,RACE_MACHINE,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(c14370025.filter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(c14370025.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(14370025,2)) then
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c14370025.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--灰 烬 骑 士 梅 菲 斯 特
function c14370028.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,14370028+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14370028,0))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,14370028)
e2:SetCost(c14370028.setcost)
e2:SetTarget(c14370028.settg)
e2:SetOperation(c14370028.setop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14370028,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,14370029)
e3:SetCondition(c14370028.spcon)
e3:SetTarget(c14370028.sptg)
e3:SetOperation(c14370028.spop)
c:RegisterEffect(e3)
end
--e2
function c14370028.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c14370028.cfilter(c)
return c:IsSetCard(0x1437) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsType(TYPE_CONTINUOUS)
and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSSetable() and not c:IsCode(14370028)
end
function c14370028.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c14370028.cfilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c14370028.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c14370028.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,LOCATION_GRAVE+LOCATION_REMOVED,g,1,0,0)
end
function c14370028.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then
Duel.SSet(tp,tc)
end
end
--e3
function c14370028.spfilter(c)
return c:IsFaceup() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x1437)
end
function c14370028.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c14370028.spfilter,tp,LOCATION_SZONE,0,1,e:GetHandler())
end
function c14370028.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,14370028,0x1437,0x11,1500,2000,4,RACE_MACHINE,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c14370028.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1437) and not c:IsSetCard(0x1438)
end
function c14370028.thfilter1(c)
return c:IsSetCard(0x1437) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToHand()
end
function c14370028.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,14370028,0x1437,0x11,1500,2000,4,RACE_MACHINE,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_SPELL)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(c14370028.filter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(c14370028.thfilter1,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(14370028,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c14370028.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
end
\ No newline at end of file
--灰 烬 骑 士 星 轨
function c14370031.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,14370031+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14370031,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,14370031)
e2:SetCost(c14370031.drcost)
e2:SetTarget(c14370031.drtg)
e2:SetOperation(c14370031.drop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14370031,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,14370032)
e3:SetCondition(c14370031.spcon)
e3:SetTarget(c14370031.sptg)
e3:SetOperation(c14370031.spop)
c:RegisterEffect(e3)
end
--e2
function c14370031.costfilter(c)
return c:IsSetCard(0x1437) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsType(TYPE_CONTINUOUS) and (c:IsFaceup() or not c:IsLocation(LOCATION_SZONE)) and c:IsAbleToGraveAsCost()
end
function c14370031.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14370031.costfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c14370031.costfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c14370031.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c14370031.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--e3
function c14370031.spfilter(c)
return c:IsFaceup() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x1437)
end
function c14370031.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c14370031.spfilter,tp,LOCATION_SZONE,0,1,e:GetHandler())
end
function c14370031.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,14370031,0x1437,0x11,1500,2000,4,RACE_MACHINE,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c14370031.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1437) and not c:IsSetCard(0x1438)
end
function c14370031.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,14370031,0x1437,0x11,1500,2000,4,RACE_MACHINE,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_SPELL)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(c14370031.filter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(14370031,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
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+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--灰 烬 皇 巴 巴 托 斯
function c14370037.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x1437),4,3,nil,nil,99)
c:EnableReviveLimit()
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c14370037.immval)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14370037,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,14370037)
e3:SetCost(c14370037.atkcost)
e3:SetOperation(c14370037.atkop)
c:RegisterEffect(e3)
--Activate(summon)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(14370037,1))
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetHintTiming(0,TIMING_END_PHASE,TIMING_DRAW_PHASE)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1,14370038)
e6:SetCost(c14370037.cost)
e6:SetOperation(c14370037.spop)
c:RegisterEffect(e6)
end
--e2
function c14370037.immval(e,te)
return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
and te:GetOwner():GetAttack()<=e:GetHandler():GetAttack() and te:IsActivated()
end
--e3
function c14370037.cfilter(c)
return c:IsSetCard(0x1437) and c:IsAbleToRemoveAsCost()
end
function c14370037.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14370037.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c14370037.cfilter,tp,LOCATION_GRAVE,0,1,ft,nil)
e:SetLabel(g:GetCount())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c14370037.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(e:GetLabel()*500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
--e6
function c14370037.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c14370037.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(0,1)
e1:SetTarget(c14370037.actlimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
Duel.RegisterEffect(e3,tp)
--local e4=e3:Clone()
--e4:SetCode(EFFECT_CANNOT_ACTIVATE)
--e4:SetValue(c14370037.actlimit1)
--Duel.RegisterEffect(e4,tp)
end
function c14370037.actlimit(e,c)
return c:IsAttackBelow(e:GetHandler():GetAttack())
end
--function c14370037.actlimit1(e,re,tp)
-- return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e)
--end
\ No newline at end of file
--灰 烬 皇 维 达 尔
function c14370040.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x1437),4,2,nil,nil,99)
c:EnableReviveLimit()
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14370040,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1,14370040)
e2:SetCondition(c14370040.tgcon)
e2:SetTarget(c14370040.tgtg)
e2:SetOperation(c14370040.tgop)
c:RegisterEffect(e2)
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c14370040.negcon)
e1:SetCost(c14370040.negcost)
e1:SetTarget(c14370040.negtg)
e1:SetOperation(c14370040.negop)
c:RegisterEffect(e1)
end
--e2
function c14370040.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp or Duel.GetTurnPlayer()~=1-tp
end
function c14370040.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(74586817,3))
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c14370040.tgop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end
end
--e1
function c14370040.thfilter1(c)
return c:IsSetCard(0x1437) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToHand()
end
function c14370040.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c14370040.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c14370040.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)
end
function c14370040.negop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.NegateActivation(ev)
if g:GetCount()>0
and Duel.IsExistingMatchingCard(c14370040.thfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(14370040,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c14370040.thfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--荒野的灵剑
function c14700001.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c14700001.target)
e1:SetOperation(c14700001.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c14700001.eqlimit)
c:RegisterEffect(e2)
--Atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(1000)
c:RegisterEffect(e3)
--Def up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetValue(1000)
c:RegisterEffect(e3)
--add hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(14700001,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetProperty(EFFECT_FLAG_INITIAL)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,14700001)
e4:SetCondition(c14700001.thcon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c14700001.thtg)
e4:SetOperation(c14700001.thop)
c:RegisterEffect(e4)
--Equip
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(14700001,1))
e5:SetCategory(CATEGORY_EQUIP)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,14700001)
e5:SetCondition(c14700001.spcon)
e5:SetCost(aux.bfgcost)
e5:SetTarget(c14700001.sptg)
e5:SetOperation(c14700001.spop)
c:RegisterEffect(e5)
end
function c14700001.eqlimit(e,c)
return c:IsSetCard(0x2e0) or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR))
--Equip limit checking
end
function c14700001.filter(c)
return c:IsFaceup()
and (c:IsSetCard(0x2e0) or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR)))
--Equip limit checking faceup or not
end
function c14700001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
--setting linking between monster and equipcard
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14700001.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14700001.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c14700001.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c14700001.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
function c14700001.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c14700001.thfilter(c)
return c:IsSetCard(0x2e0) and not c:IsCode(14700001) and c:IsAbleToHand() and c:IsType(TYPE_EQUIP)
end
function c14700001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14700001.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c14700001.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c14700001.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c14700001.eqfilter(c,tc,tp)
return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(tc) and c:CheckUniqueOnField(tp) and c:IsSetCard(0x2e0) and not c:IsForbidden() and not c:IsCode(14700001)
end
function c14700001.spfilter(c,tp)
return c:IsFaceup()
and (c:IsSetCard(0x2e0) or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR)))
and Duel.IsExistingMatchingCard(c14700001.eqfilter,tp,LOCATION_DECK,0,1,nil,c,tp)
end
function c14700001.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function c14700001.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsControler(tp) and c14700001.spfilter(chkc,tp) end
local ft=0
if e:GetHandler():IsLocation(LOCATION_HAND) then ft=1 end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>ft
and Duel.IsExistingTarget(c14700001.spfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c14700001.spfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c14700001.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local c=Duel.SelectMatchingCard(tp,c14700001.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tc,tp)
if c:GetCount()>0 then
Duel.Equip(tp,c:GetFirst(),tc)
end
end
end
--荒野的披风
function c14700002.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c14700002.target)
e1:SetOperation(c14700002.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c14700002.eqlimit)
c:RegisterEffect(e2)
--indes
--local e4=Effect.CreateEffect(c)
--e4:SetType(EFFECT_TYPE_EQUIP)
--e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
--e4:SetValue(1)
--c:RegisterEffect(e4)
--cannot targetted
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetValue(aux.tgoval)
c:RegisterEffect(e5)
--search
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(14700002,0))
e6:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetProperty(EFFECT_FLAG_INITIAL)
e6:SetRange(LOCATION_GRAVE)
e6:SetCountLimit(1,14700002)
e6:SetCondition(c14700002.thcon)
e6:SetCost(aux.bfgcost)
e6:SetTarget(c14700002.thtg)
e6:SetOperation(c14700002.thop)
c:RegisterEffect(e6)
--Equip
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(14700002,1))
e7:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_FREE_CHAIN)
e7:SetProperty(EFFECT_FLAG_CARD_TARGET)
e7:SetRange(LOCATION_GRAVE)
e7:SetCountLimit(1,14700002)
e7:SetCondition(c14700002.spcon)
e7:SetCost(aux.bfgcost)
e7:SetTarget(c14700002.sptg)
e7:SetOperation(c14700002.spop)
c:RegisterEffect(e7)
end
function c14700002.eqlimit(e,c)
return c:IsSetCard(0x2e0) or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR))
--Equip limit checking
end
function c14700002.filter(c)
return c:IsFaceup()
and (c:IsSetCard(0x2e0) or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR)))
--Equip limit checking faceup or not
end
function c14700002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
--setting linking between monster and equipcard
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14700002.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14700002.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c14700002.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c14700002.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c14700002.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c14700002.thfilter(c)
return c:IsCode(14700005)
end
function c14700002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14700002.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c14700002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c14700002.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c14700002.filter1(c,e,tp)
return c:IsFaceup()
and (c:IsSetCard(0x2e0) or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR)))
and Duel.IsExistingMatchingCard(c14700002.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_LMATERIAL)
end
function c14700002.filter2(c,e,tp,mc)
return c:IsSetCard(0x2e0) and c:IsType(TYPE_LINK) and mc:IsCanBeLinkMaterial(c) and c:GetAttribute()~=mc:GetAttribute()
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false)
end
function c14700002.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c14700002.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c14700002.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c14700002.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c14700002.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c14700002.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_LMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c14700002.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=g:GetFirst()
if sc then
sc:SetMaterial(Group.FromCards(tc))
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_MATERIAL+REASON_LINK)
Duel.BreakEffect()
Duel.SpecialSummon(sc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
\ No newline at end of file
--荒野的披风
function c14700003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c14700003.target)
e1:SetOperation(c14700003.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c14700003.eqlimit)
c:RegisterEffect(e2)
--equipcard indies
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_SZONE,0)
e3:SetTarget(c14700003.flfilter)
e3:SetValue(c14700003.indesval)
c:RegisterEffect(e3)
--effect encountted
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,14700003)
e4:SetCondition(c14700003.efcon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c14700003.eftg)
e4:SetOperation(c14700003.efop)
c:RegisterEffect(e4)
--recycle mudi equip
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,14700003)
e5:SetCondition(c14700003.rmcon)
e5:SetCost(aux.bfgcost)
e5:SetTarget(c14700003.rmtg)
e5:SetOperation(c14700003.rmop)
c:RegisterEffect(e5)
end
function c14700003.eqlimit(e,c)
return c:IsSetCard(0x2e0) or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR))
--Equip limit checking
end
function c14700003.filter(c)
return c:IsFaceup()
and (c:IsSetCard(0x2e0) or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR)))
--Equip limit checking faceup or not
end
function c14700003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
--setting linking between monster and equipcard
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14700003.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14700003.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c14700003.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c14700003.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c14700003.flfilter(e,c)
return c:IsSetCard(0x2e0) and c:IsType(TYPE_EQUIP) and c:IsType(TYPE_SPELL) and not c:IsCode(14700003)
end
function c14700003.indesval(e,re,rp)
return rp~=e:GetHandlerPlayer()
end
function c14700003.efcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c14700003.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and c14700003.effilter(chkc,tp) and chkc:IsSetCard(0x2e0) end
if chk==0 then return Duel.IsExistingTarget(c14700003.effilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c14700003.effilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c14700003.effilter(c,tc,tp)
return c:IsFaceup()
and (c:IsSetCard(0x2e0) or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR)))
end
function c14700003.e2filter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c14700003.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(c14700003.e2filter)
e1:SetCountLimit(1)
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1)
end
end
function c14700003.efilter(e,re)
return e:GetHandler()~=re:GetOwnerPlayer()
end
function c14700003.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c14700003.rmfilter(c)
return c:IsSetCard(0x2e0) and c:IsType(TYPE_EQUIP) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() and not c:IsCode(14700003)
end
function c14700003.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return (chkc:GetLocation()==LOCATION_GRAVE or chkc:GetLocation()==LOCATION_REMOVED)and c14700003.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14700003.rmfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
local g=Duel.SelectTarget(tp,c14700003.rmfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c14700003.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,2,REASON_EFFECT)
end
end
function c14700003.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
\ No newline at end of file
--荒野的翎帽
function c14700004.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c14700004.target)
e1:SetOperation(c14700004.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c14700004.eqlimit)
c:RegisterEffect(e2)
--extra attack chance
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e3:SetValue(1)
c:RegisterEffect(e3)
--recycle monster
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE)
e4:SetCategory(CATEGORY_TODECK)
e4:SetCountLimit(1,14700004)
e4:SetCondition(c14700004.rccon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c14700004.rctg)
e4:SetOperation(c14700004.rcop)
c:RegisterEffect(e4)
--Equip
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(14700004,1))
e5:SetCategory(CATEGORY_EQUIP)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,14700004)
e5:SetCondition(c14700004.spcon)
e5:SetCost(aux.bfgcost)
e5:SetTarget(c14700004.sptg)
e5:SetOperation(c14700004.spop)
c:RegisterEffect(e5)
end
function c14700004.eqlimit(e,c)
return c:IsSetCard(0x2e0) or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR))
--Equip limit checking
end
function c14700004.filter(c)
return c:IsFaceup()
and (c:IsSetCard(0x2e0) or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR)))
--Equip limit checking faceup or not
end
function c14700004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
--setting linking between monster and equipcard
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14700004.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14700004.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c14700004.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c14700004.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c14700004.rccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c14700004.rcfilter(c)
return (c:IsSetCard(0x2e0) or (c:GetAttack()==1100 and c:GetDefense()==1200 and c:IsRace(RACE_WARRIOR))) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c14700004.rctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and c14700004.rcfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14700004.rcfilter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectTarget(tp,c14700004.rcfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c14700004.rcop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function c14700004.spfilter(c,tp)
return c:IsFaceup()
and (c:IsSetCard(0x2e0) or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR)))
and Duel.IsExistingMatchingCard(c14700004.eqfilter,tp,LOCATION_GRAVE,0,1,nil,c,tp)
end
function c14700004.eqfilter(c,tc,tp)
return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(tc) and c:CheckUniqueOnField(tp) and c:IsSetCard(0x2e0) and not c:IsForbidden() and not c:IsCode(14700004)
end
function c14700004.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function c14700004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chck:IsControler(tp) and chkc:IsFaceup() and c14700004.spfilter(chkc,tp) end
local ft=0
if e:GetHandler():IsLocation(LOCATION_HAND) then ft=1 end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>ft
and Duel.IsExistingTarget(c14700004.spfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c14700004.spfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c14700004.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local c=Duel.SelectMatchingCard(tp,c14700004.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil,tc,tp)
if c:GetCount()>0 then
Duel.Equip(tp,c:GetFirst(),tc)
end
end
end
\ No newline at end of file
--荒野大地
function c14700005.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14700005,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,14700005+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c14700005.actv1)
c:RegisterEffect(e1)
--local e2=Effect.CreateEffect(c)
--e2:SetDescription(aux.Stringid(14700005,1))
--e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
--e2:SetType(EFFECT_TYPE_ACTIVATE)
--e2:SetCode(EVENT_FREE_CHAIN)
--e2:SetCountLimit(1,14700005+EFFECT_COUNT_CODE_OATH)
--e2:SetCost(c14700005.cost)
--e2:SetTarget(c14700005.tagt2)
--e2:SetOperation(c14700005.actv2)
--c:RegisterEffect(e2)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetCondition(c14700005.adcon)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetValue(c14700005.atkval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--target destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(14700005,0))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCountLimit(1)
e5:SetRange(LOCATION_FZONE)
e5:SetCondition(c14700005.dtycon)
e5:SetCost(c14700005.discost)
e5:SetTarget(c14700005.dtytg)
e5:SetOperation(c14700005.dtyop)
c:RegisterEffect(e5)
--negate
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(14700005,1))
e6:SetCategory(CATEGORY_NEGATE)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_CHAINING)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e6:SetRange(LOCATION_FZONE)
e6:SetCountLimit(1,14700005)
e6:SetCondition(c14700005.discon)
e6:SetCost(c14700005.discost)
e6:SetTarget(c14700005.distg)
e6:SetOperation(c14700005.disop)
c:RegisterEffect(e6)
end
--function c14700005.costfilter(c)
--return c:IsType(TYPE_SPELL) and c:IsDiscardable()
--end
--function c14700005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
--if chk==0 then return Duel.IsExistingMatchingCard(c14700005.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
--Duel.DiscardHand(tp,c14700005.costfilter,1,1,REASON_COST+REASON_DISCARD)
--end
function c14700005.filter1(c)
return c:IsAttack(1100) and c:IsDefense(1200) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end
function c14700005.actv1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c14700005.filter1,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(14700005,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--function c14700005.filter2(c,e,tp,tc)
--return c:IsAttack(1100) and c:IsDefense(1200) and c:IsRace(RACE_WARRIOR) and not c:IsForbidden()
--end
--function c14700005.tagt2(e,tp,eg,ep,ev,re,r,rp,chk)
--if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
--and Duel.IsExistingMatchingCard(c14700005.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
--Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
--end
--function c14700005.actv2(e,tp,eg,ep,ev,re,r,rp)
--if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
--local g=Duel.GetMatchingGroup(c14700005.filter2,tp,LOCATION_DECK,0,nil)
--if g:GetCount()>0 then
--Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
--local sg=g:Select(tp,1,1,nil)
--Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
--end
--end
function c14700005.chkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsType(TYPE_SPELL)
end
function c14700005.adcon(e)
return Duel.IsExistingMatchingCard(c14700005.chkfilter,e:GetHandler():GetControler(),LOCATION_SZONE,0,1,nil)
end
function c14700005.atkval(e,c)
return Duel.GetMatchingGroupCount(c14700005.chkfilter,e:GetHandlerPlayer(),LOCATION_SZONE,0,nil)*100
end
function c14700005.dtycon(e)
return Duel.IsExistingMatchingCard(c14700005.chkfilter,e:GetHandler():GetControler(),LOCATION_SZONE,0,3,nil)
end
function c14700005.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(c14700005.chkfilter,tp,LOCATION_SZONE,0,4,nil)
end
function c14700005.discostft(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsType(TYPE_SPELL) and c:IsSetCard(0x2e0)
end
function c14700005.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if chk==0 then return ft>=0 and Duel.IsExistingMatchingCard(c14700005.discostft,tp,LOCATION_SZONE,0,1,nil,ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c14700005.discostft,tp,LOCATION_SZONE,0,1,1,nil,ft)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c14700005.dtytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c14700005.dtyop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c14700005.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c14700005.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
\ No newline at end of file
--荒野的女刺客
function c14700006.initial_effect(c)
--ss once
c:SetSPSummonOnce(14700006)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c14700006.matfilter,1,1)
--yueshu xiaoguo
local e1=Effect.CreateEffect(c)
e1:SetCountLimit(1,14700006)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCategory(CATEGORY_POSITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c14700006.yscost)
e1:SetTarget(c14700006.ystg)
e1:SetOperation(c14700006.ysop)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCountLimit(1,14700010)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c14700006.spcon)
e2:SetTarget(c14700006.sptg)
e2:SetOperation(c14700006.spop)
c:RegisterEffect(e2)
end
function c14700006.matfilter(c)
return (c:IsLinkSetCard(0x2e0) and not c:IsLinkAttribute(ATTRIBUTE_WATER))
or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR))
end
function c14700006.cfilter(c,tp)
return c:IsControler(tp) and c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
end
function c14700006.yscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipGroup():IsExists(c14700006.cfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=e:GetHandler():GetEquipGroup():FilterSelect(tp,c14700006.cfilter,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c14700006.setfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c14700006.ystg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14700006.setfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14700006.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c14700006.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c14700006.ysop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
function c14700006.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp))
and c:IsPreviousPosition(POS_FACEUP)
end
function c14700006.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsAttack(1100) and c:IsDefense(1200) and c:IsRace(RACE_WARRIOR)
end
function c14700006.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14700006.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c14700006.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c14700006.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c14700006.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--荒野的女剑士
function c14700007.initial_effect(c)
--ss once
c:SetSPSummonOnce(14700007)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c14700007.matfilter,1,1)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14700007,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetTarget(c14700007.tgtg)
e1:SetOperation(c14700007.tgop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCountLimit(1,14700007)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c14700007.spcon)
e2:SetTarget(c14700007.sptg)
e2:SetOperation(c14700007.spop)
c:RegisterEffect(e2)
end
function c14700007.matfilter(c)
return (c:IsLinkSetCard(0x2e0) and not c:IsLinkAttribute(ATTRIBUTE_FIRE))
or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR))
end
function c14700007.tgfilter(c)
return c:IsSetCard(0x2e0) and c:IsAbleToGrave() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_EQUIP)
end
function c14700007.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14700007.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c14700007.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c14700007.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c14700007.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp))
and c:IsPreviousPosition(POS_FACEUP)
end
function c14700007.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsAttack(1100) and c:IsDefense(1200) and c:IsRace(RACE_WARRIOR)
end
function c14700007.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14700007.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c14700007.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c14700007.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c14700007.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
--荒野的女游侠
function c14700008.initial_effect(c)
--ss once
c:SetSPSummonOnce(14700008)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c14700008.matfilter,1,1)
--spell/trap destroy
local e1=Effect.CreateEffect(c)
e1:SetCountLimit(1,14700008)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c14700008.yscost)
e1:SetTarget(c14700008.ystg)
e1:SetOperation(c14700008.ysop)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCountLimit(1,14700011)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c14700008.spcon)
e2:SetTarget(c14700008.sptg)
e2:SetOperation(c14700008.spop)
c:RegisterEffect(e2)
end
function c14700008.matfilter(c)
return (c:IsLinkSetCard(0x2e0) and not c:IsLinkAttribute(ATTRIBUTE_WIND))
or (c:GetBaseAttack()==1100 and c:GetBaseDefense()==1200 and c:IsRace(RACE_WARRIOR))
end
function c14700008.cfilter(c,tp)
return c:IsControler(tp) and c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
end
function c14700008.yscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipGroup():IsExists(c14700008.cfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=e:GetHandler():GetEquipGroup():FilterSelect(tp,c14700008.cfilter,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c14700008.ystg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsType(TYPE_SPELL+TYPE_TRAP) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c14700008.ysop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c14700008.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp))
and c:IsPreviousPosition(POS_FACEUP)
end
function c14700008.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsAttack(1100) and c:IsDefense(1200) and c:IsRace(RACE_WARRIOR)
end
function c14700008.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14700008.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c14700008.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c14700008.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c14700008.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--荒野的女勇士
function c14700009.initial_effect(c)
--ss once
c:SetSPSummonOnce(14700009)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c14700009.matfilter,1,1)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14700009,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c14700009.eqcon)
e1:SetTarget(c14700009.eqtg)
e1:SetOperation(c14700009.eqop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCountLimit(1,14700009)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c14700009.spcon)
e2:SetTarget(c14700009.sptg)
e2:SetOperation(c14700009.spop)
c:RegisterEffect(e2)
--change name
--local e3=Effect.CreateEffect(c)
--e3:SetType(EFFECT_TYPE_SINGLE)
--e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
--e3:SetCode(EFFECT_CHANGE_CODE)
--e3:SetRange(LOCATION_MZONE)
--e3:SetValue(05438492)
--c:RegisterEffect(e3)
end
function c14700009.matfilter(c)
return c:IsLinkSetCard(0x2e0) and not c:IsLinkAttribute(ATTRIBUTE_EARTH)
end
function c14700009.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp))
and c:IsPreviousPosition(POS_FACEUP)
end
function c14700009.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsAttack(1100) and c:IsDefense(1200) and c:IsRace(RACE_WARRIOR)
end
function c14700009.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14700009.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c14700009.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c14700009.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c14700009.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
function c14700009.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c14700009.filter(c,e,tp,ec)
return c:IsSetCard(0x2e0) and c:IsCanBeEffectTarget(e) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec)
end
function c14700009.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c14700009.filter(chkc,e,tp,e:GetHandler()) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c14700009.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp,e:GetHandler()) end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetMatchingGroup(c14700009.filter,tp,LOCATION_REMOVED,0,nil,e,tp,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g1=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode())
if ft>1 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(14700009,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g2=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,g2:GetFirst():GetCode())
g1:Merge(g2)
--if ft>2 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(14700009,3)) then
--Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
--g2=g:Select(tp,1,1,nil)
--g1:Merge(g2)
--end
end
Duel.SetTargetCard(g1)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_REMOVED,g1,g1:GetCount(),0,0)
end
function c14700009.eqop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if ft<g:GetCount() then return end
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local tc=g:GetFirst()
while tc do
Duel.Equip(tp,tc,c,true,true)
tc=g:GetNext()
end
Duel.EquipComplete()
end
\ No newline at end of file
--教团的普通骑士
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104200,"CHURCH_KNIGHT")
function cm.initial_effect(c)
--double tribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DOUBLE_TRIBUTE)
e1:SetValue(cm.condition)
c:RegisterEffect(e1)
--to hand
local e2=rsef.STO(c,EVENT_SUMMON_SUCCESS,{m,1},nil,"se,th","de,dsp",nil,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e3=rsef.RegisterClone(c,e2,"code",EVENT_SPSUMMON_SUCCESS)
end
function cm.thfilter(c)
return c:IsAbleToHand() and (c:IsCode(16104220) or c:IsCode(16104226))
end
function cm.thop(e,tp)
local c=e:GetHandler()
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.condition(e,c)
return c:CheckSetCard("CHURCH")
end
--教团的灰骑士 格雷
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104202,"CHURCH_KNIGHT")
function cm.initial_effect(c)
c:SetUniqueOnField(1,1,m)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(cm.sumsuc)
c:RegisterEffect(e1)
--a d A
local e2=REIKAI.CHRUCH_KNIGHT_DES(c,cm.gacon,cm.gatg,{1,m},cm.gaop)
local e3=REIKAI.CHRUCH_KNIGHT_ADV(c,cm.gacon,cm.gatg,{1,m},cm.gaop)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsSummonType(SUMMON_TYPE_ADVANCE) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabel(c:GetFieldID())
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(0,LOCATION_ONFIELD)
e2:SetTarget(cm.disable)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsOnField() and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function cm.disable(e,c)
return not c:IsType(TYPE_MONSTER)
end
function cm.gacon(e,tp,eg,ep,ev,re,r,rp)
local des=eg:GetFirst()
local rc=des:GetReasonCard()
return (not des:IsRace(RACE_WARRIOR)) and rc:IsRelateToBattle() and rc==e:GetHandler()
end
function cm.gatg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.gaop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetTarget(cm.desreptg)
e2:SetOperation(cm.desrepop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetLabelObject(e2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetDescription(aux.Stringid(m,1))
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3,true)
end
end
function cm.filter1(c)
return c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_MZONE)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if sc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and c:IsFaceup() then
if not Duel.Equip(tp,sc,c) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(c)
e1:SetValue(cm.eqlimit)
sc:RegisterEffect(e1)
--atk/def up
local e2=Effect.CreateEffect(sc)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
local e3=Effect.CreateEffect(sc)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetValue(1000)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e3)
end
end
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
function cm.repfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local g=c:GetEquipGroup()
return not c:IsReason(REASON_REPLACE) and g:IsExists(cm.repfilter,1,nil)
end
if Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
local g=c:GetEquipGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:FilterSelect(tp,cm.repfilter,1,1,nil)
Duel.SetTargetCard(sg)
return true
else return false end
end
function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.Destroy(tg,REASON_EFFECT+REASON_REPLACE)
end
\ No newline at end of file
--教团的银骑士 莱特哈尔
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104204,"CHURCH_KNIGHT")
function cm.initial_effect(c)
c:SetUniqueOnField(1,1,m)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(cm.sumsuc)
c:RegisterEffect(e1)
--a d A
local e2=REIKAI.CHRUCH_KNIGHT_DES(c,cm.gacon,cm.gatg,{1},cm.gaop)
local e3=REIKAI.CHRUCH_KNIGHT_ADV(c,cm.gacon,cm.gatg,{1},cm.gaop)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsSummonType(SUMMON_TYPE_ADVANCE) then return end
local e1=rsef.SV_IMMUNE_EFFECT(c,cm.val,nil,{RESET_PHASE+PHASE_END},nil,nil)
end
function cm.val(e,re,tp)
return not re:GetHandler():IsRace(RACE_WARRIOR)
end
function cm.gacon(e,tp,eg,ep,ev,re,r,rp)
local des=eg:GetFirst()
local rc=des:GetReasonCard()
return (not des:IsRace(RACE_WARRIOR)) and rc:IsRelateToBattle() and rc==e:GetHandler() and rc:GetEffectCount(16104206)==0
end
function cm.gatg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.gaop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetDescription(aux.Stringid(m,1))
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3,true)
end
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if tc==c then tc=Duel.GetAttackTarget() end
if chk==0 then return tc and tc:IsFaceup() and not tc:IsRace(RACE_WARRIOR) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
if e:IsHasType(EFFECT_TYPE_TRIGGER_O) then
Duel.SetChainLimit(aux.FALSE)
end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if tc==c then tc=Duel.GetAttackTarget() end
if tc:IsRelateToBattle() then if Duel.Destroy(tc,REASON_EFFECT)~=0 then
local LP1=Duel.GetLP(1-tp)
if tc:GetTextAttack()>LP1 then Duel.SetLP(1-tp,0) end
Duel.SetLP(1-tp,LP1-tc:GetTextAttack()) end
end
end
\ No newline at end of file
--不灭的圣光教团国
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104206,"CHURCH")
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--cannot Disable Sum
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_DISABLE_SUMMON)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e3:SetTarget(aux.TargetBoolFunction(rscf.CheckSetCard,"CHURCH"))
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetTarget(aux.TargetBoolFunction(rscf.CheckSetCard,"CHURCH"))
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DISABLE_FLIP_SUMMON)
e1:SetRange(LOCATION_FZONE)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetTarget(aux.TargetBoolFunction(rscf.CheckSetCard,"CHURCH"))
c:RegisterEffect(e1)
--Summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1)
e4:SetTarget(cm.sumtg)
e4:SetOperation(cm.sumop)
c:RegisterEffect(e4)
end
function cm.filter(c)
return c:CheckSetCard("CHURCH") and c:IsSummonable(true,nil)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()<=0 then return end
local sc=g:GetFirst()
if sc:CheckSetCard("CHURCH_KNIGHT") then
if sc:GetActivateEffect() and e:GetOperation() then
local e=sc:GetActivateEffect()
local op=e:GetOperation()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetOperation(op)
sc:RegisterEffect(e1)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetDescription(aux.Stringid(m,1))
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
sc:RegisterEffect(e3,true)
end
end
Duel.Summon(tp,sc,true,nil)
end
\ No newline at end of file
--教团的苍骑士 IO
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104208,"CHURCH_KNIGHT")
function cm.initial_effect(c)
c:SetUniqueOnField(1,1,m)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(cm.sumsuc)
c:RegisterEffect(e1)
--a d A
local e2=REIKAI.CHRUCH_KNIGHT_DES(c,cm.gacon,cm.gatg,{1,m},cm.gaop)
local e3=REIKAI.CHRUCH_KNIGHT_ADV(c,cm.gacon,cm.gatg,{1,m},cm.gaop)
end
function cm.des(c)
return not c:IsRace(RACE_WARRIOR)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsSummonType(SUMMON_TYPE_ADVANCE) then return end
local g=Duel.GetMatchingGroup(cm.des,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
function cm.gacon(e,tp,eg,ep,ev,re,r,rp)
local des=eg:GetFirst()
local rc=des:GetReasonCard()
return (not des:IsRace(RACE_WARRIOR)) and rc:IsRelateToBattle() and rc==e:GetHandler()
end
function cm.gatg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.gaop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetTarget(cm.dstg)
e1:SetOperation(cm.dsop)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetDescription(aux.Stringid(m,1))
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3,true)
end
end
function cm.filter1(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end
function cm.desfilter(c,g)
return g:IsContains(c)
end
function cm.dstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_MZONE)
end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sc=Duel.GetFirstTarget()
local cg=sc:GetColumnGroup()
local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,sc,cg)
if sc:IsRelateToEffect(e) then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--教团的翼骑士 韦因
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104210,"CHURCH_KNIGHT")
function cm.initial_effect(c)
c:SetUniqueOnField(1,1,m)
--hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.sprcost)
e1:SetTarget(cm.sprtg)
e1:SetOperation(cm.sprop)
c:RegisterEffect(e1)
--a d A
local e2=REIKAI.CHRUCH_KNIGHT_DES(c,cm.gacon,cm.gatg,{1,m},cm.gaop)
local e3=REIKAI.CHRUCH_KNIGHT_ADV(c,cm.gacon,cm.gatg,{1,m},cm.gaop)
end
function cm.filter(c)
return c:CheckSetCard("CHURCH") and c:GetLevel()>=5
end
function cm.sprcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.sprtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,e:GetHandler())
end
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(cm.ntcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function cm.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.gacon(e,tp,eg,ep,ev,re,r,rp)
local des=eg:GetFirst()
local rc=des:GetReasonCard()
return (not des:IsRace(RACE_WARRIOR)) and rc:IsRelateToBattle() and rc==e:GetHandler()
end
function cm.gatg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.gaop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetDescription(aux.Stringid(m,1))
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3,true)
end
end
function cm.filter1(c)
return c:IsAbleToRemove()
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,4))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_REMOVE)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--教团的圣旗手 迪萨贝尔
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104212,"CHURCH")
function cm.initial_effect(c)
c:SetUniqueOnField(1,1,m)
--summon success
local e1=rsef.STO(c,EVENT_SUMMON_SUCCESS,{m,1},nil,"se,th","de,dsp",nil,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e3=rsef.RegisterClone(c,e1,"code",EVENT_SPSUMMON_SUCCESS)
--double tribute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DOUBLE_TRIBUTE)
e2:SetValue(cm.condition)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return c:IsCode(16104206) and c:IsAbleToHand()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.condition(e,c)
return c:CheckSetCard("CHURCH")
end
\ No newline at end of file
--叛教的掠夺骑士 IO
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104214,"CHURCH_KNIGHT")
function cm.initial_effect(c)
aux.AddCodeList(c,16104208)
c:SetUniqueOnField(1,1,m)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(cm.splimit)
c:RegisterEffect(e0)
local e4=rscf.SetSpecialSummonProduce(c,LOCATION_HAND,cm.sprcon,cm.sprop)
--indes
--local e1=Effect.CreateEffect(c)
--e1:SetType(EFFECT_TYPE_SINGLE)
--e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
--e1:SetRange(LOCATION_MZONE)
--e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
--e1:SetValue(1)
--c:RegisterEffect(e1)
--cannot target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--disef and gain
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
end
function cm.splimit(e,se,sp,st)
return se:GetHandler():IsCode(16104226)
end
function cm.spzfilter(c,tp)
return Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.sprcon(e,c,tp)
local g1=Duel.GetReleaseGroup(tp,false):Filter(Card.IsCode,nil,16104208)
return (g1+g1):IsExists(cm.spzfilter,1,nil,tp)
end
function cm.sprop(e,tp)
local g1=Duel.GetReleaseGroup(tp,false):Filter(Card.IsCode,nil,16104208)
local sg=(g1+g1):SelectSubGroup(tp,cm.spzfilter,false,1,1,tp)
Duel.Release(sg,REASON_COST)
end
function cm.filter1(c)
return c:IsFaceup() and not (c:IsDisabled() and c:GetAttack()==0 and c:GetDefense()==0)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
Duel.SelectTarget(tp,cm.filter1,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,tp,LOCATION_MZONE)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local op=Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))
if op==0 then
local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SET_ATTACK)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
e5:SetValue(0)
tc:RegisterEffect(e5)
local e4=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_DEFENSE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetValue(0)
tc:RegisterEffect(e4)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(tc:GetTextAttack())
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e3:SetValue(tc:GetTextDefense())
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetDescription(aux.Stringid(m,4))
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2,true)
end
if op==1 then
local code=tc:GetOriginalCodeRule()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_CODE)
e1:SetValue(code)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetDescription(aux.Stringid(m,5))
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2,true)
if not tc:IsType(TYPE_TRAPMONSTER) then
local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
if (not (tc:IsDisabled() or tc:IsType(TYPE_NORMAL))) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e5=Effect.CreateEffect(e:GetHandler())
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_TRIGGER)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e5)
end
end
end
end
\ No newline at end of file
--叛教的异骑士 迪萨贝尔
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104216,"CHURCH_KNIGHT")
function cm.initial_effect(c)
aux.AddCodeList(c,16104212)
c:SetUniqueOnField(1,1,m)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(cm.splimit)
c:RegisterEffect(e0)
local e4=rscf.SetSpecialSummonProduce(c,LOCATION_HAND,cm.sprcon,cm.sprop)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
c:RegisterEffect(e1)
--cannot target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetValue(1)
c:RegisterEffect(e2)
--disef and gain
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.discon)
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
end
function cm.splimit(e,se,sp,st)
return se:GetHandler():IsCode(16104226)
end
function cm.spzfilter(c,tp)
return Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.sprcon(e,c,tp)
local g1=Duel.GetReleaseGroup(tp,false):Filter(Card.IsCode,nil,16104212)
return (g1+g1):IsExists(cm.spzfilter,1,nil,tp)
end
function cm.sprop(e,tp)
local g1=Duel.GetReleaseGroup(tp,false):Filter(Card.IsCode,nil,16104212)
local sg=(g1+g1):SelectSubGroup(tp,cm.spzfilter,false,1,1,tp)
Duel.Release(sg,REASON_COST)
end
function cm.filter1(c)
return c:IsFaceup() and not c:IsDisabled()
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and Duel.IsChainNegatable(ev)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetCategory(CATEGORY_NEGATE)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re)
and not re:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler():IsDestructable() and re:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg,1,0,0)
end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and rc:IsType(TYPE_MONSTER) and Duel.Destroy(eg,REASON_EFFECT)~=0
and not rc:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.SpecialSummon(re:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--骑士的行军
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104218,"CHURCH_KNIGHT")
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return c:CheckSetCard("CHURCH")
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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:CheckSetCard("CHURCH")
end
function cm.filter(c)
return c:CheckSetCard("CHURCH_KNIGHT") and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--直到最后一刻
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104220,"CHURCH_KNIGHT")
function cm.initial_effect(c)
c:SetUniqueOnField(1,1,m)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--cannot ChangePosition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetTarget(cm.postg)
e1:SetCondition(cm.poscon)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.postg(e,c)
return c:CheckSetCard("CHURCH")
end
function cm.poscon(e)
return e:GetHandler():IsAttackPos()
end
function cm.cfilter(c)
return c:CheckSetCard("CHURCH")
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then local tc=eg:Filter(cm.cfilter,nil):GetFirst()
local atk=tc:GetTextAttack() local def=tc:GetTextDefense() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,16104222,nil,0x21,atk,def,1,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:Filter(cm.cfilter,nil):GetFirst()
local atk,def,code=0,0,0
if tc then
atk=tc:GetAttack()
def=tc:GetDefense()
code=tc:GetOriginalCode()
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,16104222,nil,0x21,atk,def,1,RACE_ZOMBIE,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,16104222)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(atk)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(def)
token:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_CODE)
e3:SetReset(RESET_EVENT+0x1fe0000)
e3:SetValue(code)
token:RegisterEffect(e3,true)
end
end
\ No newline at end of file
--异端剿灭
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104224,"CHURCH_KNIGHT")
function cm.initial_effect(c)
--ACT
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.descon)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.desfilter(c)
return (not c:IsRace(RACE_WARRIOR)) and c:IsFaceup()
end
--function cm.ntrfilter(c)
--return c:IsRace(RACE_WARRIOR) and c:IsControlerCanBeChanged() and c:IsFaceup()
--end
function cm.filter(c)
return c:CheckSetCard("CHURCH_KNIGHT") and c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:GetLevel()>=5
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_ONFIELD,nil)
local num=g:GetCount()
if num<=0 then return end
Duel.Destroy(g,REASON_EFFECT)
--if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,16104228) and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
--local tc=Duel.SelectMatchingCard(tp,cm.ntrfilter,tp,0,LOCATION_MZONE,1,1,nil)
--Duel.GetControl(tc,tp)
--end
end
\ No newline at end of file
--前路的抉择
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104226,"CHURCH")
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,m)
e0:SetTarget(cm.sptg)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg1)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
end
function cm.filter(c,e,tp)
return c:IsFaceup() and c:CheckSetCard("CHURCH")
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,c:GetCode(),e,tp)
end
function cm.spfilter(c,code,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.IsCodeListed(c,code) and c:IsSetCard(0xcc4)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
local code=tc:GetCode()
if Duel.SendtoGrave(tc,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,code,e,tp)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
sg:GetFirst():CompleteProcedure()
end
end
function cm.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xcc4)
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,c,e,tp)
end
function cm.spfilter1(c,cad,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.IsCodeListed(cad,c:GetCode()) and c:CheckSetCard("CHURCH") and not c:IsSetCard(0xcc4)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
if Duel.SendtoGrave(tc,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,tc,e,tp)
if sg:GetCount()>0 then
Duel.BreakEffect()
local sc=sg:GetFirst()
if sc:CheckSetCard("CHURCH_KNIGHT") then
if sc:GetActivateEffect() and e:GetOperation() then
local e=sc:GetActivateEffect()
local op=e:GetOperation()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetOperation(op)
sc:RegisterEffect(e1)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetDescription(aux.Stringid(m,1))
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
sc:RegisterEffect(e3,true)
end
end
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--教团的异骑士 燎煌
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104228,"CHURCH_KNIGHT")
function cm.initial_effect(c)
c:SetUniqueOnField(1,1,m)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(cm.sumsuc)
c:RegisterEffect(e1)
--a d A
local e2=REIKAI.CHRUCH_KNIGHT_DES(c,cm.gacon,cm.gatg,{1,m},cm.gaop)
local e3=REIKAI.CHRUCH_KNIGHT_ADV(c,cm.gacon,cm.gatg,{1,m},cm.gaop)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsSummonType(SUMMON_TYPE_ADVANCE) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabel(c:GetFieldID())
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(0,LOCATION_ONFIELD)
e2:SetTarget(cm.disable)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsOnField() and re:GetHandler():IsType(TYPE_MONSTER)
end
function cm.disable(e,c)
return c:IsType(TYPE_MONSTER)
end
function cm.gacon(e,tp,eg,ep,ev,re,r,rp)
local des=eg:GetFirst()
local rc=des:GetReasonCard()
return (not des:IsRace(RACE_WARRIOR)) and rc:IsRelateToBattle() and rc==e:GetHandler()
end
function cm.gatg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.gaop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetDescription(aux.Stringid(m,1))
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3,true)
end
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
if g:GetFirst():IsType(TYPE_MONSTER) then
local atk=g:GetFirst():GetTextAttack()
if atk<0 then atk=0 end
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--终末之歌
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rscf.DefineCard(16104230,"CHURCH")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c)
return (c:CheckSetCard("CHURCH")) and c:IsAbleToDeck()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,3,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.sfilter(c,tp)
return c:IsLocation(LOCATION_DECK) and c:IsControler(tp)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(cm.sfilter,1,nil,tp) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==3 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -4538,5 +4538,29 @@ function rsof.Check_Boolean(value,booleanvaule)
return type(value)=="boolean" and value==false
end
end
REIKAI={}
function REIKAI.CHRUCH_KNIGHT_DES(card,con,tg,count,op)
local tc1,val2,ignore=rsef.GetRegisterCard(card)
local e=Effect.CreateEffect(tc1)
e:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e:SetCode(EVENT_BATTLE_DESTROYED)
e:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
rsef.RegisterCountLimit(e,count)
e:SetRange(LOCATION_MZONE)
rsef.RegisterSolve(e,con,nil,tg,op)
local _,fid=rsef.RegisterEffect(card,e)
return e,fid
end
function REIKAI.CHRUCH_KNIGHT_ADV(card,con,tg,count,op)
local tc1,val2,ignore=rsef.GetRegisterCard(card)
local e=Effect.CreateEffect(tc1)
e:SetType(EFFECT_TYPE_ACTIVATE)
e:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
rsef.RegisterCountLimit(e,count)
e:SetRange(LOCATION_MZONE)
rsef.RegisterSolve(e,con,nil,tg,op)
local _,fid=rsef.RegisterEffect(card,e)
return e,fid
end
-------------------"Hape"---------------------
rsof.Escape_Old_Functions()
\ No newline at end of file
--Nation Blue·高垣枫
local m=26802007
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_XYZ),1,1)
c:EnableReviveLimit()
--effect gain
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_BE_MATERIAL)
e0:SetCondition(cm.efcon)
e0:SetOperation(cm.efop)
c:RegisterEffect(e0)
--cannot link material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
--change name
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(81009011)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.mttg)
e3:SetOperation(cm.mtop)
c:RegisterEffect(e3)
end
function cm.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.sumcon)
e1:SetOperation(cm.sumsuc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(81009011,1))
end
function cm.mtfilter(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(cm.mtfilter,tp,0,LOCATION_GRAVE,1,nil,e) end
end
function cm.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,cm.mtfilter,tp,0,LOCATION_GRAVE,1,1,nil,e)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
--悠久的羽根·高垣枫
local m=26802008
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2,cm.ovfilter,aux.Stringid(m,0))
c:EnableReviveLimit()
--destroy replace
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.desreptg)
e1:SetValue(cm.desrepval)
e1:SetOperation(cm.desrepop)
c:RegisterEffect(e1)
--material
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.matcon)
e2:SetTarget(cm.mattg)
e2:SetOperation(cm.matop)
c:RegisterEffect(e2)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(81009011)
end
function cm.repfilter(c,tp)
return c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp)
and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function cm.desrepval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer())
end
function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
Duel.Hint(HINT_CARD,0,m)
end
function cm.cfilter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsControler(tp) and c:IsCanBeEffectTarget(e) and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and eg:IsExists(cm.cfilter1,1,nil,e,tp)
end
function cm.tgfilter(c,tp,eg)
return eg:IsContains(c) and c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.tgfilter(chkc,tp,eg) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp,eg)
and e:GetHandler():IsCanOverlay() end
if eg:GetCount()==1 then
Duel.SetTargetCard(eg)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,eg)
end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
--等身的距离·高垣枫
local m=26802009
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--xyz summon
aux.AddXyzProcedure(c,nil,9,2,cm.ovfilter,aux.Stringid(m,0))
c:EnableReviveLimit()
--return grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetCost(cm.rtgcost)
e1:SetTarget(cm.rtgtg)
e1:SetOperation(cm.rtgop)
c:RegisterEffect(e1)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,m+900)
e5:SetCost(cm.cost)
e5:SetTarget(cm.sptg)
e5:SetOperation(cm.spop)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(81009011)
end
function cm.rtgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function cm.rtgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function cm.rtgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
end
end
function cm.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsType(TYPE_XYZ)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
function cm.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) 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,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,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)
end
end
--方舟骑士-安洁莉娜
local m=26803011
local cm=_G["c"..m]
function cm.initial_effect(c)
--disable attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.atkcon)
e1:SetTarget(cm.atktg)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.askcon)
e2:SetOperation(cm.askop)
c:RegisterEffect(e2)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():IsLocation(LOCATION_HAND) then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if Duel.NegateAttack() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
if c:IsLocation(LOCATION_HAND) and c:IsAbleToGrave() then
Duel.BreakEffect()
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
function cm.askcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler() and e:GetHandler():IsChainAttackable()
end
function cm.askop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
Duel.ChainAttack()
end
end
--深蓝之声·如月千早
local m=26810021
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.rltg)
e1:SetOperation(cm.rlop)
c:RegisterEffect(e1)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_RELEASE)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
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.CheckReleaseGroup(tp,nil,1,nil) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
local sg=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(sg,REASON_COST)
end
function cm.rltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsReleasable,1-tp,LOCATION_MZONE,0,1,nil,REASON_RULE) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,1-tp,LOCATION_MZONE)
end
function cm.rlop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsReleasable,1-tp,LOCATION_MZONE,0,nil,REASON_RULE)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_RELEASE)
local sg=g:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Release(sg,REASON_RULE)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x601)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,ct,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--如月千早的疲惫
local m=26810022
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(cm.setcost)
e2:SetTarget(cm.settg)
e2:SetOperation(cm.setop)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function cm.cfilter(c,tp)
return c:IsSetCard(0x601) and (c:IsControler(tp) or c:IsFaceup()) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
Duel.Release(sg,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function cm.vfilter(c)
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.vfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.vfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
end
--海之时针·海伊
local m=26816012
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,2)
c:EnableReviveLimit()
--chain attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetCondition(cm.atcon)
e1:SetCost(cm.atcost)
e1:SetOperation(cm.atop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c and c:IsChainAttackable(0)
end
function cm.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToBattle() then return end
Duel.ChainAttack()
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_XYZ) and c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK and c:GetReasonCard():IsAttack(3200)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,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.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
--天球的观测者
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m,cm=rscf.DefineCard(30556820)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m},nil,nil,nil,nil,rsop.target(aux.TRUE,nil,LOCATION_DECK),cm.act)
local e2=rsef.QO(c,nil,{m,2},{1,m},"th,dr",nil,LOCATION_SZONE,rscon.phmp,nil,cm.tg,cm.op)
end
function cm.act(e,tp)
if not aux.ExceptThisCard(e) then return end
local ct,og,tc=rsop.SelectToDeck(tp,aux.TRUE,tp,LOCATION_DECK,0,1,1,nil,{1-tp,2,REASON_EFFECT })
if tc then
tc:ReverseInDeck()
end
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_DECK,nil)
local b1=g:IsExists(Card.IsAbleToHand,1,nil)
local b2=Duel.IsPlayerCanDraw(tp,#g)
if chk==0 then return #g>0 and (b1 or b2) end
end
function cm.op(e,tp)
if not aux.ExceptThisCard(e) then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_DECK,nil)
if #g<=0 then return end
Duel.ConfirmCards(1-tp,g)
local b1=g:IsExists(Card.IsAbleToHand,1,nil)
local b2=Duel.IsPlayerCanDraw(tp,#g)
if not b1 and not b2 then return end
local op=rsop.SelectOption(1-tp,b1,{m,0},b2,{m,1})
if op==1 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
else
Duel.Draw(tp,#g,REASON_EFFECT)
end
end
\ No newline at end of file
--造神计划
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m,cm=rscf.DefineCard(33330100)
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.QO(c,nil,{m,0},1,"sp",nil,LOCATION_SZONE,nil,rscost.cost(cm.cfilter,"tg",LOCATION_MZONE,0,true),rsop.target(rscf.spfilter2(Card.IsSetCard,0x550),"sp",LOCATION_EXTRA),cm.spop)
local e3=rsef.QO(c,nil,{m,1},nil,"se,th,td,ga",nil,LOCATION_GRAVE,nil,aux.bfgcost,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
end
function cm.cfilter(c,e,tp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return #g==g:FilterCount(Card.IsAbleToGraveAsCost,nil)
end
function cm.spop(e,tp)
if aux.ExceptThisCard(e) then
rsop.SelectSpecialSummon(tp,rscf.spfilter2(Card.IsSetCard,0x550),tp,LOCATION_EXTRA,0,1,1,nil,{},e,tp)
end
local e1=rsef.FV_LIMIT_PLAYER({e:GetHandler(),tp},"sp",nil,aux.TargetBoolFunction(Card.IsLocation,LOCATION_EXTRA),{1,0},nil,rsreset.pend)
end
function cm.thfilter(c)
return c:IsSetCard(0x550) and c:IsAbleToHand()
end
function cm.tdfilter(c)
return c:IsSetCard(0x550) and c:IsAbleToDeck()
end
function cm.thop(e,tp)
if rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})>0 then
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
rsgf.SelectToDeck(g,tp,aux.TRUE,1,3,nil,{})
end
end
end
\ No newline at end of file
--造神计划1 伪帝
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m,cm=rscf.DefineCard(33330101)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_LINK),3,3)
local e1=rsef.SC(c,EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(cm.ssop)
local e2=rsef.I(c,{m,0},{1,m},"tg,sp,atk",nil,LOCATION_GRAVE,cm.spcon,nil,nil,cm.spop)
local e3=rsef.RegisterOPTurn(c,e2,cm.spcon2)
end
function cm.ssop(e,tp)
local e1=rsef.FC({e:GetHandler(),tp},EVENT_CHAINING,nil,nil,nil,nil,nil,cm.rmop,rsreset.pend)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) and rc:IsAbleToRemove() then
Duel.Hint(HINT_CARD,0,m)
Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)
end
end
function cm.spcon(e,tp)
local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
return #hg==1 and not hg:GetFirst():IsPublic() and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function cm.spop(e,tp)
rsop.SelectSolve(HINTMSG_CONFIRM,tp,aux.NOT(Card.IsPublic),tp,LOCATION_HAND,0,1,1,nil,cm.solvefun,e,tp)
end
function cm.solvefun(g,e,tp)
local c=aux.ExceptThisCard(e)
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
if not tc:IsType(TYPE_MONSTER) or not c or not rscf.spfilter2()(c,e,tp) or not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end
if Duel.SendtoGrave(tc,REASON_EFFECT)>0 and rssf.SpecialSummon(c)>0 then
local e1=rscf.QuickBuff(c,"atk+",tc:GetBaseAttack())
end
end
function cm.spcon2(e,tp)
return Duel.GetLP(tp)<=4000
end
\ No newline at end of file
--造神计划9 永生骸
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m,cm=rscf.DefineCard(33330109)
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(1166)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(cm.lcon)
e1:SetTarget(cm.ltg)
e1:SetOperation(Auxiliary.LinkOperation(nil,2,4,cm.gf))
e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1)
local e2=rsef.SC(c,EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(cm.atkop)
local e3=rsef.STO(c,EVENT_TO_GRAVE,{m,0},{1,m},"sp","de,dsp",cm.spcon,aux.bfgcost,rsop.target(rscf.spfilter2(Card.IsType,TYPE_LINK),"sp",LOCATION_REMOVED,LOCATION_REMOVED),cm.spop)
local e4=rsef.FTO(c,EVENT_DAMAGE,{m,1},nil,nil,"de,dsp",LOCATION_MZONE,cm.setcon,nil,rsop.target(cm.setfilter,nil,LOCATION_GRAVE,LOCATION_GRAVE),cm.setop)
end
function cm.gf(g)
return g:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_NORMAL)
end
function cm.lcon(...)
local f=aux.GetLinkMaterials
aux.GetLinkMaterials=cm.GetLinkMaterials
local res=Auxiliary.LinkCondition(nil,2,4,cm.gf)(...)
aux.GetLinkMaterials=f
return res
end
function cm.ltg(...)
local f=aux.GetLinkMaterials
aux.GetLinkMaterials=cm.GetLinkMaterials
local res=Auxiliary.LinkTarget(nil,2,4,cm.gf)(...)
aux.GetLinkMaterials=f
return res
end
function cm.GetLinkMaterials(tp,f,lc)
local mg=Duel.GetMatchingGroup(Auxiliary.LConditionFilter,tp,LOCATION_MZONE,0,nil,f,lc)
local mg2=Duel.GetMatchingGroup(Auxiliary.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp)
local mg3=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_SZONE,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end
if mg3:GetCount()>0 then mg:Merge(mg3) end
return mg
end
function cm.atkop(e,tp)
local c=e:GetHandler()
local e1=rscf.QuickBuff(c,"atk",0,"reset",rsreset.est_pend+RESET_DISABLE)
local e2=rsef.SV_INDESTRUCTABLE(c,"battle",nil,nil,rsreset.est_pend,"cd")
local e3=rsef.SV_IMMUNE_EFFECT(c,rsval.imes,nil,rsreset.est_pend,"cd")
end
function cm.spcon(e,tp)
local c=e:GetHandler()
return c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp)
end
function cm.spop(e,tp)
rsop.SelectSpecialSummon(tp,rscf.spfilter2(Card.IsType,TYPE_LINK),tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,{},e,tp)
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and ev>=1000 and (r & REASON_BATTLE ~=0 or (r & REASON_EFFECT ~=0 and rp~=tp))
end
function cm.setfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local st=math.floor(ev/1000)
if ft<=0 then return end
rsop.SelectSolve(HINTMSG_SET,tp,cm.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,math.min(ft,st,1),nil,cm.setfun,tp)
end
function cm.setfun(g,tp)
Duel.SSet(tp,g)
end
\ No newline at end of file
......@@ -23,17 +23,18 @@ function cm.initial_effect(c)
end
--e1
function cm.spfilter(c,e,tp)
return c:IsLevelBelow(2) and c:IsSetCard(0xa82) and (c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
return c:IsLevelBelow(2) and c:IsSetCard(0xa82) and c:IsAbleToHand() --or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end
if chk==0 then return true end
if Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
-- e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e:SetCategory(CATEGORY_TOHAND)
e:SetOperation(cm.activate)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,0,0,0)
--Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,0,0,0)
else
e:SetCategory(0)
e:SetProperty(0)
......@@ -44,15 +45,15 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not tc:IsHasEffect(EFFECT_NECRO_VALLEY)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsAbleToHand() then
--if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
-- and not tc:IsHasEffect(EFFECT_NECRO_VALLEY)
-- and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
-- Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
--else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
--end
end
end
--e2
......
......@@ -29,7 +29,7 @@ function cm.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTargetRange(1,1)
--e3:SetCondition(cm.con2)
e3:SetValue(cm.limit2)
c:RegisterEffect(e3)
......
......@@ -18,29 +18,30 @@ function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
-- e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+10000)
e2:SetCondition(cm.thcon)
-- e2:SetCondition(cm.thcon)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--e3mat check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(cm.valcheck)
c:RegisterEffect(e3)
-- local e3=Effect.CreateEffect(c)
-- e3:SetType(EFFECT_TYPE_SINGLE)
-- e3:SetCode(EFFECT_MATERIAL_CHECK)
-- e3:SetValue(cm.valcheck)
-- c:RegisterEffect(e3)
--summon success
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetCondition(cm.regcon)
e4:SetOperation(cm.regop)
c:RegisterEffect(e4)
e4:SetLabelObject(e3)
-- local e4=Effect.CreateEffect(c)
-- e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
-- e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
-- e4:SetCode(EVENT_SUMMON_SUCCESS)
-- e4:SetCondition(cm.regcon)
-- e4:SetOperation(cm.regop)
-- c:RegisterEffect(e4)
-- e4:SetLabelObject(e3)
end
--e1
function cm.tezhao(c,e,tp)
......@@ -58,9 +59,9 @@ function cm.tezhao1(e,tp,eg,ep,ev,re,r,rp)
end
end
--e2
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
--function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
-- return Duel.GetTurnPlayer()==tp and e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
--end
function cm.thcostfil(c)
return c:IsSetCard(0xa85) and c:IsAbleToGraveAsCost()
end
......@@ -86,25 +87,25 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
--e3
function cm.valcheck(e,c)
local g=c:GetMaterial()
local flag=0
if g:IsExists(Card.IsSetCard,1,nil,0xa85) then flag=1 end
e:SetLabel(flag)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
and e:GetLabelObject():GetLabel()~=0
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_RELEASE)
e3:SetTargetRange(0,1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e3)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
--function cm.valcheck(e,c)
-- local g=c:GetMaterial()
-- local flag=0
-- if g:IsExists(Card.IsSetCard,1,nil,0xa85) then flag=1 end
-- e:SetLabel(flag)
--end
--function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
-- return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
-- and e:GetLabelObject():GetLabel()~=0
--end
--function cm.regop(e,tp,eg,ep,ev,re,r,rp)
-- local e3=Effect.CreateEffect(e:GetHandler())
-- e3:SetDescription(aux.Stringid(m,2))
-- e3:SetType(EFFECT_TYPE_FIELD)
-- e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
-- e3:SetRange(LOCATION_MZONE)
-- e3:SetCode(EFFECT_CANNOT_RELEASE)
-- e3:SetTargetRange(0,1)
-- e3:SetReset(RESET_EVENT+RESETS_STANDARD)
-- e:GetHandler():RegisterEffect(e3)
-- e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
--end
......@@ -24,35 +24,45 @@ function cm.initial_effect(c)
e2:SetOperation(Suyu.sum)
c:RegisterEffect(e2)
--cannot activate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(1,0)
e3:SetValue(cm.aclimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SSET)
e4:SetRange(LOCATION_SZONE)
e4:SetOperation(cm.aclimset)
c:RegisterEffect(e4)
-- local e3=Effect.CreateEffect(c)
-- e3:SetType(EFFECT_TYPE_FIELD)
-- e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
-- e3:SetCode(EFFECT_CANNOT_ACTIVATE)
-- e3:SetRange(LOCATION_MZONE)
-- e3:SetTargetRange(1,0)
-- e3:SetValue(cm.aclimit)
-- c:RegisterEffect(e3)
-- local e4=Effect.CreateEffect(c)
-- e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
-- e4:SetCode(EVENT_SSET)
-- e4:SetRange(LOCATION_SZONE)
-- e4:SetOperation(cm.aclimset)
-- c:RegisterEffect(e4)
--level
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_UPDATE_LEVEL)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xa85))
e5:SetValue(2)
c:RegisterEffect(e5)
end
--e1
function cm.sum(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA)
end
--e3
function cm.aclimit(e,re,tp)
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL) then return false end
local c=re:GetHandler()
return not c:IsLocation(LOCATION_SZONE)
end
function cm.aclimset(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,1)
tc=eg:GetNext()
end
end
--function cm.aclimit(e,re,tp)
-- if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL) then return false end
-- local c=re:GetHandler()
-- return not c:IsLocation(LOCATION_SZONE)
--end
--function cm.aclimset(e,tp,eg,ep,ev,re,r,rp)
-- local tc=eg:GetFirst()
-- while tc do
-- tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,1)
-- tc=eg:GetNext()
-- end
--end
\ No newline at end of file
......@@ -74,7 +74,7 @@ end
function cm.atkop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=e:GetLabel()*200
local atk=e:GetLabel()*500
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
......@@ -102,7 +102,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local d=dg:FilterCount(cm.cfilter,nil)
if d>0 then
Duel.BreakEffect()
Duel.Draw(tp,d,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -18,17 +18,24 @@ function cm.initial_effect(c)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--tohand
-- local e2=Effect.CreateEffect(c)
-- e2:SetDescription(aux.Stringid(m,0))
-- e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
-- e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
-- e2:SetProperty(EFFECT_FLAG_DELAY)
-- e2:SetCode(EVENT_CHAINING)
-- e2:SetRange(LOCATION_MZONE)
-- e2:SetCountLimit(1,m+10000)
-- e2:SetCondition(cm.thcon)
-- e2:SetTarget(cm.thtg2)
-- e2:SetOperation(cm.thop2)
-- c:RegisterEffect(e2)
--synchro level
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_CHAINING)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+10000)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg2)
e2:SetOperation(cm.thop2)
e2:SetCode(EFFECT_XYZ_LEVEL)
e2:SetValue(cm.slevel)
c:RegisterEffect(e2)
end
function cm.mfilter(c)
......@@ -39,7 +46,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.thfilter(c)
return c:IsCode(33500110) and c:IsAbleToHand()
return c:IsSetCard(0xa85) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -54,21 +61,26 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
--e2
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:GetHandler():IsCode(33500110)
end
function cm.thfilter2(c)
return c:IsSetCard(0xa84) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,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.thcon(e,tp,eg,ep,ev,re,r,rp)
-- return rp==tp and re:GetHandler():IsCode(33500110)
--end
--function cm.thfilter2(c)
-- return c:IsSetCard(0xa84) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
--end
--function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
-- if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) end
-- Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
--end
--function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
-- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
-- local g=Duel.SelectMatchingCard(tp,cm.thfilter2,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
--e2
function cm.slevel(e,c)
local lv=e:GetHandler():GetLevel()
return 4*65536+lv
end
\ No newline at end of file
......@@ -4,7 +4,8 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2,cm.ovfilter,aux.Stringid(m,0))
-- aux.AddXyzProcedure(c,nil,4,2,cm.ovfilter,aux.Stringid(m,0))
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--to deck
local e1=Effect.CreateEffect(c)
......@@ -23,6 +24,7 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1)
e2:SetCondition(cm.thcon)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
......
......@@ -2,7 +2,7 @@
function c33500310.initial_effect(c)
--f material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa84),3,false)
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa84),2,false)
--1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -17,53 +17,82 @@ function c33500310.initial_effect(c)
e2:SetValue(c33500310.efilter)
c:RegisterEffect(e2)
--2
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,33500310)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c33500310.ncon)
e3:SetTarget(c33500310.ntg)
e3:SetOperation(c33500310.nop)
c:RegisterEffect(e3)
-- local e3=Effect.CreateEffect(c)
-- e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
-- e3:SetRange(LOCATION_MZONE)
-- e3:SetCode(EVENT_CHAINING)
-- e3:SetCountLimit(1,33500310)
-- e3:SetProperty(EFFECT_FLAG_DELAY)
-- e3:SetCondition(c33500310.ncon)
-- e3:SetTarget(c33500310.ntg)
-- e3:SetOperation(c33500310.nop)
-- c:RegisterEffect(e3)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(cm.thcon)
e5:SetTarget(cm.thtg2)
e5:SetOperation(cm.thop2)
c:RegisterEffect(e5)
end
function c33500310.efilter(e,ct)
local player=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return player==tp and te:GetHandler():IsSetCard(0xa84) and te:GetHandler():IsType(TYPE_MONSTER) and bit.band(loc,LOCATION_SZONE)~=0
end
function c33500310.ncon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(33500110)
--function c33500310.ncon(e,tp,eg,ep,ev,re,r,rp)
-- return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(33500110)
--end
--function c33500310.ntg(e,tp,eg,ep,ev,re,r,rp,chk)
-- if chk==0 then
-- return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
-- end
--end
--function c33500310.nop(e,tp,eg,ep,ev,re,r,rp)
-- local c=e:GetHandler()
-- if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then
-- return
-- end
-- Duel.ConfirmDecktop(1-tp,1)
-- local g=Duel.GetDecktopGroup(1-tp,1)
-- local tc=g:GetFirst()
-- local sel=nil
-- if tc:IsType(TYPE_MONSTER) then sel=TYPE_MONSTER end
-- if tc:IsType(TYPE_SPELL) then sel=TYPE_SPELL end
-- if tc:IsType(TYPE_TRAP) then sel=TYPE_TRAP end
-- local e1=Effect.CreateEffect(c)
-- e1:SetType(EFFECT_TYPE_FIELD)
-- e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
-- e1:SetCode(EFFECT_CANNOT_ACTIVATE)
-- e1:SetTargetRange(0,1)
-- e1:SetLabel(sel)
-- e1:SetValue(c33500310.aclimit)
-- e1:SetReset(RESET_PHASE+PHASE_END,2)
-- Duel.RegisterEffect(e1,tp)
--end
--function c33500310.aclimit(e,re,tp)
-- local sel=e:GetLabel()
-- return re:IsActiveType(sel)
--end
--e5
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:GetHandler():IsCode(33500110)
end
function c33500310.ntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c33500310.nop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then
return
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
Duel.ConfirmDecktop(1-tp,1)
local g=Duel.GetDecktopGroup(1-tp,1)
local tc=g:GetFirst()
local sel=nil
if tc:IsType(TYPE_MONSTER) then sel=TYPE_MONSTER end
if tc:IsType(TYPE_SPELL) then sel=TYPE_SPELL end
if tc:IsType(TYPE_TRAP) then sel=TYPE_TRAP end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetLabel(sel)
e1:SetValue(c33500310.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c33500310.aclimit(e,re,tp)
local sel=e:GetLabel()
return re:IsActiveType(sel)
end
\ No newline at end of file
......@@ -31,6 +31,23 @@ function c65060023.initial_effect(c)
e3:SetTarget(c65060023.damtg)
e3:SetOperation(c65060023.damop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_BATTLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(aux.IsDualState)
e4:SetTarget(c65060023.thtg)
e4:SetOperation(c65060023.thop)
c:RegisterEffect(e4)
end
function c65060023.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c65060023.thop(e,tp,eg,ep,ev,re,r,rp,chk)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c65060023.atkfil(c,e)
return (c:IsAttackable() and not c:IsImmuneToEffect(e)) or e:GetHandler():IsAttackable()
......@@ -47,21 +64,6 @@ function c65060023.damop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c65060023.efop2)
Duel.RegisterEffect(e1,tp)
local g=Duel.SelectMatchingCard(tp,c65060023.atkfil,tp,0,LOCATION_MZONE,1,1,nil,e)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
local m=0
if c:IsAttackable() then
m=Duel.CalculateDamage(c,tc)
else
m=Duel.CalculateDamage(tc,c)
end
if m~=0 then
Duel.BreakEffect()
if not c:IsStatus(STATUS_BATTLE_DESTROYED) then Duel.SendtoHand(c,nil,REASON_EFFECT) end
end
end
end
function c65060023.efop2(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
......@@ -98,8 +100,7 @@ end
function c65060023.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_HAND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) and Duel.SelectYesNo(tp,aux.Stringid(65060023,0)) then
Duel.BreakEffect()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then
--effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -107,16 +108,6 @@ function c65060023.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c65060023.efop)
Duel.RegisterEffect(e1,tp)
c:RegisterFlagEffect(65060023,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(c65060023.thcon)
e2:SetOperation(c65060023.thop)
c:RegisterEffect(e2)
end
end
end
......@@ -136,14 +127,4 @@ function c65060023.efop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
b:RegisterEffect(e2)
end
end
function c65060023.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(65060023)~=0
end
function c65060023.thop(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
if ph==PHASE_MAIN2 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.Readjust()
end
end
\ No newline at end of file
......@@ -31,6 +31,23 @@ function c65060024.initial_effect(c)
e3:SetTarget(c65060024.damtg)
e3:SetOperation(c65060024.damop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_BATTLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(aux.IsDualState)
e4:SetTarget(c65060024.thtg)
e4:SetOperation(c65060024.thop)
c:RegisterEffect(e4)
end
function c65060024.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c65060024.thop(e,tp,eg,ep,ev,re,r,rp,chk)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c65060024.atkfil(c,e)
return (c:IsAttackable() and not c:IsImmuneToEffect(e)) or e:GetHandler():IsAttackable()
......@@ -47,20 +64,6 @@ function c65060024.damop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(-800)
Duel.RegisterEffect(e1,tp)
local g=Duel.SelectMatchingCard(tp,c65060024.atkfil,tp,0,LOCATION_MZONE,1,1,nil,e)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
local m=0
if c:IsAttackable() then
m=Duel.CalculateDamage(c,tc)
else
m=Duel.CalculateDamage(tc,c)
end
if m~=0 then
if not c:IsStatus(STATUS_BATTLE_DESTROYED) then Duel.SendtoHand(c,nil,REASON_EFFECT) end
end
end
end
function c65060024.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
......@@ -74,8 +77,7 @@ end
function c65060024.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_HAND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) and Duel.SelectYesNo(tp,aux.Stringid(65060024,0)) then
Duel.BreakEffect()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then
--effect
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -87,27 +89,6 @@ function c65060024.spop(e,tp,eg,ep,ev,re,r,rp)
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
Duel.RegisterEffect(e3,tp)
local fid=e:GetHandler():GetFieldID()
c:RegisterFlagEffect(65060024,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(c65060024.thcon)
e2:SetOperation(c65060024.thop)
c:RegisterEffect(e2)
end
end
end
function c65060024.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(65060024)~=0
end
function c65060024.thop(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
if ph==PHASE_MAIN2 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.Readjust()
end
end
\ No newline at end of file
......@@ -23,6 +23,7 @@ function c65060025.initial_effect(c)
e2:SetValue(3000)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e3:SetRange(LOCATION_MZONE)
......@@ -31,53 +32,35 @@ function c65060025.initial_effect(c)
e3:SetTarget(c65060025.damtg)
e3:SetOperation(c65060025.damop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_BATTLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(aux.IsDualState)
e4:SetTarget(c65060025.thtg)
e4:SetOperation(c65060025.thop)
c:RegisterEffect(e4)
end
function c65060025.atkfil(c,e)
return (c:IsAttackable() and not c:IsImmuneToEffect(e)) or e:GetHandler():IsAttackable()
function c65060025.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c65060025.thop(e,tp,eg,ep,ev,re,r,rp,chk)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c65060025.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c65060025.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLED)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(c65060025.efop2)
Duel.RegisterEffect(e1,tp)
local g=Duel.SelectMatchingCard(tp,c65060025.atkfil,tp,0,LOCATION_MZONE,1,1,nil,e)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
local m=0
if c:IsAttackable() then
m=Duel.CalculateDamage(c,tc)
else
m=Duel.CalculateDamage(tc,c)
end
if m~=0 then
Duel.BreakEffect()
if not c:IsStatus(STATUS_BATTLE_DESTROYED) then Duel.SendtoHand(c,nil,REASON_EFFECT) end
end
end
end
function c65060025.efop2(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local b=Duel.GetAttackTarget()
if (a:IsSetCard(0x9da4) or (b~=nil and b:IsSetCard(0x9da4))) and Duel.IsExistingMatchingCard(c65060025.effil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(65060025,1)) then
Duel.Hint(HINT_CARD,0,65060025)
local g=Duel.SelectMatchingCard(tp,c65060025.effil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c65060025.effil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c65060025.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c65060025.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
......@@ -86,8 +69,7 @@ end
function c65060025.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_HAND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) and Duel.SelectYesNo(tp,aux.Stringid(65060025,0)) then
Duel.BreakEffect()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then
--effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -95,17 +77,7 @@ function c65060025.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(c65060025.efop)
Duel.RegisterEffect(e1,tp)
c:RegisterFlagEffect(65060025,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(c65060025.thcon)
e2:SetOperation(c65060025.thop)
c:RegisterEffect(e2)
Duel.RegisterEffect(e1,tp)
end
end
end
......@@ -121,14 +93,4 @@ function c65060025.efop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c65060025.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(65060025)~=0
end
function c65060025.thop(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
if ph==PHASE_MAIN2 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.Readjust()
end
end
\ No newline at end of file
......@@ -31,9 +31,23 @@ function c65060026.initial_effect(c)
e3:SetTarget(c65060026.damtg)
e3:SetOperation(c65060026.damop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_BATTLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(aux.IsDualState)
e4:SetTarget(c65060026.thtg)
e4:SetOperation(c65060026.thop)
c:RegisterEffect(e4)
end
function c65060026.atkfil(c,e)
return (c:IsAttackable() and not c:IsImmuneToEffect(e)) or e:GetHandler():IsAttackable()
function c65060026.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c65060026.thop(e,tp,eg,ep,ev,re,r,rp,chk)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c65060026.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -54,21 +68,6 @@ function c65060026.damop(e,tp,eg,ep,ev,re,r,rp)
e2:SetOwnerPlayer(tp)
e2:SetValue(c65060026.efilter)
Duel.RegisterEffect(e2,tp)
local g=Duel.SelectMatchingCard(tp,c65060026.atkfil,tp,0,LOCATION_MZONE,1,1,nil,e)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
local m=0
if c:IsAttackable() then
m=Duel.CalculateDamage(c,tc)
else
m=Duel.CalculateDamage(tc,c)
end
if m~=0 then
Duel.BreakEffect()
if not c:IsStatus(STATUS_BATTLE_DESTROYED) then Duel.SendtoHand(c,nil,REASON_EFFECT) end
end
end
end
function c65060026.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
......@@ -85,8 +84,7 @@ end
function c65060026.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_HAND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)and Duel.SelectYesNo(tp,aux.Stringid(65060026,0)) then
Duel.BreakEffect()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then
--indes
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
......@@ -95,27 +93,7 @@ function c65060026.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x9da4))
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
c:RegisterFlagEffect(65060026,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(c65060026.thcon)
e2:SetOperation(c65060026.thop)
c:RegisterEffect(e2)
Duel.RegisterEffect(e1,tp)
end
end
end
function c65060026.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(65060026)~=0
end
function c65060026.thop(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
if ph==PHASE_MAIN2 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.Readjust()
end
end
......@@ -31,9 +31,23 @@ function c65060027.initial_effect(c)
e3:SetTarget(c65060027.damtg)
e3:SetOperation(c65060027.damop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_BATTLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(aux.IsDualState)
e4:SetTarget(c65060027.thtg)
e4:SetOperation(c65060027.thop)
c:RegisterEffect(e4)
end
function c65060027.atkfil(c,e)
return (c:IsAttackable() and not c:IsImmuneToEffect(e)) or e:GetHandler():IsAttackable()
function c65060027.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c65060027.thop(e,tp,eg,ep,ev,re,r,rp,chk)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c65060027.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -48,20 +62,6 @@ function c65060027.damop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(800)
Duel.RegisterEffect(e1,tp)
local g=Duel.SelectMatchingCard(tp,c65060027.atkfil,tp,0,LOCATION_MZONE,1,1,nil,e)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
local m=0
if c:IsAttackable() then
m=Duel.CalculateDamage(c,tc)
else
m=Duel.CalculateDamage(tc,c)
end
if m~=0 then
if not c:IsStatus(STATUS_BATTLE_DESTROYED) then Duel.SendtoHand(c,nil,REASON_EFFECT) end
end
end
end
function c65060027.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
......@@ -75,8 +75,7 @@ end
function c65060027.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_HAND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) and Duel.SelectYesNo(tp,aux.Stringid(65060027,0)) then
Duel.BreakEffect()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then
--effect
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -86,26 +85,6 @@ function c65060027.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x9da4))
e1:SetValue(400)
Duel.RegisterEffect(e1,tp)
c:RegisterFlagEffect(65060027,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(c65060027.thcon)
e2:SetOperation(c65060027.thop)
c:RegisterEffect(e2)
end
end
end
function c65060027.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(65060027)~=0
end
function c65060027.thop(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
if ph==PHASE_MAIN2 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.Readjust()
end
end
--八宫一月·昔
local m=81005072
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
function cm.initial_effect(c)
Tenka.EightOne(c)
--atk limit
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.atktg)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
--negate
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_NEGATE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e5:SetCountLimit(1,m+900)
e5:SetCondition(cm.negcon)
e5:SetCost(cm.negcost)
e5:SetTarget(cm.negtg)
e5:SetOperation(cm.negop)
c:RegisterEffect(e5)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return (loc&LOCATION_ONFIELD)==0 and Duel.IsChainNegatable(ev)
end
function cm.costfilter(c)
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
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)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT)
end
end
--灵刻使的琴音
local m=81009031
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetLabel(0)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.con)
e1:SetCost(cm.cost)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--change scale
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.sctg)
e2:SetOperation(cm.scop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return not (c:IsSummonType(SUMMON_TYPE_LINK) or c:IsSummonType(SUMMON_TYPE_PENDULUM))
end
function cm.acost(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.sumlimit)
Duel.RegisterEffect(e1,tp)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM or bit.band(sumtype,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if not tc1 or not tc2 then return false end
return tc1:GetLeftScale()==tc2:GetRightScale()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function cm.cfilter(c,tp)
return c:IsType(TYPE_PENDULUM)
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil,c)
end
function cm.thfilter(c,tc)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x237)
and c:GetOriginalLeftScale()==tc:GetOriginalLeftScale()
and c:GetOriginalRightScale()==tc:GetOriginalRightScale()
and not c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
and c:IsAbleToHand() and (c:IsFaceup() or c:IsLocation(LOCATION_DECK))
end
function cm.tg(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 cm.acost(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp)
end
cm.acost(e,tp,eg,ep,ev,re,r,rp,1)
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
e:SetLabelObject(g:GetFirst())
Duel.Release(g,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil,tc)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.dfilter(c,tp)
return c:IsType(TYPE_PENDULUM) and not c:IsPublic()
and Duel.IsExistingTarget(cm.scfilter,tp,LOCATION_PZONE,0,1,nil,c)
end
function cm.scfilter(c,pc)
return c:IsSetCard(0x237) and c:GetLeftScale()~=pc:GetLeftScale()
end
function cm.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_PZONE) and cm.scfilter(chkc,e:GetLabelObject()) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,cm.dfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
Duel.ConfirmCards(1-tp,cg)
Duel.ShuffleHand(tp)
e:SetLabelObject(cg:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.scfilter,tp,LOCATION_PZONE,0,1,1,nil,cg:GetFirst())
end
function cm.scop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local pc=e:GetLabelObject()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LSCALE)
e1:SetValue(pc:GetLeftScale())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RSCALE)
e2:SetValue(pc:GetRightScale())
tc:RegisterEffect(e2)
end
end
--小原银香
local m=81013026
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--scale
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.sctg)
e1:SetOperation(cm.scop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.scfilter(c,pc)
return c:GetLeftScale()~=pc:GetLeftScale()
end
function cm.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_PZONE) and cm.scfilter(chkc,c) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(cm.scfilter,tp,LOCATION_PZONE,LOCATION_PZONE,1,c,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.scfilter,tp,LOCATION_PZONE,LOCATION_PZONE,1,1,c,c)
end
function cm.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LSCALE)
e1:SetValue(tc:GetLeftScale())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RSCALE)
e2:SetValue(tc:GetRightScale())
c:RegisterEffect(e2)
end
end
function cm.spcon(e)
local tp=e:GetHandler():GetControler()
local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if not tc1 or not tc2 then return false end
return tc1:GetLeftScale()==tc2:GetRightScale() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,0))
end
--立花直美
local m=81013027
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(cm.sprcon)
e0:SetOperation(cm.sprop)
c:RegisterEffect(e0)
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sttg)
e1:SetOperation(cm.stop)
c:RegisterEffect(e1)
end
function cm.sprfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost()
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.sprfilter,tp,LOCATION_GRAVE,0,2,nil)
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.sprfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.stfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and (c:GetType()==TYPE_SPELL or c:IsType(TYPE_QUICKPLAY)) and c:IsSSetable()
end
function cm.sttg(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.stfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.stfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,cm.stfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECKBOT)
tc:RegisterEffect(e1)
end
end
--一花的不情愿
local m=81013028
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--Protect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetOperation(cm.immop)
c:RegisterEffect(e2)
end
function cm.spfilter1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsExistingTarget(cm.spfilter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)
end
end
function cm.immop(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_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetTarget(cm.indtg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
Duel.RegisterEffect(e2,tp)
end
function cm.indtg(e,c)
return c:GetOwner()==e:GetHandlerPlayer() and c:IsType(TYPE_MONSTER)
end
--白雪安娜·造神计划
local m=81013029
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,cm.lcheck)
c:EnableReviveLimit()
--code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e0:SetValue(81011003)
c:RegisterEffect(e0)
--Immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(cm.etarget)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.discon)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--spsummon bgm
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.sumcon)
e3:SetOperation(cm.sumsuc)
c:RegisterEffect(e3)
end
function cm.lcheck(g,lc)
return g:IsExists(cm.mzfilter,1,nil)
end
function cm.mzfilter(c)
return c:IsLinkRace(RACE_SPELLCASTER) and c:IsLinkType(TYPE_LINK) and c:IsLink(3)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(81011003,0))
end
function cm.etarget(e,c)
return e:GetHandler()==c or e:GetHandler():GetLinkedGroup():IsContains(c)
end
function cm.efilter(e,re)
return not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(cm.tfilter,1,nil,tp) and Duel.IsChainNegatable(ev)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--水晶艾蕾娜·断罪
local m=81013030
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_RELEASE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(cm.spcon)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--tribute summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.sumcon)
e2:SetTarget(cm.sumtg)
e2:SetOperation(cm.sumop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_RELEASE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_RELEASE)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.con)
e3:SetTarget(cm.tg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
end
function cm.spcfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp and c:IsReason(REASON_SUMMON)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(cm.spcfilter,1,nil,tp)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetLabelObject(e)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return se~=e:GetLabelObject()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(81019004,0))
end
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function cm.sumfilter(c)
return c:IsSummonable(true,nil,1)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil,1)
end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_SUMMON)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RELEASE)
end
end
--水晶艾蕾娜·旧约
local m=81013031
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,cm.ffiltera,cm.ffilterb,true)
--spsummon bgm
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(cm.sumcon)
e0:SetOperation(cm.sumsuc)
c:RegisterEffect(e0)
--change race
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.rctg)
e1:SetOperation(cm.rcop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(81019004,0))
end
function cm.chainfilter(re,tp,cid)
return not (re:GetHandler():IsRace(RACE_THUNDER) and re:IsActiveType(TYPE_MONSTER)
and Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION)==LOCATION_HAND)
end
function cm.ffiltera(c)
return c:IsRace(RACE_FIEND) and c:IsFusionAttribute(ATTRIBUTE_DARK)
end
function cm.ffilterb(c)
return c:IsRace(RACE_PLANT) and c:IsFusionAttribute(ATTRIBUTE_EARTH)
end
function cm.rctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (not e:GetHandler():IsRace(RACE_PLANT)) or (not e:GetHandler():IsAttribute(ATTRIBUTE_EARTH)) end
end
function cm.rcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_PLANT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetValue(ATTRIBUTE_EARTH)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)~=0
or Duel.GetCustomActivityCount(m,1-tp,ACTIVITY_CHAIN)~=0
end
function cm.spfilter1(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.spfilter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.spfilter1,nil,e)
local sg1=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION)
and rp==1-tp and c:GetPreviousControler()==tp
end
function cm.thfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,2,c,c:GetCode())
end
function cm.thfilter2(c,code)
return c:IsType(TYPE_MONSTER) and c:IsCode(code) 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,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,3,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
if g1:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,2,2,g1,g1:GetFirst():GetCode())
g1:Merge(g2)
if Duel.SendtoHand(g1,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g1)
end
end
--失格天使·白鸟芽衣
local m=81013032
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
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_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(cm.target)
e2:SetValue(cm.indct)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.setcon)
e3:SetTarget(cm.settg)
e3:SetOperation(cm.setop)
c:RegisterEffect(e3)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
return not Tenka.ReikaCon(e)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,0))
end
function cm.target(e,c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function cm.filter(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
--实验室的少女
local m=81013033
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--token
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(cm.descon1)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.tktg)
e3:SetOperation(cm.tkop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCondition(cm.descon2)
c:RegisterEffect(e4)
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c:GetCode())
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 Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
function cm.splimit(e,c)
return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
end
function cm.descon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.descon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function cm.tkfilter(c,tp)
return c:IsFaceup() and not c:IsCode(81011019)
and Duel.IsPlayerCanSpecialSummonMonster(tp,81011019,0,0x4011,2800,2000,8,RACE_PLANT,ATTRIBUTE_EARTH)
end
function cm.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.tkfilter(chkc,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.tkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.SelectTarget(tp,cm.tkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local cd=tc:GetCode()
if not tc:IsRelateToEffect(e) or not tc:IsFaceup() then atk=0 end
if Duel.IsPlayerCanSpecialSummonMonster(tp,81011019,0,0x4011,2800,2000,8,RACE_PLANT,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,81011019)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(cd)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e1,true)
end
end
--白石唯
local m=81013034
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),nil,nil,aux.FilterBoolFunction(Card.IsType,TYPE_TUNER),1,99)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCost(cm.descost)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (bit.band(st,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO and not se)
end
function cm.costfilter(c)
return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost()
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_TUNER) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) 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,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,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)
end
end
--恒定电压·白石唯
local m=81013035
local cm=_G["c"..m]
function cm.initial_effect(c)
--level change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.lvtg)
e1:SetOperation(cm.lvop)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(cm.efcon)
e2:SetOperation(cm.efop)
c:RegisterEffect(e2)
end
function cm.lvfilter(c,lv)
return c:GetLevel()>0 and c:IsFaceup() and not c:IsLevel(lv)
end
function cm.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lv=e:GetHandler():GetLevel()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and cm.lvfilter(chkc,lv) end
if chk==0 then return Duel.IsExistingTarget(cm.lvfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,lv) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.lvfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,lv)
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function cm.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO and e:GetHandler():GetReasonCard():IsType(TYPE_TUNER)
end
function cm.efop(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:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true)
end
--云顶之战·望月杏奈
local m=81016023
local cm=_G["c"..m]
function cm.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.descon)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.damcon)
e2:SetCost(cm.damcost)
e2:SetTarget(cm.damtg)
e2:SetOperation(cm.damop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function cm.desfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToHand()
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.desfilter(chkc) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(cm.desfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsSetCard(0x81d)
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function cm.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=math.abs(Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA))
if chk==0 then return ct>0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=math.abs(Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA))
Duel.Damage(p,ct*200,REASON_EFFECT)
end
--夏夜花火·望月杏奈
local m=81016024
local cm=_G["c"..m]
function cm.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOEXTRA)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.sscon)
e1:SetTarget(cm.sstg)
e1:SetOperation(cm.ssop)
c:RegisterEffect(e1)
--special summon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,1))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1)
e6:SetCondition(cm.spcon)
e6:SetTarget(cm.sptg)
e6:SetOperation(cm.spop)
c:RegisterEffect(e6)
end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function cm.sstg(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.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) and c:IsAbleToExtra()
end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=g:Select(tp,1,1,nil)
Duel.HintSelection(dg)
Duel.SendtoDeck(dg,nil,2,REASON_EFFECT)
end
end
end
function cm.cfilter(c,tp)
return c:GetSummonPlayer()==tp and c:IsPreviousLocation(LOCATION_EXTRA)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,1-tp)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x81d) 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_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
if Duel.GetTurnPlayer()==tp then
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN)
end
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
--望月杏奈的自信
local m=81016025
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOEXTRA)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.sscon)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+900)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.spfilter(c)
return c:IsFaceup() and c:IsSetCard(0x81d)
end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.thfilter(c)
return c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) and c:IsAbleToExtra()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(cm.thfilter,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,g:GetCount(),0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,0,LOCATION_GRAVE,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local tc=g:GetFirst()
while tc do
if tc:IsLocation(LOCATION_EXTRA) 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:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e1=e0:Clone()
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(cm.splimit)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
end
tc=g:GetNext()
end
end
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsCode(e:GetLabel())
end
function cm.thfilter(c)
return c:IsSetCard(0x81d) and not c:IsCode(m) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--余音缭绕·最上静香
local m=81018050
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
function cm.initial_effect(c)
Tenka.Shizuka(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLED)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-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,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
function cm.tgfilter(c)
return c:IsSetCard(0x81b) and c:IsAbleToHand()
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,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,3,3,nil)
Duel.ConfirmCards(1-tp,sg)
local tg=sg:RandomSelect(1-tp,1)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
Duel.BreakEffect()
local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local mc=mg:GetFirst()
while mc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
mc:RegisterEffect(e1)
mc=mg:GetNext()
end
end
end
--Airwave
local m=81022024
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--Shuffle to set from GY
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(cm.settg)
e2:SetOperation(cm.setop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.filter(c,att)
return c:IsFaceup() and c:IsAttribute(att)
end
function cm.thfilter(c,tp)
return c:IsRace(RACE_PYRO) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
and not Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil,c:GetAttribute())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.activate(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,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.retfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PYRO) and c:IsAbleToGrave()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable()
and Duel.IsExistingMatchingCard(cm.retfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.retfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0
and c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
end
--到站电车·拉蒂
local m=81022025
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_PYRO),2,2)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.regcon)
e1:SetOperation(cm.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(cm.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--multi attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EXTRA_ATTACK)
e3:SetValue(3)
e3:SetCondition(cm.macon)
c:RegisterEffect(e3)
--search
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m+900,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
function cm.macon(e)
return e:GetHandler():GetFlagEffect(m+900)>0
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsRace,1,nil,RACE_PYRO) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function cm.thfilter(c)
return c:IsCode(81012079) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--灯火之缄默
local m=81027023
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,81027000)
aux.AddRitualProcGreaterCode(c,81027000)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DRAW)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,m)
e5:SetCondition(cm.thcon)
e5:SetCost(cm.thcost)
e5:SetTarget(cm.thtg)
e5:SetOperation(cm.thop)
c:RegisterEffect(e5)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(cm.handcon)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(81027000)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.costfilter(c)
return c:IsCode(81027000) and c:IsDiscardable()
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil) end
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0
end
--灯火之魔女·青鸟
local m=81027024
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
function cm.initial_effect(c)
Tenka.Asamiya(c)
--actlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
e1:SetCondition(cm.actcon)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.regop)
c:RegisterEffect(e2)
end
function cm.actfilter(c)
return c:IsFaceup() and c:IsCode(81027000)
end
function cm.actcon(e)
local ph=Duel.GetCurrentPhase()
local tp=e:GetHandlerPlayer()
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(cm.actfilter,tp,LOCATION_MZONE,0,1,c) and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(cm.damop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.damfilter(c)
return c:IsCode(81027000) and c:IsFaceup()
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(cm.damfilter,tp,LOCATION_MZONE,0,nil)
if ct==0 then return end
Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,ct*2700,REASON_EFFECT)
end
--喜欢呱太的猫掌柜
function c87090001.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c87090001.matfilter,2)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87090001,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,87090001)
e1:SetCost(c87090001.secost)
e1:SetTarget(c87090001.setg)
e1:SetOperation(c87090001.seop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(87090001,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,88900001)
e2:SetTarget(c87090001.target)
e2:SetOperation(c87090001.activate)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--damage reduce
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e4:SetValue(aux.ChangeBattleDamage(0,HALF_DAMAGE))
c:RegisterEffect(e4)
end
function c87090001.matfilter(c)
return c:IsLinkType(TYPE_EFFECT) and c:IsAttackBelow(500)
end
function c87090001.secost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c87090001.filter(c)
return c:IsAttackBelow(500) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c87090001.setg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c87090001.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c87090001.seop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c87090001.filter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
function c87090001.sfilter(c,e,tp)
return c:IsFaceup() and c:GetSequence()<5 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c87090001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c87090001.sfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c87090001.sfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c87090001.sfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c87090001.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--白绯八岐大蛇
function c87090002.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),3,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c87090002.efilter)
c:RegisterEffect(e2)
--atkchange
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SET_BASE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c87090002.atktg)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e4)
--search
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(87090002,1))
e5:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,87090002)
e5:SetTarget(c87090002.thtg)
e5:SetOperation(c87090002.thop)
c:RegisterEffect(e5)
end
function c87090002.ffilter(c)
return c:IsRace(RACE_REPTILE)
end
function c87090002.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c87090002.cfilter(c)
return c:IsFaceup() and c:IsAttack(0)
end
function c87090002.thfilter(c)
return c:IsRace(RACE_REPTILE) and c:IsAbleToHand()
end
function c87090002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c87090002.cfilter,tp,0,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(c87090002.thfilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return ct>0 and g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c87090002.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c87090002.cfilter,tp,0,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(c87090002.thfilter,tp,LOCATION_DECK,0,nil)
if ct>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c87090002.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c87090002.splimit(e,c)
return not c:IsRace(RACE_REPTILE) and c:IsLocation(LOCATION_EXTRA)
end
function c87090002.atktg(e,c)
return c~=e:GetHandler()
end
......@@ -4,6 +4,8 @@
# 禁用 0xff0-0xfff 区间以保证 YGOPro2 上能正常运作
# 禁用 0x100-0x1ff 区间避免 OCG 卡字段上浮冲突
#某失智の刀客塔 3529764274 1
#芙兰 657556329 7
#is_named_with_cyberaqua 电子水蓝
#is_named_with_PETS P.E.T.S.
......@@ -30,6 +32,8 @@
!setname 0x520c 纪录
!setname 0x520c 物语纪录
!setname 0x620c 外传纪录
!setname 0x320e 罪恶王冠
!setname 0x520e Void
!setname 0x620e 抚子
!setname 0x20f 魔法使之夜
!setname 0x320f 童话的怪物
......@@ -211,6 +215,13 @@
#仲村芽衣子 2736617510 141 global:scorp
#named_with_hana 花舞少女
#渊眼少女 1368478851 143
!setname 0x1437 灰烬
!setname 0x1438 灰烬骑士
#Ruby 917770701 147
!setname 0x2e0 薇迪瓦
#Candy 1195203843 148 0x800-0x80f
!setname 0x4800 灾厄
!setname 0x4801 华丽偶像
......@@ -254,9 +265,13 @@
!setname 0xcc1 未来机关
!setname 0xcc2 盾子
!setname 0xcc3 狛枝凪斗
!setname 0xcc4 叛教的
!setname 0xcca 异种
!setname 0xccc 超高校级的高校生
!setname 0xccd 黑白熊
!counter 0xccf 黑白熊指示物
#DefineCard(code,"CHURCH") 教团的
#DefineCard(code,"CHURCH_KNIGHT") 教团的骑士
#DefineCard(code,"SCP") SCP
#DefineCard(code,"SCP_J") SCP基金会
......
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