Commit f17f0c4e authored by IamIpanda's avatar IamIpanda

Big boom

parents
stages:
- build
- package
- release
build:
stage: build
tags:
- linux
image:
name: iami/cdb-transformer
entrypoint: [""]
script:
- /opt/cdb-transformer/cdb-transformer --from MyDIY.txt --to MyDIY.cdb --strings ./origin-strings.conf --strings ./strings.conf
- tar czf MyDIY.ypk script *.cdb
- echo $CI_JOB_ID > .job_id
artifacts:
paths:
- "MyDIY.ypk"
- .job_id
only:
- master
# upload package:
# stage: package
# tags:
# - linux
# image: curlimages/curl
# script:
# - date=$(date +%Y-%m-%d)
# - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file MyDIY.ypk "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/MyDIY.ypk"'
# only:
# - master
release:
stage: release
tags:
- linux
image: registry.gitlab.com/gitlab-org/release-cli:latest
script:
- JOB_ID=$(cat .job_id)
- release-cli create --name "MyDIY-$CI_COMMIT_SHORT_SHA" --tag-name $CI_COMMIT_SHORT_SHA --assets-link "{\"name\":\"MyDIY-$(date +%Y-%m-%d).ypk\",\"url\":\"$CI_SERVER_URL/$CI_PROJECT_PATH/-/jobs/$JOB_ID/artifacts/download\"}"
only:
- master
File added
# =======================================================================
# MyDIY
# -----------------------------------------------------------------------
# 这是熊猫在娱乐服投递的 DIY 卡。
# 卡片 ID 均在 172016000-172031999 之间,取义于 172.16 的私有网段。
# =======================================================================
# 领地声明卡
拓扑混沌交换熊(172016000) 光/暗 LINK-4 电子界/连接 2800 4 [↙][↓][↘][↑] (Custom)
系列:拓扑
效果怪兽2只
这张卡的属性也当作「光」使用。
①:每当这张卡或与这张卡处于连接状态的怪兽成为效果的唯一对象时,若这张卡不处于互相链接状态,将那个效果改为以随机顺序依次以那些怪兽为对象各自执行1次。
②:自己攻击宣言的回合,主要阶段2跳过。
③:对方额外卡组里有卡且数量小于10的场合,自己场上的卡不受对方的效果影响。自己额外卡组里有卡且数量小于10的场合,对方场上的卡不受自己的效果影响。
④:场上表侧表示的这张卡被对方的效果里侧表示除外的场合决斗胜利。
分类:常驻-DIY
效果分类:融合相关
# 这是一张第八期早期的 DIY,和乌合的行进对位。随时代已被抛弃。
愚者的进军(172016001) 通常魔法
「愚者的进军」的①效果1回合只能适用1次。
①:自己场上战士族·兽战士族·念动力怪兽每有1种类,抽1张卡。3种类集齐的场合,再抽2张卡。这张卡发动的回合,自己不能把怪兽效果发动。
分类:常驻-DIY
效果分类:抽卡辅助
# 这是一张第七期的 DIY,用于配合哥布林的经营手腕。②效果为后补。
# 有规则问题,①效果令自己空场理应不能发动②效果,实际上能。
冥府之使者 凯茵(172016002) 暗 7星 天使 2500 2700 (Custom)
①:把这张卡从手卡丢弃才能发动。自己场上所有表侧表示的魔法·陷阱破坏。这个效果对方回合也能发动。
②:自己场上没有卡,这张卡被送去墓地的场合才能发动。选最多有这回合自己被破坏的魔法·陷阱卡数量的场上的卡送去墓地。
分类:常驻-DIY
花火(172016003) 通常魔法
这张卡发动回合的结束阶段开始时,败北。
①:败北。
②:只要这张卡在场上表侧表示存在,卡的效果发动时,那个效果的控制者抽1张卡。那之后,那个控制者可以把那张卡送去墓地,抽1张卡。
分类:常驻-DIY
效果分类:抽卡辅助
提示文本:是否要将这张卡送去墓地?
万古的仪式(172016004) 通常魔法
①:给卡组排序。这回合对手受到的伤害为0。
分类:常驻-DIY
# 万恶之始
岩融冰结(172016005) 水 3星 念动力 0 1800 (Custom)
①:对手回合的主要阶段,把这张卡从手卡送去墓地,宣言任意数量的卡名才能发动。直到回合结束,宣言的卡名的卡不能使用。场上每有1张卡,这回合每有1次卡的效果的发动,宣言的卡每有1种类,从游戏开始每经过1回合,为发动这个效果需额外支付1500生命分。
分类:常驻-DIY
# 禹铸九鼎,以镇九州。
九鼎(172016006) 装备魔法
战士族怪兽才能装备。
这张卡发动时,额外以这张卡所在区域以外的9个自己的区域为对象。
①:只要这张卡在场上表侧表示存在,这张卡发动时选择的区域里的卡不受这张卡装备的卡以外的效果影响。这个效果在这张卡发动的回合无效。
②:这张卡从场上离开时除外。
分类:常驻-DIY
# 抄自万智牌「艾文核灵师」
白夜苦行(172016007) 暗 3星 岩石/调整 0 1800 (Custom)
这个卡名的①效果在自己上回合及这回合发动过包含以下其中任意种效果的场合不能发动:
●从卡组把卡加入手卡的效果
●从卡组把怪兽特殊召唤的效果
●从卡组把卡送去墓地的效果
①:对手回合的主要阶段,把手卡的这张卡送去墓地才能发动。这张卡加入对方手卡,重置对方「白夜苦行」的发动条件,然后以下效果适用。
●直到回合结束,若双方某个效果中提及的范围包含「卡组」,则该范围改为「卡组顶3张」。
●可以确认自己的卡组。
(注:只有要「拿起卡组」的动作会受限制,抽卡、放回卡组顶、卡组底等效果不受影响。受核心机能限制,只有回合玩家能确认卡组。)
分类:常驻-DIY
提示文本:封闭卡组
# 抄自万智牌「霰散弹」
因果王法(172016009) 炎 3星 恶魔/调整 0 1800 (Custom)
①:对方把10次以上卡的效果发动过的回合,对方的手卡·场上的卡合计数量比自己的手卡·场上的卡合计数量多的场合,在连锁1把这张卡从手卡送去墓地才能发动。给这张卡的原本持有者自己场上特殊召唤的怪兽x50点的伤害。这回合中每有1次效果发动,依序令那张卡发动1次这个效果的复制,与这个效果组成连锁。
分类:常驻-DIY
效果分类:LP伤害
以眼还眼(172016011) 反击陷阱
①:卡的效果发动无效并破坏,用这个效果把发动无效的卡同名的卡从自己卡组选1张在自己场上盖放。
分类:常驻-DIY
效果分类:效果无效
# 缺一张 ac 娘卡图,钦定配合「升阶魔法 星光之力」(俗称A站之力)
希望的幻色(172016012) 通常陷阱
系列:超量
这张卡在规则上当做「超量」卡使用。
这张卡的①②效果合计1回合只能使用1次。
①:支付100整数倍的生命分才能发动。从自己额外卡组把1只阶级与那个倍数相同的XYZ怪兽在额外怪兽区域特殊召唤。这个效果特殊召唤的怪兽效果无效,不能攻击,不能解放,下个结束阶段开始时返回额外卡组。
②:这张卡在自己墓地存在的场合,自己XYZ召唤成功时才能发动。这张卡在自己场上盖放,抽1张卡。这个效果发动的回合,自己不能因为这个效果外的原因抽卡。
分类:常驻-DIY
效果分类:抽卡辅助
卧薪尝胆(172016013) 通常陷阱
①:对方的战斗阶段结束时,自己场上没有怪兽存在的场合才能发动。抽2张卡,对方抽7张卡。在下个回合中,卡和效果的发动不能被无效,自己场上的卡不能成为对方效果的对象。
②:这张卡被对方破坏送去墓地的场合才能发动。下个对手的战斗阶段结束时仅1次,这张卡的①效果发动条件满足的场合,那个效果适用。
效果分类:抽卡辅助
SHUT UP!(172016014) 通常魔法
不能对应这张卡的效果的发动把卡的效果发动。
这张卡发动的回合,自己不能用衍生物以外的怪兽攻击宣言。
①:自己主要阶段1开始时,支付以100为单位的基本分发动。在自己场上把1只攻击力等于支付的基本分数值的「拳头衍生物」(3/地/战士/?/0)攻击表示特殊召唤,变成这个回合的战斗阶段的战斗步骤。这衍生物不能解放,不能成为召唤方式对应的召唤素材,且具有:
● 这张卡可以攻击时必须攻击。
● 这张卡进行战斗的场合,直到伤害步骤结束时魔法·陷阱·效果怪兽的效果不能发动。
● 这张卡战斗破坏对方怪兽的场合,可以支付2000生命分。若如此做,则这张卡可以再一次攻击。
●自己不能特殊召唤。
分类:常驻-DIY
效果分类:特殊召唤
提示文本:是否要支付2000生命分?
拳头衍生物(172016015) 地 3星 战士/通常/衍生物 ? 0 (Custom)
由「SHUT UP!」的效果特殊召唤。这衍生物不能解放,不能成为召唤方式对应的召唤素材。
①:这张卡可以攻击时必须攻击。
②:这张卡进行战斗的场合,直到伤害步骤结束时魔法·陷阱·效果怪兽的效果不能发动。
③:这张卡战斗破坏对方怪兽的场合,可以支付2000生命分。若如此做,则这张卡可以再一次攻击。
④:自己不能特殊召唤。
# 灵感自神制裁索多玛。分类 1 为试图爬上顶的十进管,分类 2 为试图对天使出手的索多玛传说。
神之怒火(172016016) 反击陷阱
①:包含以下其中任意种效果的效果发动时,把手卡·场上1张反击陷阱卡给对方观看,支付1000生命分才能发动。那个发动无效并破坏,从卡组·手卡选择1只「Y.H.V.H」无需祭品通常召唤。
● 等级比原本等级高的怪兽发动的效果
● 以场上天使族怪兽为对象的效果
● 与这场决斗中曾被这个卡名以外的「神之」反击陷阱卡无效的卡同名的卡发动的效果。满足此发动条件的卡名被记录时,无论「神之怒火」位于何处,双方都将收到此卡的提示。
分类:常驻-DIY
# 「王侯将相,宁有种乎?」
大泽夜语(172016017) 永续魔法
这张卡在主要阶段1开始时才能作卡的发动。
①:卡不具有字段与记述。
②:主要阶段1开始时,把场上表侧表示的这张卡送去墓地才能发动。直到决斗结束,卡不具有字段与记述。
分类:常驻-DIY
# 红绿阵仇恨卡。
# 为让灵摆卡组能玩数值上设计得弱了,作为补偿,机制上略有加强。
转瞬即逝的噩梦(172016018) 永续陷阱
①:双方的主要阶段,支付1000基本分才能发动。手卡的这张卡在自己场上表侧表示放置。这个效果在1组连锁上只能发动1次。
②:这张卡在场上表侧表示存在,场上有这张卡以外的魔法·陷阱卡存在的场合,支付1000基本分以那张卡为对象发动。那张卡破坏。这个效果在1组连锁上对每张卡只能发动1次。
③:结束阶段,场上没有「催眠妹妹」存在的场合,这张卡破坏,自己受到3000伤害。
分类:常驻-DIY
深渊的暗中谋划(172016019) 通常魔法
①:自己场上有「深渊的冥王」或者对方的场上有「冥界的魔王 哈·迪斯」存在的场合才能发动。从卡组选「技能抽取」「精神抽取」「灵魂抽取」各1张发动(Cost仍需照常支付)。
分类:常驻-DIY
# 暗黑界的减速康
暗黑界的静寂 无色(172016201) 暗 8星 恶魔 0 0 (Custom)
系列:暗黑界
①:这张卡被卡的效果丢弃送去墓地的场合,把1个「静寂指示物」在自己场上的「暗黑界」卡上放置。放置「静寂指示物」的卡根据卡的种类获得以下效果:
● 融合怪兽:不能把「暗黑界」卡以外的卡的效果发动。
● 怪兽:不能对应「暗黑界」卡的效果把卡的效果发动。
● 魔法:「暗黑界」以外的卡的发动的效果无效。
● 陷阱:「暗黑界」以外的场上的卡的效果无效。
②:这张卡送去墓地时发动。场上所有「静寂指示物」取除。因为这个效果把 1 个以上「静寂指示物」取除的场合,这张卡特殊召唤。
分类:暗属性、恶魔族、融合、主卡、动漫-GX、OCG-原创剧情
效果分类:效果无效
# 武神,文殿的对位卡
暗黑界的武魂(172016221) 永续陷阱
系列:暗黑界
这个卡名的①的效果1回合只能使用1次。
①:1回合1次,「暗黑界」怪兽攻击表示特殊召唤时,以对手场上1只怪兽为对象才能发动。变成那个回合的战斗阶段,特殊召唤的那只怪兽和作为对象的怪兽进行伤害计算。那次战斗中受到战斗伤害的怪兽的控制者选择1张手卡丢弃,否则抽1张卡。
②:「暗黑界」怪兽因为从手卡被卡的效果丢弃以外的原因送去墓地的场合发动。抽1张,然后选2张手卡丢弃。
分类:暗属性、恶魔族、融合、主卡、动漫-GX、OCG-原创剧情
效果分类:抽卡辅助
# 战神,文殿的对位卡
暗黑界的召集(172016222) 永续陷阱
系列:暗黑界
这个卡名的①②效果1回合合计只能使用1次。
①:1回合1次,「暗黑界」怪兽从手卡被效果丢弃送去墓地的场合才能发动。丢弃1张手卡或者失去一半基本分,对于每一张丢弃的卡而言,从卡组·场上·墓地·除外的卡中选择那张卡以外的同名卡2张加入手卡。
②:魔法·陷阱卡从手卡被效果丢弃送去自己墓地的场合才能发动。那些在自己场上盖放。那之后,因为这个效果每有1张卡盖放,选1张手卡丢弃。
分类:暗属性、恶魔族、融合、主卡、动漫-GX、OCG-原创剧情
效果分类:卡组检索、卡片回收
提示文本:选2张同名卡加入手卡、丢弃1张手卡、支付一半生命分、回收魔法·陷阱
# 宰相,文殿的对位卡
暗黑界的唤笈(172016223) 通常陷阱
系列:暗黑界
这个卡名的①②效果1回合合计只能使用1次。
①:双方的主要阶段才能发动。从自己的除外的卡中把恶魔族融合怪兽卡决定的融合素材怪兽返回卡组,把那1只融合怪兽从额外卡组融合召唤。那之后,因为这个效果有回到卡组的卡每有1张,选1张手卡丢弃,没有回到卡组的卡每有1张,失去一半基本分。
②:这张卡在墓地存在,选墓地1张「暗黑界」通常魔法·速攻魔法·通常陷阱卡返回卡组才能发动。从手卡选1只「暗黑界」怪兽丢弃,那个效果适用。
效果分类:卡片回收、融合相关
# 缺张米德拉什骑在影依化的自然木龙兽上的卡图
神影依骑 米德拉什(172016230) 暗 11星 魔法使/融合 2900 2400 (Custom)
系列:影依
「影依兽」+「影依古龙」+「神影依 米德拉什」
这张卡不是用上记素材的融合召唤不能特殊召唤,这张卡的融合召唤不能适用「影牢之咒缚」。
这个卡名的②③效果1回合合计只能发动1次,对手回合也能发动。
①:这张卡融合召唤成功时才能发动。选择自己墓地1只「影依」融合怪兽,获得那只怪兽所记载的效果。
②:以对手场上1只怪兽为对象才能发动。那只怪兽变成里侧表示,在自己场上把1只「影依衍生物/暗/兽族/?/?」攻击表示特殊召唤。那衍生物的属性·种族·攻击力·守备力变成与那只怪兽相同,当作与那怪兽的同名卡使用。只要这衍生物在场上表侧表示存在,衍生物和那只怪兽不能把表示形式变更。
③:为这张卡的融合召唤使用过的1组融合素材在墓地集齐的场合才能发动。把这张卡送去墓地,那些怪兽在在自己场上盖放。
分类:暗属性、魔法师族、融合、DT
效果分类:卡片回收、衍生物
提示文本:、获得墓地融合怪兽的效果、特殊召唤「影依衍生物」、把融合素材在自己场上盖放
影依衍生物(172016231) 暗 1星 魔法使/通常/衍生物 ? ? (Custom)
系列:影依
由「神影依骑 米德拉什」的效果特殊召唤。
效果分类:卡片回收、衍生物
# K 出光属性 3000/1000 立即砍
帝王的胎动(172016233) 通常魔法
系列:帝王
①:宣言1个属性才能发动。从卡组选那个属性且防御力为1000,攻击力分别为800,2400,2800,3000的怪兽各1张加入手卡。
分类:常驻-DIY
效果分类:卡组检索
# 取自 Rewrite FD 女主角名「未来来篝」。与「miracle」同音。
# 黄粱一梦,①②效果内容为做梦。做梦会醒,③效果。
# 花札已可结分时,可以宣言「koikoi(来来)」,游戏继续。③效果。
# ④即纯粹的剧情致敬。
未来来(172016240) 永续魔法
这张卡发动的场合,把自己场上「花札卫」怪兽全部除外,在这张卡上放置3个「奇迹指示物」来发动。
①:只要这张卡在场上表侧表示存在,自己不是「花札卫」怪兽不能从额外卡组特殊召唤,这张卡和「花札卫」怪兽不会被效果破坏。
②:自己场上「花札卫」怪兽效果发动的场合发动。展示自己卡组最上面这张卡持有的「奇迹指示物」数量的卡,按照喜欢的顺序把这些卡放回卡组底,剩下的按照喜欢的顺序放回卡组顶。
③:自己对「花札」怪兽同调召唤成功的场合发动。从这张卡上把1个「奇迹指示物」取除,那之后,可以把以下效果适用。
● 这张卡送去墓地,自己场上·墓地的「花札卫」怪兽按照喜欢的顺序放回卡组底,剩下的按照喜欢的顺序放回卡组顶。那之后,为这张卡发动而除外的怪兽特殊召唤。
④:结束阶段发动。自己手卡·场上·墓地的卡里侧表示除外,基本分变成8000,抽5张卡。这张卡上没有「奇迹指示物」存在的场合,这个效果对对手也适用。
分类:常驻-DIY
提示文本:卡组确认、是否要把「花札卫」卡返回卡组?、回到卡组最上面、回到卡组最下面、重置世界
# 抄自万智牌「明灯控」套牌
神碑之渊(172016245) 场地魔法
系列:神碑
这张卡发动的场合,对方把手卡按照喜欢的顺序返回卡组底,给这张卡放置那个返回数量的「碑刻指示物」来发动。
持有「碑刻指示物」的这张卡因为这张卡的原本持有者从场上离开的场合,对方抽那个数量的卡,然后自己失去8000基本分。
①:这张卡上有「碑刻指示物」存在的场合,连锁1必须发动。取除1个「碑刻指示物」,对方抽1张。这个效果不会被无效。
②:只要这张卡在场上表侧表示存在,双方卡组上下翻转进行决斗。自己发动的「神碑」速攻魔法卡发动的场合,可以给那个效果加上以下效果。
● 这张卡除外,对方的卡组洗切。
③:自己的抽卡阶段,作为抽卡的代替发动。选择1项:
● 对手手卡的卡数量的除外的「神碑」魔法卡加入手卡。
● 对手场上的卡数量的墓地的「神碑」魔法卡加入手卡。
● 交换自己墓地和除外的「神碑」卡,抽1张。
分类:常驻-DIY
提示文本:让对方抽卡、是否要把这张卡除外让对方洗切卡组?、选除外的「神碑」卡加入手卡、选墓地的「神碑」卡加入手卡、交换墓地和除外的「神碑」卡
# 反击天使版「迷宫城的白银姬」
无间行者帕尔修斯(172016251) 暗 8星 天使 0 0 (Custom)
这个卡名的①③的效果1回合各能使用1次。①效果对手回合也能发动。
①:自己生命分不比对手低的场合可以发动。这张卡从手卡特殊召唤。这个回合仅有1次,自己可以把反击陷阱从手卡发动。
②:只要这张卡在场上表侧表示存在,自己不能把怪兽效果发动。
③:每次自己或者对手把反击陷阱发动,从卡组选1张与那张卡卡名不同的反击陷阱在自己场上盖放。自己场上有「天空的圣域」且自己生命分比对手高的场合,直到回合结束这张卡的属性变成光属性,攻击力上升那个差值,把②效果的「自己」改成「对手」。
分类:常驻-DIY
效果分类:抽卡辅助
提示文本:从手卡特殊召唤、圣徒形态
# 第九期 DIY,②效果为后补。
混沌帝龙 -结末的使者-(172016261) 光 8星 龙/特殊召唤 3000 2500 (Custom)
系列:混沌
这张卡不能通常召唤。从自己墓地把光属性和暗属性的怪兽各1只除外的场合可以特殊召唤。
①:1回合1次,支付1000生命分,把自己墓地1只怪兽除外才能发动。双方互相把卡组顶保留10张,其他卡送去墓地。那之后,双方各自受到这个效果自己送去墓地的怪兽卡数量×300伤害。与为这个效果除外的怪兽属性相同的怪兽每有1只,额外再受到300伤害。这张卡的效果发动的回合,自己不能把其他的效果发动。
②:只要这张卡在场上表侧表示存在,自己卡的发动或效果被无效的场合,这张卡①效果的契约与发动过的事实重置。
分类:常驻-DIY
效果分类:抽卡辅助
提示文本:特殊召唤、把卡组的卡送去墓地、重置契约
# 第十期 DIY。
雾天气 阳橙(172016280) 炎 LINK-2 天使/连接 1900 2 [←][➡️] (Custom)
系列:天气
「天气」怪兽2只
①:这张卡在额外怪兽区特殊召唤成功时才能发动。将这张卡向自己的主要怪兽区移动。那之后,可以从手卡把1只「天气」怪兽召唤。
②:这张卡所连接区的「天气」效果怪兽得到以下效果。●包含让对手抽卡的效果发动的场合,把这张卡除外才能发动。那些抽卡由自己进行。
③:场上的这张卡为让「天气」卡的效果发动而被除外的场合,下个回合的准备阶段才能发动。除外的这张卡特殊召唤。
分类:天使族、连接、主卡、OCG
提示文本:移动「雾天气 阳橙」的位置、除外的「天气」怪兽特殊召唤、劫持抽卡效果(雾天气 阳橙)、是否要将「天气」怪兽召唤?
# 补充的卡片,设计不好。
雾之天气模样(172016281) 永续魔法
系列:天气
①:「雾之天气模样」在自己场上只能有1张表侧表示存在。
②:和这张卡相同纵列的自己的主要怪兽区域以及那些两邻的自己的主要怪兽区域存在的「天气」效果怪兽得到以下效果。
● 把这张卡除外才能发动。随机选对手场上1只怪兽变成里侧表示。
分类:天使族、连接、主卡、OCG
效果分类:卡片除外
提示文本:随机1只怪兽变成里侧表示(雾之天气模样)
# 暮光道补充卡。
# 3 效果「信者得救」
黄昏的丧钟(172016285) 通常魔法
①:自己场上的暗属性怪兽攻击力上升500。
②:这张卡送去墓地,自己卡组有卡的场合发动。双方从卡组顶把2张卡送去墓地。自己在决斗中每有1次把这个效果发动,送去墓地的卡的数量增加2。这个效果送去墓地的卡的效果无效。那之后,这张卡返回卡组洗切。
③:这张卡送去墓地,自己卡组没有卡的场合,以下效果适用。
●自己场上有且只有「裁决之龙」和原本属性是光属性的「光道」怪兽的场合决斗胜利,不满足条件的场合败北。
待修改
效果分类:卡组破坏
# 解除龙辉巧的契约要求。
# 待修改
天极辉星 巨熊舰长(172016290) 光 9星 兽/灵摆 2000 700 (Custom)
系列:龙辉巧、北极天熊
←7 【灵摆】 7→
①:只要这张卡在灵摆区域存在,自己手卡等级6以下的「龙辉巧」怪兽等级上升6。在双方「龙辉巧」怪兽看来「北极天熊」怪兽是仪式怪兽。
②:1回合1次,从自己的额外卡组把2张「天极辉舰-熊斗龙巧」除外才能发动。从额外卡组选1张「天极辉舰-熊斗龙巧」当做永续陷阱在自己的魔法·陷阱区域放置。这个效果放置的卡具有那个记述的怪兽效果。那之后,这张卡的刻度上升1。
【怪兽效果】
这张卡在规则上当做「北极天熊」和「龙辉巧」卡使用。
①:这张卡召唤·特殊召唤成功的场合发动。从自己魔法·陷阱区域把1张「天极辉舰-熊斗龙巧」特殊召唤,选场上1张卡破坏。没有成功特殊召唤的场合,这张卡在自己的灵摆区域放置。
②:从自己场上·墓地选1只仪式·同调怪兽除外,以场上1张卡为对象才能发动。那张卡破坏。
分类:常驻-DIY
提示文本:特殊召唤、选场上的卡破坏
# 解除北极天熊的契约要求。
# 待修改
天极辉工 机巧副官(172016291) 水 1阶 机械/超量/灵摆 1050 1050 (Custom)
系列:龙辉巧、北极天熊
←3 【灵摆】 3→
①:只要这张卡在灵摆区域表侧表示存在,超量怪兽在「北极天熊」怪兽看来持有等级。自己场上没有同调怪兽表侧表示存在的场合,再让自己场上等级7以上的「北极天熊」怪兽等级下降6。
②:自己的魔法·陷阱区域有「天极辉舰-熊斗龙巧」存在,自己对「龙辉巧」或「北极天熊」怪兽的特殊召唤成功时发动。那些怪兽的攻击力上升1000。那之后,这张卡的刻度下降1。
③:1回合1次,自己灵摆区域有2张卡存在的场合才能发动。选择满足那1对灵摆刻度的「龙辉巧」和「北极天熊」怪兽直到下个对方回合结束时公开。因这个效果公开的怪兽手卡发动的效果不需要把怪兽解放。这个效果发动的回合,自己不能灵摆召唤。
【怪兽效果】
1星怪兽×2
这张卡在规则上当做「北极天熊」和「龙辉巧」卡使用。
这张卡在「北极天熊」怪兽看来持有等级。
①:这张卡特殊召唤成功的场合发动。从自己场上把1张「天极辉舰-熊斗龙巧」当做永续陷阱在自己魔法·陷阱区域放置。这个效果放置的卡具有那个记述的怪兽效果。没有放置的场合,这张卡在自己的灵摆区域放置。
②:1回合1次,取除这张卡1个「北极天熊」超量素材才能发动。从自己手卡·场上选1只怪兽和对方场上1只怪兽,那些怪兽的持有者把那个怪兽解放。这个效果对方回合也能发动。
分类:常驻-DIY
提示文本:放置「天极辉舰-熊斗龙巧」到魔陷区、选自己和对手的怪兽解放、攻击力上升、使用「天极辉官 机巧副官」的效果特殊召唤
机壳中的炼狱(172016292) 永续陷阱
系列:机壳、炼狱
①:解放自己场上1只「机壳」怪兽才能发动。可以把自己灵摆区的「机壳」卡返回手卡。那之后,可以从卡组选解放的那只怪兽等级以下的1只不能通常召唤的「狱火机」怪兽特殊召唤。解放或者返回手卡的是「机壳汇编器 不安定」的场合,改为可以从卡组选1只「狱火机」怪兽特殊召唤。
②:1回合1次,以自己场上1只等级8以上的「狱火机」怪兽为对象才能发动。那只怪兽返回手卡,这回合自己用「机壳」灵摆刻度进行灵摆召唤时,可以在主要怪兽区进行灵摆召唤。
(受核心机能限制,进行灵摆召唤的实际流程为把那些怪兽里侧表示除外,再特殊召唤。)
分类:常驻-DIY
提示文本:选「狱火机」怪兽特殊召唤、连接自己的主要怪兽区、用「机壳中的炼狱」效果灵摆召唤、是否要选怪兽在额外怪兽区特殊召唤?、是否要把灵摆区的「机壳」卡返回手卡?、是否要把「狱火机」怪兽特殊召唤?
# 光道暗黑界,我的初恋。
# 待修 2 效果
# 3 效果的本意是给「光之召集」的 combo,不满意。
于至阴刻开的正道(172016295) 永续魔法
系列:暗黑界、光道
这个卡名的③效果1回合只能使用1次。
①:结束阶段1次,从卡组顶把卡送去墓地的效果额外获得以下效果:
● 抽那个数量的卡,然后选那个数量的卡丢弃。
②:1回合1次,把手卡丢弃的效果额外获得以下效果:
● 从卡组选那个数量等级4以下的光属性怪兽送去墓地。
③:这张卡从卡组被送去墓地或者从手卡被丢弃送去墓地时才能发动。这张卡在场上发动。那之后,可以选择自己场上1只怪兽返回手卡。
分类:常驻-DIY
效果分类:送去墓地、返回手卡、抽卡辅助
提示文本:是否要适用「于至阴刻开的正道」的①效果?、是否要适用「于至阴刻开的正道」的②效果?、在场上发动(于天阴刻开的正道)、是否要选怪兽返回手卡?
跕怨少女 莉莉安(172017001) 光 4星 魔法使 900 800 (Custom)
系列:跕怨少女
①:只要这张卡在场上表侧表示存在,不能以1只怪兽为素材进行XYZ召唤。
②: 对方支付生命分的场合才能发动。墓地的这张卡特殊召唤。那之后,可以用包含这张卡在内的场上的怪兽为祭品,等级·阶级合计直到变成和仪式召唤的怪兽相同为止,从卡组·手卡把1只「跕怨少女」怪兽当做仪式召唤特殊召唤。
分类:光属性、暗属性、魔法师族、战士族、恶魔族、仪式、OCG
效果分类:卡片除外
提示文本:是否要进行仪式召唤?
跕怨少女 莉莉姆(172017002) 暗 4星 魔法使/仪式 1550 800 (Custom)
系列:跕怨少女
「与奈落的契约」降临。
①:只要这张卡在场上表侧表示存在,双方不能把怪兽效果发动。不使用这张卡记载的仪式魔法仪式召唤的场合,自己的回合结束时这个效果失效。
②:仪式召唤的这张卡被战斗破坏的场合才能发动。从墓地选1只「跕怨少女」怪兽除外。下个回合的准备阶段,因为这个效果除外的怪兽特殊召唤。
分类:光属性、暗属性、魔法师族、战士族、恶魔族、仪式、OCG
效果分类:卡片除外
跕怨少女 莉莉丝(172017003) 暗 8星 恶魔/仪式 2750 2750 (Custom)
系列:跕怨少女
「与奈落的契约」降临。
①:只要这回合特殊召唤的这张卡在场上表侧表示存在,双方不能把怪兽召唤·特殊召唤。不使用这张卡记载的仪式魔法仪式召唤的场合,自己的回合结束时这个效果失效。
②:仪式召唤的这张卡被对方送去墓地的场合才能发动。从墓地选1只这个卡名以外的「跕怨少女」怪兽特殊召唤。
分类:光属性、暗属性、魔法师族、战士族、恶魔族、仪式、OCG
效果分类:卡片除外
跕怨少女 爱丽丝(172017004) 暗 12星 恶魔/仪式 3000 3000 (Custom)
系列:跕怨少女
「不洁教堂」降临。
这张卡不在正中怪兽区域不能特殊召唤。
①:只要这张卡在场上表侧表示存在,双方正中位置以外的怪兽区域不能使用。那些区域中有怪兽的场合,那些怪兽送去墓地。不使用这张卡记载的仪式魔法仪式召唤的场合,自己的回合结束时这个效果失效。
②:怪兽送去墓地时,把这张卡送去墓地才能发动。那只怪兽在自己场上特殊召唤,获得这张卡记载的效果,失去原本卡名,只要在场上表侧表示变成这张卡的卡名。
分类:光属性、暗属性、魔法师族、战士族、恶魔族、仪式、OCG
效果分类:卡片除外
不洁教堂(172017010) 场地魔法
这个卡名的①②③效果1回合只能发动1次。
①:作为这张卡发动时的效果处理,从卡组选1张「修女」怪兽加入手卡。
②:对方战士族·魔法使族·念动力族怪兽的攻击宣言时,对方必须支付800生命分才能发动。自己选墓地1只怪兽特殊召唤。这个效果特殊召唤的怪兽回合结束时送去墓地。
③:这张卡送去墓地时才能发动。支付仪式召唤的怪兽等级×500生命分,从手卡把1只「修女」仪式怪兽仪式召唤。
注:「修女」字段是「救祓少女」和「跕怨少女」的父字段。
分类:光属性、暗属性、魔法师族、战士族、恶魔族、仪式、OCG
命运恶戏(172017011) 通常魔法
这个卡名的卡1回合只能发动1张。
①:从卡组选择「救祓少女」「跕怨少女」各1只给对手观看。对方从那之中随机选1只。对方选的怪兽在自己场上特殊召唤,剩下的怪兽送去墓地。
分类:光属性、暗属性、魔法师族、战士族、恶魔族、仪式、OCG
效果分类:卡片除外、送去墓地、特殊召唤
跕怨少女的晚祷(172017012) 仪式魔法
系列:跕怨少女
这张卡卡名在规则上当做「与奈落的契约」使用。
①:自己场上只有魔法使怪兽1只的场合,支付800基本分才能发动。那只怪兽解放,从双方墓地选1只暗属性仪式怪兽仪式召唤。场上有「不洁教堂」的场合,那个仪式怪兽也可以是从卡组选的「修女」仪式怪兽。
②:这张卡在墓地存在,自己正中区域的魔法使族怪兽破坏的场合,可以作为那只怪兽的破坏的代替把这张卡在自己场上盖放, 那之后,这张卡的①效果发动条件满足的场合,效果适用。发动条件不满足的场合,这张卡破坏。这个效果盖放的卡从场上离开时除外。
分类:光属性、暗属性、魔法师族、战士族、恶魔族、仪式、OCG
效果分类:特殊召唤
!setname 0x1 正义盟军 AOJ
!setname 0x2 次世代 ジェネクス
!setname 0x1002 真次世代 レアル·ジェネクス
#!setname 0x2002 盟军·次世代 A・ジェネクス
#setname 0x3 N/A
!setname 0x4 亚马逊 アマゾネス
!setname 0x5 秘仪之力 アルカナフォース
!setname 0x6 暗黑界 暗黒界
!setname 0x7 古代的机械 アンティーク・ギア
!setname 0x8 英雄 HERO
!setname 0x3008 元素英雄 EHERO
!setname 0x5008 幻影英雄 VHERO
!setname 0x6008 邪心英雄 E-HERO
!setname 0xa008 假面英雄 MHERO
!setname 0xc008 命运英雄 D-HERO
!setname 0x9 新宇 ネオス
!setname 0xa 入魔 ヴェルズ
!setname 0x100a 侵入魔鬼 インヴェルズ
!setname 0xb 永火 インフェルニティ
!setname 0xc 外星 エーリアン
!setname 0xd 剑士 セイバー
!setname 0x100d X-剑士 X-セイバー
#setname 0x300d XX-剑士 XX-セイバー
!setname 0x400d 元素灵剑士 エレメントセイバー
!setname 0xe 电气 エレキ
!setname 0xf 扰乱 おジャマ
!setname 0x10 薰风 ガスタ
!setname 0x11 机巧 カラクリ
!setname 0x12 青蛙 ガエル
!setname 0x13 机皇 機皇
!setname 0x3013 机皇帝 機皇帝
!setname 0x5013 机皇神 機皇神
!setname 0x6013 机皇兵 機皇兵
#setname 0x14 N/A
!setname 0x15 巨大战舰 巨大戦艦
!setname 0x16 机人 ロイド
!setname 0x1016 交通机人 ビークロイド
!setname 0x2016 疾行机人 スピードロイド
!setname 0x17 同调 シンクロ
!setname 0x1017 同调士 シンクロン
!setname 0x2017 同调龙 シンクロ・ドラゴン
!setname 0x18 云魔物 雲魔物
!setname 0x19 剑斗兽 剣闘獣
!setname 0x1a 黑蝎 黒蠍
!setname 0x1b 幻兽 幻獣
!setname 0x101b 幻兽机 幻獣機
!setname 0x1c 死之信息 死のメッセージ
!setname 0x1d 核成 コアキメイル
!setname 0x1e 茧状体 C(コクーン)
!setname 0x1f 新空间侠 N(ネオスペーシアン)
!setname 0x20 紫炎 紫炎
!setname 0x21 地缚 地縛
!setname 0x1021 地缚神 地縛神
!setname 0x22 朱罗纪 ジュラック
!setname 0x23Sin
!setname 0x24 废铁 スクラップ
!setname 0x25C(チェーン)
!setname 0x26 变形斗士 D(ディフォーマー)
!setname 0x27 科技属 TG(テックジーナス)
!setname 0x28 电池人 電池メン
!setname 0x29 龙骑兵团 ドラグニティ
!setname 0x2a 自然 ナチュル
!setname 0x2b 忍者
!setname 0x2c 炎狱 フレムベル
#setname 0x2d N/A
!setname 0x2e 守墓 墓守
!setname 0x2f 冰结界 氷結界
!setname 0x30 大日 ヴァイロン
!setname 0x31 命运女郎 フォーチュンレディ
!setname 0x32 火山 ヴォルカニック
!setname 0x33 黑羽 BF(ブラックフェザー)
!setname 0x1033 强袭黑羽 A BF(アサルト ブラックフェザー)
!setname 0x34 宝玉 宝玉
!setname 0x1034 宝玉兽 宝玉獣
!setname 0x2034 究极宝玉神 究極宝玉神
!setname 0x5034 高等宝玉兽 A宝玉獣
!setname 0x35 魔轰神 魔轟神
!setname 0x36 机甲 マシンナーズ
!setname 0x37 霞之谷 霞の谷
!setname 0x38 光道 ライトロード
!setname 0x39 熔岩 ラヴァル
!setname 0x3a 遗式 リチュア
!setname 0x3b 真红眼 レッドアイズ
!setname 0x3c 爬虫妖 レプティレス
!setname 0x3d 六武众 六武衆
!setname 0x103d 影六武众 影六武衆
!setname 0x3e 异虫 ワーム
!setname 0x3f 救世 セイヴァー
!setname 0x40 被封印 封印されし
!setname 0x41 LV LV(レベル)
!setname 0x42 极星 極星
!setname 0x3042 极星天 極星天
!setname 0x5042 极星宝 極星宝
!setname 0x6042 极星兽 極星獣
!setname 0xa042 极星灵 極星霊
!setname 0x43 废品 ジャンク
!setname 0x44 代行者
!setname 0x45 恶魔 デーモン
!setname 0x1045 红莲魔|恶魔 レッド・デーモン
!setname 0x46 融合 融合/フュージョン
!setname 0x1046 融合龙 フュージョン・ドラゴン
!setname 0x47 宝石 ジェム
!setname 0x1047 宝石骑士 ジェムナイト
!setname 0x48 No. No.
!setname 0x1048 混沌No. CNo.
!setname 0x49 铳士 銃士
!setname 0x4a 时械神 時械神
!setname 0x4b 极神 極神
!setname 0x4c 落穴 落とし穴
#setname 0x4d N/A
#setname 0x4e 进化 エヴォル
!setname 0x304e 进化虫 エヴォルド
!setname 0x504e 进化帝 エヴォルカイザー
!setname 0x604e 进化龙 エヴォルダー
#setname 0x4f 爆裂 バスター
!setname 0x104f /爆裂体 /バスター
!setname 0x50 蛇毒 ヴェノム
!setname 0x1050 凶饿毒|蛇毒 スターヴ・ヴェノム
!setname 0x51 零件 ガジェット
!setname 0x52 守护者 ガーディアン
!setname 0x1052 门之守护神|守护者 ゲート・ガーディアン
!setname 0x2052 法理守护者 ローガーディアン
!setname 0x53 星圣 セイクリッド
!setname 0x54 我我我 ガガガ
!setname 0x55 光子 フォトン
!setname 0x56 甲虫装机 甲虫装機
!setname 0x57 共鸣者 リゾネーター
!setname 0x58 发条 ゼンマイ
!setname 0x59 隆隆隆 ゴゴゴ
!setname 0x5a 企鹅 ペンギン
!setname 0x5b 番茄小子 トマボー
!setname 0x5c 斯芬克斯 スフィンクス
#setname 0x5d N/A
#setname 0x5e N/A
#setname 0x5f N/A
!setname 0x60 竹光
!setname 0x61 忍法
!setname 0x62 卡通 トゥーン
!setname 0x63 反应机 リアクター
!setname 0x64 鹰身 ハーピィ
!setname 0x65 侵略的 侵略の
!setname 0x66 战士 ウォリアー
!setname 0x1066 音响战士 音響戦士
!setname 0x2066 磁石战士 マグネット・ウォリアー
#setname 0x67 钢铁 アイアン
#setname 0x68 铁皮 ブリキ
!setname 0x69 圣刻 聖刻
!setname 0x6a 幻蝶刺客 幻蝶の刺客
!setname 0x6b 保镖 バウンサー
#setname 0x6c 光芒使者 ライトレイ
!setname 0x6d 魔人 魔人(まじん)
!setname 0x6e 魔导 魔導
!setname 0x106e 魔导书 魔導書
!setname 0x6f 英豪 ヒロイック
!setname 0x106f 英豪挑战者 HC
#setname 0x206f 英豪冠军 H-C
!setname 0x70 先史遗产 先史遺産
!setname 0x71 魔偶甜点 マドルチェ
!setname 0x72 齿轮齿轮 ギアギア
!setname 0x1072 齿轮齿轮人 ギアギアーノ
!setname 0x73 超量 エクシーズ
!setname 0x1073 混沌超量 CX(カオスエクシーズ)
!setname 0x2073 超量龙 エクシーズ・ドラゴン
!setname 0x4073 铠装超量 アーマード・エクシーズ
!setname 0x74 水精鳞 水精鱗
!setname 0x75 深渊 アビス
!setname 0x76 纹章兽 紋章獣
!setname 0x77 海皇
!setname 0x78 迅捷 素早い
!setname 0x79 炎星
#setname 0x7a 圣 聖
!setname 0x107a 圣骑士 聖騎士(せいきし)
!setname 0x207a 圣剑 聖剣(せいけん)
!setname 0x507a 焰圣骑士 焔聖騎士
!setname 0x607a 焰圣剑 焔聖剣
!setname 0x7b 银河 ギャラクシー
!setname 0x107b 银河眼 ギャラクシーアイズ
!setname 0x307b 银河眼时空龙 ギャラクシーアイズ・タキオン・ドラゴン
!setname 0x7c 炎舞
!setname 0x7d 阳炎 ヘイズ
!setname 0x107d 阳炎兽 陽炎獣
!setname 0x7e 异热同心 ゼアル
!setname 0x107e 异热同心武器 ZW(ゼアル・ウェポン)
!setname 0x207e 异热同心从者 ZS(ゼアル・サーバス)
!setname 0x7f 霍普 ホープ
!setname 0x107f 希望皇 霍普 希望皇ホープ
!setname 0x207f 未来皇 霍普 未来皇ホープ
!setname 0x80 尘妖 ダストン
!setname 0x81 炎王
!setname 0x1081 炎王兽 炎王獣
!setname 0x82 怒怒怒 ドドド
!setname 0x83 人偶 パペット
!setname 0x1083 机关傀儡 ギミック・パペット
#setname 0x84 燃烧拳 バーニングナック
!setname 0x1084 燃烧拳击手 BK(バーニングナックラー)
!setname 0x2084 燃烧拳 バーニングナックル
!setname 0x85 超级防卫机器人 SDロボ
!setname 0x86 光天使
!setname 0x87 阴影 アンブラル
!setname 0x88 武神
!setname 0x89 洞 ホール
#setname 0x8a 虫惑 蟲惑
!setname 0x108a 虫惑魔 蟲惑魔
!setname 0x8b 食恶 マリスボラス
#setname 0x8c 德鲁伊 ドルイド
!setname 0x8d 鬼计 ゴーストリック
!setname 0x8e 吸血鬼 ヴァンパイア
!setname 0x8f 刷拉拉 ズババ
!setname 0x90 森罗 森羅
!setname 0x91 王家长眠之谷 ネクロバレー
!setname 0x92 纹章 メダリオン
!setname 0x93 电子 サイバー
!setname 0x1093 电子龙 サイバー・ドラゴン
!setname 0x2093 电子化天使 サイバー・エンジェル
!setname 0x4093 电子暗黑 サイバー・ダーク/サイバーダーク
!setname 0x94 电子科技 サイバネティック
!setname 0x95 升阶魔法 RUM
!setname 0x96 电子鱼人|非「电子」 フィッシュボーグ
!setname 0x97 古遗物 アーティファクト
!setname 0x98 魔术师 魔術師
!setname 0x99 异色眼 オッドアイズ
!setname 0x9a 超重武者
!setname 0x109a 超重武者装留
!setname 0x9b 幻奏
!setname 0x109b 幻奏的音姬 幻奏の音姫
!setname 0x9c 星骑士 テラナイト
!setname 0x109c 星辉士|星骑士 ステラナイト
!setname 0x9d 影依 シャドール
!setname 0x9e 龙星 竜星
!setname 0x9f 娱乐伙伴 EM(エンタメイト)
!setname 0xa0 传说的骑士 伝説の騎士
!setname 0xa1 传说之龙 伝説の竜
#setname 0xa2 魔术 マジシャン
!setname 0x10a2 黑魔术 ブラック・マジシャン
!setname 0x20a2 魔术少女 マジシャン・ガール
!setname 0x30a2 黑魔术少女 ブラック・マジシャン・ガール
!setname 0xa3 星尘 スターダスト
!setname 0xa4 栗子球 クリボー
!setname 0x10a4 羽翼栗子球 ハネクリボー
!setname 0xa5 变化 チェンジ
!setname 0xa6 幼芽 スプラウト
!setname 0xa7 阿托利斯 アルトリウス
!setname 0xa8 兰斯洛特 ランスロット
!setname 0xa9 毛绒动物 ファーニマル
!setname 0xaa 机壳 クリフォート
!setname 0x10aa 隐藏的机壳 アポクリフォート
!setname 0xab 文具电子人|非「电子」 ブンボーグ
!setname 0xac 哥布林 ゴブリン
!setname 0x10ac 哥布林骑手 ゴブリンライダー
!setname 0xad 魔玩具 デストーイ
!setname 0xae 契约书 契約書
!setname 0xaf DD
!setname 0x10af DDD
!setname 0xb0 加特姆士 ガトムズ
!setname 0xb1 彼岸
!setname 0xb2 超级运动员 U.A.
!setname 0xb3 妖仙兽 妖仙獣
!setname 0xb4 影灵衣 影霊衣
!setname 0xb5 灵兽 霊獣
!setname 0x10b5 灵兽使 霊獣使い
!setname 0x20b5 精灵兽 精霊獣
#!setname 0x30b5 精灵兽使 精霊獣使い
!setname 0x40b5 圣灵兽骑 聖霊獣騎
!setname 0xb6 外神
!setname 0xb7 旧神
!setname 0xb8 古神
!setname 0xb9 烈焰加农炮 ブレイズ・キャノン
!setname 0xba 急袭猛禽 RR(レイド・ラプターズ)
!setname 0xbb 狱火机 インフェルノイド
!setname 0xbc 人造人 人造人間
!setname 0xbd 暗黑骑士 盖亚 暗黒騎士ガイア
!setname 0xbe 帝王 帝王
!setname 0xbf 灵使 霊使い
!setname 0xc0 凭依 憑依
!setname 0x10c0 凭依装着 憑依装着
!setname 0xc1 PSY骨架 PSYフレーム
!setname 0x10c1 PSY骨架装备 PSYフレームギア
!setname 0xc2 动力工具 パワー・ツール
!setname 0xc3 锋利小鬼 エッジインプ
!setname 0xc4 神数 セフィラ
!setname 0xc5 炼狱 煉獄
!setname 0xc6 娱乐法师 Em(エンタメイジ)
!setname 0xc7 龙剑士 竜剣士
!setname 0xc8 点火骑士 イグナイト
!setname 0xc9 芳香 アロマ
!setname 0xca 魔装战士 魔装戦士
!setname 0xcb 以太神兵龙 イーサルウェポン
!setname 0xcc 占术姬 占術姫
!setname 0xcd 水伶女 アクアアクトレス
!setname 0xce 水族馆 アクアリウム
!setname 0xcf 混沌 カオス
!setname 0x10cf 混沌战士 カオス・ソルジャー
!setname 0xd0 威风妖怪 マジェスペクター
!setname 0xd1 灰篮 グレイドル
!setname 0xd2 星际仙踪 Kozmo
!setname 0xd3 坏兽 壊獣
!setname 0xd4 伯吉斯异兽 バージェストマ
!setname 0xd5 但丁 ダンテ
!setname 0xd6 破坏剑 破壊剣
!setname 0xd7 破坏之剑士 バスター・ブレイダー
!setname 0xd8 雾动机龙 ダイナミスト
!setname 0xd9 不知火
!setname 0x10d9 妖刀-不知火 妖刀-不知火
!setname 0xda 龙魔王 竜魔王
!setname 0xdb 幻影 ファントム
!setname 0x10db 幻影骑士团 幻影騎士団
!setname 0xdc 超级量子 超量
!setname 0x10dc 超级量子战士 超量士
!setname 0x20dc 超级量子机兽 超量機獣
!setname 0xdd 青眼 ブルーアイズ
!setname 0xde 艾克佐迪亚 エクゾディア
!setname 0xdf 月光 ムーンライト
!setname 0xe0 无形噬体 アモルファージ
!setname 0xe1 炼装 メタルフォーゼ
!setname 0xe2 三形金字塔 トラミッド
!setname 0xe3 方界
!setname 0xe4 精灵剑士 エルフの剣士
!setname 0xe5 光波 サイファー
!setname 0x10e5 光波龙 サイファー・ドラゴン
!setname 0xe6 花札卫 花札衛
!setname 0xe7 沉默剑士 サイレント・ソードマン
!setname 0xe8 沉默魔术师 サイレント・マジシャン
!setname 0xe9 磁石战士 磁石の戦士(じしゃくのせんし)
!setname 0xea 水晶机巧|非「机巧」 クリストロン
!setname 0xeb 化合兽 化合獣
#!setname 0xec 魔界 魔界
!setname 0x10ec 魔界剧团 魔界劇団
!setname 0x20ec 魔界台本 魔界台本
!setname 0xed 地中族 サブテラー
!setname 0x10ed 地中族邪界 サブテラーマリス
!setname 0xee 秘旋谍 SPYRAL
!setname 0x10ee 秘旋谍装备 SPYRAL GEAR
!setname 0x20ee 秘旋谍任务 SPYRAL MISSION
!setname 0xef 堕天使
!setname 0xf0 风魔女 WW(ウィンド・ウィッチ)
!setname 0xf1 十二兽 十二獣
!setname 0xf2 灵摆 ペンデュラム
!setname 0x10f2 灵摆龙 ペンデュラム・ドラゴン
!setname 0x20f2 灵摆读阵 ペンデュラムグラフ
!setname 0xf3 捕食 プレデター
!setname 0x10f3 捕食植物
!setname 0xf4 召唤兽 召喚獣
!setname 0xf5 甘多拉 ガンドラ
!setname 0xf6 摩天楼
!setname 0xf7 抒情歌鸲 LL(リリカル・ルスキニア)
#!setname 0xf8 霸王 覇王
!setname 0x10f8 霸王门 覇王門
!setname 0x20f8 霸王眷龙 覇王眷竜
!setname 0xf9 真龙 真竜
!setname 0xfa 幻煌龙 幻煌龍
!setname 0xfb 淘气仙星 トリックスター
!setname 0xfc 刚鬼 剛鬼
!setname 0xfd 星杯
!setname 0xfe 星遗物 星遺物
!setname 0xff 幻透翼 クリアウィング
!setname 0x100 化学结合 ボンディング
!setname 0x101 码语者 コード・トーカー
!setname 0x102 弹丸 ヴァレット
!setname 0x103 幻变骚灵 オルターガイスト
!setname 0x104 机怪虫 クローラー
!setname 0x105 玄化 メタファイズ
!setname 0x106 复仇死者 ヴェンデット
!setname 0x107 方程式运动员 F.A.
!setname 0x108 魔弹 魔弾
!setname 0x109 天气 天気
!setname 0x10a 珀耳修斯 パーシアス
!setname 0x10b 廷达魔三角 ティンダングル
!setname 0x10c 机界骑士 ジャックナイツ
!setname 0x10d 魔导兽|非「魔导」 魔導獣
!setname 0x10e 进化药 進化薬
!setname 0x10f 枪管 ヴァレル
!setname 0x110 纳祭 サクリファイス
!setname 0x1110 眼纳祭神 アイズ・サクリファイス
!setname 0x111 武装龙 アームド・ドラゴン
!setname 0x112 幻崩 トロイメア
!setname 0x113 灵神 霊神
!setname 0x114 空牙团 空牙団
!setname 0x115 闪刀 閃刀
!setname 0x1115 闪刀姬 閃刀姫
!setname 0x116 圣像骑士 パラディオン
!setname 0x117 魔神仪 魔神儀
!setname 0x118 电脑网 サイバネット
!setname 0x119 转生炎兽 サラマングレイト
!setname 0x11a 恐龙摔跤手 ダイナレスラー
!setname 0x11b 自奏圣乐 オルフェゴール
!setname 0x11c 雷龙 サンダー·ドラゴン
!setname 0x11d 禁忌的 禁じられた
!setname 0x11e 未界域
!setname 0x11f 奈芙提斯 ネフティス
!setname 0x120 调皮宝贝 プランキッズ
!setname 0x121 魔妖
!setname 0x122 女武神|非「武神」 ワルキューレ
!setname 0x123 蔷薇 ローズ
!setname 0x1123 蔷薇龙 ローズ・ドラゴン
!setname 0x124 机械天使 機械天使
!setname 0x125 笑容 スマイル
!setname 0x126 时间潜行者 クロノダイバー
!setname 0x127 无限起动 無限起動
!setname 0x128 魔女术 ウィッチクラフト
!setname 0x129 咒眼 呪眼
!setname 0x12a 恩底弥翁 エンディミオン
!setname 0x12b 海晶少女 マリンセス
!setname 0x12c 天威
!setname 0x12d 斯摩夫 シムルグ
!setname 0x12e 占卜魔女 占い魔女
!setname 0x12f 蜂军 BF(ビー・フォース)
!setname 0x130 破械
!setname 0x1130 破械神
!setname 0x131 梦魔镜 夢魔鏡
!setname 0x132 斩机 斬機
!setname 0x133 半龙女仆 ドラゴンメイド
!setname 0x134 王战 ジェネレイド
!setname 0x135 @火灵天星 @イグニスター
!setname 0x136 “艾” Ai(アイ)
!setname 0x137 战华 戦華
!setname 0x138 巨石遗物 メガリス
!setname 0x139 守护神官 守護神官
!setname 0x13a 拟声 オノマト
!setname 0x13b 叛逆 リベリオン
!setname 0x13c 代码破坏者 コードブレイカー
!setname 0x13d 星义 ネメシス
!setname 0x13e 巴巴罗斯 バルバロス
!setname 0x13f 海造贼 海造賊
!setname 0x140 魔救 アダマシア
!setname 0x141 六花
#setname 0x142 黄金国 エルド
!setname 0x1142 黄金国巫妖 エルドリッチ
!setname 0x2142 黄金国永生药 エルドリクシル
!setname 0x143 黄金乡 黄金郷
!setname 0x144 幻魔
!setname 0x145 教导 ドラグマ
!setname 0x146 童话动物 メルフィー
!setname 0x147 波波 ポータン
!setname 0x148 罗兰 ローラン
!setname 0x149 化石
!setname 0x14a 源数 ヌメロン
!setname 0x114a 源数之门 ゲート・オブ・ヌメロン
!setname 0x14b 机块 機塊
#setname 0x14c 灵术 霊術
!setname 0x314c 地灵术 地霊術
!setname 0x514c 水灵术 水霊術
!setname 0x614c 火灵术 火霊術
!setname 0x914c 风灵术 風霊術
#setname 0xa14c 光灵术 光霊術
#setname 0xc14c 暗灵术 闇霊術
!setname 0x14d 铁兽 トライブリゲード
!setname 0x14e 电脑堺 電脳堺
!setname 0x114e 电脑堺门 電脳堺門
!setname 0x14f 双天
!setname 0x150 大贤者 マギストス
#setname 0x151 双子 Twin
!setname 0x1151 直播☆双子 LiveTwin
!setname 0x2151 邪恶★双子 EvilTwin
!setname 0x152 姬丝基勒 キスキル
!setname 0x153 璃拉 リィラ
!setname 0x154 龙辉巧 ドライトロン
!setname 0x155 护宝炮妖 スプリガンズ
!setname 0x156 治安战警队 SForce
!setname 0x157 秘异三变 ミュートリア
#setname 0x158 圣 サン
!setname 0x1158 圣蔓 サンヴァイン
!setname 0x2158 圣天树 サンアバロン
!setname 0x4158 圣种 サンシード
!setname 0x159 圣夜骑士 ホーリーナイツ
!setname 0x15a 人偶怪兽 ドール・モンスター
!setname 0x15b 惊乐 アメイズメント
!setname 0x15c 游乐设施 アトラクション
!setname 0x15d 烙印
!setname 0x15e 降阶魔法 RDM
!setname 0x15f 战吼 ウォークライ
!setname 0x160 原质炉 マテリアクトル
!setname 0x161 溟界
!setname 0x162 七音服 ドレミコード
!setname 0x1162 大钢琴之七音服 グランドレミコード
!setname 0x163 北极天熊 ベアルクティ
!setname 0x164 死狱乡 デスピア
!setname 0x165 魔键 魔鍵
!setname 0x166 军贯 軍貫
!setname 0x1167 森之圣兽 森の聖獣
!setname 0x2167 森之圣灵 森の聖霊
!setname 0x168 隐形水母怪 ステルス・クラーゲン
!setname 0x169 原数天灵 ヌメロニアス
!setname 0x16a 编号系 ナンバーズ
!setname 0x16b 相剑 相剣
!setname 0x16c 冰水 氷水
!setname 0x16d 随风旅鸟 ふわんだりぃず
!setname 0x16e 拓扑 トポロジック
!setname 0x16f 许珀里翁 ヒュペリオン
!setname 0x170 骑甲虫 ビートルーパー
!setname 0x171 朋克 P.U.N.K.
!setname 0x172 救祓少女 エクソシスター
!setname 0x173 恐啡肽狂龙 ダイノルフィア
!setname 0x174 恶魔娘 悪魔嬢
!setname 0x175 七皇 セブンス
!setname 0x176 异晶人的 バリアンズ
!setname 0x177 海龙神 リバイアサン
!setname 0x178 潜海 シー・ステルス
!setname 0x179 兽带斗神 セリオンズ
!setname 0x17a 恐吓爪牙族 スケアクロー
!setname 0x17b 野蛮人 バーバリアン
!setname 0x17c 书灵师 リブロマンサー
!setname 0x17d 群豪 ヴァリアンツ
!setname 0x17e 拉比林斯迷宫 ラビュリンス
!setname 0x117e 拉比林斯迷宫欢迎 ウェルカム・ラビュリンス
!setname 0x17f 神碑
!setname 0x180 卫星闪灵 スプライト
!setname 0x181 珠泪哀歌族 ティアラメンツ
!setname 0x182 春化精
!setname 0x183 悠悠 もけもけ
!setname 0x184 翼侠 ウィングマン
#setname 0x185 涂鸦 らくがき
!setname 0x1185 涂鸦兽 らくがきじゅう
!setname 0x2185 涂鸦本 らくがきちょう
!setname 0x186 G石人 Gゴーレム
!setname 0x187 桥梁 架け橋
!setname 0x188 深渊之兽 ビーステッド
!setname 0x189 俱舍怒威族 クシャトリラ
!setname 0x18a 魊影 ゴーティス
!setname 0x18b 救援ACERACE
!setname 0x18c 纯爱妖精 ピュアリィ
!setname 0x18d 御巫
!setname 0x18e 仪水镜 儀水鏡
!setname 0x18f 防火 ファイアウォール
!setname 0x190 末那愚子族 マナドゥム
!setname 0x191 妮穆蕾莉娅 ネムレリア
!setname 0x192 金傲大奖赛 GP(ゴールド・プライド)
!setname 0x193 迷宫壁 ラビリンス・ウォール
!setname 0x194 至爱 フェイバリット
!setname 0x195 征服斗魂 VS(ヴァンキッシュ・ソウル)
!setname 0x196 新式魔厨 ヌーベルズ
!setname 0x197 食谱 レシピ
!setname 0x198 维萨斯 ヴィサス
!setname 0x199 反击 カウンター
!setname 0x19a 吠陀 ヴェーダ
!setname 0x19b 迪亚贝尔斯塔尔 ディアベルスター
!setname 0x19c 蛇眼 スネークアイ
!setname 0x19d 荷鲁斯 ホルス
!setname 0x119d 荷鲁斯之黑炎龙 ホルスの黒炎竜
!setname 0x19e 罪宝
!setname 0x19f 圣菓使 聖菓使
!setname 0x1a0 哈特 ハート
!setname 0x1a1 莫忘 メメント
!setname 0x1a2 百夫长骑士 センチュリオン
!setname 0x1a3 异响鸣 ヴァルモニカ
!setname 0x1a4 蒂斯蒂娜 Tistina
!setname 0x1a5 于贝尔 ユベル
!setname 0x1a6 肃声 粛声
!setname 0x1a7 白斗气 ホワイト・オーラ
!setname 0x1a8 玩具 トイ
-- 拓扑混沌交换熊
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2)
c:EnableReviveLimit()
-- destro
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BECOME_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.destrocon)
e1:SetOperation(s.destroop)
c:RegisterEffect(e1)
-- skip M2
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.skipcon)
e2:SetOperation(s.skipop)
c:RegisterEffect(e2)
-- immune effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(s.immunetg)
e3:SetValue(s.immunefilter)
e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
c:RegisterEffect(e3)
-- win
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_REMOVED)
e4:SetCode(EVENT_REMOVE)
e4:SetCondition(s.wincon)
e4:SetOperation(s.winop)
c:RegisterEffect(e4)
end
function s.linkfilter(c)
return c:IsCode(47297616) and c:GetAttack()==2800
end
function s.destrocon(e,tp,eg,ep,ev,re,r,rp)
if #eg~=1 then return false end
local c=e:GetHandler()
local mg=c:GetMutualLinkedGroup()
if #mg>0 then return false end
local g=c:GetLinkedGroup()
local tc=eg:GetFirst()
return tc==c or g:IsContains(tc)
end
function s.destrofilter(c,ftg,e,tp,eg,ep,ev,re,r,rp)
return ftg(e,tp,eg,ep,ev,re,r,rp,0,c)
end
function s.destroop(e,tp,eg,ep,ev,re,r,rp)
local fop=re:GetOperation()
local ftg=re:GetTarget()
local c=e:GetHandler()
local g=c:GetLinkedGroup()
g:AddCard(c)
g=g:Filter(s.destrofilter,nil,ftg,e,tp,eg,ep,ev,re,r,rp)
g:KeepAlive()
Duel.Hint(HINT_CARD,0,id)
Duel.HintSelection(g)
--Duel.ChangeTargetCard(ev,g:Clone())
Duel.ChangeChainOperation(ev,s._destroop(fop,g))
end
function s._destroop(op,g)
return function(e,tp,eg,ep,ev,re,r,rp)
local rg=s.shuffle(g)
for _, tc in ipairs(rg) do
local tg=Group.FromCards(tc)
Duel.ChangeTargetCard(ev,tg)
op(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext()
end
end
end
function s.shuffle(g)
local c=g:GetFirst()
local t={}
while c do
table.insert(t,c)
c=g:GetNext()
end
for i=#t,2,-1 do
local j = math.random(i)
t[i],t[j]=t[j],t[i]
end
return t
end
function s.skipcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetOwner()==tp
end
function s.skipop(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
end
function s.immunetg(e,c)
local tp=c:GetControler()
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)
return ct>0 and ct<10
end
function s.immunefilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
function s.wincon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
print(c:IsReason(REASON_EFFECT),rp,tp,c:IsPreviousControler(tp),c:IsPreviousLocation(LOCATION_ONFIELD),c:IsPreviousPosition(POS_FACEUP))
return c:IsReason(REASON_EFFECT) and rp==1-tp and c:IsPreviousControler(tp)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
and c:IsLocation(LOCATION_REMOVED) and c:IsPosition(POS_FACEDOWN)
end
function s.winop(e,tp,eg,ep,ev,re,r,rp)
Duel.Win(tp,0xf0)
end
\ No newline at end of file
--愚者的进军
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
function s.chainfilter(re,tp,cid)
return not re:IsActiveType(TYPE_MONSTER)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==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_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function s.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER+RACE_PSYCHO)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetRace)
if ct==3 then ct=5 end
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetRace)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Draw(p,ct,REASON_EFFECT)
if ct==3 then
Duel.Draw(p,2,REASON_EFFECT)
end
end
-- 冥府的使者 凯茵
local s,id,o=GetID()
function s.initial_effect(c)
-- destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ANNOUNCE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(s.sgtg)
e2:SetOperation(s.sgop)
c:RegisterEffect(e2)
if not s.gf then
s.gf=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetCondition(s.descon)
ge1:SetOperation(s.desop)
Duel.RegisterEffect(ge1,0)
end
end
function s.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsPosition(POS_FACEUP)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) end
local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,0,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,0,0)
end
function s.cost(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 s.op(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,0,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
function s.sgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ct=Duel.GetFlagEffectLabel(tp,id)
return Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)==0
and ct and ct>0
and Duel.IsExistingMatchingCard(s.sgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
end
function s.sgfilter(c)
return c:IsAbleToGrave()
end
function s.sgop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFlagEffectLabel(tp,id)
if ct and ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,s.sgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
local c=eg:GetFirst()
while c do
if bit.band(r,REASON_DESTROY)~=0
and c:IsPreviousLocation(LOCATION_ONFIELD)
and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) then
return true
end
c=eg:GetNext()
end
return false
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=eg:GetFirst()
while c do
local p=c:GetOwner()
local ct=Duel.GetFlagEffectLabel(p,id)
if ct==nil then
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1,1)
else
Duel.SetFlagEffectLabel(p,id,ct+1)
end
c=eg:GetNext()
end
end
\ No newline at end of file
--花火
local s,id,o=GetID()
function s.initial_effect(c)
--fail
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(s.cost)
e2:SetOperation(s.op)
c:RegisterEffect(e2)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
--fail in ep
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(s.op)
Duel.RegisterEffect(e1,tp)
--draw
local ge=Effect.CreateEffect(c)
ge:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge:SetCode(EVENT_CHAINING)
ge:SetLabelObject(c)
ge:SetCondition(s.drawcon)
ge:SetOperation(s.drawop)
Duel.RegisterEffect(ge,tp)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Win(1-tp,0xff)
end
function s.drawop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local rc=re:GetHandler()
Duel.Draw(rp,1,REASON_COST)
if rc:IsOnField() and Duel.SelectYesNo(rp,aux.Stringid(id,0)) and Duel.SendtoGrave(rc,REASON_EFFECT)~=0 then
Duel.Draw(rp,1,REASON_EFFECT)
end
end
function s.drawcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
if c:IsOnField() then
return true
else
e:Reset()
end
end
\ No newline at end of file
--万古的仪式
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
while ct>0 do
local g=Duel.GetDecktopGroup(tp,ct)
local count=math.min(ct,15)
local dg=g:Select(tp,1,count,nil)
local c=dg:GetFirst()
while c do
Duel.MoveSequence(c,SEQ_DECKTOP)
c=dg:GetNext()
end
Duel.SortDecktop(tp,tp,#dg)
count=#dg
while count>0 do
g=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(g:GetFirst(),SEQ_DECKBOTTOM)
count=count-1
end
ct=ct-#dg
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(s.val)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,1-tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(1)
Duel.RegisterEffect(e2,1-tp)
-- Validate deck order
--ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
--s.drawall(tp,ct)
end
function s.val(e,re,val,r,rp,rc)
if e:GetHandlerPlayer()==1-rp then
return 0
else return val end
end
function s.drawall(tp,n)
while n>0 do
Duel.Draw(tp,1,REASON_EFFECT)
Duel.SelectYesNo(tp,aux.Stringid(id,0))
n=n-1
end
end
\ No newline at end of file
-- 岩融冰结
local s,id,o=GetID()
function s.initial_effect(c)
-- disable
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ANNOUNCE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCondition(s.con)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,aux.FALSE)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
if chkc then return true end
local ids={}
local c=e:GetLabel()
for i=1,c do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp)
Duel.SetTargetParam(ac)
table.insert(ids,ac)
end
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
e:SetOperation(s.op(ids))
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local count=s.count(tp)
local maxc=math.floor(Duel.GetLP(tp)/1500)-count
if chk==0 then return maxc>0 and e:GetHandler():IsAbleToGraveAsCost() end
if maxc<=0 then return end
--Duel.PayLPCost(1-tp, Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)+1)
--Duel.PayLPCost(1-tp, Duel.GetTurnCount())
--Duel.PayLPCost(1-tp, Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)+1)
--Duel.PayLPCost(1-tp, Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)+1)
local t={}
for i=1,maxc do t[i]=i end
local a1=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,(a1+count)*1500)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
e:SetLabel(a1)
end
function s.count(tp)
return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
+Duel.GetTurnCount()-1 -- Turn starts in 1
+Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)
+Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)-1 -- Activate itself counts 1
end
function s.op(ids)
return function (e,tp,eg,ep,ev,re,r,rp)
for i,id in pairs(ids) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_FORBIDDEN)
e1:SetTargetRange(0x7f,0x7f)
e1:SetTarget(s.bantg)
e1:SetLabel(id)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
end
end
function s.bantg(e,c)
return c:IsCode(e:GetLabel()) and (not c:IsOnField() or c:GetRealFieldID()>e:GetFieldID())
end
--九鼎
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(s.immunetg)
e2:SetValue(s.immunefilter)
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(s.eqlimit)
c:RegisterEffect(e3)
--redirect
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCondition(aux.TRUE)
e5:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e5)
end
function s.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end
function s.eqlimit(e,c)
return c:IsRace(RACE_WARRIOR)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local c=e:GetHandler()
local s=c:GetSequence()
local seq=Duel.SelectField(tp,9,LOCATION_ONFIELD,0,0xe0+(0x100<<s),id)
e:SetLabel(seq)
end
function s.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
local seq=e:GetLabel()
Duel.Hint(HINT_ZONE,0,seq)
Duel.Equip(tp,c,tc)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,seq)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function s.immunetg(e,c)
local sc=e:GetHandler()
local tzone=sc:GetFlagEffectLabel(id)
if tzone==nil then return false end
local zone=s.getzone(c)
--print(seq,loc,tzone,zone)
return bit.band(tzone,zone)>0
end
function s.immunefilter(e,te)
local c=e:GetHandler()
local tc=c:GetEquipTarget()
return te:GetOwner()~=c
end
function s.getzone(c)
local seq=c:GetSequence()
local loc=c:GetLocation()
local zone=0
if loc==LOCATION_MZONE then
zone=0x1<<seq
elseif loc==LOCATION_SZONE then
zone=0x100<<seq
elseif loc==LOCATION_FZONE then
zone=0x1000
elseif loc==LOCATION_PZONE then
zone=0 -- ????
end
return zone
end
\ No newline at end of file
-- 白夜苦行
local s,id,o=GetID()
local LIMIT_NUMBER=3
function c172016007.initial_effect(c)
--redirect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.limcon)
e1:SetCost(s.limcost)
e1:SetOperation(s.limop)
c:RegisterEffect(e1)
if not s.gf then
-- Card.SetUniqueOnField 只涉及场上的卡
-- Duel.RemoveCounter 目前为止只涉及场上的卡
-- Duel.IsCanRemoveCounter 目前为止只涉及场上的卡
-- Duel.GetCounter 目前为止只涉及场上的卡
-- Duel.GetFieldGroup 已单独处理
-- Duel.GetFieldGroupCount 已单独处理
s.hook_func2()
Duel.GetMatchingGroup = s.hook_func("GetMatchingGroup",Duel.GetMatchingGroup,1,2,3,4)
Duel.GetMatchingGroupCount = s.hook_func("GetMatchingGroupCount",Duel.GetMatchingGroupCount,1,2,3,4)
Duel.GetFirstMatchingCard = s.hook_func("GetFirstMatchingCard",Duel.GetFirstMatchingCard,1,2,3,4)
Duel.IsExistingMatchingCard = s.hook_func("IsExistingMatchingCard",Duel.IsExistingMatchingCard,1,2,3,4)
Duel.SelectMatchingCard = s.hook_func("SelectMatchingCard",Duel.SelectMatchingCard,2,3,4,5)
-- Duel.GetTargetCount 只涉及场上的卡
-- Duel.IsExistingTarget 只涉及场上的卡
-- Duel.SelectTarget 只涉及场上的卡
-- Duel.GetOverlayGroup 似乎只涉及场上的卡
-- Duel.GetOverlayCount 似乎只涉及场上的卡
-- Duel.CheckRemoveOverlayCard 似乎只涉及场上的卡
-- Duel.RemoveOverlayCard 似乎只涉及场上的卡
-- Duel.SelectDisableField 只涉及场上的卡
local ge=Effect.CreateEffect(c)
ge:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge:SetCode(EVENT_CHAINING)
ge:SetCountLimit(1,id)
ge:SetCondition(s.gecon)
ge:SetOperation(s.geop)
Duel.RegisterEffect(ge,0)
s.gf=true
end
end
function s.limcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetFlagEffect(tp,id)==0 and Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function s.limcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function s.limop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SendtoHand(c,1-tp,REASON_EFFECT) then
Duel.ResetFlagEffect(1-tp,id)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(id)
e1:SetTargetRange(1,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER+EFFECT_FLAG_IMMEDIATELY_APPLY)
e2:SetCondition(aux.TRUE)
e2:SetOperation(s.confirmop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
Duel.RegisterEffect(e3,1-tp)
end
end
function s.confirmop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetTurnPlayer()
Duel.ConfirmCards(p,Duel.GetFieldGroup(p,LOCATION_DECK,0))
end
function s.gecon(e,tp,eg,ep,ev,re,r,rp)
local ex2,g2,gc2,dp2,dv2=Duel.GetOperationInfo(ev,CATEGORY_SPECIAL_SUMMON)
local ex3,g3,gc3,dp3,dv3=Duel.GetOperationInfo(ev,CATEGORY_TOGRAVE)
local ex4=re:IsHasCategory(CATEGORY_DRAW)
local ex5=re:IsHasCategory(CATEGORY_SEARCH)
local ex6=re:IsHasCategory(CATEGORY_DECKDES)
return ((ex2 and bit.band(dv2,LOCATION_DECK)==LOCATION_DECK)
or (ex3 and bit.band(dv3,LOCATION_DECK)==LOCATION_DECK)
or ex4 or ex5 or ex6) and Duel.IsChainDisablable(ev)
end
function s.geop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(rp,id)==0 then
Duel.RegisterFlagEffect(rp,id,RESET_PHASE+PHASE_END,0,2)
end
end
function s.hook_filter(f)
if f==nil then
return s.filter
else
return aux.AND(f,s.filter)
end
end
function s.filter(c)
return c:IsLocation(~LOCATION_DECK) or (s.OriginGetFieldGroupCount(c:GetOwner(),LOCATION_DECK,0)-c:GetSequence()<=LIMIT_NUMBER)
end
function s.hook_func(name,f,fpos,playerpos,lpos1,lpos2,addfilter)
s["Origin"..name]=f
return function(...)
local args={...}
local argc=select("#",...)
if Duel.IsPlayerAffectedByEffect(args[playerpos],id) then
if fpos~=nil then
args[fpos] = s.hook_filter(args[fpos])
end
if lpos1~=nil and bit.band(args[lpos1],LOCATION_DECK)>0 then
args[lpos1] = LOCATION_DECK
end
if lpos2~=nil and bit.band(args[lpos2],LOCATION_DECK)>0 then
args[lpos2] = LOCATION_DECK
end
return f(table.unpack(args,1,argc))
else
return f(...)
end
end
end
function s.hook_func2()
s.OriginGetFieldGroup=Duel.GetFieldGroup
s.OriginGetFieldGroupCount=Duel.GetFieldGroupCount
Duel.GetFieldGroup = function(_player,_s,_o)
if Duel.IsPlayerAffectedByEffect(_player,id) then
if bit.band(_s,LOCATION_DECK)>0 then _s = LOCATION_DECK end
if bit.band(_o,LOCATION_DECK)>0 then _o = LOCATION_DECK end
end
local group=s.OriginGetFieldGroup(_player,_s,_o)
if Duel.IsPlayerAffectedByEffect(_player,id) then
group=group:Filter(s.filter,nil)
end
return group
end
--[[ Duel.GetFieldGroupCount = function(_player,_s,_o)
if Duel.IsPlayerAffectedByEffect(_player,id) then
if bit.band(_s,LOCATION_DECK)>0 then _s = LOCATION_DECK end
if bit.band(_o,LOCATION_DECK)>0 then _o = LOCATION_DECK end
local c1=s.OriginGetFieldGroupCount(_player,_s,0)
local c2=s.OriginGetFieldGroupCount(_player,0,_o)
if c1==LOCATION_DECK then c1=math.min(c1,LIMIT_NUMBER) end
if c2==LOCATION_DECK then c2=math.min(c2,LIMIT_NUMBER) end
return c1+c2
else
return s.OriginGetFieldGroupCount(_player,_s,_o)
end
end ]]
end
-- 因果应报
local s,id,o=GetID()
function s.initial_effect(c)
--burn
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMING_CHAIN_END)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCondition(s.burncon)
e1:SetTarget(s.burntg)
e1:SetCost(s.burncost)
e1:SetOperation(s.burnop)
c:RegisterEffect(e1)
if not s.gf then
s.gf=true
s.effect_order={}
s.effect_counter={0,0}
s.current_order=nil
s.last_effect=nil
s.last_effect_turn=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
ge1:SetCode(EVENT_CHAINING)
ge1:SetCondition(s.gecon)
ge1:SetOperation(s.geop)
Duel.RegisterEffect(ge1,0)
end
end
function s.burncon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return s.effect_counter[2-tp]>=10 and Duel.GetCurrentChain()==0 and s.last_effect_turn==Duel.GetTurnCount()
and Duel.IsExistingMatchingCard(Card.IsSummonType,tp,0,LOCATION_MZONE,1,nil,SUMMON_TYPE_SPECIAL)
and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD+LOCATION_HAND,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)
end
function s.burncost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function s.burnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetMatchingGroupCount(Card.IsSummonType,tp,LOCATION_MZONE,nil,nil,SUMMON_TYPE_SPECIAL)
Duel.Damage(c:GetOwner(),ct*50,REASON_EFFECT)
end
function s.burntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
s.current_order={}
for k,v in pairs(s.effect_order) do
s.current_order[k]=v
end
s.create_chain_effect()
end
function s.chaincon(e,tp,eg,ep,ev,re,r,rp)
return s.current_order~=nil and e:GetLabel()~=1
end
function s.chaintg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetLabel(1)
-------------------------------------------------
-- ct=#s.current_order
-- print("[")
-- for i=1,ct do
-- print(s.current_order[i]:GetCode())
-- end
-- print("]")
-------------------------------------------------
s.create_chain_effect()
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,50)
end
function s.create_chain_effect()
while true do
if #s.current_order==0 then
s.current_order={}
return
end
local c=table.remove(s.current_order,1)
local ce=Effect.CreateEffect(c)
ce:SetDescription(aux.Stringid(id,0))
ce:SetType(EFFECT_TYPE_QUICK_F)
ce:SetCode(EVENT_CHAINING)
ce:SetRange(~0)
ce:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
ce:SetCondition(s.chaincon)
ce:SetTarget(s.chaintg)
ce:SetOperation(s.burnop)
ce:SetReset(RESET_EVENT+RESET_CHAIN)
c:RegisterEffect(ce)
if ce:IsActivatable(c:GetControler(),true,true) then
break
end
ce:Reset()
end
end
function s.gecon(e,tp,eg,ep,ev,re,r,rp)
return s.last_effect~=re
end
function s.geop(e,tp,eg,ep,ev,re,r,rp)
local turn=Duel.GetTurnCount()
if turn~=s.last_effect_turn then
local ct=#s.effect_order
for i=1,ct do s.effect_order[i]=nil end
s.effect_counter={0,0}
end
table.insert(s.effect_order,re:GetHandler())
s.effect_counter[rp+1]=s.effect_counter[rp+1]+1
s.last_effect=re
s.last_effect_turn=turn
end
--以眼还眼
local s,id,o=GetID()
function s.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(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,re:GetHandler():GetCode())
end
function s.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
if bit.band(re:GetHandler():GetOriginalType(),TYPE_MONSTER)~=0 then
e:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
else
e:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
end
return true
end
function s.filter(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK,0,nil,rc:GetCode())
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
if rc:IsType(TYPE_MONSTER) and rc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then
Duel.BreakEffect()
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,sg)
elseif (rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and rc:IsSSetable() then
Duel.BreakEffect()
Duel.SSet(tp,sg)
end
end
end
end
-- 希望的幻色
local s,id,o=GetID()
function s.initial_effect(c)
-- xyz summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,id)
e1:SetOperation(s.op)
e1:SetCost(s.cost)
c:RegisterEffect(e1)
-- set from grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,id)
e2:SetCondition(s.setcon)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
-- no draw
if not s.gf then
s.gf=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ge1:SetCode(EVENT_DRAW)
ge1:SetOperation(s.regop)
Duel.RegisterEffect(ge1,0)
end
end
function s.spfilter(c,e,tp,rank)
if rank~=nil and c:GetRank()~=rank then return false end
return c:IsType(TYPE_XYZ)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c,0x60)>0
end
-- function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
-- if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL)
-- and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,nil) end
-- Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
-- end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,nil,nil,e,tp)
local t={}
local tc=g:GetFirst()
while tc do
t[tc:GetRank()]=1
tc=g:GetNext()
end
local ls={}
for level,one in pairs(t) do
if Duel.CheckLPCost(tp,level*100) then
table.insert(ls,level)
end
end
if chk==0 then return #ls>0 end
local rank=Duel.AnnounceNumber(tp,table.unpack(ls))
Duel.PayLPCost(tp, rank*100)
e:SetLabel(rank)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rank=e:GetLabel()
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,rank)
local tc=g:GetFirst()
if tc then
if Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP,0x60)~=0 then
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1)
tc:CompleteProcedure()
local e2=Effect.CreateEffect(tc)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(tc)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(tc)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetLabelObject(tc)
e4:SetCondition(s.retcon)
e4:SetOperation(s.retop)
Duel.RegisterEffect(e4,tp)
end
end
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return false end
local tc=e:GetLabelObject()
if tc:GetFlagEffect(id)~=0 then
return true
else
e:Reset()
return false
end
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_TEMPORARY)
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
local xyz=eg:GetCount()==1 and eg:GetFirst():IsSummonType(SUMMON_TYPE_XYZ) and eg:GetFirst():IsControler(tp)
local nodraw=Duel.GetFlagEffect(tp,id)~=1
return xyz and nodraw
end
function s.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 s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SSet(tp,e:GetHandler())~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(ep,id,RESET_PHASE+PHASE_END,0,1)
end
-- 卧薪尝胆
local s,id,o=GetID()
function s.initial_effect(c)
-- draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_BATTLE_END)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
-- resound
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(s.recon)
e2:SetOperation(s.reop)
c:RegisterEffect(e2)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
if chk==0 then return c==0 end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,7)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,2,REASON_EFFECT)
Duel.Draw(1-tp,7,REASON_EFFECT)
if e:GetLabel()~=nil then e:Reset() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetTargetRange(1,1)
e1:SetCondition(s.accon)
e1:SetValue(aux.TRUE)
e1:SetLabel(Duel.GetTurnCount())
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetValue(aux.tgoval)
Duel.RegisterEffect(e3,tp)
end
function s.accon(e)
return e:GetLabel()~=Duel.GetTurnCount()
end
function s.recon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
function s.reop(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_BATTLE)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.op)
e1:SetCountLimit(1)
-- if Duel.GetCurrentPhase()<=PHASE_BATTLE then
-- e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,2)
-- else
-- e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN)
-- end
Duel.RegisterEffect(e1,tp)
end
-- Shut up!
local s,id,o=GetID()
function s.initial_effect(c)
-- special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetCost(s.cost)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() and Duel.IsAbleToEnterBP()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return Duel.CheckLPCost(tp,100,true)
and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN_MONSTER,0,0,3,RACE_WARRIOR,ATTRIBUTE_EARTH) end
local maxc=Duel.GetLP(tp)
if maxc>25500 then maxc=25500 end
maxc=math.floor(maxc/100)*100
local t={}
for i=1,maxc/100 do
t[i]=i*100
end
local cost=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,cost,true)
e:SetLabel(cost)
-- only token can attack
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(s.antarget)
Duel.RegisterEffect(e1,tp)
end
function s.antarget(e,c)
return not c:IsType(TYPE_TOKEN)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN_MONSTER,0,0,3,RACE_WARRIOR,ATTRIBUTE_EARTH) then return end
local c=e:GetHandler()
-- silent until get into Battle step.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetReset(RESET_PHASE+PHASE_BATTLE_START)
e1:SetTargetRange(1,1)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
-- can't goto ep, must bp
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_EP)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_MAIN2+PHASE_BATTLE+RESET_SELF_TURN+RESET_OPPO_TURN)
Duel.RegisterEffect(e2,tp)
-- Create token
local token=Duel.CreateToken(tp,id+1)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
s.initial_token_effect(e,tp,token)
Duel.BreakEffect()
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
end
function s.disop(e)
return function(e2,...)
e:Reset()
e2:Reset()
end
end
function s.initial_token_effect(e,tp,token)
local c=e:GetHandler()
-- atk
local te0=Effect.CreateEffect(c)
te0:SetType(EFFECT_TYPE_SINGLE)
te0:SetCode(EFFECT_SET_ATTACK)
te0:SetValue(e:GetLabel())
te0:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(te0)
-- can't release
local te1=Effect.CreateEffect(c)
te1:SetType(EFFECT_TYPE_SINGLE)
te1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
te1:SetRange(LOCATION_MZONE)
te1:SetCode(EFFECT_UNRELEASABLE_SUM)
te1:SetValue(1)
token:RegisterEffect(te1)
-- cannot be material
local te2=te1:Clone()
te2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
token:RegisterEffect(te2)
local te3=te1:Clone()
te3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
te3:SetValue(aux.TRUE)
token:RegisterEffect(te3)
local te4=te1:Clone()
te4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
token:RegisterEffect(te4)
local te5=te1:Clone()
te5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
token:RegisterEffect(te5)
local te6=te1:Clone()
te6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(te6)
-- must attack
local te7=Effect.CreateEffect(c)
te7:SetType(EFFECT_TYPE_SINGLE)
te7:SetCode(EFFECT_MUST_ATTACK)
te7:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(te7)
-- shut up!
local te8=Effect.CreateEffect(c)
te8:SetType(EFFECT_TYPE_FIELD)
te8:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
te8:SetCode(EFFECT_CANNOT_ACTIVATE)
te8:SetRange(LOCATION_MZONE)
te8:SetTargetRange(1,1)
te8:SetValue(1)
te8:SetCondition(s.shutupcon)
token:RegisterEffect(te8)
-- chain attack
local te9=Effect.CreateEffect(c)
te9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
te9:SetCode(EVENT_BATTLE_DESTROYING)
te9:SetCondition(s.chainacon)
te9:SetOperation(s.chainaop)
te9:SetReset(RESET_EVENT+RESETS_STANDARD)
te9:SetLabelObject(token)
--token:RegisterEffect(te9)
Duel.RegisterEffect(te9,tp)
local te10=Effect.CreateEffect(c)
te10:SetType(EFFECT_TYPE_FIELD)
te10:SetRange(LOCATION_MZONE)
te10:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
te10:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
te10:SetTargetRange(1,0)
token:RegisterEffect(te10)
end
function s.shutupcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function s.chainacon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local bc=tc:GetBattleTarget()
return tc==eg:GetFirst() and tc:IsRelateToBattle() and bc and bc:IsPreviousControler(1-tp) and tc:IsChainAttackable(0)
end
function s.chainaop(e,tp,eg,ep,ev,re,r,rp)
if Duel.CheckLPCost(tp,2000) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.PayLPCost(tp,2000)
Duel.ChainAttack()
end
end
-- 神之怒火
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.condition)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
if not s.gf then
s.codelist={}
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ge1:SetCode(EVENT_CHAIN_NEGATED)
ge1:SetCondition(s.recordcon)
ge1:SetOperation(s.recordop)
Duel.RegisterEffect(ge1,0)
s.gf=true
end
end
function s.filter(c)
return c:IsRace(RACE_FAIRY) and c:IsFaceup()
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainNegatable(ev) then return false end
if re==nil then return false end
local ec=re:GetHandler()
if ec:GetOriginalLevel()>ec:GetLevel() then return true end
if re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if tg and tg:IsExists(s.filter,1,nil) then return true end
end
return s.codelist[ec:GetCode()]~=nil
end
function s.cfilter(c)
return c:IsType(TYPE_COUNTER) and not c:IsPublic()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp)
and Duel.CheckLPCost(tp,1000)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
local tc=cg:GetFirst()
Duel.ConfirmCards(1-tp,cg)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_HAND)
e2:SetOperation(s.clearop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
e2:SetLabel(Duel.GetCurrentChain())
e2:SetLabelObject(e1)
tc:RegisterEffect(e2)
Duel.PayLPCost(tp,1000)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.ndcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function s.spfilter(c,e,tp)
return c:IsCode(114514997) and Duel.GetMZoneCount(tp)>0
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then
if Duel.Destroy(eg,REASON_EFFECT)~=0 and ec:IsLocation(LOCATION_GRAVE) then
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
-- reduce to 0s
sc:RegisterFlagEffect(114514997,RESET_EVENT,1,0)
Duel.Summon(tp,sc,true,nil)
end
end
end
end
function s.clearop(e,tp,eg,ep,ev,re,r,rp)
if ev~=e:GetLabel() then return end
e:GetLabelObject():Reset()
e:Reset()
end
s.yhvhc={
[41420027]=1, --宣
[84749824]=1, --警
[40605147]=1, --通
[92512625]=1, --忠
[38891741]=1, --摄
--[id]=1, --怒
}
function s.recordcon(e,tp,eg,ep,ev,re,r,rp)
local se=Duel.GetChainInfo(0,CHAININFO_DISABLE_REASON)
local rc=se:GetHandler():GetCode()
return s.yhvhc[rc]~=nil
end
function s.recordop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local rc=re:GetHandler():GetCode()
s.codelist[rc]=1
end
--大泽夜语
local s,id,o=GetID()
function s.initial_effect(c)
-- activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
c:RegisterEffect(e1)
-- remove setcode
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(id)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
c:RegisterEffect(e2)
-- revolution!
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(s.condition)
e3:SetCost(s.cost)
e3:SetOperation(s.op)
c:RegisterEffect(e3)
if not s.gf then
s.originIsSetCard = Card.IsSetCard
Card.IsSetCard = s.IsSetCard
s.originIsCodeListed = aux.IsCodeListed
aux.IsCodeListed = s.IsCodeListed
s.gf=true
end
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function s.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)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local ge=Effect.CreateEffect(e:GetHandler())
ge:SetType(EFFECT_TYPE_FIELD)
ge:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ge:SetCode(id)
ge:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ge:SetTargetRange(1,1)
Duel.RegisterEffect(ge,tp)
end
function s.IsSetCard(c,set)
if Duel.IsPlayerAffectedByEffect(c:GetControler(),id) then
return false
end
return s.originIsSetCard(c,set)
end
function s.IsCodeListed(c,code)
if Duel.IsPlayerAffectedByEffect(c:GetControler(),id) then
return false
end
return s.originIsCodeListed(c,code)
end
--转瞬即逝的噩梦
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--quick activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCondition(s.qacon)
e1:SetCost(s.cost)
e1:SetOperation(s.qaop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCost(s.cost)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
local e2p=e2:Clone()
e2p:SetCode(EVENT_CHAIN_SOLVED)
c:RegisterEffect(e2p)
--self destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_SZONE)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetCountLimit(1)
e3:SetCondition(s.sdcon)
e3:SetOperation(s.sdop)
c:RegisterEffect(e3)
end
function s.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 s.qacon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function s.qaop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
function s.desfilter(c)
return c:IsOnField() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup() and c:GetFlagEffect(id)==0
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return s.desfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.HintSelection(g)
local tc=g:GetFirst()
tc:RegisterFlagEffect(id,RESET_EVENT+RESET_CHAIN+RESET_LEAVE,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.Destroy(tc,REASON_EFFECT)
end
function s.sdcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,22200403)
end
function s.sdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.Damage(tp,3000,REASON_EFFECT)>0 then
Duel.Destroy(c,REASON_EFFECT)
end
end
\ No newline at end of file
--深渊的暗中谋划
--[[
82732705 技能抽取
73599290 灵魂抽取
68937720 精神抽取
53982768 冥界的魔王 哈·迪斯
53375573 深渊的冥王
]]
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cfilter(c,id)
return c:IsFaceup() and c:IsCode(id)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>=3 and (
Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil,53375573)
or Duel.IsExistingMatchingCard(s.cfilter,tp,0,LOCATION_ONFIELD,1,nil,53982768))
end
function s.filter(c,tp,code)
return c:IsCode(code) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,tp,82732705)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,tp,73599290)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,tp,68937720)
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
for _, tid in ipairs({82732705,73599290,68937720}) do
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,tp,tid):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,tid,te,0,tp,tp,Duel.GetCurrentChain())
else
return
end
end
end
--暗黑界的静寂 无色
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(s.putcon)
e1:SetOperation(s.putop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetOperation(s.rcounter)
c:RegisterEffect(e2)
end
function s.putcon(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(e:GetHandler():GetPreviousControler())
return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040
end
function s.putop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,nil,nil)
if g:GetCount()==0 then return end
Duel.BreakEffect()
Duel.Hint(HINT_CARD,0,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local g1=g:Select(tp,1,1,nil)
local tc=g1:GetFirst()
if tc:IsFaceup() then
tc:AddCounter(0x10e9,1)
if tc:GetFlagEffect(id)~=0 then return end
local te=Effect.CreateEffect(tc)
te:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
te:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if tc:IsType(TYPE_FUSION) and tc:IsType(TYPE_MONSTER) then
te:SetType(EFFECT_TYPE_FIELD)
te:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
te:SetCode(EFFECT_CANNOT_ACTIVATE)
te:SetRange(LOCATION_MZONE)
te:SetTargetRange(1,1)
te:SetCondition(s.countercon)
te:SetValue(s.aclimit)
elseif tc:IsType(TYPE_MONSTER) then
te:SetRange(LOCATION_ONFIELD)
te:SetCode(EVENT_CHAINING)
te:SetRange(LOCATION_MZONE)
te:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
te:SetCondition(s.countercon)
te:SetOperation(s.chainop)
elseif tc:IsType(TYPE_SPELL) then
te:SetRange(LOCATION_ONFIELD)
te:SetCode(EVENT_CHAIN_SOLVING)
te:SetCondition(s.negcon)
te:SetOperation(s.negop)
elseif tc:IsType(TYPE_TRAP) then
te:SetType(EFFECT_TYPE_FIELD)
te:SetRange(LOCATION_ONFIELD)
te:SetCode(EFFECT_DISABLE)
te:SetCondition(s.countercon)
te:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
te:SetTarget(s.negtg)
end
tc:RegisterEffect(te)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0)
end
end
function s.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x6)
end
function s.nfilter(c,e,tp)
return not c:IsSetCard(0x6)
end
function s.cofilter(c)
return c:GetCounter(0x10e9)~=0
end
function s.countercon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x10e9)~=0
end
function s.aclimit(e,re,tp)
local rc=re:GetHandler()
return not rc:IsSetCard(0x6)
end
function s.chainop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsSetCard(0x6) and ep==tp then
Duel.SetChainLimit(aux.FALSE)
end
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return s.countercon(e,tp,eg,ep,ev,re,r,rp) and not rc:IsSetCard(0x6)
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev,true)
end
function s.negtg(e,c)
return s.nfilter(c)
end
-- function s.redraw(e,tp,eg,ep,ev,re,r,rp)
-- local g=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND)
-- Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
-- Duel.BreakEffect()
-- Duel.Draw(tp,2,REASON_EFFECT)
-- Duel.Draw(1-tp,2,REASON_EFFECT)
-- end
function s.rcounter(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.cofilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local tc=g:GetFirst()
local ss=false
while tc do
local sct=tc:GetCounter(0x10e9)
if sct>0 then ss=true end
tc:RemoveCounter(tp,0x10e9,sct,0)
tc:ResetFlagEffect(id)
tc=g:GetNext()
end
if ss then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
-- 暗黑界的武魂
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetHintTiming(0,TIMING_SPSUMMON)
c:RegisterEffect(e0)
-- force battle
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(s.battlecon)
e1:SetTarget(s.battletg)
e1:SetOperation(s.battleop)
e1:SetCountLimit(1,id)
c:RegisterEffect(e1)
-- draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
--e2:SetCountLimit(1,id+id)
e2:SetCondition(s.drcon)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
end
function s.battlecon(e,tp,eg,ep,ev,re,r,rp)
if #eg~=1 then return false end
local ec=eg:GetFirst()
return ec:IsSetCard(0x6) and ec:IsFaceup() and ec:IsSummonPlayer(tp) and ec:IsAttackPos() and (Duel.GetCurrentPhase()==PHASE_MAIN1) and Duel.IsAbleToEnterBP()
end
function s.battletg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,nil,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACKTARGET)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,nil,LOCATION_MZONE,1,1,e:GetHandler())
end
function s.battleop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local ec=eg:GetFirst()
if ec:IsAttackable() and tc:IsOnField() then
-- attacker. Due to ygopro bug(?) must be a trigger_f
local e1=Effect.CreateEffect(ec)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetProperty(EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(s.battleop2)
e1:SetTarget(s.battle2tg)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
ec:RegisterEffect(e1)
-- cannot goto ep
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_EP)
e2:SetTargetRange(1,1)
e2:SetReset(RESET_PHASE+PHASE_MAIN2+PHASE_BATTLE+RESET_SELF_TURN+RESET_OPPO_TURN)
Duel.RegisterEffect(e2,tp)
-- silent to simulate skip battle start step
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetReset(RESET_PHASE+PHASE_BATTLE_START)
e3:SetCondition(s.silentcon(e1))
e3:SetTargetRange(1,1)
e3:SetValue(1)
Duel.RegisterEffect(e1,tp)
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
end
end
function s.silentcon(te)
return function(e)
return e~=te
end
end
function s.battleop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
--draw
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLED)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(s.battledop)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
--if Duel.GetTurnPlayer()~=tp then
-- Duel.CalculateDamage(tc,c,true)
--else
Duel.CalculateDamage(c,tc,true)
--end
e:Reset()
end
function s.battle2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(aux.FALSE)
end
function s.cfilter(c,tp,re)
local rc=re:GetHandler()
return c:IsSetCard(0x6)
and c:IsPreviousControler(tp)
and not (c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_HAND))
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return re and eg:IsExists(s.cfilter,1,nil,tp,re)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,1,REASON_EFFECT) then
Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_EFFECT+REASON_DISCARD)
end
end
function s.battledop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c and c:IsRelateToBattle() and Duel.GetBattleDamage(c:GetOwner())==0 then
Duel.Draw(c:GetOwner(),1,REASON_EFFECT)
else
Duel.DiscardHand(c:GetOwner(),Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)
end
if bc and bc:IsRelateToBattle() and Duel.GetBattleDamage(bc:GetOwner())==0 then
Duel.Draw(bc:GetOwner(),1,REASON_EFFECT)
else
Duel.DiscardHand(bc:GetOwner(),Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)
end
e:Reset()
end
\ No newline at end of file
-- 暗黑界的召集
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e1)
--collect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DISCARD)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetCondition(s.cocon)
e2:SetOperation(s.coop)
c:RegisterEffect(e2)
--collect spell
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(id,3))
e3:SetCondition(s.cocon2)
e3:SetOperation(s.coop2)
c:RegisterEffect(e3)
end
function s.cofilter(c,tp,re)
local rc=re:GetHandler()
return c:IsSetCard(0x6)
and c:IsReason(REASON_EFFECT)
and c:IsPreviousLocation(LOCATION_HAND)
and c:IsPreviousControler(tp)
end
function s.monfilter(c)
return c:IsType(TYPE_MONSTER)
end
function s.spellfilter(c,tp)
return c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP) and c:IsPreviousControler(tp) and c:IsLocation(LOCATION_GRAVE)
end
function s.exist3(c,tp)
return Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsCode),tp,0x35,0,nil,c:GetCode()):__len()>=3
end
function s.cocon(e,tp,eg,ep,ev,re,r,rp)
return re and eg:IsExists(aux.AND(s.cofilter,s.monfilter,s.exist3),1,nil,tp,re)
end
function s.cocon2(e,tp,eg,ep,ev,re,r,rp)
return re and eg:IsExists(aux.AND(s.cofilter,s.spellfilter),1,nil,tp,re)
end
function s.coop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT)
and Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))==0 then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)
else
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
local ec=eg:GetFirst()
while ec do
if s.monfilter(ec) then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsCode),tp,0x35,0,nil,ec:GetCode())
g:RemoveCard(ec)
if #g>=2 then
g=g:Select(tp,2,2,nil)
end
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
ec=eg:GetNext()
end
end
function s.coop2(e,tp,eg,ep,ev,re,r,rp)
local cg=eg:Filter(s.spellfilter,nil,e)
local n=Duel.SSet(tp,cg)
if n>0 then
Duel.DiscardHand(tp,aux.TRUE,n,n,REASON_EFFECT+REASON_DISCARD)
end
end
\ No newline at end of file
-- 暗黑界的唤笈
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
e1:SetCountLimit(1,id)
c:RegisterEffect(e1)
-- ret spell
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id)
e2:SetCondition(s.retcon)
e2:SetTarget(s.rettg)
e2:SetCost(s.retcost)
e2:SetOperation(s.retop)
c:RegisterEffect(e2)
end
function s.filter0(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function s.filter1(c,e)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x6) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_REMOVED,0,nil)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_REMOVED,0,nil,e)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
local todeck=0
local nottodeck=0
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
tc:SetMaterial(mat)
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
local mc=mat:GetFirst()
while mc do
if mc:IsLocation(LOCATION_DECK) then
todeck=todeck+1
else
nottodeck=nottodeck+1
end
mc=mat:GetNext()
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
Duel.BreakEffect()
if todeck>0 then
Duel.DiscardHand(tp,aux.TRUE,todeck,todeck,REASON_EFFECT+REASON_DISCARD)
end
if nottodeck>0 then
Duel.SetLP(tp,Duel.GetLP(tp)-Duel.GetLP(tp)/2*nottodeck)
end
end
end
function s.spellfilter(c,tp,re)
return (c:GetType()==TYPE_SPELL or c:GetType()==TYPE_QUICKPLAY+TYPE_SPELL or c:GetType()==TYPE_TRAP)
and c:IsSetCard(0x6)
and c:IsAbleToDeck()
and c:CheckActivateEffect(false,true,false)~=nil
end
function s.thfilter(c)
return c:IsDiscardable() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x6)
end
function s.retcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(s.spellfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_HAND,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.spellfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
return true
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
if op and Duel.DiscardHand(tp,s.thfilter,1,1,REASON_EFFECT+REASON_DISCARD) then op(e,tp,eg,ep,ev,re,r,rp) end
end
-- 神影依骑 米德拉什
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,94977269,3717252,114514679,false,false)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
e2:SetRange(~LOCATION_EXTRA)
e2:SetValue(aux.FALSE)
c:RegisterEffect(e2)
--copy effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(s.copycon)
e3:SetTarget(s.copytg)
e3:SetOperation(s.copyop)
c:RegisterEffect(e3)
--create shaddoll token
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetTarget(s.dolltg)
e4:SetOperation(s.dollop)
e4:SetCountLimit(1,id)
c:RegisterEffect(e4)
--defusion
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,3))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e5:SetCondition(s.decon)
e5:SetOperation(s.deop)
e5:SetCountLimit(1,id)
c:RegisterEffect(e5)
end
function s.copycon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.copyfilter(c)
return c:IsSetCard(0x9d) and c:IsType(TYPE_FUSION)
end
function s.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(s.copyfilter,tp,LOCATION_GRAVE,0,1,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,s.copyfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetTargetCard(g)
end
function s.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and c:IsFaceup() then
local code=tc:GetOriginalCode()
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,1)
end
end
function s.dollfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function s.dolltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c:IsControler(1-tp) and s.dollfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(s.dollfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,s.dollfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function s.dollop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
local atk=tc:GetAttack()
local def=tc:GetDefense()
local code=Card.GetCode(tc)
local attr=tc:GetAttribute()
local race=tc:GetRace()
local level=tc:GetLevel()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)~=0 then
local token=Duel.CreateToken(tp,id+1)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(atk)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(def)
token:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(attr)
token:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CHANGE_LEVEL)
e4:SetValue(level)
token:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetCode(EFFECT_CHANGE_RACE)
e5:SetValue(race)
token:RegisterEffect(e5)
local e6=e1:Clone()
e6:SetCode(EFFECT_ADD_CODE)
e6:SetValue(id)
token:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e7:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e8:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e8)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e9:SetCode(EVENT_LEAVE_FIELD)
e9:SetOperation(s.disop(e7))
token:RegisterEffect(e9)
end
end
function s.disop(te)
return function(e)
e:Reset()
te:Reset()
end
end
function s.defilter(c,e,tp,fusc,mg)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and c:GetReason()&(REASON_FUSION+REASON_MATERIAL)==(REASON_FUSION+REASON_MATERIAL) and c:GetReasonCard()==fusc
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and fusc:CheckFusionMaterial(mg,c,PLAYER_NONE,true)
end
function s.decon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler()
local mg=tc:GetMaterial()
local ct=mg:GetCount()
local sumtype=tc:GetSummonType()
return mg:FilterCount(aux.NecroValleyFilter(s.defilter),nil,e,tp,tc,mg)==ct
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and bit.band(sumtype,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
and Duel.IsPlayerCanSendtoGrave(tp)
end
function s.deop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler()
local mg=tc:GetMaterial()
local ct=mg:GetCount()
local sumtype=tc:GetSummonType()
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and bit.band(sumtype,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
and ct>0 and ct<=Duel.GetLocationCount(tp,LOCATION_MZONE)
and mg:FilterCount(aux.NecroValleyFilter(s.defilter),nil,e,tp,tc,mg)==ct
and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.BreakEffect()
Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ShuffleSetCard(mg)
end
end
--帝王的胎动
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local n=s.scan_location(Card.IsAbleToHand,LOCATION_DECK,tp)
local attrs=s.available_attributes(n)
if chk==0 then return attrs>0 end
e:SetLabel(Duel.AnnounceAttribute(tp,1,attrs))
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,4,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local l=s.scan_location(Card.IsAbleToHand,LOCATION_DECK,tp)
local attrs=s.available_attributes(l)
local attr=e:GetLabel()
if bit.band(attrs,attr)~=attr then return end
local g=
Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,attr,800)+
Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,attr,2400)+
Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,attr,2800)+
Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,attr,3000)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
function s.filter(c,attr,atk)
return c:IsAttribute(attr) and c:IsAttack(atk) and c:IsDefense(1000)
end
function s.available_attributes(n)
return s.attribute_available(n, ATTRIBUTE_EARTH)
+s.attribute_available(n, ATTRIBUTE_WATER)
+s.attribute_available(n, ATTRIBUTE_FIRE)
+s.attribute_available(n, ATTRIBUTE_WIND)
+s.attribute_available(n, ATTRIBUTE_LIGHT)
+s.attribute_available(n, ATTRIBUTE_DARK)
end
function s.attribute_available(n,attribute)
local j=attribute*attribute*attribute*attribute*15
if bit.band(n,j)==j then
return attribute
else
return 0
end
end
function s.scan_location(f,l,tp)
local g=Duel.GetMatchingGroup(f,tp,l,0,nil)
local n=0
for c in aux.Next(g) do
n=s.scan_card(c,n)
end
return n
end
function s.scan_card(c,n)
-- 0000,0000,0000,0000,0000,0000
-- 暗 光 风 炎 水 地
-- 1 1 1 1
-- 混帝 大帝 帝 侍从
if not c:IsDefense(1000) then return n end
local bit=0
if c:IsAttack(800) then bit=bit+1
elseif c:IsAttack(2400) then bit=bit+2
elseif c:IsAttack(2800) then bit=bit+4
elseif c:IsAttack(3000) then bit=bit+8
end
if bit==0 then return n end
local a=c:GetAttribute()
while a>0 do
local ca=a&(a-1)
local cab=a-ca
n=n|(cab*cab*cab*cab*bit)
a=ca
end
return n
end
--未来来
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableCounterPermit(0x10ea)
--activate
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_COUNTER)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCost(s.cost)
e0:SetTarget(s.target)
c:RegisterEffect(e0)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetCondition(s.indescon)
e1:SetTarget(s.indestg)
e1:SetValue(1)
c:RegisterEffect(e1)
-- --disable spsummon
local e1p=Effect.CreateEffect(c)
e1p:SetType(EFFECT_TYPE_FIELD)
e1p:SetRange(LOCATION_SZONE)
e1p:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1p:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1p:SetTargetRange(1,0)
e1p:SetCondition(s.indescon)
e1p:SetTarget(s.sumlimit)
c:RegisterEffect(e1p)
--scry
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(s.scrycon)
e2:SetOperation(s.scryop)
c:RegisterEffect(e2)
--wakeup (return card to deck top)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(s.wakeupcon)
e3:SetOperation(s.wakeupop)
c:RegisterEffect(e3)
-- reset the world
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCategory(CATEGORY_REMOVE)
e4:SetDescription(aux.Stringid(id,4))
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetCondition(s.resetcon)
e4:SetTarget(s.resettg)
e4:SetOperation(s.resetop)
c:RegisterEffect(e4)
end
function s.filter(c)
return Card.IsAbleToRemoveAsCost(c) and c:IsSetCard(0xe6)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local tg=Duel.GetOperatedGroup()
tg:KeepAlive()
e:SetLabelObject(tg)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsCanAddCounter(tp,0x10ea,7,c) end
c:AddCounter(0x10ea,3)
end
function s.indescon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x10ea)
return ct>0
end
function s.indestg(e,c)
local cc=e:GetHandler()
return (c:IsFaceup() and c:IsSetCard(0xe6)) or c==cc
end
function s.sumlimit(e,c)
return not (c:IsSetCard(0xe6)) and c:IsLocation(LOCATION_EXTRA)
end
function s.scrycon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x10ea)
local rc=re:GetHandler()
return ct>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=ct and
re:IsActiveType(TYPE_MONSTER) and rc:IsSetCard(0xe6)
-- and not e:GetHandler():IsStatus(STATUS_CHAINING)
end
function s.scryop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x10ea)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<ct then return end
s.scry(tp,ct)
end
function s.scry(tp,ct)
Duel.ConfirmDecktop(tp,ct)
local g=Duel.GetDecktopGroup(tp,ct)
local dg=g:Select(tp,0,#g,nil)
local ug=g-dg
local dc=dg:GetFirst()
while dc do
Duel.MoveSequence(dc,SEQ_DECKTOP)
dc=dg:GetNext()
end
Duel.SortDecktop(tp,tp,#dg)
for i=1,#dg do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM)
end
Duel.SortDecktop(tp,tp,#ug)
end
function s.wakeupfilter(c)
return c:IsLocation(LOCATION_DECK)
end
function s.wakeupcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x10ea)
local rc=re:GetHandler()
return ct>0 and rc:IsSummonType(SUMMON_TYPE_SYNCHRO) and rc:IsSetCard(0xe6)
end
function s.wakeupop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x10ea)
if ct>0 then
c:RemoveCounter(tp,0x10ea,1,REASON_EFFECT)
if Duel.SelectYesNo(tp,aux.Stringid(id,1)) and Duel.SendtoGrave(c,REASON_EFFECT)>0 then
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,0xe6)
Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)
local tg=Duel.GetOperatedGroup():Filter(s.wakeupfilter,nil)
if #tg>0 then
s.scry(tp,#tg)
local e0=c:GetActivateEffect()
local tg2=e0:GetLabelObject()
Duel.SpecialSummon(tg2,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function s.resetcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function s.resettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local ct=c:GetCounter(0x10ea)
if ct>0 then ct=1 else ct=0 end
local loc=LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE
local g=Duel.GetMatchingGroup(aux.TRUE,tp,loc,loc*ct,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
function s.resetop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x10ea)
if ct>0 then ct=0 else ct=1 end
local loc=LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE
local g=Duel.GetMatchingGroup(aux.TRUE,tp,loc,loc*ct,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
Duel.SetLP(tp,8000)
Duel.Draw(tp,5,REASON_EFFECT)
if ct==1 then
Duel.SetLP(1-tp,8000)
Duel.Draw(1-tp,5,REASON_EFFECT)
end
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,2,REASON_EFFECT)
end
--神碑之渊
local s,id,o=GetID()
function s.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK)
--leave
local e0p=Effect.CreateEffect(c)
e0p:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e0p:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0p:SetCode(EVENT_LEAVE_FIELD_P)
e0p:SetOperation(s.leavecheckop)
c:RegisterEffect(e0p)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e0:SetCode(EVENT_LEAVE_FIELD)
e0:SetOperation(s.leaveop)
e0:SetLabelObject(e0p)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.tdcost)
e1:SetTarget(s.tdtarget)
c:RegisterEffect(e1)
-- Reverse Deck
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_REVERSE_DECK)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,1)
c:RegisterEffect(e2)
-- draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_CHAIN_END)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCondition(s.drcon)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
-- shuffle
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_FZONE)
e4:SetCondition(s.shufflecon)
e4:SetOperation(s.shuffleop)
c:RegisterEffect(e4)
-- replace draw
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_PREDRAW)
e5:SetRange(LOCATION_FZONE)
e5:SetTarget(s.thtg)
e5:SetOperation(s.thop)
c:RegisterEffect(e5)
end
function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) end
local ct=aux.PlaceCardsOnDeckBottom(1-tp,Duel.GetFieldGroup(1-tp,LOCATION_HAND,0),REASON_COST)
e:SetLabel(ct)
end
function s.tdtarget(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsCanAddCounter(tp,0x10eb,Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0),c) end
local ct=e:GetLabel()
c:AddCounter(0x10eb,ct)
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x10eb)>0 and Duel.GetCurrentChain()==0
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,2)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():RemoveCounter(tp,0x10eb,1,REASON_EFFECT) then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_RULE)
end
end
function s.shufflecon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local c=e:GetHandler()
return rc:IsSetCard(0x17f) and rc:IsType(TYPE_QUICKPLAY) and rc:IsControler(tp) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function s.shuffleop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,s._shuffleop(re:GetOperation()))
end
function s._shuffleop(op)
return function(e,tp,eg,ep,ev,re2,r,rp)
op(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_CARD,0,id)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
Duel.ShuffleDeck(1-tp)
end
end
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return tp==Duel.GetTurnPlayer() end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x17f) and c:IsType(TYPE_SPELL)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local op1_ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
local op2_ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
local op1_cards=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_REMOVED,0,nil)
local op2_cards=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,nil)
local op=aux.SelectFromOptions(tp,
{#op1_cards>=op1_ct,aux.Stringid(id,2)},
{#op2_cards>=op2_ct,aux.Stringid(id,3)},
{true,aux.Stringid(id,4)})
if op==1 then
local g1=op1_cards:Select(tp,op1_ct,op1_ct,nil)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
elseif op==2 then
local g2=op2_cards:Select(tp,op2_ct,op2_ct,nil)
Duel.SendtoHand(g2,nil,REASON_EFFECT)
else
local g31=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_REMOVED,0,nil,0x17f)
local g32=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsSetCard),tp,LOCATION_GRAVE,0,nil,0x17f)
Duel.Remove(g32,POS_FACEUP,REASON_EFFECT)
Duel.SendtoGrave(g31,POS_FACEUP,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function s.leavecheckop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(e:GetHandler():GetCounter(0x10eb))
end
function s.leaveop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabelObject():GetLabel()
if rp~=e:GetHandler():GetOwner() then return end
if ct==0 then return end
Duel.Draw(1-tp,ct,REASON_RULE)
Duel.SetLP(tp,Duel.GetLP(tp)-8000)
end
--无间行者帕尔修斯
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,56433456)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--no monster
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
e2:SetValue(s.aclimit)
e2:SetCondition(s.accon)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetTargetRange(0,1)
e3:SetCondition(s.accon2)
c:RegisterEffect(e3)
--set & henshin
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVED)
e4:SetRange(LOCATION_MZONE)
e4:SetOperation(s.setop)
e4:SetCondition(s.setcon)
--e4:SetCountLimit(1,id+id)
c:RegisterEffect(e4)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)>=Duel.GetLP(1-tp)
end
function s.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 s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetTarget(s.handtg)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.handtg(e,c)
return c:IsType(TYPE_COUNTER)
end
function s.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function s.accon(e,tp,eg,ep,ev,re,r,rp)
return not s.accon2(e,tp,eg,ep,ev,re,r,rp)
end
function s.accon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffectLabel(id)==1
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
return c:GetFlagEffectLabel(id+100000000)~=1
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil,rc) end
end
function s.setfilter(c,rc)
return not c:IsCode(rc:GetCode()) and c:IsType(TYPE_COUNTER) and c:IsSSetable()
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_COUNTER) or not c:IsLocation(LOCATION_MZONE) or c:IsFacedown() then return end
local rc=re:GetHandler()
Duel.Hint(HINT_CARD,tp,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil,rc)
if #g <= 0 then return end
c:RegisterFlagEffect(id+100000000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
Duel.SSet(tp,g:GetFirst())
if not Duel.IsEnvironment(56433456) then return end
if Duel.GetLP(tp)<=Duel.GetLP(1-tp) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(ATTRIBUTE_LIGHT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetOwnerPlayer(tp)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(Duel.GetLP(tp) - Duel.GetLP(1-tp))
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
\ No newline at end of file
--混沌帝龙 -结末的使者-
local s,id,o=GetID()
o=1e9
function s.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.spcon)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DECKDES+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(s.sgcost)
e3:SetTarget(s.sgtg)
e3:SetOperation(s.sgop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,aux.FALSE)
--reset
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_NEGATED)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(s.rstcon)
e4:SetOperation(s.rstop)
c:RegisterEffect(e4)
local e4p=e4:Clone()
e4p:SetCode(EVENT_CHAIN_DISABLED)
c:RegisterEffect(e4p)
end
function s.spcostfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetMZoneCount(tp)<=0 then return false end
local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_GRAVE,0,nil)
return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function s.sgcostfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER)
end
function s.sgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local t=c:GetFlagEffectLabel(id)
if t==nil then t=0 end
--print("f",Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN),t)
return Duel.CheckLPCost(tp,1000)
and Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)<=t
and Duel.GetFlagEffect(tp,id+o)==0
and Duel.IsExistingMatchingCard(s.sgcostfilter,tp,LOCATION_GRAVE,0,1,nil)
end
Duel.PayLPCost(tp,Duel.GetCustomActivityCount(s,tp,ACTIVITY_CHAIN)*1000)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.sgcostfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local c=g:GetFirst()
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(c:GetAttribute())
-- Cannot start second time
Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,0,1)
-- Cannot activitate
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(aux.TRUE)
e1:SetCondition(s.actcon)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.actcon(e)
return Duel.GetFlagEffect(tp,id+o)~=0
end
function s.damfilter(c,p)
return c:GetOwner()==p and c:IsAbleToGrave() and c:IsType(TYPE_MOSNTER)
end
function s.sgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ctp =Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local cntp=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
-- correctly set damage info for Super LP-Z
end
function s.sgfilter(c,p)
return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER) and c:IsControler(p)
end
function s.exdmfilter(c,p,attr)
return s.sgfilter(c,p) and c:IsAttribute(attr)
end
function s.sgop(e,tp,eg,ep,ev,re,r,rp)
local attr=e:GetLabel()
for oc in aux.Next(Duel.GetDecktopGroup(tp,10)) do Duel.MoveSequence(oc,SEQ_DECKBOTTOM) end
for oc in aux.Next(Duel.GetDecktopGroup(1-tp,10)) do Duel.MoveSequence(oc,SEQ_DECKBOTTOM) end
local ctp =Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local cntp=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
Duel.DiscardDeck(tp,#ctp-10,REASON_EFFECT)
local tpg=Duel.GetOperatedGroup()
Duel.DiscardDeck(1-tp,#cntp-10,REASON_EFFECT)
local ntpg=Duel.GetOperatedGroup()
local tpc = tpg:FilterCount(s.sgfilter,nil,tp) + tpg:FilterCount(s.exdmfilter,nil,tp,attr)
local ntpc=ntpg:FilterCount(s.sgfilter,nil,1-tp)+ntpg:FilterCount(s.exdmfilter,nil,1-tp,attr)
if tpc>0 then Duel.Damage( tp,tpc *300,REASON_EFFECT,true) end
if ntpc>0 then Duel.Damage(1-tp,ntpc*300,REASON_EFFECT,true) end
Duel.RDComplete()
end
function s.rstcon(e,tp,eg,ep,ev,re,r,rp)
local de,dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON,CHAININFO_DISABLE_PLAYER)
return rp==tp and dp==1-tp
end
function s.rstop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local c=e:GetHandler()
local target=c:GetFlagEffectLabel(id)
local current=Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)
--print("->", current)
if target==nil then
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,current)
else
c:SetFlagEffectLabel(id,current)
end
Duel.ResetFlagEffect(tp,id+o)
end
--雾天气 阳橙
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x109),2)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.sucon)
e1:SetOperation(s.suop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_REMOVE)
e2:SetOperation(s.spreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetRange(LOCATION_REMOVED)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--effect gain
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(s.discon2)
e4:SetCost(aux.bfgcost)
e4:SetOperation(s.disop2)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(s.eftg)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
end
function s.sucon(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():GetSequence()>4
end
function s.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsSetCard(0x109)
end
function s.suop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsFaceup() then return end
if not c:IsRelateToEffect(e) or c:IsControler(1-tp)
or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(c,nseq)
if Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
function s.spreg(e,tp,eg,ep,ev,re,r,rp)
if not re then return end
local c=e:GetHandler()
local rc=re:GetHandler()
if c:IsReason(REASON_COST) and rc:IsSetCard(0x109) and c:IsPreviousLocation(LOCATION_ONFIELD) and re:IsActivated() then
e:SetLabel(Duel.GetTurnCount()+1)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetLabel()==Duel.GetTurnCount() and e:GetHandler():GetFlagEffect(id)>0
end
function s.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)
e:GetHandler():ResetFlagEffect(id)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.eftg(e,c)
local lg=e:GetHandler():GetLinkedGroup()
return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x109) and lg:IsContains(c)
end
function s.discon2(e,tp,eg,ep,ev,re,r,rp)
local ex,cg,cc,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DRAW)
return ex and cv>0
end
function s.disop2(e,tp,eg,ep,ev,re,r,rp)
s_dispo2_real_tp=rp
s_dispo2_real_e=re:Clone()
Duel.ChangeChainOperation(ev,s.repop)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
if s_draw_func == nil then
s_draw_func = Duel.Draw
end
Duel.Draw = s.hackdraw
local op = s_dispo2_real_e:GetOperation()
op(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw = s_draw_func
end
function s.hackdraw(p,d,r)
s_draw_func(s_dispo2_real_tp,d,r)
end
--雾之天气模样
local s,id,o=GetID()
function s.initial_effect(c)
c:SetUniqueOnField(1,0,id)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(s.remtg)
e2:SetCost(aux.bfgcost)
e2:SetOperation(s.remop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(s.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
function s.eftg(e,c)
local seq=c:GetSequence()
return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x109)
and seq<5 and math.abs(e:GetHandler():GetSequence()-seq)<=1
end
function s.filter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function s.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) end
end
function s.remop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local sg=g:RandomSelect(1-tp,1)
local tc=sg:GetFirst()
if tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(id)~=0
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
-- 黄昏的丧钟
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.atkcon)
e1:SetOperation(s.atkop)
c:RegisterEffect(e1)
--Deckdes
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(s.descon)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
--Win
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(s.wincon)
e3:SetOperation(s.winop)
c:RegisterEffect(e3)
end
function s.atkfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(s.atkfilter,tp,LOCATION_MZONE,nil,nil)>0
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_ONFIELD,nil,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT)
e1:SetValue(500)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_DECK,nil,nil)>0
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetFlagEffectLabel(tp,id)
if ct==nil then ct=0 end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,e:GetHandler(),0,tp,ct+2)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,e:GetHandler(),0,1-tp,ct+2)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetFlagEffectLabel(tp,id)
if ct==nil then
Duel.RegisterFlagEffect(tp,id,0,0,1,2)
ct=0
else
Duel.SetFlagEffectLabel(tp,id,ct+2)
end
ct=ct+2
local g1=Duel.GetDecktopGroup(tp,ct)
local g2=Duel.GetDecktopGroup(1-tp,ct)
g1:Merge(g2)
local tc=g1:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x17a0000)
tc:RegisterEffect(e2)
tc=g1:GetNext()
end
Duel.SendtoGrave(g1,REASON_EFFECT)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
function s.losefilter(c)
return not c:IsCode(57774843) and not (c:IsSetCard(0x38) and bit.band(c:GetOriginalAttribute(),ATTRIBUTE_LIGHT)>0)
end
function s.wincon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_DECK,nil,nil)==0
end
function s.winop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
if Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_MZONE,nil,nil,57774843)>0
and Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_MZONE,nil,nil,0x38)>0
and Duel.GetMatchingGroupCount(s.losefilter,tp,LOCATION_MZONE,nil,nil,0)==0 then
Duel.Win(tp,0xe6)
else
Duel.Win(1-tp,0xe6)
end
end
\ No newline at end of file
-- 天极辉星 巨熊舰长
local s,id,o=GetID()
function s.initial_effect(c)
-- pendulum summon
aux.EnablePendulumAttribute(c,false)
-- add ritual type
local e1=Effect.CreateEffect(c)
e1:SetDescription(1160)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetOperation(s.scaleop)
c:RegisterEffect(e1)
local e1p=Effect.CreateEffect(c)
e1p:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1p:SetCode(EVENT_LEAVE_FIELD)
e1p:SetRange(LOCATION_PZONE)
e1p:SetOperation(s.leaveop)
c:RegisterEffect(e1p)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,aux.NOT(s.isLegalUrsarcticCard))
-- level up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetTarget(s.hlvfilter)
e2:SetValue(6)
c:RegisterEffect(e2)
-- call ship
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1)
e3:SetCost(s.cscost)
e3:SetCondition(s.cscon)
e3:SetOperation(s.csop)
c:RegisterEffect(e3)
-- force special summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetOperation(s.ssop)
c:RegisterEffect(e5)
local e5p=e5:Clone()
e5p:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5p)
-- destroy
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,1))
e6:SetCategory(CATEGORY_DESTROY)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetCost(s.descost)
e6:SetTarget(s.destg)
e6:SetOperation(s.desop)
c:RegisterEffect(e6)
end
-- Lua is evil and the one who write these sh&t must be devil.
function s.isLegalUrsarcticCard(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x163) and Duel.GetFlagEffectLabel(0,id)~=nil
end
function s.DrytronSpSummonLimit(e,c,sump,sumtype,sumpos,targetp,se)
return s.originDrytronSpSummonLimit(e,c,sump,sumtype,sumpos,targetp,se) and not s.isLegalUrsarcticCard(c)
end
function s.DrytronCostFilter(c,tp)
return (c:IsSetCard(0x154) or (c:IsSetCard(0x163) and Duel.GetFlagEffectLabel(0,id)~=nil) or c:IsType(TYPE_RITUAL))
and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0
and (c:IsControler(tp) or c:IsFaceup())
end
function s.GetCustomActivityCount(oid,tp,act)
if oid==97148796 and act==ACTIVITY_SPSUMMON and Duel.GetFlagEffectLabel(0,id)~=nil then
return math.max(0,s.originGetCustomActivityCount(oid,tp,act)-s.originGetCustomActivityCount(id,tp,act))
end
return s.originGetCustomActivityCount(oid,tp,act)
end
function s.scaleop(e,tp,eg,ep,ev,re,r,rp)
local count=Duel.GetFlagEffectLabel(0,id)
if count~=nil then
Duel.SetFlagEffectLabel(0,id,count+1)
else
Duel.RegisterFlagEffect(0,id,nil,0,1,1)
end
if not s.dry then
s.originDrytronSpSummonLimit = aux.DrytronSpSummonLimit
aux.DrytronSpSummonLimit = s.DrytronSpSummonLimit
s.originDrytronCostFilter = aux.DrytronCostFilter
aux.DrytronCostFilter = s.DrytronCostFilter
s.originGetCustomActivityCount = Duel.GetCustomActivityCount
Duel.GetCustomActivityCount = s.GetCustomActivityCount
-- 右枢可以拿北极天熊
if c97148796 then
c97148796.thfilter = function(c)
return c:IsAbleToHand() and ((c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)) or (Duel.GetFlagEffectLabel(0,id) and c:IsSetCard(0x163) and c:IsType(TYPE_MONSTER) ))
end
end
-- 天厨一可以展示北极天熊
if c22420202 then
c22420202.drfilter = function(c)
return (c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER+TYPE_SPELL) and not c:IsPublic()) or (Duel.GetFlagEffectLabel(0,id) and c:IsSetCard(0x163) and c:IsType(TYPE_MONSTER) )
end
end
--扶筐增二在北极天熊在场时可以康
if c1174075 then
c1174075.cfilter = function(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and (c:IsType(TYPE_RITUAL) or (Duel.GetFlagEffectLabel(0,id) and c:IsSetCard(0x163) and c:IsType(TYPE_MONSTER) ))
end
end
s.dry = true
end
end
function s.leaveop(e,tp,eg,ep,ev,re,r,rp)
local count=Duel.GetFlagEffectLabel(0,id)
if count<=1 then
Duel.ResetFlagEffect(0,id)
else
Duel.SetFlagEffectLabel(0,id,count-1)
end
end
function s.hlvfilter(e,c)
return c:IsLevelAbove(1) and c:IsLevelBelow(6) and c:IsSetCard(0x154)
end
function s.cscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function s.cscost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_EXTRA,0,nil,33250142)
if chk==0 then return #g>=3 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local cg=g:Select(tp,2,2,nil)
Duel.Remove(cg,POS_FACEUP,REASON_EFFECT)
end
function s.csop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_EXTRA,0,1,1,nil,33250142)
if #g==0 then return end
local c=e:GetHandler()
local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te0=Effect.CreateEffect(c)
te0:SetCode(EFFECT_CHANGE_TYPE)
te0:SetType(EFFECT_TYPE_SINGLE)
te0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
te0:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
te0:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
tc:RegisterEffect(te0)
-- gain effect
s.originRegisterEffect = Card.RegisterEffect
Card.RegisterEffect = s.RegisterEffect1
c33250142.initial_effect(tc)
Card.RegisterEffect = s.originRegisterEffect
-- scale up
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e2)
end
function s.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ss=false
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_SZONE,0,1,nil,33250142) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
-- special summon starts here
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_SZONE,0,1,1,nil,e,tp,33250142)
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)~=0 then
ss=true
-- destroy starts here
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()~=0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
-- to pen zone
if not ss and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
-- go to pzone so gain effect
s.scaleop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.desfilter(c)
return (c:IsType(TYPE_RITUAL) or c:IsType(TYPE_SYNCHRO)) and c:IsType(TYPE_MONSTER)
end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function s.RegisterEffect1(c,e)
e:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e:SetRange(LOCATION_SZONE)
s.originRegisterEffect(c,e)
end
-- 天极辉工 机巧副官
local s,id,o=GetID()
o=1e9
function s.initial_effect(c)
-- xyz summon & pendulum summon
aux.AddXyzProcedure(c,nil,1,2)
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
-- this card has level
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SYNCHRO_LEVEL)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(~0)
e0:SetValue(1)
c:RegisterEffect(e0)
local e0p=e0:Clone()
e0p:SetCode(EFFECT_XYZ_LEVEL)
c:RegisterEffect(e0p)
-- pzone, give xyz level
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(id)
e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
c:RegisterEffect(e1)
-- pzone, don't take effect from Ursarctic Septentrion
local e1p=Effect.CreateEffect(c)
e1p:SetType(EFFECT_TYPE_FIELD)
e1p:SetCode(EFFECT_IMMUNE_EFFECT)
e1p:SetRange(LOCATION_PZONE)
e1p:SetTarget(s.xyzfilter)
e1p:SetValue(s.immunefilter)
c:RegisterEffect(e1p)
-- pzone, Ursarctic level down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(s.hlvcon)
e2:SetTarget(s.hlvfilter)
e2:SetValue(-6)
c:RegisterEffect(e2)
-- pzone, Xyz level gain
-- local e2p=Effect.CreateEffect(c)
-- e2p:SetType(EFFECT_TYPE_FIELD)
-- e2p:SetCode(EFFECT_SYNCHRO_LEVEL)
-- e2p:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
-- e2p:SetRange(LOCATION_PZONE)
-- e2p:SetTargetRange(LOCATION_MZONE,0)
-- e2p:SetCondition(s.hlvcon)
-- e2p:SetTarget(s.xyzfilter)
-- e2p:SetValue(s.xyzlevel)
-- c:RegisterEffect(e2)
-- pzone, gain atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_PZONE)
e3:SetCondition(s.atkcon)
e3:SetOperation(s.atkop)
c:RegisterEffect(e3)
-- pzone, pendulum
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_PZONE)
e4:SetCountLimit(1)
e4:SetCondition(s.pencon)
e4:SetOperation(s.penop)
c:RegisterEffect(e4)
-- force move ship
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetOperation(s.ssop)
c:RegisterEffect(e5)
-- destroy
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,1))
e6:SetCategory(CATEGORY_RELEASE)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(s.descon)
e6:SetCost(s.descost)
e6:SetOperation(s.desop)
c:RegisterEffect(e6)
-- hijack
if not s.fy then
s.originRegisterEffect = Card.RegisterEffect
s.originUrsarcticSpSummonCost = aux.UrsarcticSpSummonCost
aux.UrsarcticSpSummonCost = s.UrsarcticSpSummonCost
s.originUrsarcticSpSummonLimit = aux.UrsarcticSpSummonLimit
aux.UrsarcticSpSummonLimit = s.UrsarcticSpSummonLimit
s.originDrytronSpSummonCost = aux.DrytronSpSummonCost
aux.DrytronSpSummonCost = s.DrytronSpSummonCost
s.fy = true
end
end
function s.hlvcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_SYNCHRO)
end
function s.hlvfilter(e,c)
return c:IsLevelAbove(7) and c:IsSetCard(0x163)
end
function s.xyzfilter(e,c)
return c:IsType(TYPE_XYZ)
end
function s.xyzlevel(e,c)
end
function s.immunefilter(e,te)
return te:GetHandler():GetCode()==53087962
end
function s.atkfilter(c,tp)
return c:IsFaceup() and (c:IsSetCard(0x154) or c:IsSetCard(0x163)) and c:IsControler(tp)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
local scale=e:GetHandler():GetLeftScale()
return eg:IsExists(s.atkfilter,1,nil,tp) and scale>0 and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_SZONE,0,1,nil,33250142)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(s.atkfilter,nil,tp)
local tc=g:GetFirst()
while tc 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)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
Duel.BreakEffect()
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetValue(-1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e2)
end
function s.penfilter(c,lsc,rsc)
local lv=c:GetLevel()
return lv>lsc and lv<rsc and not c:IsPublic() and (c:IsSetCard(0x154) or c:IsSetCard(0x163))
end
function s.pencon(e,tp,eg,ep,ev,re,r,rp)
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
local lsc=Duel.GetFieldCard(tp,LOCATION_PZONE,0):GetLeftScale()
local rsc=Duel.GetFieldCard(tp,LOCATION_PZONE,1):GetRightScale()
if lsc>rsc then lsc,rsc=rsc,lsc end
return Duel.IsExistingMatchingCard(s.penfilter,tp,LOCATION_HAND,0,1,nil,lsc,rsc) and Auxiliary.PendulumChecklist&(0x1<<tp)==0 -- Haven't pedulum summoned
end
function s.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lsc=Duel.GetFieldCard(tp,LOCATION_PZONE,0):GetLeftScale()
local rsc=Duel.GetFieldCard(tp,LOCATION_PZONE,1):GetRightScale()
if lsc>rsc then lsc,rsc=rsc,lsc end
local g=Duel.SelectMatchingCard(tp,s.penfilter,tp,LOCATION_HAND,0,1,999,nil,lsc,rsc)
if #g>0 then
local tc=g:GetFirst()
while tc do
local fid=tc:GetFieldID()
tc:RegisterFlagEffect(id+o,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,EFFECT_FLAG_CLIENT_HINT,1,fid,66)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e1)
Card.RegisterEffect = s.RegisterEffect2
_G['c'..tc:GetCode()].initial_effect(tc)
Card.RegisterEffect = s.originRegisterEffect
tc=g:GetNext()
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(s.psplimit)
Duel.RegisterEffect(e1,tp)
end
function s.psplimit(e,c,tp,sumtp,sumpos)
return not bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function s.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ss=false
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,33250142) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
-- special summon starts here
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_MZONE,0,1,1,nil,e,tp,33250142)
local tc=g:GetFirst()
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
ss=true
local te0=Effect.CreateEffect(c)
te0:SetCode(EFFECT_CHANGE_TYPE)
te0:SetType(EFFECT_TYPE_SINGLE)
te0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
te0:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
te0:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
tc:RegisterEffect(te0)
-- gain effect
Card.RegisterEffect = s.RegisterEffect1
c33250142.initial_effect(tc)
Card.RegisterEffect = s.originRegisterEffect
end
end
-- to pen zone
if not ss and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function s.desfilter(c)
return Duel.IsPlayerCanRelease(c:GetOwner(),c) and c:IsType(TYPE_MONSTER)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) and
Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_MZONE,1,nil)
end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x163) end
local tg=e:GetHandler():GetOverlayGroup():FilterSelect(tp,Card.IsSetCard,1,1,nil,0x163)
Duel.SendtoGrave(tg,REASON_COST)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,s.desfilter,tp,0,LOCATION_MZONE,0,1,1,nil)
if #g1>0 and #g2>0 then
g1:Merge(g2)
Duel.Release(g1,REASON_COST)
end
end
function s.RegisterEffect1(c,e)
e:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e:SetRange(LOCATION_SZONE)
s.originRegisterEffect(c,e)
end
function s.RegisterEffect2(c,e)
e:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e:SetDescription(aux.Stringid(id,3))
if e:GetCost() == s.DrytronSpSummonCost then
e:SetRange(LOCATION_HAND)
s.originRegisterEffect(c,e)
end
if e:GetCost() == s.UrsarcticSpSummonCost then
s.originRegisterEffect(c,e)
end
end
function s.UrsarcticSpSummonCost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:GetFlagEffect(id+o)>0 then
if chk==0 then return true end
else
return s.originUrsarcticSpSummonCost(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function s.UrsarcticSpSummonLimit(e,c)
return s.originUrsarcticSpSummonLimit(e,c) and not c:IsCode(id) and not
(Duel.IsPlayerAffectedByEffect(c:GetControler(),id) and c:IsType(TYPE_XYZ))
end
function s.DrytronSpSummonCost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:GetFlagEffect(id+o)>0 then
if chk==0 then
return Duel.GetCustomActivityCount(97148796,tp,ACTIVITY_SPSUMMON)<=0
end
e:SetLabel(100)
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(Auxiliary.DrytronSpSummonLimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(97148796)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
else
return s.originDrytronSpSummonCost(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
-- 机壳中的炼狱
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e1)
--sp
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetTarget(s.spcost)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--link all zone
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetTarget(s.rettg)
e3:SetOperation(s.retop)
e3:SetCountLimit(1)
c:RegisterEffect(e3)
-- -- test
-- local e4=Effect.CreateEffect(c)
-- e4:SetType(EFFECT_TYPE_QUICK_O)
-- e4:SetRange(LOCATION_SZONE)
-- e4:SetCode(EVENT_FREE_CHAIN)
-- e4:SetOperation(s.testop)
-- c:RegisterEffect(e4)
end
function s.spfilter(c,e,tp,level)
return c:IsSetCard(0xbb)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsLevelBelow(level)
and (level==99 or c:IsType(TYPE_SPSUMMON))
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,REASON_COST,nil,0xaa) end
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,REASON_COST,nil,0xaa)
if Duel.Release(g,REASON_COST)>0 then
local c=g:GetFirst()
if c:IsCode(51194046) then
e:SetLabel(99)
else
e:SetLabel(c:GetLevel())
end
end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetLabel()
if lv==nil then return end
local tg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0):Filter(Card.IsSetCard,nil,0xaa)
if #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
if Duel.SendtoHand(tg,nil,REASON_EFFECT)~=0 and tg:FilterCount(Card.IsCode,nil,51194046)>0 then
lv=99
end
end
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp,lv)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,5)) then
local c=sg:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
end
end
function s.filter(c)
return c:IsLevelAbove(8) and c:IsSetCard(0xbb) and c:IsAbleToHand()
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not (tc and tc:IsRelateToEffect(e)) then return end
if Duel.SendtoHand(tc,nil,REASON_EFFECT)==0 then return end
local c=e:GetHandler()
-- Add pend effect to ALL your pend cards
local pg=Duel.GetMatchingGroup(s.pendfilter,tp,~0,0,nil)
pg:ForEach(s.addpend)
end
function s.testop(e,tp,eg,ep,ev,re,r,rp)
local pg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
local pc=pg:GetFirst()
s.addpend(pc)
end
function s.pendfilter(c)
return c:IsSetCard(0xaa) and c:IsType(TYPE_PENDULUM)
end
function s.addpend(pc)
local e1=Effect.CreateEffect(pc)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC_G)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(s.pendcon)
e1:SetOperation(s.pendop())
e1:SetValue(SUMMON_TYPE_PENDULUM)
e1:SetReset(RESET_PHASE+PHASE_END)
pc:RegisterEffect(e1)
end
function s.pendcon(e,c,og)
if c==nil then return true end
local tp=c:GetControler()
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
if Auxiliary.PendulumChecklist&(0x1<<tp)~=0 and #eset==0 then return false end
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if rpz==nil or c==rpz then return false end
local lscale=c:GetLeftScale()
local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end
if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_XYZ)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return false end
local g=nil
if og then
g=og:Filter(Card.IsLocation,nil,loc)
else
g=Duel.GetFieldGroup(tp,loc,0)
end
return g:IsExists(Auxiliary.PConditionFilter,1,nil,e,tp,lscale,rscale,eset)
end
function s.pendop()
local origin=aux.PendOperation()
return function(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
s.originGetLocationCountFromEx=Duel.GetLocationCountFromEx
Duel.GetLocationCountFromEx=s.GetLocationCountFromEx
origin(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
Duel.GetLocationCountFromEx=s.originGetLocationCountFromEx
local g=sg:Clone()
local g1=g:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
local g2=g:Filter(aux.NOT(Card.IsLocation),nil,LOCATION_EXTRA)
if #g1>0 and Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
local cg=g1:Select(tp,1,1,nil)
g1:RemoveCard(cg:GetFirst())
end
Duel.Remove(g1,POS_FACEDOWN,REASON_REPLACE)
Duel.SpecialSummon(g,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP)
sg:Clear()
end
end
function s.GetLocationCountFromEx(tp,tp,sg,t,...)
if t==TYPE_PENDULUM then t=TYPE_SYNCHRO end
return s.originGetLocationCountFromEx(tp,tp,sg,t,...)
end
\ No newline at end of file
--于天阴刻开的正道
local s,id,o=GetID()
o=1e9
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e0)
-- draw and handes
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(s.drawcon)
e1:SetOperation(s.drawop)
c:RegisterEffect(e1)
--send to grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(s.sgcon)
e2:SetOperation(s.sgop)
c:RegisterEffect(e2)
-- set itself
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(s.backcon)
e3:SetOperation(s.backop)
e3:SetCountLimit(1,id)
c:RegisterEffect(e3)
end
function s.drawcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local c=e:GetHandler()
return re:IsHasCategory(CATEGORY_DECKDES) and rc:GetCode()~=id and c:GetFlagEffect(id)==0 and Duel.GetCurrentPhase()==PHASE_END
end
-- function s.drawtg(e,tp,eg,ep,ev,re,r,rp,chk)
-- local ex,g,gc,dp,dv=Duel.GetOperationInfo(ev,CATEGORY_DECKDES)
-- if chk==0 then return dv>0 end
-- Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,dv)
-- Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,dv)
-- end
function s.drawop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_CARD,0,id)
local c=e:GetHandler()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.ChangeChainOperation(ev,s._drawop(re:GetOperation()))
end
end
function s._drawop(op)
return function(e,tp,eg,ep,ev,re2,r,rp)
local ex,g,gc,dp,dv=Duel.GetOperationInfo(ev,CATEGORY_DECKDES)
op(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.Draw(tp,dv,REASON_EFFECT)
if d>0 then
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,dv,dv,REASON_EFFECT+REASON_DISCARD)
end
end
end
function s.sgfilter(c)
return c:IsType(TYPE_MONSTER)
and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsLevelBelow(4)
and c:IsAbleToGrave()
end
function s.sgcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local c=e:GetHandler()
return re:IsHasCategory(CATEGORY_HANDES) and rc:GetCode()~=id and c:GetFlagEffect(id+o)==0
end
function s.sgop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_CARD,0,id)
local c=e:GetHandler()
c:RegisterFlagEffect(id+o,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.ChangeChainOperation(ev,s._sgop(re:GetOperation()))
end
end
function s._sgop(op)
return function(e,tp,eg,ep,ev,re2,r,rp)
local ex,g,gc,dp,dv=Duel.GetOperationInfo(ev,CATEGORY_HANDES)
op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.sgfilter,tp,LOCATION_DECK,0,dv,dv,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function s.backfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.backcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK)
or (e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040)
end
function s.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local g1=Duel.GetMatchingGroup(s.backfilter,tp,LOCATION_MZONE,0,nil)
if #g1>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
local gg1=g1:Select(tp,1,1,nil)
Duel.SendtoHand(gg1,nil,REASON_EFFECT)
end
end
end
-- 巫独少女 莉莉安
local s,id,o=GetID()
function s.initial_effect(c)
-- no xyz with one
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(id)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
c:RegisterEffect(e1)
-- ritual summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PAY_LPCOST)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.rscon)
e3:SetTarget(s.rstg)
e3:SetOperation(s.rsop)
c:RegisterEffect(e3)
if not s.gf then
s.originXyzAlterFilter=aux.XyzAlterFilter
aux.XyzAlterFilter=s.XyzAlterFilter
s.originMustMaterialCheck=aux.MustMaterialCheck
aux.MustMaterialCheck=s.MustMaterialCheck
s.gf=true
end
end
function s.XyzAlterFilter(c,alterf,xyzc,e,tp,alterop)
return not Duel.IsPlayerAffectedByEffect(tp,id) and s.originXyzAlterFilter(c,alterf,xyzc,e,tp,alterop)
end
function s.MustMaterialCheck(v,tp,code)
if code==EFFECT_MUST_BE_XMATERIAL and Duel.IsPlayerAffectedByEffect(tp,id) then return false end
return s.originMustMaterialCheck(v,tp,code)
end
function s.mfilter(c,e)
return c:IsFaceup() and s.GetLevel(c)>0 and not c:IsImmuneToEffect(e) and c:IsReleasable()
end
function s.filter(c,e,tp)
return c:IsSetCard(0xf72)
end
function s.GetLevel(c)
if c==nil then return 0 end
if c:GetRank()>0 then
return c:GetRank()
else
return c:GetLevel()
end
end
function s.GetRitualLevel(c,rc)
if c:IsType(TYPE_XYZ) then
return c:GetRank()
else
return s.originGetRitualLevel(c,rc)
end
end
function s.RitualCheckEqual(g,c,lv)
return g:CheckWithSumEqual(s.GetLevel,lv,#g,#g,c)
end
function s.rcheck(gc)
return function(tp,g,c)
return g:IsContains(gc)
end
end
function s.rscon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp
end
function s.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
return c:IsCanBeSpecialSummoned(e,0,tp,tp,false)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function s.rsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) then
s.originGetRitualLevel=Card.GetRitualLevel
Card.GetRitualLevel=s.GetRitualLevel
local mg1=Duel.GetRitualMaterialEx(tp)
mg1:Remove(Card.IsLocation,nil,LOCATION_HAND)
local mg2=Duel.GetMatchingGroup(s.mfilter,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2)
aux.RCheckAdditional=s.rcheck(c)
if Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,s.filter,e,tp,mg1,nil,s.GetLevel,"Equal")
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,s.filter,e,tp,mg1,nil,s.GetLevel,"Equal")
local tc=tg:GetFirst()
if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,s.GetLevel(tc),"Equal")
--local g1=mg:Select(tp,1,1,nil)
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,s.GetLevel(tc),tp,tc,s.GetLevel(tc),"Equal")
aux.GCheckAdditional=nil
Card.GetRitualLevel=s.originGetRitualLevel
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
aux.RCheckAdditional=nil
Card.GetRitualLevel=s.originGetRitualLevel
end
end
-- 巫独少女 莉莉姆
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
-- no effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,1)
e1:SetCondition(s.tgcon)
e1:SetValue(s.tglimit)
c:RegisterEffect(e1)
-- enter the field
local e1p=Effect.CreateEffect(c)
e1p:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1p:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1p:SetCode(EVENT_SPSUMMON_SUCCESS)
e1p:SetLabelObject(e1)
e1p:SetOperation(s.flop)
c:RegisterEffect(e1p)
-- special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetCondition(s.sscon)
e2:SetTarget(s.sstg)
e2:SetOperation(s.ssop)
c:RegisterEffect(e2)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():GetFlagEffect(id)>0
end
function s.tglimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function s.filter(c,tp)
return c:IsSetCard(0xf72) and Duel.IsPlayerCanRemove(tp,c)
end
function s.flop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rc=re:GetHandler()
if c:IsSummonType(SUMMON_TYPE_RITUAL) and rc:GetCode()==69035382 then
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
else
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1)
end
end
function s.sscon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,tp)
and e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function s.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) then
local te=Effect.CreateEffect(tc)
te:SetDescription(aux.Stringid(id,1))
te:SetCategory(CATEGORY_SPECIAL_SUMMON)
te:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
te:SetCode(EVENT_PHASE+PHASE_STANDBY)
te:SetRange(LOCATION_REMOVED)
te:SetCondition(s.sscon2)
te:SetOperation(s.ssop2)
te:SetCountLimit(1)
te:SetLabelObject(e)
tc:RegisterEffect(te)
end
end
function s.sscon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.ssop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
--end
e:Reset()
end
-- 巫独少女 莉莉丝
local s,id,o=GetID()
function s.initial_effect(c)
-- 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,1)
e1:SetCondition(s.tgcon)
c:RegisterEffect(e1)
local e1p=e1:Clone()
e1p:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e1p)
-- enter the field
local e1q=Effect.CreateEffect(c)
e1q:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1q:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1q:SetCode(EVENT_SPSUMMON_SUCCESS)
e1q:SetLabelObject(e1)
e1q:SetOperation(s.flop)
c:RegisterEffect(e1q)
-- special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(s.sscon)
e2:SetOperation(s.ssop)
c:RegisterEffect(e2)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():GetFlagEffect(id)>0
end
function s.tglimit(e)
local c=e:GetHandler()
return true --not c:IsSetCard(0x162)
end
function s.flop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rc=re:GetHandler()
if c:IsSummonType(SUMMON_TYPE_RITUAL) and rc:GetCode()==69035382 then
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
else
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1)
end
end
function s.filter(c,tp,e)
return c:IsSetCard(0xf72) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetCode()~=id
end
function s.sscon(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousControler(tp)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,tp,e)
and e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function s.ssop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,tp,e)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
-- 巫独少女 爱丽丝
local s,id,o=GetID()
function s.initial_effect(c)
-- must center
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MUST_USE_MZONE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(0x4)
c:RegisterEffect(e0)
-- disable area
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetCondition(s.discon)
e1:SetValue(s.disval)
c:RegisterEffect(e1)
-- enter the field
local e1p=Effect.CreateEffect(c)
e1p:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1p:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1p:SetCode(EVENT_SPSUMMON_SUCCESS)
e1p:SetLabelObject(e1)
e1p:SetOperation(s.flop)
c:RegisterEffect(e1p)
--adjust
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.discon)
e2:SetOperation(s.adjustop)
c:RegisterEffect(e2)
--- special summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(s.sstg1)
e3:SetCost(s.sscost1)
e3:SetOperation(s.ssop1)
c:RegisterEffect(e3)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():GetFlagEffect(id)>0
end
function s.disfilter(c)
return c:GetSequence()~=2
end
function s.disval(e)
return 0xfb00fb
end
function s.adjustop(e,tp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
local tg=g:Filter(s.disfilter,nil)
Duel.SendtoGrave(tg,REASON_RULE)
end
function s.flop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rc=re:GetHandler()
if c:IsSummonType(SUMMON_TYPE_RITUAL) and rc:GetCode()==172017010 then
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
else
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1)
end
end
function s.ssfilter1(c,e,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sstg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return eg:IsExists(s.ssfilter1,1,nil,e,tp)
end
end
function s.sscost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function s.ssop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=nil
if #eg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
tc=eg:Filter(s.ssfilter1,nil,e,tp):Select(tp,1,1,nil):GetFirst()
else
tc=eg:GetFirst()
end
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,0x4) then
tc:CopyEffect(id,RESET_EVENT+RESETS_STANDARD)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(id)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(tc)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(s.desop)
tc:RegisterEffect(e2)
end
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler()
aux.EnableChangeCode(tc,id+1,~0)
end
-- 不洁教堂
local s,id,o=GetID()
function s.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,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
-- pay lp attack
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.aacon)
e2:SetCost(s.aacost)
e2:SetTarget(s.aatg)
e2:SetOperation(s.aaop)
c:RegisterEffect(e2)
--- ritual summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,id+o+o)
e3:SetTarget(s.rstg)
e3:SetOperation(s.rsop)
c:RegisterEffect(e3)
end
function s.setfilter(c)
return c:IsSetCard(0x172) or c:IsSetCard(0xf72) or c:IsCode(387282) or c:IsCode(22200403) or c:IsCode(92099232)
end
function s.thfilter(c)
return s.setfilter(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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 s.aafilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.aacon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and Duel.GetAttacker():IsRace(RACE_WARRIOR+RACE_SPELLCASTER+RACE_PSYCHO) and Duel.CheckLPCost(1-tp,800)
end
function s.aacost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(1-tp,800) end
Duel.PayLPCost(1-tp,800)
end
function s.aatg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(s.aafilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
end
function s.aaop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.aafilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if #g==0 then return end
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
local te=Effect.CreateEffect(tc)
te:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
te:SetCode(EVENT_PHASE+PHASE_END)
te:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
te:SetCountLimit(1)
te:SetLabelObject(tc)
te:SetCondition(s.descon)
te:SetOperation(s.desop)
Duel.RegisterEffect(te,tp)
Duel.SpecialSummonComplete()
local at=Duel.GetAttacker()
if at:IsAttackable() and not at:IsImmuneToEffect(e) and not tc:IsImmuneToEffect(e) then
--Duel.CalculateDamage(at,tc)
end
end
end
function s.rsfilter(c,e,tp,lp)
return s.setfilter(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) and lp>c:GetLevel()*500
end
function s.rstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
local lp=Duel.GetLP(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.rsfilter,tp,LOCATION_HAND,0,1,nil,e,tp,lp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function s.rsop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local lp=Duel.GetLP(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,s.rsfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,lp)
local tc=tg:GetFirst()
if tc then
Duel.PayLPCost(tp,tc:GetLevel()*500)
tc:SetMaterial(nil)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(id)~=0 then
return true
else
e:Reset()
return false
end
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
-- 命运恶戏
local s,id,o=GetID()
function s.initial_effect(c)
-- activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.filter(c,e,tp,setcode)
return c:IsSetCard(setcode) and not c:IsForbidden() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,0x172)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,0xf72) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local g1=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp,0x172)
local g2=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp,0xf72)
if g1:GetCount()==0 or g2:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.ConfirmCards(1-tp,sg1)
Duel.ShuffleDeck(tp)
local cg=sg1:Select(1-tp,1,1,nil)
local tc=cg:GetFirst()
Duel.Hint(HINT_CARD,0,tc:GetCode())
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
sg1:RemoveCard(tc)
Duel.SendtoGrave(sg1,nil,REASON_EFFECT)
end
-- 少女的晚祷
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.rscon)
e1:SetCost(s.rscost)
e1:SetTarget(s.rstg)
e1:SetOperation(s.rsop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(s.reptg)
e2:SetValue(s.repval)
e2:SetOperation(s.repop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
function s.rsfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsAttribute(ATTRIBUTE_DARK) and Duel.IsPlayerCanSpecialSummon(tp,SUMMON_TYPE_RITUAL,POS_FACEUP,tp,c)
end
function s.rsfilter2(c)
return c:IsType(TYPE_RITUAL) and (c:IsSetCard(0x172) or c:IsSetCard(0xf72)) and Duel.IsPlayerCanSpecialSummon(tp,SUMMON_TYPE_RITUAL,POS_FACEUP,tp,c)
end
function s.rsmonster(tp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.rsfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,tp)
if Duel.IsEnvironment(172017010) then
g=g+Duel.GetMatchingGroup(s.rsfilter2,tp,LOCATION_DECK,0,nil,tp)
end
return g
end
function s.rscon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
return #g==1 and tc:IsRace(RACE_SPELLCASTER)
end
function s.rscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800)
end
function s.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
if chk==0 then
return Duel.IsPlayerCanRelease(tc) and #s.rsmonster(tp)>0
end
e:SetLabelObject(tc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,summon_location)
end
function s.rsop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
local rc=e:GetLabelObject()
local tg=s.rsmonster(tp)
if Duel.Release(rc,REASON_EFFECT)==1 and #tg>0 then
local tc=tg:Select(tp,1,1,nil):GetFirst()
tc:SetMaterial(Group.FromCards(rc))
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function s.repfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()==2
and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function s.repval(e,c)
return s.repfilter(c,e:GetHandlerPlayer())
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rse=e:GetLabelObject()
if Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetRange(LOCATION_SZONE)
e1:SetLabelObject(c:GetActivateEffect())
e1:SetOperation(s._repop)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2)
end
end
function s._repop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te:IsActivatable(tp,true,true) then
s.rstg(te,tp,eg,ep,ev,re,r,rp,1)
s.rsop(te,tp,eg,ep,ev,re,r,rp)
else
Duel.Destroy(te:GetHandler(),REASON_EFFECT)
end
e:Reset()
end
!victory 0xf0 「拓扑混沌交换熊」特殊胜利
!victory 0xf1 「黄昏的丧钟」特殊胜利
!victory 0xff 「花火」特殊胜利
!setname 0xf72 跕怨少女
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