Commit 8f45e2ba authored by REIKAI's avatar REIKAI 💬

Merge branch '2023.06.11' into 'master'

2023.06.11

See merge request !14
parents 251be500 ebff48d5
Pipeline #22203 passed with stages
in 25 minutes and 14 seconds
......@@ -4,8 +4,8 @@ stages:
variables:
GIT_DEPTH: "1"
LAST_UPDATE_DATE: "2023.05.16"
CURRENT_UPDATE_DATE: "2023.05.30"
LAST_UPDATE_DATE: "2023.05.30"
CURRENT_UPDATE_DATE: "2023.06.11"
redtext:
stage: prepare
......
No preview for this file type
......@@ -308,13 +308,13 @@
12010053 0 --LA CY 最后的静仪式
12011029 0 --黑色星云 源数黑雪姬
12013000 1 --朝雾草的火枪手 琪亚拉
12013001 0 --琉璃唐草的火枪手 麦·伦
12013001 1 --琉璃唐草的火枪手 麦·伦
12013002 1 --帚石楠的火枪手 艾尔玛
12013007 1 --紫阳花的火枪手 伊瓦尔
12013015 0 --蒲公英的火枪手 米露卡
12016005 0 --炫灵姬 一生的约定
12016005 1 --炫灵姬 一生的约定
12016015 0 --炫灵姬 三人成行
12017007 0 --至妙的守护天使 玛卡丽儿
12017007 2 --至妙的守护天使 玛卡丽儿
12026024 1 --化作机械的暗影 拉结尔
12026026 1 --光晓的神子 拉结尔
12026032 1 --懵懂的纯真 拉结尔
......@@ -327,7 +327,7 @@
12029010 1 --永远的誓言 纯白女王
12029011 1 --王权代行者 纯白女王
12029016 0 --惩戒双子
12029070 0 --巨蛾娘的宝藏
12029070 1 --巨蛾娘的宝藏
12030002 1 --乌冬 yatori
12030008 0 --礼物 yatori
12030009 1 --女仆 yatori
......@@ -347,7 +347,7 @@
12037000 0 --极丽六鸟 迦陵频伽
12037003 0 --战场的巫鸣鸟 迦陵频伽
12037012 0 --梦幻誓装 蝶崎火売
12037051 0 --极丽六鸟 薛琳娜
12037051 2 --极丽六鸟 薛琳娜
12037052 1 --极丽六鸟 紧那罗
12038003 1 --偶像P 普利兹姆
12039053 1 --深海绝唱 缇璐娅
......@@ -375,13 +375,12 @@
12048006 1 --墓城的血姬 布璐缇雅
12048018 1 --阿尔·阿吉夫的残页
12048026 0 --墓城七姬 四之姬 萨莉亚
12051021 0 --最初的夏祭 卡娜
12051023 0 --爱情的梦像 卡娜
12051023 1 --爱情的梦像 卡娜
12051030 1 --度假潜水
12054000 1 --空腹的顾拉
12054001 1 --暴食女巫 顾拉
12054052 0 --美食楼的琵珂
12054060 0 --牵挂姐姐的点心职人 美食楼的罗赛特
12054060 1 --牵挂姐姐的点心职人 美食楼的罗赛特
12056005 1 --你偷看了?
12059030 1 --灰银魔王
12060030 0 --百鬼夜行
......@@ -393,7 +392,6 @@
12061021 1 --绽放喝彩 鹭草
12061031 1 --全力训练 鹭草
12062001 1 --诞源的神子 艾尔儿
12062005 0 --灯赫的神子 梅拉尔
12062012 0 --灭天龙 最终法则
12062041 2 --典理的祈祷
12066023 1 --天境一闪
......@@ -407,8 +405,6 @@
12087050 1 --响彻人心之歌 罗洛涅萝尔
12087052 2 --花绽的歌声 罗洛涅萝尔
12087055 1 --闪耀的光彩 罗洛涅萝尔
12087060 1 --雪花之碎片
12087062 1 --茜色之小道
12090082 1 --星界转生
12094005 1 --魔王转生 御影零夜
#122
......@@ -543,7 +539,6 @@
16114231 1 --雪仙精 莉琳
16114235 1 --龙素记号 Sb
16114246 1 --薰风仙精 高德妮
16114257 3 --雪山仙精 玛璐璐
16114258 2 --天真仙精 奥查匹
16120006 1 --坚牢之翼 俄律西恩
16120009 1 --师团之先导者 希拉托斯忒·拉
......@@ -585,8 +580,6 @@
16170003 1 --狂雷金刚拳
16172004 0 --禁时王
16172006 0 --大欲的魔龙
16172022 0 --煌世破
16172023 0 --煌世落
16199520 0 --华丽的降神
16199522 1 --王牌礼物
16199523 1 --暴发户的赠礼
......@@ -907,6 +900,7 @@
30666700 3 --拟龙贵族·谋士龙女
30666725 1 --拟龙贵族·复仇龙女
30683110 0 --M·A·L·Hydra
30683305 0 --M·A·L·Growth Wedge
30683425 0 --M·A·L——Null
#307
30700001 0 --龙裔的新生者
......@@ -1130,7 +1124,6 @@
33500933 0 --D.A.L 四糸乃·闪耀
33501019 1 --壶宇融合
33501024 0 --高原的魔女大人
33501037 0 --书馆的荣誉魔女
33501077 0 --神秘大魔法师
33501086 0 --孤立无援
33501091 0 --鸢之歌
......@@ -1332,7 +1325,6 @@
37564914 1 --Sayuri & 3L
#379
37900017 1 --不明的魔法之元
37902000 0 --次元之书
37987096 0 --优雅少女 苏娜
#391
39101001 0 --天才的宿命 白羊物语
......@@ -1868,6 +1860,9 @@
81902063 0 --TC.62 空想之上的人格保持者 古明地恋
#854
85402300 0 --栞
#881
88178301 0 --白玉楼的亡灵少女 幽幽子
88178317 0 --生命的二刀流 魂魄妖梦
#888
88888244 0 --轮回崩坏 梅比乌斯
88888255 0 --妖相百斩 SP洪荒无极
......@@ -1915,6 +1910,7 @@
96030180 0 --装填 冰橘火力
96030181 0 --紧急投放
96040002 0 --再来一杯
96040020 0 --功能性饮料 原汁不原味
#986
98600002 0 --欧忒耳佩
98600004 1 --情书
......
expansions/pics/33330400.jpg

91.3 KB | W: | H:

expansions/pics/33330400.jpg

60.7 KB | W: | H:

expansions/pics/33330400.jpg
expansions/pics/33330400.jpg
expansions/pics/33330400.jpg
expansions/pics/33330400.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330401.jpg

42.3 KB | W: | H:

expansions/pics/33330401.jpg

89.3 KB | W: | H:

expansions/pics/33330401.jpg
expansions/pics/33330401.jpg
expansions/pics/33330401.jpg
expansions/pics/33330401.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330402.jpg

37.3 KB | W: | H:

expansions/pics/33330402.jpg

81.9 KB | W: | H:

expansions/pics/33330402.jpg
expansions/pics/33330402.jpg
expansions/pics/33330402.jpg
expansions/pics/33330402.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330403.jpg

37.7 KB | W: | H:

expansions/pics/33330403.jpg

81 KB | W: | H:

expansions/pics/33330403.jpg
expansions/pics/33330403.jpg
expansions/pics/33330403.jpg
expansions/pics/33330403.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330404.jpg

38.2 KB | W: | H:

expansions/pics/33330404.jpg

80.4 KB | W: | H:

expansions/pics/33330404.jpg
expansions/pics/33330404.jpg
expansions/pics/33330404.jpg
expansions/pics/33330404.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330405.jpg

36.7 KB | W: | H:

expansions/pics/33330405.jpg

78.1 KB | W: | H:

expansions/pics/33330405.jpg
expansions/pics/33330405.jpg
expansions/pics/33330405.jpg
expansions/pics/33330405.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330406.jpg

38.4 KB | W: | H:

expansions/pics/33330406.jpg

80.9 KB | W: | H:

expansions/pics/33330406.jpg
expansions/pics/33330406.jpg
expansions/pics/33330406.jpg
expansions/pics/33330406.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330407.jpg

39.8 KB | W: | H:

expansions/pics/33330407.jpg

84.2 KB | W: | H:

expansions/pics/33330407.jpg
expansions/pics/33330407.jpg
expansions/pics/33330407.jpg
expansions/pics/33330407.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330408.jpg

38.1 KB | W: | H:

expansions/pics/33330408.jpg

79.7 KB | W: | H:

expansions/pics/33330408.jpg
expansions/pics/33330408.jpg
expansions/pics/33330408.jpg
expansions/pics/33330408.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330409.jpg

40.7 KB | W: | H:

expansions/pics/33330409.jpg

86.2 KB | W: | H:

expansions/pics/33330409.jpg
expansions/pics/33330409.jpg
expansions/pics/33330409.jpg
expansions/pics/33330409.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330410.jpg

45.2 KB | W: | H:

expansions/pics/33330410.jpg

94.4 KB | W: | H:

expansions/pics/33330410.jpg
expansions/pics/33330410.jpg
expansions/pics/33330410.jpg
expansions/pics/33330410.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330411.jpg

38.9 KB | W: | H:

expansions/pics/33330411.jpg

80.5 KB | W: | H:

expansions/pics/33330411.jpg
expansions/pics/33330411.jpg
expansions/pics/33330411.jpg
expansions/pics/33330411.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330412.jpg

41.4 KB | W: | H:

expansions/pics/33330412.jpg

91.9 KB | W: | H:

expansions/pics/33330412.jpg
expansions/pics/33330412.jpg
expansions/pics/33330412.jpg
expansions/pics/33330412.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33330413.jpg

14.8 KB | W: | H:

expansions/pics/33330413.jpg

48.5 KB | W: | H:

expansions/pics/33330413.jpg
expansions/pics/33330413.jpg
expansions/pics/33330413.jpg
expansions/pics/33330413.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/88178012.jpg

49.1 KB | W: | H:

expansions/pics/88178012.jpg

3.08 MB | W: | H:

expansions/pics/88178012.jpg
expansions/pics/88178012.jpg
expansions/pics/88178012.jpg
expansions/pics/88178012.jpg
  • 2-up
  • Swipe
  • Onion skin
--天灾领域
local m=12001500
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--change effect type
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(m)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.filter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.spfilter(c)
return c:IsAbleToHand()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,REASON_EFFECT)
end
end
--天外之灾 骨骸鱼
local m=12001501
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12001501,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.grace(g)
if not g then return false end
local race=0
local tc=g:GetFirst()
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
return race
end
function cm.gatt(g)
if not g then return false end
local att=0
local tc=g:GetFirst()
while tc do
att=att|tc:GetAttribute()
tc=g:GetNext()
end
return race
end
function cm.spfilter1(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter2(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter3(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsRace(race) and not c:IsAttribute(att)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,Group.FromCards(c)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
function cm.thfilter3(c,e,tp,tc,tt)
local race=tc:GetRace()
local att=tc:GetAttribute()
return not c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsAttribute(att) and (tt==1 and c:IsAbleToRemove() or tt==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or tt==3 and c:IsAbleToHand() or tt==4 and c:IsAbleToGrave() )
end
function cm.reop(e,tp,tc,tt,loc)
if Duel.IsPlayerAffectedByEffect(tp,12001500) and Duel.IsExistingMatchingCard(cm.thfilter3,tp,loc,0,1,nil,e,tp,tc,tt) and Duel.SelectYesNo(tp,aux.Stringid(12001500,1)) then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,loc,0,1,1,nil,e,tp,tc,tt)
tc=g1:GetFirst()
end
if tt==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif tt==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tt==3 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
elseif tt==4 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,Group.FromCards(c))
if #g1>0 then
cm.reop(e,tp,g1:GetFirst(),1,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+c)
if #g2>0 then
cm.reop(e,tp,g2:GetFirst(),1,LOCATION_DECK)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g3=Duel.SelectMatchingCard(tp,cm.spfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+g2+c)
if #g3>0 then
cm.reop(e,tp,g3:GetFirst(),2,LOCATION_DECK)
end
end
end
end
\ No newline at end of file
--天外之灾 浮游蛇
local m=12001502
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12001501,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.grace(g)
if not g then return false end
local race=0
local tc=g:GetFirst()
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
return race
end
function cm.gatt(g)
if not g then return false end
local att=0
local tc=g:GetFirst()
while tc do
att=att|tc:GetAttribute()
tc=g:GetNext()
end
return race
end
function cm.spfilter1(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter2(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter3(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsRace(race) and not c:IsAttribute(att)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,Group.FromCards(c)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thfilter3(c,e,tp,tc,tt)
local race=tc:GetRace()
local att=tc:GetAttribute()
return not c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsAttribute(att) and (tt==1 and c:IsAbleToRemove() or tt==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or tt==3 and c:IsAbleToHand() or tt==4 and c:IsAbleToGrave() )
end
function cm.reop(e,tp,tc,tt,loc)
if Duel.IsPlayerAffectedByEffect(tp,12001500) and Duel.IsExistingMatchingCard(cm.thfilter3,tp,loc,0,1,nil,e,tp,tc,tt) and Duel.SelectYesNo(tp,aux.Stringid(12001500,1)) then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,loc,0,1,1,nil,e,tp,tc,tt)
tc=g1:GetFirst()
end
if tt==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif tt==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tt==3 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
elseif tt==4 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,Group.FromCards(c))
if #g1>0 then
cm.reop(e,tp,g1:GetFirst(),1,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+c)
if #g2>0 then
cm.reop(e,tp,g2:GetFirst(),1,LOCATION_DECK)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=Duel.SelectMatchingCard(tp,cm.spfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+g2+c)
if #g3>0 then
cm.reop(e,tp,g3:GetFirst(),3,LOCATION_DECK)
end
end
end
end
end
\ No newline at end of file
--天外之灾 赤衣虿
local m=12001503
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12001501,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.grace(g)
if not g then return false end
local race=0
local tc=g:GetFirst()
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
return race
end
function cm.gatt(g)
if not g then return false end
local att=0
local tc=g:GetFirst()
while tc do
att=att|tc:GetAttribute()
tc=g:GetNext()
end
return race
end
function cm.spfilter1(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter2(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter3(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and not c:IsRace(race) and not c:IsAttribute(att)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,Group.FromCards(c)) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.thfilter3(c,e,tp,tc,tt)
local race=tc:GetRace()
local att=tc:GetAttribute()
return not c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsAttribute(att) and (tt==1 and c:IsAbleToRemove() or tt==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or tt==3 and c:IsAbleToHand() or tt==4 and c:IsAbleToGrave() )
end
function cm.reop(e,tp,tc,tt,loc)
if Duel.IsPlayerAffectedByEffect(tp,12001500) and Duel.IsExistingMatchingCard(cm.thfilter3,tp,loc,0,1,nil,e,tp,tc,tt) and Duel.SelectYesNo(tp,aux.Stringid(12001500,1)) then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,loc,0,1,1,nil,e,tp,tc,tt)
tc=g1:GetFirst()
end
if tt==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif tt==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tt==3 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
elseif tt==4 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,Group.FromCards(c))
if #g1>0 then
cm.reop(e,tp,g1:GetFirst(),1,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+c)
if #g2>0 then
cm.reop(e,tp,g2:GetFirst(),1,LOCATION_DECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=Duel.SelectMatchingCard(tp,cm.spfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+g2+c)
if #g3>0 then
cm.reop(e,tp,g3:GetFirst(),4,LOCATION_DECK)
end
end
end
end
\ No newline at end of file
--天外之灾 白丝蛭
local m=12001504
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12001501,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.grace(g)
if not g then return false end
local race=0
local tc=g:GetFirst()
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
return race
end
function cm.gatt(g)
if not g then return false end
local att=0
local tc=g:GetFirst()
while tc do
att=att|tc:GetAttribute()
tc=g:GetNext()
end
return race
end
function cm.spfilter1(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter2(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter3(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsRace(race) and not c:IsAttribute(att)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,Group.FromCards(c)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_REMOVED)
end
function cm.thfilter3(c,e,tp,tc,tt)
local race=tc:GetRace()
local att=tc:GetAttribute()
return not c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsAttribute(att) and (tt==1 and c:IsAbleToRemove() or tt==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or tt==3 and c:IsAbleToHand() or tt==4 and c:IsAbleToGrave() )
end
function cm.reop(e,tp,tc,tt,loc)
if Duel.IsPlayerAffectedByEffect(tp,12001500) and Duel.IsExistingMatchingCard(cm.thfilter3,tp,loc,0,1,nil,e,tp,tc,tt) and Duel.SelectYesNo(tp,aux.Stringid(12001500,1)) then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,loc,0,1,1,nil,e,tp,tc,tt)
tc=g1:GetFirst()
end
if tt==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif tt==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tt==3 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
elseif tt==4 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,Group.FromCards(c))
if #g1>0 then
cm.reop(e,tp,g1:GetFirst(),1,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+c)
if #g2>0 then
cm.reop(e,tp,g2:GetFirst(),1,LOCATION_DECK)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g3=Duel.SelectMatchingCard(tp,cm.spfilter3,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,g1+g2+c)
if #g3>0 then
cm.reop(e,tp,g3:GetFirst(),2,LOCATION_REMOVED)
end
end
end
end
\ No newline at end of file
--天灾少女 零
local m=12001508
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
aux.AddCodeList(c,68468459)
--special summon self
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.sspcon)
c:RegisterEffect(e1)
--special summon other monsters
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.spcon)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.sspcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.thfilter(c)
return c:IsCode(12001500) and c:IsAbleToRemove()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--天外之灾龙 终结
local m=12001510
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.sprcon)
e1:SetTarget(cm.sprtg)
e1:SetOperation(cm.sprop)
c:RegisterEffect(e1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.sprfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsAbleToDeckAsCost() and c:IsType(TYPE_MONSTER)
end
function cm.fselect(g,tp)
return Duel.GetMZoneCount(tp,g)>0 and g:GetClassCount(Card.GetAttribute)==#g and g:GetClassCount(Card.GetRace)==#g
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,nil)
return rg:CheckSubGroup(cm.fselect,3,3,tp)
end
function cm.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=rg:SelectSubGroup(tp,cm.fselect,true,3,3,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoDeck(g,nil,2,REASON_COST)
g:DeleteGroup()
end
function cm.filter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,cm.filter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(m,4))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e2:SetCode(EFFECT_CANNOT_DRAW)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetTargetRange(1,1)
c:RegisterEffect(e2)
end
function cm.searchfilter(c)
return c:IsSetCard(0x6fb9) and c:IsAbleToHand() and c:IsFaceup()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.searchfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function cm.dfilter(c,att)
return c:IsAttribute(att) and c:IsFaceup()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.searchfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local att=g:GetFirst():GetAttribute()
local mg=Duel.GetMatchingGroup(cm.dfilter,tp,0,LOCATION_MZONE,nil,att)
if #mg>0 then
if Duel.Destroy(mg,REASON_EFFECT)==0 then Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) end
else
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--天外之灾龙 降临
local m=12001511
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.sprcon)
e1:SetTarget(cm.sprtg)
e1:SetOperation(cm.sprop)
c:RegisterEffect(e1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12001510,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.sprfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsAbleToDeckAsCost() and c:IsType(TYPE_MONSTER)
end
function cm.fselect(g,tp)
return Duel.GetMZoneCount(tp,g)>0 and g:GetClassCount(Card.GetAttribute)==#g and g:GetClassCount(Card.GetRace)==#g
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,nil)
return rg:CheckSubGroup(cm.fselect,3,3,tp)
end
function cm.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=rg:SelectSubGroup(tp,cm.fselect,true,3,3,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoDeck(g,nil,2,REASON_COST)
g:DeleteGroup()
end
function cm.filter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,cm.filter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(m,4))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e2:SetCode(EFFECT_CANNOT_DRAW)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetTargetRange(1,1)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.rfilter(c,att)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and c:IsAttribute(att)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local att=re:GetHandler():GetAttribute()
if chk==0 then return Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_DECK,0,1,nil,att) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.thfilter3(c,e,tp,tc,tt)
local race=tc:GetRace()
local att=tc:GetAttribute()
return not c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsAttribute(att) and (tt==1 and c:IsAbleToRemove() or tt==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or tt==3 and c:IsAbleToHand() or tt==4 and c:IsAbleToGrave() )
end
function cm.reop(e,tp,tc,tt,loc)
if Duel.IsPlayerAffectedByEffect(tp,12001500) and Duel.IsExistingMatchingCard(cm.thfilter3,tp,loc,0,1,nil,e,tp,tc,tt) and Duel.SelectYesNo(tp,aux.Stringid(12001500,1)) then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,loc,0,1,1,nil,e,tp,tc,tt)
tc=g1:GetFirst()
end
if tt==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif tt==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tt==3 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
elseif tt==4 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local att=re:GetHandler():GetAttribute()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.rfilter,tp,LOCATION_DECK,0,1,1,nil,att)
if #g1>0 then
cm.reop(e,tp,g1:GetFirst(),1,LOCATION_DECK)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,att))
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
--天外之灾神 混沌的零形
local m=12001515
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x6fb9),3,true)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.sprcon)
e2:SetOperation(cm.sprop)
c:RegisterEffect(e2)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(cm.desreptg)
e2:SetValue(cm.desrepval)
e2:SetOperation(cm.desrepop)
c:RegisterEffect(e2)
end
function cm.sprfilter1(c,sc,tp)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.IsExistingMatchingCard(cm.sprfilter2,tp,LOCATION_MZONE,0,1,nil,tp,sc,c)
end
function cm.sprfilter2(c,tp,sc,tc)
return c:IsSetCard(0x6fb9) and c:IsLevel(11) and c:IsAbleToRemoveAsCost() and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and c:GetRace()~=tc:GetRace() and c:GetAttribute()~=tc:GetAttribute()
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.sprfilter1,tp,LOCATION_HAND,0,1,nil,c,tp)
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.sprfilter1,tp,LOCATION_HAND,0,1,1,nil,c,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.sprfilter2,tp,LOCATION_MZONE,0,1,1,nil,tp,c,g1:GetFirst())
g1:Merge(g2)
c:SetMaterial(g1)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function cm.filter(c)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,cm.filter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.spfilter(c,e,tp)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local att=g:GetFirst();GetAttribute()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,1)
e1:SetTarget(function()
return c:IsAttribute(att)
end)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,2,nil) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function cm.desrepval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer())
end
function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.Hint(HINT_CARD,0,m)
end
--天灾蠢动
local m=12001520
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.IsPlayerCanRemove(tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.grace(g)
if not g then return false end
local race=0
local tc=g:GetFirst()
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
return race
end
function cm.gatt(g)
if not g then return false end
local att=0
local tc=g:GetFirst()
while tc do
att=att|tc:GetAttribute()
tc=g:GetNext()
end
return race
end
function cm.spfilter1(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter3(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsRace(race) and not c:IsAttribute(att)
end
function cm.thfilter3(c,e,tp,tc,tt)
local race=tc:GetRace()
local att=tc:GetAttribute()
return not c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsAttribute(att) and (tt==1 and c:IsAbleToRemove() or tt==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or tt==3 and c:IsAbleToHand() or tt==4 and c:IsAbleToGrave() )
end
function cm.reop(e,tp,tc,tt,loc)
if Duel.IsPlayerAffectedByEffect(tp,12001500) and Duel.IsExistingMatchingCard(cm.thfilter3,tp,loc,0,1,nil,e,tp,tc,tt) and Duel.SelectYesNo(tp,aux.Stringid(12001500,1)) then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,loc,0,1,1,nil,e,tp,tc,tt)
tc=g1:GetFirst()
end
if tt==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif tt==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tt==3 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
elseif tt==4 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 or not Duel.IsPlayerCanRemove(tp) then return end
local g=Duel.GetDecktopGroup(tp,1)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 and g:GetFirst():IsType(TYPE_MONSTER) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp,g)
if #g1>0 then
cm.reop(e,tp,g1:GetFirst(),1,LOCATION_DECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=Duel.SelectMatchingCard(tp,cm.spfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+g)
if #g3>0 then
cm.reop(e,tp,g3:GetFirst(),3,LOCATION_DECK)
end
end
end
end
\ No newline at end of file
--天灾接触
local m=12001521
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.grace(g)
if not g then return false end
local race=0
local tc=g:GetFirst()
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
return race
end
function cm.gatt(g)
if not g then return false end
local att=0
local tc=g:GetFirst()
while tc do
att=att|tc:GetAttribute()
tc=g:GetNext()
end
return race
end
function cm.spfilter1(c,e,tp)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,Group.FromCards(c))
end
function cm.spfilter2(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsRace(race) and not c:IsAttribute(att) and Duel.IsExistingMatchingCard(cm.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,g+c)
end
function cm.spfilter3(c,e,tp,g)
local att=cm.gatt(g)
local race=cm.grace(g)
return c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsRace(race) and not c:IsAttribute(att)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thfilter3(c,e,tp,tc,tt)
local race=tc:GetRace()
local att=tc:GetAttribute()
return not c:IsSetCard(0x6fb9) and c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsAttribute(att) and (tt==1 and c:IsAbleToRemove() or tt==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or tt==3 and c:IsAbleToHand() or tt==4 and c:IsAbleToGrave() )
end
function cm.reop(e,tp,tc,tt,loc)
if Duel.IsPlayerAffectedByEffect(tp,12001500) and Duel.IsExistingMatchingCard(cm.thfilter3,tp,loc,0,1,nil,e,tp,tc,tt) and Duel.SelectYesNo(tp,aux.Stringid(12001500,1)) then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,loc,0,1,1,nil,e,tp,tc,tt)
tc=g1:GetFirst()
end
if tt==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif tt==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tt==3 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
elseif tt==4 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g1>0 then
cm.reop(e,tp,g1:GetFirst(),1,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1)
if #g2>0 then
cm.reop(e,tp,g2:GetFirst(),1,LOCATION_DECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=Duel.SelectMatchingCard(tp,cm.spfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1+g2)
if #g3>0 then
cm.reop(e,tp,g3:GetFirst(),3,LOCATION_DECK)
end
end
end
end
\ No newline at end of file
--天灾融合
local m=12001522
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.gcheck(sg)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=1
end
function cm.filter0(c)
return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function cm.filter1(c,e)
return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function cm.gcheck(sg)
return sg:GetClassCount(Card.GetRace)==#sg and sg:GetClassCount(Card.GetAttribute)==#sg
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_THUNDER+RACE_AQUA+RACE_ROCK+RACE_PYRO) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
Auxiliary.GCheckAdditional=cm.gcheck
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
Auxiliary.GCheckAdditional=nil
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(cm.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)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter1),tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
Auxiliary.GCheckAdditional=cm.gcheck
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
Auxiliary.GCheckAdditional=nil
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)
if mat:IsExists(Card.IsFacedown,1,nil) then
local cg=mat:Filter(Card.IsFacedown,nil)
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
\ No newline at end of file
......@@ -56,12 +56,6 @@ function c12005012.matfilter(c)
return c:IsSetCard(0xfb0) and c:IsReleasable() and c:IsFaceup()
end
function c12005012.thop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_HAND)
e1:SetTargetRange(0,LOCATION_DECK)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
......@@ -3,7 +3,7 @@ function c12013001.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12013001,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,12013001)
......@@ -28,19 +28,20 @@ function c12013001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c12013001.filter(c)
return c:IsSetCard(0xfb6) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c12013001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12013001.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c12013001.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12013001.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local ct=Duel.Draw(p,d,REASON_EFFECT)
if ct~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function c12013001.reccon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -91,7 +91,7 @@ end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToRemove),tp,0,LOCATION_GRAVE,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function cm.retreg(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -59,7 +59,7 @@ function cm.remop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.thfilter(c)
return c:IsAbleToHand()
return c:IsAbleToHand() and c:IsSetCard(0x6fa6)
end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
......
......@@ -37,10 +37,20 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
end
end
unction cm.splimit(e,c)
return not c:IsAttackBelow(1500)
end
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT) and c:IsCanTurnSet()
end
......
......@@ -40,7 +40,7 @@ function c12030008.initial_effect(c)
end
function c12030008.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ( Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil) or Duel.GetTurnPlayer()==tp ) and re:GetHandler():GetLocation()==LOCATION_GRAVE
return ( Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil) or Duel.GetTurnPlayer()==tp ) and re:GetHandler():GetLocation()==LOCATION_GRAVE and Duel.GetCurrentChain()>=3
end
function c12030008.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -25,12 +25,12 @@ function c12037000.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_TO_HAND)
e3:SetCode(EFFECT_CANNOT_DRAW)
e3:SetTargetRange(1,1)
e3:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK))
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c12037000.con3)
c:RegisterEffect(e3)
--
end
--
......
......@@ -39,6 +39,17 @@ function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND,0,1,63,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST)
local tc=g:GetFirst()
while tc do
if tc:IsLocation(LOCATION_GRAVE) and not tc:IsSetCard(0x1fb5) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
tc=g:GetNext()
end
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
--幻梦础 阿撒托斯
local m=12044073
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--summon/spsummon cost
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_COST)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetCost(cm.spcost)
e0:SetOperation(cm.costop)
c:RegisterEffect(e0)
--target
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TODECK)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--special summon proc
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_DECK)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.spop)
e2:SetValue(1)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetCondition(cm.actcon)
e4:SetOperation(cm.actop)
e4:SetLabelObject(e2)
c:RegisterEffect(e4)
--to hand
local e22=Effect.CreateEffect(c)
e22:SetDescription(aux.Stringid(m,2))
e22:SetCategory(CATEGORY_TODECK)
e22:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e22:SetProperty(EFFECT_FLAG_DELAY)
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
e22:SetRange(LOCATION_MZONE)
e22:SetTarget(cm.tdtg)
e22:SetOperation(cm.tdop)
c:RegisterEffect(e22)
local e3=e22:Clone()
e3:SetCode(EVENT_FLIP)
c:RegisterEffect(e3)
end
function cm.spcost(e,c,tp)
return Duel.GetFlagEffect(tp,m)==0 or not c:IsLocation(LOCATION_DECK)
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsLocation(LOCATION_DECK) then
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
end
function cm.thfilter1(c)
return c:IsSetCard(0x8fb5) and c:IsFaceup()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_DECK,0,11,nil)
end
function cm.rmfilter(c)
return c:IsFacedown() and c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_DECK)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_DECK,0,nil)
if not g then return end
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,tp,2,REASON_EFFECT)
c:ReverseInDeck()
Duel.ShuffleDeck(tp)
end
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return c:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():CompleteProcedure()
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
return re==te
end
function cm.actfilter(c,tp)
return c:IsCode(12044075) and c:GetActivateEffect():IsActivatable(tp)
end
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SendtoDeck(c,2,nil,REASON_EFFECT)
local g=Duel.GetMatchingGroup(cm.actfilter,tp,LOCATION_DECK,0,nil,tp)
if g:GetCount()>0 then
tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function cm.filter(c)
return c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if not g then return end
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
end
end
\ No newline at end of file
--虚妄之诺
local m=12044075
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
aux.AddCodeList(c,12044073)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.rstg)
e1:SetOperation(cm.rsop)
c:RegisterEffect(e1)
--todeck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCondition(cm.spcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_RITUAL) and c:IsFaceup()
end
function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_equal,chk)
if bit.band(c:GetType(),0x81)~=0x81 or (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then
mg:Merge(m2)
end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
local lv=level_function(c)
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(c,lv,greater_or_equal)
local res=mg:CheckSubGroup(Auxiliary.RitualCheck,1,lv,tp,c,lv,greater_or_equal)
Auxiliary.GCheckAdditional=nil
return res
end
function cm.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg1=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(cm.RitualUltimateFilter,tp,LOCATION_DECK,0,1,nil,cm.filter,e,tp,mg1,nil,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.RitualUltimateFilter,tp,LOCATION_DECK,0,1,1,nil,cm.filter,e,tp,mg1,nil,Card.GetLevel,"Greater")
local tc=g: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,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
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()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SINGLE_RANGE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(cm.imcon)
e1:SetValue(cm.efilter)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.imcon(e)
return not Duel.IsExistingMatchingCard(Card.IsFacedown,e:GetHandlerPlayer(),LOCATION_DECK,0,1,nil)
end
function cm.cfilter(c)
return c:IsPreviousSetCard(0x8fb5) and c:IsLevelAbove(8) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_REMOVED)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_REMOVED,LOCATION_REMOVED)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
\ No newline at end of file
--两人一体 斯伊
local m=12047030
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--change name
aux.EnableChangeCode(c,12047000,LOCATION_MZONE+LOCATION_GRAVE)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.cfilter(c,tp)
return c:GetSummonPlayer()==1-tp
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function cm.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3fa8) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_GRAVE,0,nil)
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--伊斯&斯伊 ~Alone With You~
local m=12047031
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,12047000,12047000,true,true)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.negtg)
e1:SetOperation(cm.negop)
c:RegisterEffect(e1)
--to grave
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_TO_GRAVE)
e0:SetOperation(cm.regop)
c:RegisterEffect(e0)
--to hand/spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return c:IsSetCard(0x3fa8) and c:IsAbleToHand()
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return ep==1-tp and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=11 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local fid=e:GetHandler():GetFieldID()
if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)<11 then return end
local g=Duel.GetDecktopGroup(1-tp,11)
if Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local og=Duel.GetOperatedGroup()
e:GetLabelObject():Merge(og)
for tc in aux.Next(og) do
tc:RegisterFlagEffect(m,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,fid)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetLabelObject(og)
e2:SetLabel(fid)
e2:SetCondition(cm.retcon)
e2:SetOperation(cm.retop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function cm.retfilter(c,fid)
return c:GetFlagEffectLabel(m)==fid
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(cm.retfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(cm.retfilter,nil,e:GetLabel())
g:DeleteGroup()
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetOperation(cm.disop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp then return end
Duel.Hint(HINT_CARD,0,m)
Duel.NegateEffect(ev)
end
\ No newline at end of file
......@@ -7,15 +7,6 @@ cm.named_with_IDA=true
function c12051021.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(c12051021.filter),4,4)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c12051021.imcon)
e3:SetValue(c12051021.efilter)
c:RegisterEffect(e3)
local e31=Effect.CreateEffect(c)
e31:SetCategory(CATEGORY_SPECIAL_SUMMON)
e31:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
......@@ -37,6 +28,16 @@ function c12051021.initial_effect(c)
e1:SetTarget(c12051021.destg)
e1:SetOperation(c12051021.desop)
c:RegisterEffect(e1)
--cannot target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetCondition(c12051021.imcon)
e4:SetValue(c12051021.efilter)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
end
function c12051021.imcon(e)
return e:GetHandler():GetSequence()>4
......
......@@ -8,6 +8,13 @@ function c12051023.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c12051023.mfilter,1,1)
--XYZ SUM
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.linklimit)
c:RegisterEffect(e0)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12051023,0))
......
......@@ -5,7 +5,7 @@ Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xafbc),aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_DARK),false)
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xafbc),aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),false)
--special summon other monsters
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
......
......@@ -41,7 +41,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if Duel.GetFlagEffect(tp,m)>9 then
--[[if Duel.GetFlagEffect(tp,m)>9 then
local c=e:GetHandler()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
......@@ -51,7 +51,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
e3:SetValue(cm.efilter)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
end
end]]--
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
......
--同心协唱之歌 罗洛涅萝尔
local m=12087054
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
cm.named_with_RRNRU=true
function cm.initial_effect(c)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(cm.reop)
e2:SetCountLimit(1,m+100)
c:RegisterEffect(e2)
local e1=e2:Clone()
e1:SetCode(EVENT_FLIP)
c:RegisterEffect(e1)
--set
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(12087053,3))
e6:SetCategory(CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_PHASE+PHASE_END)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1)
e6:SetTarget(cm.settg)
e6:SetOperation(cm.setop)
c:RegisterEffect(e6)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
if Duel.GetCurrentPhase()<=PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY,2)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
end
Duel.RegisterEffect(e1,tp)
end
function cm.spfilter(c,e,tp)
return srre.check_set_RRNRU(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN)
if c:IsCanTurnSet() and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.ChangePosition(c,POS_FACEUP_ATTACK)
end
end
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_SZONE,0,1,nil) end
end
function cm.filter(c)
return srre.check_set_RRNRUS(c) and c:IsFacedown() and not c:IsForbidden()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(12087050,1))
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_SZONE,0,1,1,nil):GetFirst()
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
tc:CancelToGrave(false)
tc:CreateEffectRelation(e)
if tc and srre.check_set_RRNRUS(tc) and tc.wteffect then
tc.wteffect(e,tp,eg,ep,ev,re,r,rp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(cm.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=c:IsCanTurnSet()
local b2=c:IsAbleToHand()
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local b1=c:IsCanTurnSet()
local b2=c:IsAbleToHand()
local op=3
if b1 and b2 then
if Duel.SelectYesNo(tp,aux.Stringid(12087050,5)) then op=0 else op=1 end
elseif b1 then op=1
elseif b2 then op=0
end
if op==0 then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
if op==1 then
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
end
end
\ No newline at end of file
......@@ -36,6 +36,9 @@ function c12812006.initial_effect(c)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--
cm.self_summon_effect=e3
end
function cm.psplimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xa73) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
......
......@@ -38,7 +38,6 @@ function c12812010.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.tntg)
e4:SetOperation(cm.tnop)
c:RegisterEffect(e4)
......
......@@ -14,6 +14,7 @@ function cm.thfilter(c)
end
function cm.thop(e,tp)
if rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,{}) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -15,14 +15,11 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.sptg1)
e2:SetOperation(cm.spop1)
c:RegisterEffect(e2)
......@@ -55,7 +52,7 @@ function cm.check(c,e,tp)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_GRAVE,0,1,e:GetHandler()) then return end
......
--恶梦启示录
if not pcall(function() require("expansions/script/c33301000") end) then require("script/c33301000") end
local m=33330400
local cm=_G["c"..m]
if not rsv.Nightmare then
rsv.Nightmare={}
rsnm=rsv.Nightmare
function rsnm.SummonFun(c,code,type2,isgrave,istograve)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e0)
if type2 then
local e1=rscf.SetSpecialSummonProduce(c,LOCATION_HAND,rsnm.spcon2,rsnm.spop2)
local lab=not isgrave and LOCATION_ONFIELD or LOCATION_GRAVE
local val=not istograve and 0 or 1
e1:SetLabel(lab)
e1:SetValue(val)
return e1
end
local e1=rscf.SetSpecialSummonProduce(c,LOCATION_HAND,rsnm.spcon,rsnm.spop)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,rsnm.counterfilter)
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SPSUMMON_COST)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCost(rsnm.limcost)
e2:SetOperation(rsnm.limop)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1)
e2:SetCost(cm.cost)
e2:SetCondition(cm.con)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
local e3=rsef.STO(c,EVENT_TO_GRAVE,{m,0},{1,code},"se,th","de,dsp",rsnm.thcon,nil,rsop.target(rsnm.thfilter,"th",LOCATION_DECK),rsnm.thop)
return e1,e2,e3
end
function rsnm.counterfilter(c)
if c:GetSummonLocation()&LOCATION_HAND+LOCATION_DECK ==0 then return true end
return c:IsSetCard(0x4552)
end
function rsnm.spcfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeckAsCost() and Duel.GetMZoneCount(tp,c,tp)>0
end
function rsnm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(rsnm.spcfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp)
end
function rsnm.spop(e,tp)
rshint.Select(tp,"td")
local tg=Duel.SelectMatchingCard(tp,rsnm.spcfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp)
Duel.SendtoDeck(tg,nil,2,REASON_COST)
end
function rsnm.spcfilter2(c,e)
local val=e:GetValue()
return c:IsSetCard(0x4552) and ((val==0 and c:IsAbleToDeckOrExtraAsCost()) or (val==1 and c:IsAbleToGraveAsCost()))
end
function rsnm.spcfilter3(g,tp,loc)
return Duel.GetMZoneCount(tp,g,tp)>0 and ((loc==LOCATION_ONFIELD and #g==1) or (loc==LOCATION_GRAVE and #g==2))
end
function rsnm.spcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(rsnm.spcfilter2,tp,LOCATION_HAND+e:GetLabel(),0,c,e)
return g:CheckSubGroup(rsnm.spcfilter3,1,2,tp,e:GetLabel())
end
function rsnm.cffilter(c)
return c:IsFacedown() or c:IsLocation(LOCATION_HAND)
end
function rsnm.spop2(e,tp)
local g=Duel.GetMatchingGroup(rsnm.spcfilter2,tp,LOCATION_HAND+e:GetLabel(),0,e:GetHandler(),e)
rshint.Select(tp,"td")
local tg=g:SelectSubGroup(tp,rsnm.spcfilter3,false,1,2,tp,e:GetLabel())
local cg=tg:Filter(rsnm.cffilter,nil)
if #cg>0 then
Duel.ConfirmCards(1-tp,cg)
end
if e:GetValue()==0 then
Duel.SendtoDeck(tg,nil,2,REASON_COST)
else
Duel.SendtoGrave(tg,REASON_COST)
end
end
function rsnm.limcost(e,c,tp)
return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0
end
function rsnm.limop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(rsnm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function rsnm.splimit(e,c)
if c:IsLocation(LOCATION_HAND+LOCATION_DECK) then return not c:IsSetCard(0x4552)
else return false
end
end
function rsnm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetPreviousControler()==tp
end
function rsnm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x4552)
end
function rsnm.thop(e,tp)
rshint.Select(tp,"th")
local tg=Duel.SelectMatchingCard(tp,rsnm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function rsnm.FilpFun(c,code,cate,con,tg,op,ctlimit)
local limit=ctlimit and {1,code} or nil
local e1=rsef.STO(c,EVENT_FLIP,{code,0},limit,cate,"de",con,nil,tg,op)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
if not c:IsStatus(STATUS_COPYING_EFFECT) then
local mt=getmetatable(c)
mt.flip_effect=e1
end
return e1
end
function rsnm.FilpFun2(c,code,cate,con,tg,op)
local e1=rsef.STO(c,EVENT_FLIP,{code,0},nil,cate,"de,dsp",con,nil,tg,op)
if not c:IsStatus(STATUS_COPYING_EFFECT) then
local mt=getmetatable(c)
mt.flip_effect=e1
end
local e2=rsef.RegisterClone(c,e1,"code",EVENT_SPSUMMON_SUCCESS)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
return e1,e2
end
--------------
end
--------------
if cm then
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.QO(c,EVENT_CHAINING,{m,0},1,nil,nil,LOCATION_SZONE,cm.con,rscost.reglabel(100),cm.tg,cm.op)
local e3=rsef.FTO(c,EVENT_ATTACK_ANNOUNCE,{m,1},nil,"pos",nil,LOCATION_SZONE,cm.poscon,nil,rsop.target(cm.posfilter,"pos",LOCATION_MZONE,0,true),cm.posop)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetCondition(cm.poscon)
e3:SetTarget(cm.postg)
e3:SetOperation(cm.posop)
c:RegisterEffect(e3)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp
......@@ -148,7 +40,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil,e,tp,eg,ep,ev,re,r,rp)
end
e:SetLabel(0)
rshint.Select(tp,"pos")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local tc=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_MZONE,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp):GetFirst()
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,true)
e:SetLabelObject(tc)
......@@ -157,9 +49,14 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=aux.ExceptThisCard(e)
if not c then return end
local tc=e:GetLabelObject()
if not tc:IsSetCard(0x4552) then return end
local e1=rsef.SV_IMMUNE_EFFECT(c,cm.val,nil,rsreset.est_pend)
if not tc:IsSetCard(0x6552) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_SZONE)
e1:SetValue(cm.val)
e1:SetOwnerPlayer(tp)
c:RegisterEffect(e1,true)
local te=tc.flip_effect
if not te then return end
local tg=te:GetTarget()
......@@ -175,7 +72,12 @@ function cm.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function cm.posfilter(c)
return c:IsFaceup() and c:IsSetCard(0x4552)
return c:IsFaceup() and c:IsSetCard(0x6552)
end
function cm.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(cm.posfilter,tp,LOCATION_MZONE,0,1,nil,e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.posop(e,tp)
local g=Duel.GetMatchingGroup(cm.posfilter,tp,LOCATION_MZONE,0,nil)
......@@ -183,7 +85,7 @@ function cm.posop(e,tp)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
local sg=Duel.GetMatchingGroup(cm.sfilter,tp,LOCATION_MZONE,0,nil)
Duel.ShuffleSetCard(sg)
rshint.Select(1-tp,HINTMSG_OPPO)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_OPPO)
local ac=Duel.SelectMatchingCard(1-tp,nil,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
Duel.ChangeAttackTarget(ac)
end
......@@ -191,5 +93,3 @@ end
function cm.sfilter(c)
return c:IsFacedown() and c:GetSequence()<5
end
--------------
end
--恶梦启示 偏见
if not pcall(function() require("expansions/script/c33330400") end) then require("script/c33330400") end
local m=33330401
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e3=rsnm.SummonFun(c,m)
local e4=rsnm.FilpFun(c,m,"atk",cm.con,nil,cm.op)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_FLIP)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.tg)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
local mt=getmetatable(c)
mt.flip_effect=e4
end
function cm.con(e,tp)
return Duel.IsExistingMatchingCard(cm.getcount,tp,0,LOCATION_MZONE,1,nil,true)
function cm.spcfilter(c,tp)
return c:IsFaceup() and c:GetSequence()<5
end
function cm.op(e,tp)
local g=Duel.GetMatchingGroup(cm.getcount,tp,0,LOCATION_MZONE,nil)
if #g<=0 then return end
for tc in aux.Next(g) do
local atk=cm.getcount(tc)
local e1=rsef.SV_SET({e:GetHandler(),tc},"atkf",atk*200,nil,rsreset.est)
function cm.spcon(e,tp)
local c=e:GetHandler()
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)
end
end
function cm.getcount(c,isreturn)
local ct=0
if c:IsLevelAbove(1) then ct=c:GetLevel()
elseif c:IsRankAbove(1) then ct=c:GetRank()
elseif c:IsLinkAbove(1) then ct=c:GetLink()
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetPreviousControler()==tp
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x6552)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.op(e,tp)
local race=Duel.AnnounceRace(tp,1,0x1ffffff)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(race)
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_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetLabel(Duel.GetTurnCount())
e2:SetCondition(cm.spcone)
e2:SetOperation(cm.spope)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.spfiltere(c,e,tp)
return c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function cm.spcone(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==e:GetLabel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfiltere,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
function cm.spope(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfiltere),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
if isreturn then return ct>0 end
return ct
end
\ No newline at end of file
--恶梦启示 虚伪
if not pcall(function() require("expansions/script/c33330400") end) then require("script/c33330400") end
local m=33330402
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e3=rsnm.SummonFun(c,m)
local e4=rsnm.FilpFun(c,m,"eq",nil,rsop.target({cm.eqfilter,"eq",0,LOCATION_MZONE },{cm.cfilter,nil,LOCATION_MZONE }),cm.op)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_FLIP)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.tg)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
local mt=getmetatable(c)
mt.flip_effect=e4
end
function cm.spcfilter(c,tp)
return c:IsFaceup() and c:GetSequence()<5
end
function cm.spcon(e,tp)
local c=e:GetHandler()
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetPreviousControler()==tp
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x6552)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x4552) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
return c:IsFaceup() and c:IsSetCard(0x6552) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.eqfilter(c,e,tp)
return c:IsFaceup() and c:IsAbleToChangeControler() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.eqfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,0)
end
function cm.op(e,tp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,0,nil)
if #g<=0 then return end
rsof.SelectHint(tp,"eq")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tg=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,0,LOCATION_MZONE,1,1,nil,e,tp)
if #tg<=0 then return end
rsof.SelectHint(tp,HINTMSG_SELF)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local tg2=g:Select(tp,1,1,nil)
Duel.HintSelection(tg)
Duel.HintSelection(tg2)
local tc=tg:GetFirst()
local tc2=tg2:GetFirst()
if not rsop.eqop(e,tc,tc2) then return end
if not Duel.Equip(tp,tc,tc2) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc2)
e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1)
--update atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE)
......@@ -33,4 +114,7 @@ function cm.op(e,tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(tc:GetTextAttack())
tc:RegisterEffect(e1)
end
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
--恶梦启示 怀疑
if not pcall(function() require("expansions/script/c33330400") end) then require("script/c33330400") end
local m=33330403
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e3=rsnm.SummonFun(c,m)
local e4=rsnm.FilpFun(c,m,"rm",cm.con,nil,cm.op)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_FLIP)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.con)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
local mt=getmetatable(c)
mt.flip_effect=e4
end
function cm.spcfilter(c,tp)
return c:IsFaceup() and c:GetSequence()<5
end
function cm.spcon(e,tp)
local c=e:GetHandler()
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetPreviousControler()==tp
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x6552)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function cm.con(e,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
......@@ -15,15 +82,14 @@ function cm.op(e,tp)
local opt=Duel.AnnounceType(tp)
Duel.ConfirmDecktop(1-tp,1)
if (opt==0 and tc:IsType(TYPE_MONSTER)) or (opt==1 and tc:IsType(TYPE_SPELL)) or (opt==2 and tc:IsType(TYPE_TRAP)) then
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if #hg<=0 then return end
Duel.ConfirmCards(tp,hg)
if hg:IsExists(cm.rmfilter,1,nil,opt) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
rsof.SelectHint(tp,"rm")
local rg=hg:FilterSelect(tp,cm.rmfilter,1,2,nil,opt)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=hg:FilterSelect(tp,cm.rmfilter,1,1,nil,opt)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
Duel.ShuffleHand(1-tp)
end
end
function cm.rmfilter(c,opt)
......
--恶梦启示 抑郁
if not pcall(function() require("expansions/script/c33330400") end) then require("script/c33330400") end
local m=33330404
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e3=rsnm.SummonFun(c,m)
local e4=rsnm.FilpFun(c,m,"sp",nil,rsop.target(cm.spfilter,"sp",LOCATION_HAND+LOCATION_GRAVE ),cm.op,true)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_FLIP)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
local mt=getmetatable(c)
mt.flip_effect=e4
end
function cm.spcfilter(c,tp)
return c:IsFaceup() and c:GetSequence()<5
end
function cm.spcon(e,tp)
local c=e:GetHandler()
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetPreviousControler()==tp
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x6552)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x6552) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return c:IsFaceup() and not c:IsDisabled()
end
function cm.op(e,tp)
rshint.Select(tp,"sp")
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local c = e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
local tc=sg:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(-1000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
tc:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,4))
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetLabelObject(tc)
e2:SetCondition(cm.descon)
e2:SetOperation(cm.desop)
Duel.RegisterEffect(e2,tp)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(m)>0 then
return true
else
e:Reset()
return false
end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if tc:IsAttack(0) then
e:Reset()
return
end
Duel.Hint(HINT_CARD,0,m)
local preatk=tc:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if preatk~=0 and tc:IsAttack(0) then
Duel.Destroy(tc,REASON_EFFECT)
e:Reset()
end
end
\ No newline at end of file
--恶梦启示 绝望
if not pcall(function() require("expansions/script/c33330400") end) then require("script/c33330400") end
local m=33330405
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e3=rsnm.SummonFun(c,m)
local e4=rsnm.FilpFun(c,m,"pos,dr",cm.con,nil,cm.op,true)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_POSITION+CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_FLIP)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.con)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
local mt=getmetatable(c)
mt.flip_effect=e4
end
function cm.spcfilter(c,tp)
return c:IsFaceup() and c:GetSequence()<5
end
function cm.spcon(e,tp)
local c=e:GetHandler()
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetPreviousControler()==tp
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x6552)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function cm.con(e,tp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
......@@ -27,7 +94,7 @@ function cm.op(e,tp)
if #tg>0 then
local ft=Duel.GetLocationCount(i,LOCATION_SZONE)
local ct=math.min(#tg,ft)
rsof.SelectHint(i,{m,1})
Duel.Hint(HINT_SELECTMSG,i,aux.Stringid(m,1))
local sg=tg:Select(i,ct,ct,nil)
Duel.HintSelection(sg)
for tc in aux.Next(sg) do
......@@ -44,24 +111,7 @@ function cm.op(e,tp)
end
tg=Duel.GetMatchingGroup(Card.IsFaceup,i,LOCATION_MZONE,0,nil)
if #tg>0 then
--Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
Duel.Remove(tg,POS_FACEUP,REASON_RULE)
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(cm.flipcon)
e1:SetOperation(cm.flipop)
Duel.RegisterEffect(e1,tp)
end
function cm.flipcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_MZONE,1,nil)
end
function cm.flipop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil)
local ct=Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
Duel.Draw(1-tp,ct,REASON_EFFECT)
end
\ No newline at end of file
--恶梦启示 孤独
if not pcall(function() require("expansions/script/c33330400") end) then require("script/c33330400") end
local m=33330406
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e3=rsnm.SummonFun(c,m)
local e4=rsnm.FilpFun(c,m,nil,nil,nil,cm.op,true)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_FLIP)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.tg)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
local mt=getmetatable(c)
mt.flip_effect=e4
end
function cm.spcfilter(c,tp)
return c:IsFaceup() and c:GetSequence()<5
end
function cm.spcon(e,tp)
local c=e:GetHandler()
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetPreviousControler()==tp
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x6552)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function cm.spfiltere(c,e,tp)
return c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfiltere,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.cfilter(c)
return c:IsFacedown() or not c:IsCode(m)
return c:IsFaceup() and not c:IsCode(m)
end
function cm.op(e,tp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct==0 then return false end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
ct=1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfiltere),tp,LOCATION_DECK,0,1,ct,nil,e,tp)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,sg)
end
if Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) then return end
local turnp=Duel.GetTurnPlayer()
Duel.SkipPhase(turnp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,turnp)
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(m,3))
local rg = Duel.SelectMatchingCard(1-tp,nil,1-tp,LOCATION_MZONE,0,1,1,nil)
local g = Duel.GetMatchingGroup(Card.IsAbleToGrave,1-tp,LOCATION_MZONE,0,rg)
Duel.SendtoGrave(g,REASON_RULE)
end
--恶梦启示 卑劣
if not pcall(function() require("expansions/script/c33330400") end) then require("script/c33330400") end
local m=33330407
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e3=rsnm.SummonFun(c,m)
local e4=rsnm.FilpFun(c,m,"atk",nil,rsop.target(cm.cfilter,nil,0,LOCATION_MZONE),cm.op)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_FLIP)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.tg)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
local mt=getmetatable(c)
mt.flip_effect=e4
end
function cm.spcfilter(c,tp)
return c:IsFaceup() and c:GetSequence()<5
end
function cm.spcon(e,tp)
local c=e:GetHandler()
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetPreviousControler()==tp
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x6552)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsAttackAbove(1)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,g:GetCount(),0,0)
end
function cm.op(e,tp)
local c=e:GetHandler()
rsof.SelectHint(tp,HINTMSG_OPPO)
local tg=Duel.SelectMatchingCard(tp,cm.cfilter,tp,0,LOCATION_MZONE,1,1,nil)
if #tg<=0 then return end
Duel.HintSelection(tg)
local atk=tg:GetFirst():GetAttack()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e1=rsef.SV_UPDATE({c,tc},"atk",-atk,nil,rsreset.est_pend,"cd")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local rg = Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if rg:GetCount()>0 then
local rc=rg:GetFirst()
local atk=rc:GetAttack()
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--恶梦启示 诋毁
if not pcall(function() require("expansions/script/c33330400") end) then require("script/c33330400") end
local m=33330408
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e3=rsnm.SummonFun(c,m)
local e4=rsnm.FilpFun(c,m,"rm",nil,rsop.target(cm.rmfilter,"rm",0,LOCATION_GRAVE+LOCATION_EXTRA),cm.op,true)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_FLIP)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.tg)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
local mt=getmetatable(c)
mt.flip_effect=e4
end
function cm.spcfilter(c,tp)
return c:IsFaceup() and c:GetSequence()<5
end
function cm.spcon(e,tp)
local c=e:GetHandler()
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetPreviousControler()==tp
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x6552)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function cm.rmfilter(c)
return c:IsFaceup() and c:IsAbleToRemove()
return c:IsFaceup() and c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end
function cm.op(e,tp)
rsof.SelectHint(tp,"rm")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rmfilter),tp,0,LOCATION_GRAVE+LOCATION_EXTRA,1,1,nil):GetFirst()
if not tc or Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)<=0 or not tc:IsLocation(LOCATION_REMOVED) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_ACTIVATING)
e1:SetCountLimit(1)
e1:SetReset(rsreset.pend,2)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetCondition(cm.chcon)
e1:SetOperation(cm.chop)
e1:SetLabelObject(tc)
......
--恶梦启示 衰弱
if not pcall(function() require("expansions/script/c33330400") end) then require("script/c33330400") end
local m=33330409
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e3=rsnm.SummonFun(c,m)
local e4=rsnm.FilpFun(c,m,"dis",nil,rsop.target(aux.disfilter1,"dis",LOCATION_ONFIELD,LOCATION_ONFIELD),cm.op)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_FLIP)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.tg)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
local mt=getmetatable(c)
mt.flip_effect=e4
end
function cm.op(e,tp)
function cm.spcfilter(c,tp)
return c:IsFaceup() and c:GetSequence()<5
end
function cm.spcon(e,tp)
local c=e:GetHandler()
rsof.SelectHint(tp,"dis")
local tc=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
if not tc then return end
Duel.HintSelection(rsgf.Mix2(tc))
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1,e2=rsef.SV_LIMIT({c,tc},"dis,dise",nil,nil,rsreset.est)
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetPreviousControler()==tp
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x6552)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function cm.check(c)
return c:IsFaceup() and c:IsAbleToGrave()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g = Duel.GetMatchingGroup(cm.check,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0)
end
function cm.op(e,tp)
local g=Duel.GetMatchingGroup(cm.check,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local dice=Duel.TossDice(tp,1)
local tg=g:RandomSelect(tp,dice)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
\ No newline at end of file
--恶梦启示 怨恨
if not pcall(function() require("expansions/script/c33330400") end) then require("script/c33330400") end
local m=33330410
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--aux.AddLinkProcedure(c,cm.lfilter,2)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),2,2,cm.lcheck)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},nil,"de,dsp",nil,nil,rsop.target(cm.tfilter,nil,LOCATION_GRAVE+LOCATION_REMOVED,0,2),cm.op)
local e2=rsef.QO(c,nil,{m,1},{1,m+100},"se,th",nil,LOCATION_MZONE,nil,rscost.cost(cm.cfilter,{"pos",cm.fun},LOCATION_MZONE),rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_LEAVE_GRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.dcheck)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--cannot be target/indestructable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
......@@ -30,21 +51,34 @@ end
function cm.lcheck(g,lc)
return g:IsExists(Card.IsSetCard,1,nil,0x6552)
end
function cm.tfilter(c,e,tp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>1 and c:IsRace(RACE_FIEND) and c:IsFaceup()
end
function cm.indcon(e)
return e:GetHandler():GetLinkedGroupCount()>0
end
function cm.op(e,tp)
function cm.tfilter(g,tp)
local g1=g:Filter(Card.IsControler,nil,tp)
local g2=g:Filter(Card.IsControler,nil,1-tp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>=g1:GetCount() and Duel.GetLocationCount(1-tp,LOCATION_SZONE)>=g2:GetCount()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsType,1,nil,TYPE_MONSTER)
end
function cm.tfcheck(c)
return c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local dg=eg:Filter(cm.tfcheck,nil,TYPE_MONSTER)
if chk==0 then return dg:CheckSubGroup(cm.tfilter,1,2,tp) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,rg,1,0,0)
end
function cm.op(e,tp,eg)
local c=e:GetHandler()
rsof.SelectHint(tp,HINTMSG_SELF)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,2,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local dg=eg:Filter(cm.tfcheck,nil,TYPE_MONSTER)
local tg=dg:SelectSubGroup(tp,cm.tfilter,false,1,2,tp)
if #tg<=0 then return end
Duel.HintSelection(tg)
for tc in aux.Next(tg) do
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
if Duel.MoveToField(tc,tp,tc:GetControler(),LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -52,26 +86,57 @@ function cm.op(e,tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e2:SetValue(m)
tc:RegisterEffect(e2,true)
end
end
end
function cm.cfilter(c)
return (c:IsFacedown() and c:IsCanChangePosition()) or (c:IsFaceup() and c:IsCanTurnSet())
function cm.dcheck(e,tp)
local lg=e:GetHandler():GetLinkedGroup()
return lg:IsExists(cm.cfilter,1,nil)
end
function cm.fun(g,e,tp)
local tc=g:GetFirst()
if tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
else Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end
function cm.cfilter(c)
return ((c:IsFacedown() or c:IsPosition(POS_FACEUP_ATTACK)) and c:IsCanChangePosition()) or (c:IsPosition(POS_FACEUP_DEFENSE) and c:IsCanTurnSet())
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x6552)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp)
--rsof.SelectHint(tp,"th")
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
local lg=e:GetHandler():GetLinkedGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local tg=lg:FilterSelect(tp,cm.cfilter,1,1,nil)
if tg:GetCount()==0 then return end
local tc=tg:GetFirst()
local prepos=tc:GetPosition()
if tc:IsFaceup() then
if tc:IsPosition(POS_FACEUP_ATTACK) then
if c:IsCanTurnSet() then
Duel.SelectPosition(tp,tc,POS_FACEUP_DEFENSE|POS_FACEDOWN_DEFENSE)
else
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
end
else
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
else
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
end
local pos=tc:GetPosition()
if pos~=prepos then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
\ No newline at end of file
--恶梦启示 急躁
if not pcall(function() require("expansions/script/c33330400") end) then require("script/c33330400") end
local m=33330411
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsnm.SummonFun(c,m,true,false,true)
local e2,e3=rsnm.FilpFun2(c,m,"atk",nil,rsop.target2(cm.fun,{cm.posfilter,"pos",LOCATION_MZONE }),cm.op)
local e4=rsef.QO(c,nil,{m,1},{1,m},"sp",nil,LOCATION_MZONE,nil,cm.cost,rsop.target(cm.spfilter,"sp",LOCATION_HAND+LOCATION_GRAVE),cm.spop)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.spcon2)
e1:SetOperation(cm.spop2)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetTarget(cm.tg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
end
function cm.fun(g,e,tp)
Duel.SetChainLimit(cm.chlimit)
function cm.spcfilter2(c)
return c:IsSetCard(0x6552) and c:IsAbleToGraveAsCost()
end
function cm.chlimit(e,ep,tp)
return tp==ep
function cm.spcfilter3(g,tp)
return Duel.GetMZoneCount(tp,g,tp)>0
end
function cm.posfilter(c)
return c:IsDefensePos() and c:IsCanChangePosition()
function cm.spcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.spcfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c)
return g:CheckSubGroup(cm.spcfilter3,1,1,tp)
end
function cm.cfilter(c)
return c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsFaceup()
function cm.cffilter(c)
return c:IsFacedown() or c:IsLocation(LOCATION_HAND)
end
function cm.op(e,tp)
rshint.Select(tp,"pos")
local tc=Duel.SelectMatchingCard(tp,cm.posfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if not tc then return end
Duel.HintSelection(rsgf.Mix2(tc))
if Duel.ChangePosition(tc,POS_FACEUP_ATTACK)<=0 then return end
local ct=Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_ONFIELD,0,nil)
if ct<=0 or not Duel.SelectYesNo(tp,aux.Stringid(m,2)) then return end
Duel.BreakEffect()
local e1=rsef.SV_UPDATE({e:GetHandler(),tc},"atk",ct*500,nil,rsreset.est,"cd")
function cm.spop2(e,tp)
local g=Duel.GetMatchingGroup(cm.spcfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:SelectSubGroup(tp,cm.spcfilter3,false,1,1,tp)
local cg=tg:Filter(cm.cffilter,nil)
if #cg>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoGrave(tg,nil,2,REASON_COST)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttackTarget()
if chk==0 then return tc and tc:IsAttackAbove(1) end
e:SetLabelObject(tc)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=e:GetLabelObject()
if Duel.NegateAttack() and bc and bc:IsRelateToBattle() and bc:IsFaceup() and bc:IsAttackAbove(1) then
local fid=e:GetHandler():GetFieldID()
bc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(bc)
e1:SetCondition(cm.descon)
e1:SetOperation(cm.desop)
Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(0)
bc:RegisterEffect(e1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
e3:SetLabelObject(e2)
e3:SetOperation(cm.op2)
c:RegisterEffect(e3)
end
function cm.op3(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():Reset()
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(m)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
function cm.resfilter(c,e,tp)
return c:IsReleasable() and c:IsFaceup() and Duel.GetMZoneCount(tp,c,tp)>0
end
......@@ -41,9 +137,13 @@ end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x6552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.spop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
rshint.Select(tp,"sp")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then
Duel.ConfirmCards(1-tp,sg)
......
--恶梦启示 虚荣
if not pcall(function() require("expansions/script/c33330400") end) then require("script/c33330400") end
local m=33330412
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsnm.SummonFun(c,m,true,true)
local e2,e3=rsnm.FilpFun2(c,m,"atk",nil,rsop.target(Card.IsCanTurnSet,"pos",LOCATION_MZONE),cm.op)
local e4=rsef.STO(c,EVENT_TO_GRAVE,{m,1},{1,m},"sp","de,dsp",nil,nil,rsop.target(cm.spfilter,"sp",LOCATION_DECK),cm.spop)
--send to gy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m+100)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.op(e,tp)
function cm.check(c)
return c:IsFaceup() and c:IsSetCard(0x6552)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_MZONE,0,1,nil)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
rshint.Select(tp,"pos")
local tc=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if not tc or Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)<=0 then return end
local e1=rsef.FV_CANNOT_BE_TARGET({c,tp},"effect",aux.tgoval,aux.TargetBoolFunction(Card.IsFacedown),{LOCATION_MZONE,0},nil,rsreset.pend)
if chk==0 then return c:IsAbleToGrave() end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,c,1,tp,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
if c:IsLocation(LOCATION_GRAVE) then
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetLabel(Duel.GetTurnCount()+1)
e2:SetLabelObject(c)
e2:SetReset(RESET_PHASE+PHASE_END,1)
e2:SetCondition(cm.rmcon)
e2:SetOperation(cm.rmop)
Duel.RegisterEffect(e2,tp)
end
end
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(m)~=0 then
return tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
else
e:Reset()
return false
end
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.SpecialSummon(e:GetLabelObject(),0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x6552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and not c:IsCode(m)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
rshint.Select(tp,"sp")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then
Duel.ConfirmCards(1-tp,sg)
......
--咒念树
if not pcall(function() require("expansions/script/c33301000") end) then require("script/c33301000") end
local m=33330413
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),aux.FilterBoolFunction(Card.IsRace,RACE_PLANT),true)
rscf.SetSpecialSummonProduce(c,LOCATION_EXTRA,cm.con,cm.op)
local e1=rsef.QO(c,nil,{m,0},{1,m},"sp",nil,LOCATION_MZONE,nil,rscost.cost(cm.cfilter,"res",LOCATION_ONFIELD),rsop.target(cm.spfilter,"sp",LOCATION_GRAVE),cm.spop)
local e2=rsef.SV_IMMUNE_EFFECT(c,rsval.imes,rscon.excard(Card.IsFacedown))
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.con)
e0:SetOperation(cm.op)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.imcon)
e2:SetValue(cm.imval)
c:RegisterEffect(e2)
end
function cm.con(e,c)
if c==nil then return true end
......@@ -15,16 +41,25 @@ function cm.con(e,c)
return Duel.IsExistingMatchingCard(cm.resfilter,tp,LOCATION_SZONE,0,1,nil)
end
function cm.resfilter(c)
return c:GetOriginalType()&TYPE_MONSTER ~=0 and c:IsReleasable() and c:IsType(TYPE_TRAP)
return c:GetOriginalType()&TYPE_MONSTER ~=0 and c:IsReleasable()
end
function cm.op(e,tp)
rshint.Select(tp,"res")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.resfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.cfilter(c,e,tp)
return c:IsReleasable() and Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
......@@ -38,7 +73,7 @@ function cm.spop(e,tp)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
rshint.Select(tp,"sp")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then
Duel.ConfirmCards(1-tp,sg)
......@@ -47,3 +82,11 @@ end
function cm.splimit(e,c)
return not c:IsRace(RACE_FIEND)
end
function cm.imcon(e)
local c=e:GetHandler()
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,0,1,c)
end
function cm.imval(e,re)
return re:GetHandler()~=e:GetHandler()
end
\ No newline at end of file
......@@ -33,7 +33,8 @@ function c33400301.spfilter(c,e,tp)
end
function c33400301.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:GetControler()==tp and c33400301.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c33400301.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c33400301.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c33400301.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingTarget(c33400301.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) then return end
......
......@@ -116,7 +116,7 @@ function cm.thfilter2(c)
return (c:IsSetCard(0x9340) or c:IsCode(33400350)) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -113,7 +113,7 @@ function cm.thfilter2(c)
return (c:IsSetCard(0x9340) or c:IsCode(33400450)) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -131,7 +131,7 @@ function cm.thfilter2(c)
return (c:IsSetCard(0x9340) or c:IsCode(33400200)) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -105,7 +105,7 @@ function cm.thfilter2(c)
return (c:IsSetCard(0x9340) or c:IsCode(33400113)) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -104,7 +104,7 @@ function cm.thfilter2(c)
return (c:IsSetCard(0x9340) or c:IsCode(33400502)) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -110,7 +110,7 @@ function cm.thfilter2(c)
return (c:IsSetCard(0x9340) or c:IsCode(33401050)) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -108,7 +108,7 @@ function cm.thfilter2(c)
return (c:IsSetCard(0x9340) or c:IsCode(33400651)) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -113,7 +113,7 @@ function cm.thfilter2(c)
return (c:IsSetCard(0x9340) or c:IsCode(33400751)) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -86,7 +86,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=g1:GetFirst()
if g1:GetCount()>0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
local cg=tc:GetColumnGroup():Filter(Card.IsAbleToHand,nil)
cg:AddCard(tc)
if cg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
......@@ -113,7 +113,7 @@ function cm.thfilter2(c)
return (c:IsSetCard(0x9340) or c:IsCode(33400850,33400851)) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -115,7 +115,7 @@ function cm.thfilter2(c)
return (c:IsSetCard(0x9340) or c:IsCode(33400951)) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
......
Hata_no_Kokoro={} or Hata_no_Kokoro
Hnk = Hata_no_Kokoro
function Hata_no_Kokoro.eff2(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(Hata_no_Kokoro.recon)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetTarget(Hata_no_Kokoro.indestg)
c:RegisterEffect(e2)
end
function Hata_no_Kokoro.recon(e)
return e:GetHandler():IsFaceup()
end
function Hata_no_Kokoro.indestg(e,c,rp,r,re)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsLocation(LOCATION_SZONE) and c:GetEquipTarget()==e:GetHandler()
end
function Hata_no_Kokoro.eff3(c,id,loc)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_DESTROY)
e1:SetRange(LOCATION_REMOVED)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id-1000)
e1:SetCondition(Hata_no_Kokoro.spcon)
e1:SetTarget(Hata_no_Kokoro.sptg)
e1:SetOperation(Hata_no_Kokoro.spop(loc))
c:RegisterEffect(e1)
end
function Hata_no_Kokoro.defilter(c,tp)
return c:IsType(TYPE_EQUIP) and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp)
end
function Hata_no_Kokoro.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Hata_no_Kokoro.defilter,1,nil,tp)
end
function Hata_no_Kokoro.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_REMOVED)
end
function Hata_no_Kokoro.eqfilter(c,tc,tp)
if not c:IsType(TYPE_EQUIP) then return end
return c:CheckEquipTarget(tc) and c:CheckUniqueOnField(tp,LOCATION_SZONE) and not c:IsForbidden()
end
function Hata_no_Kokoro.spop(loc)
return function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
if Duel.IsExistingMatchingCard(Hata_no_Kokoro.eqfilter,tp,loc,0,1,nil,c,tp) then
local g=Duel.SelectMatchingCard(tp,Hata_no_Kokoro.eqfilter,tp,loc,0,1,1,nil,c,tp)
local tc2=g:GetFirst()
Duel.Equip(tp,tc2,c)
end
end
end
end
end
function Hata_no_Kokoro.hnk_equip(c,id,e)
c:SetUniqueOnField(1,0,id)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(Hata_no_Kokoro.eqtg)
e1:SetOperation(Hata_no_Kokoro.eqop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(Hata_no_Kokoro.eqlimit)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(Hata_no_Kokoro.eftg)
e3:SetLabelObject(e)
c:RegisterEffect(e3)
end
function Hata_no_Kokoro.eqlimit(e,c)
return c:IsSetCard(0x431)
end
function Hata_no_Kokoro.filter(c)
return c:IsFaceup() and c:IsSetCard(0x431)
end
function Hata_no_Kokoro.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and Hata_no_Kokoro.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(Hata_no_Kokoro.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Hata_no_Kokoro.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function Hata_no_Kokoro.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function Hata_no_Kokoro.anger_eq(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function Hata_no_Kokoro.eftg(e,c)
return e:GetOwner():GetEquipTarget()==c and c:IsSetCard(0x431)
end
function Hata_no_Kokoro.efcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsContains(c)
end
function Hata_no_Kokoro.become_target(c,id)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,id-1000)
e1:SetCondition(Hata_no_Kokoro.efcon)
return e1
end
function Hata_no_Kokoro.worries_eq(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(500)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function Hata_no_Kokoro.fun_eq(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(Hata_no_Kokoro.efilter)
c:RegisterEffect(e1)
end
function Hata_no_Kokoro.efilter(e,te)
if te:GetOwnerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(e:GetOwner():GetEquipTarget())
end
function Hata_no_Kokoro.steff2q(c,id)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,id-1000)
e1:SetTarget(Hata_no_Kokoro.tdtgq)
e1:SetOperation(Hata_no_Kokoro.tdop)
c:RegisterEffect(e1)
end
function Hata_no_Kokoro.steff2(c,id)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,id-1000)
e1:SetTarget(Hata_no_Kokoro.tdtg)
e1:SetOperation(Hata_no_Kokoro.tdop)
c:RegisterEffect(e1)
end
function Hata_no_Kokoro.tdfilterq(c)
return c:IsSetCard(0x431) and c:IsType(TYPE_EQUIP) and c:IsAbleToDeck()
end
function Hata_no_Kokoro.tdfilter(c)
return c:IsSetCard(0x431) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function Hata_no_Kokoro.tdtgq(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsSetCard(0x431) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Hata_no_Kokoro.tdfilterq,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Hata_no_Kokoro.tdfilterq,tp,LOCATION_GRAVE,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,tp,LOCATION_GRAVE)
end
function Hata_no_Kokoro.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsSetCard(0x431) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Hata_no_Kokoro.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Hata_no_Kokoro.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function Hata_no_Kokoro.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc =Duel.GetFirstTarget()
local c=e:GetHandler()
if tc then
local g=Group.CreateGroup()
if tc:IsRelateToEffect(e) then
g:AddCard(tc)
end
if c:IsRelateToEffect(e) then
g:AddCard(c)
end
if #g>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
function Hata_no_Kokoro.pbfilter(c)
return not c:IsPublic()
end
function Hata_no_Kokoro.public(c,id,tp)
if Duel.IsExistingMatchingCard(Hata_no_Kokoro.pbfilter,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,Hata_no_Kokoro.pbfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
-- 面灵气 秦心
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.equip(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.eqcon)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()>0
end
function s.defilter(c,tc)
return c:IsLocation(LOCATION_SZONE) and c:IsType(TYPE_EQUIP)
end
function s.eqfilter(c,tc,code,tp)
return Hnk.eqfilter(c,tc,tp) and not c:IsCode(code)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
local c=e:GetHandler()
local eqg=c:GetEquipGroup()
if chk==0 then return eqg:FilterCount(s.defilter,nil)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.defilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,LOCATION_SZONE)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc =Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local code=tc:GetCode()
local c=e:GetHandler()
if Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,c,code,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,c,code,tp)
local tc2=g:GetFirst()
Duel.Equip(tp,tc2,c)
end
end
end
function s.initial_effect(c)
s.equip(c)
Hnk.eff2(c)
Hnk.eff3(c,id,LOCATION_GRAVE)
end
\ No newline at end of file
-- 面灵气 吼怒的妖狐面
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.effgain(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetCondition(s.descon)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
return e1
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler():GetBattleTarget(),1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
function s.destory(c)
local e1=Hnk.become_target(c,id)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetTarget(s.destg2)
e1:SetOperation(s.desop2)
c:RegisterEffect(e1)
end
function s.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function s.initial_effect(c)
Hnk.hnk_equip(c,id,s.effgain(c))
Hnk.anger_eq(c)
s.destory(c)
end
\ No newline at end of file
-- 面灵气 怒声的大蜘蛛面
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.effgain(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetCondition(s.ntrcon)
e1:SetTarget(s.ntrtg)
e1:SetOperation(s.ntrop)
return e1
end
function s.ntrcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function s.ntrtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc and tc:IsControlerCanBeChanged() end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,tc,1,0,0)
end
function s.ntrop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc:IsRelateToBattle() then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
function s.ntr(c)
local e1=Hnk.become_target(c,id)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetTarget(s.ntrtg2)
e1:SetOperation(s.ntrop2)
c:RegisterEffect(e1)
end
function s.ntrfilter(c)
return c:IsControlerCanBeChanged() and c:IsFaceup()
end
function s.ntrtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ntrfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE,LOCATION_REASON_CONTROL) end
local g=Duel.GetMatchingGroup(s.ntrfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function s.ntrop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,s.ntrfilter,tp,0,LOCATION_MZONE,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.GetControl(g,tp,PHASE_END,1)
end
end
function s.initial_effect(c)
Hnk.hnk_equip(c,id,s.effgain(c))
Hnk.anger_eq(c)
s.ntr(c)
end
\ No newline at end of file
-- 面灵气 忧叹的长壁面
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.effgain(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.discon)
e1:SetOperation(s.disop)
return e1
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainDisablable(ev) and Hnk.efcon(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():GetFlagEffect(id)<=0
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,0)) then
Duel.Hint(HINT_CARD,0,id)
Duel.NegateEffect(ev)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
end
function s.neg(c)
local e1=Hnk.become_target(c,id)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(s.negtg)
e1:SetOperation(s.negop)
c:RegisterEffect(e1)
end
function s.ntrfilter(c)
return c:IsControlerCanBeChanged() and c:IsFaceup()
end
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp)
and not tc:IsDisabled() and not tc:IsImmuneToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
function s.initial_effect(c)
Hnk.hnk_equip(c,id,s.effgain(c))
Hnk.worries_eq(c)
s.neg(c)
end
-- 面灵气 忧心的鬼婆面
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.effgain(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.rmcon)
e1:SetOperation(s.rmop)
return e1
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rp==1-tp and rc:IsAbleToRemove() and Hnk.efcon(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():GetFlagEffect(id)<=0
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,0)) then
Duel.Hint(HINT_CARD,0,id)
Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
end
function s.remove(c)
local e1=Hnk.become_target(c,id)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetTarget(s.rmtg2)
e1:SetOperation(s.rmop2)
c:RegisterEffect(e1)
end
function s.rmfilter(c)
return c:IsAbleToRemove()
end
function s.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ntrfilter,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.rmop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,0,LOCATION_GRAVE,1,1,nil)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function s.initial_effect(c)
Hnk.hnk_equip(c,id,s.effgain(c))
Hnk.worries_eq(c)
s.remove(c)
end
-- 面灵气 欢喜的狮子面
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.effgain(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetOperation(s.op)
return e1
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetCondition(s.drcon)
e1:SetOperation(s.drop)
e1:SetLabelObject(c)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and e:GetOwner():GetFlagEffect(id)>0
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
if c:IsOnField() and Duel.IsPlayerCanDraw(tp,1) then
Duel.Hint(HINT_CARD,0,id)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function s.draw(c)
local e1=Hnk.become_target(c,id)
e1:SetCategory(CATEGORY_DRAW)
e1:SetTarget(s.drtg2)
e1:SetOperation(s.drop2)
c:RegisterEffect(e1)
end
function s.rmfilter(c)
return c:IsAbleToRemove()
end
function s.drtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop2(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function s.initial_effect(c)
Hnk.hnk_equip(c,id,s.effgain(c))
Hnk.fun_eq(c)
s.draw(c)
end
-- 面灵气 狂喜的火男面
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.effgain(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetOperation(s.op)
return e1
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetCondition(s.thcon)
e1:SetOperation(s.thop)
e1:SetLabelObject(c)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and e:GetOwner():GetFlagEffect(id)>0
end
function s.filter(c)
return c:IsSetCard(0x431) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
if not c:IsOnField() then return end
Duel.Hint(HINT_CARD,0,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.set(c)
local e1=Hnk.become_target(c,id)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop2)
c:RegisterEffect(e1)
end
function s.thfilter(c)
if not (c:IsSetCard(0x431) and c:IsType(TYPE_TRAP)) then return false end
return c:IsAbleToHand() or c:IsSSetable()
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
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SSet(tp,tc)
end
end
end
function s.initial_effect(c)
Hnk.hnk_equip(c,id,s.effgain(c))
Hnk.fun_eq(c)
s.set(c)
end
-- 面灵气 心的轮盘
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.change(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.chtg)
e1:SetOperation(s.chop)
c:RegisterEffect(e1)
end
function s.tdfilter(c,tp)
if c:IsFacedown() or not c:IsSetCard(0x431) or not c:IsType(TYPE_EQUIP) or not c:IsAbleToDeck() then return false end
local ec=c:GetEquipTarget()
local code=c:GetCode()
return Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK,0,1,nil,code,ec,tp)
end
function s.eqfilter(c,code)
return c:IsSetCard(0x431) and c:IsType(TYPE_SPELL) and not c:IsCode(code)
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_SZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_SZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,1,tp,LOCATION_SZONE)
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local ec=tc:GetEquipTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode())
local tc2=tg:GetFirst()
local flag=0
if tc2:IsType(TYPE_EQUIP) and Hnk.eqfilter(tc2,ec,tp) then
if not tc2:IsAbleToHand() then
flag=1
elseif Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
flag=1
end
end
if flag==0 then
Duel.SendtoHand(tc2,tp,REASON_EFFECT)
else
Duel.Equip(tp,tc2,ec)
end
end
end
function s.initial_effect(c)
s.change(c)
Hata_no_Kokoro.steff2(c,id)
end
-- 面灵气 希望的恋心
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.spsummon(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.con)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSummonLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_REMOVED) or c:IsSetCard(0x431)
end
function s.cfilter(c)
return c:GetSequence()<5
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsSetCard(0x431) and c:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_REMOVED)
end
function s.filter(c,e,tp)
return c:IsSetCard(0x431) 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+LOCATION_HAND,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g2=Duel.SelectMatchingCard(tp,Hnk.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tc,tp)
local tc2=g2:GetFirst()
Duel.Equip(tp,tc2,tc)
end
end
end
end
function s.initial_effect(c)
s.spsummon(c)
end
-- 面灵气 秦心·深秘
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.equip(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.eqcon)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and (re:IsActiveType(TYPE_MONSTER) or re:GetHandler():IsType(TYPE_SPELL))
end
function s.defilter(c)
return c:IsSetCard(0x431)
end
function s.eqfilter(c,tc,code,tp)
return Hnk.eqfilter(c,tc,tp) and not c:IsCode(code)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsSetCard(0x431) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(s.defilter,tp,LOCATION_ONFIELD,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.defilter,tp,LOCATION_ONFIELD,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,LOCATION_ONFIELD)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc =Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local code=tc:GetCode()
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,c,code,tp)
local tc2=g:GetFirst()
Duel.Equip(tp,tc2,c)
end
end
end
function s.initial_effect(c)
s.equip(c)
Hnk.eff2(c)
Hnk.eff3(c,id,LOCATION_DECK)
end
-- 面灵气 秦心·凭依
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.equip(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.eqcon)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_BATTLE)~=0
end
function s.eqfilter(c,tp)
return c:IsFaceup() and (c:IsAbleToChangeControler() or c:IsControler(tp))
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end
local c=e:GetHandler()
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(s.eqfilter,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,s.eqfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0
and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.BreakEffect()
Duel.Equip(tp,tc,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(s.eqlimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function s.eqlimit(e,c)
return e:GetOwner()==c and not c:IsDisabled()
end
function s.initial_effect(c)
s.equip(c)
Hnk.eff2(c)
Hnk.eff3(c,id,LOCATION_HAND)
end
-- 凭依「喜怒哀乐附体」
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.eff1(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.filter(c,tp)
return c:IsSetCard(0x431) and Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil,c,tp)
end
function s.eqfilter(c,tc,tp)
return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(tc) and c:CheckUniqueOnField(tp,LOCATION_SZONE)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
local tc=g:GetFirst()
Duel.SetOperationInfo(0,CATEGORY_EQUIP,tc,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
local eqc=g:GetFirst()
if Duel.Equip(tp,eqc,tc) then
Hnk.public(e:GetHandler(),id,tp)
end
end
end
function s.search(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function s.thcost(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.thfilter(c)
return c:IsSetCard(0x431) 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.initial_effect(c)
s.eff1(c)
s.search(c)
end
-- 怒符「愤怒的忌狼之面」
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.eff1(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.filter(c)
return c:IsAbleToGrave()
end
function s.eqfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsSetCard(0x431) and c:IsFaceup()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
g2:Merge(g1)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g2,2,0,0)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(600)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,600)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if Duel.SendtoGrave(sg,REASON_EFFECT)~=0 then
Duel.Recover(tp,600,REASON_EFFECT)
Hnk.public(e:GetHandler(),id,tp)
end
end
function s.initial_effect(c)
s.eff1(c)
Hata_no_Kokoro.steff2q(c,id)
end
-- 忧符「忧世之苦不绝如轮」
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.eff1(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(s.con)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.confilter(c)
return c:IsSetCard(0x431) and c:IsFaceup()
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.confilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp)
and not tc:IsDisabled() and not tc:IsImmuneToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
Hnk.public(e:GetHandler(),id,tp)
end
end
function s.initial_effect(c)
s.eff1(c)
Hata_no_Kokoro.steff2q(c,id)
end
-- 喜符「昂扬的神乐狮子」
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.eff1(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.sfilter(c)
return c:IsSetCard(0x431) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(s.sfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) and
Duel.IsExistingTarget(s.sfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.sfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
if Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Hnk.public(e:GetHandler(),id,tp)
end
end
end
end
function s.initial_effect(c)
s.eff1(c)
Hata_no_Kokoro.steff2q(c,id)
end
-- 「假面丧心舞 暗黑能乐」
local s,id=GetID()
function s.eff1(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.con)
e1:SetTarget(aux.nbtg)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x431) and c:IsType(TYPE_MONSTER)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function s.thfilter(c)
return c:IsSetCard(0x431) and c:IsFaceup() and c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
local tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function s.eff2(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(aux.bfgcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
end
function s.filter(c)
return c:IsType(TYPE_TRAP) and c:IsSetCard(0x431) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
local tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
function s.initial_effect(c)
s.eff1(c)
s.eff2(c)
end
-- 「亡失的情感」
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.aih(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetRange(LOCATION_FZONE)
e1:SetTarget(s.aihtg)
e1:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e1)
end
function s.aihtg(e,c)
return c:IsSetCard(0x431) and c:IsPublic()
end
function s.eq(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
end
function s.filter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x431) and Duel.IsExistingMatchingCard(Hnk.eqfilter,tp,LOCATION_DECK,0,1,nil,c,tp)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsSetCard(0x431) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not Duel.IsExistingMatchingCard(Hnk.eqfilter,tp,LOCATION_DECK,0,1,nil,tc,tp) then return end
if tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,Hnk.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tc,tp)
local eqc=g:GetFirst()
Duel.Equip(tp,eqc,tc)
end
end
function s.atkup(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetCost(s.atkcost)
e1:SetTarget(s.atktg)
e1:SetOperation(s.atkop)
c:RegisterEffect(e1)
end
function s.pbfilter(c)
return c:IsSetCard(0x431) and c:IsType(TYPE_TRAP) and not c:IsPublic()
end
function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.pbfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.pbfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
function s.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x431)
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_MZONE,0,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:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
c:RegisterEffect(e1)
s.eq(c)
s.aih(c)
s.atkup(c)
end
-- 面灵气 秦心·希望之面
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.search(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.thfilter(c)
return c:IsSetCard(0x431) and c:IsType(TYPE_SPELL+TYPE_TRAP) 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,e:GetHandler())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Hnk.public(e:GetHandler(),id,tp)
end
end
function s.tohand(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,id-1000)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg2)
e1:SetOperation(s.thop2)
c:RegisterEffect(e1)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() end
local eqg=c:GetEquipGroup()
eqg:KeepAlive()
e:SetLabelObject(eqg)
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.thfilter2(c)
return c:IsSetCard(0x431) and c:IsAbleToHand()
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE)
end
function s.thfilter3(c)
return c:IsLocation(LOCATION_GRAVE) and c:IsAbleToHand()
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
local eqg=e:GetLabelObject()
if #eqg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local eqc=eqg:Filter(s.thfilter3,nil):Select(tp,1,1,nil)
Duel.SendtoHand(eqc,nil,REASON_EFFECT)
eqg:DeleteGroup()
end
end
end
function s.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,s.lcheck)
s.search(c)
s.tohand(c)
end
function s.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x431)
end
\ No newline at end of file
-- 面灵气 秦心※心貌百面
xpcall(function() require("expansions/script/c47310000") end,function() require("script/c47310000") end)
local s,id=GetID()
function s.equip(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.eqcon)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Hnk.eqfilter,tp,LOCATION_DECK,0,1,nil,c,tp)
or Duel.IsExistingMatchingCard(Hnk.eqfilter,tp,LOCATION_HAND,0,1,nil,c,tp)
or Duel.IsExistingMatchingCard(Hnk.eqfilter,tp,LOCATION_GRAVE,0,1,nil,c,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.IsExistingMatchingCard(Hnk.eqfilter,tp,LOCATION_HAND,0,1,nil,c,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eqc=Duel.SelectMatchingCard(tp,Hnk.eqfilter,tp,LOCATION_HAND,0,1,1,nil,c,tp)
Duel.Equip(tp,eqc:GetFirst(),c,true,true)
end
if Duel.IsExistingMatchingCard(Hnk.eqfilter,tp,LOCATION_DECK,0,1,nil,c,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eqc=Duel.SelectMatchingCard(tp,Hnk.eqfilter,tp,LOCATION_DECK,0,1,1,nil,c,tp)
Duel.Equip(tp,eqc:GetFirst(),c,true,true)
end
if Duel.IsExistingMatchingCard(Hnk.eqfilter,tp,LOCATION_GRAVE,0,1,nil,c,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eqc=Duel.SelectMatchingCard(tp,Hnk.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil,c,tp)
Duel.Equip(tp,eqc:GetFirst(),c,true,true)
end
Duel.EquipComplete()
end
end
function s.replace(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(s.desreptg)
e2:SetValue(s.desrepval)
e2:SetOperation(s.desrepop)
c:RegisterEffect(e2)
end
function s.defilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function s.repfilter(c)
return not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end
function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(s.defilter,1,nil,tp)
and c:GetEquipGroup():FilterCount(s.repfilter,nil)>0 end
return Duel.SelectEffectYesNo(tp,c,96)
end
function s.desrepval(e,c)
return s.defilter(c,e:GetHandlerPlayer())
end
function s.eqfilter2(c,tc)
return c:IsType(TYPE_EQUIP) and c:GetEquipTarget()==tc
end
function s.desrepop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local eqg=c:GetEquipGroup():Filter(s.repfilter,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=eqg:Select(Card.IsAbleToGrave,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REPLACE)
Duel.Hint(HINT_CARD,0,id)
end
function s.tohand(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP)
end
function s.tgfilter(c,tc)
return c:IsType(TYPE_EQUIP) and c:GetEquipTarget()==tc and c:IsAbleToGrave()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToGrave() end
local c=e:GetHandler()
local code=re:GetHandler():GetCode()
if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,c)
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,code) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,c)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,tg,1,tp,LOCATION_SZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function s.thfilter(c,code)
return c:IsSetCard(0x431) and c:IsType(TYPE_TRAP) and not c:IsCode(code) and c:IsAbleToHand()
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local code=re:GetHandler():GetCode()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,code)
local thc=g:GetFirst()
Duel.SendtoHand(thc,tp,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
thc:RegisterEffect(e1)
if tc and tc:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function s.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,4,s.lcheck)
s.equip(c)
s.replace(c)
s.tohand(c)
end
function s.lfilter(c)
return c:IsLinkSetCard(0x431) and c:IsType(TYPE_LINK)
end
function s.lcheck(g)
return g:IsExists(s.lfilter,1,nil)
end
\ No newline at end of file
......@@ -36,7 +36,7 @@ function c60150507.initial_effect(c)
Duel.AddCustomActivityCounter(60150507,ACTIVITY_SPSUMMON,c60150507.counterfilter)
end
function c60150507.counterfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FIEND)
return not (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FIEND))
end
function c60150507.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(60150507,tp,ACTIVITY_SPSUMMON)==0 end
......
--幻想曲的回转乐章
function c60150541.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xab20),10,2)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xab20),10,2)
c:EnableReviveLimit()
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60150541,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c60150541.thtg)
e2:SetOperation(c60150541.thop)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60150541,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c60150541.thtg)
e2:SetOperation(c60150541.thop)
c:RegisterEffect(e2)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60150541,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,60150541)
e1:SetCost(c60150541.spcost)
e1:SetTarget(c60150541.sptg)
e1:SetOperation(c60150541.spop)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60150541,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,60150541)
e1:SetCost(c60150541.spcost)
e1:SetTarget(c60150541.sptg)
e1:SetOperation(c60150541.spop)
c:RegisterEffect(e1)
end
function c60150541.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_LIGHT)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsFaceup() and c:IsAbleToHand()
end
function c60150541.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c60150541.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60150541.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c60150541.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c60150541.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60150541.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c60150541.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c60150541.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
if e:GetHandler():GetOverlayCount()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0):Select(tp,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
end
end
function c60150541.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST) and c:GetFlagEffect(60150541)==0 end
c:RemoveOverlayCard(tp,2,2,REASON_COST)
c:RegisterFlagEffect(60150541,RESET_CHAIN,0,1)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST) and c:GetFlagEffect(60150541)==0 end
c:RemoveOverlayCard(tp,2,2,REASON_COST)
c:RegisterFlagEffect(60150541,RESET_CHAIN,0,1)
end
function c60150541.filter(c,e,tp)
return c:GetRank()==10 and (c:IsSetCard(0xab20) or c:IsSetCard(0xcb20)) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
return c:GetRank()==10 and (c:IsSetCard(0xab20) or c:IsSetCard(0xcb20)) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c60150541.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c60150541.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>-1
and Duel.IsExistingMatchingCard(c60150541.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60150541.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp,tp,c)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60150541.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank())
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp,tp,c)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60150541.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank())
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(60150541,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e1)
end
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e1)
end
end
......@@ -70,11 +70,13 @@ function c71401007.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c71401007.filter2,tp,LOCATION_HAND,0,nil,e,tp)
if Duel.Draw(tp,g:GetCount(),REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401007,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
if Duel.Draw(tp,g:GetCount(),REASON_EFFECT)>0 then
local sg=Duel.GetMatchingGroup(c71401007.filter2,tp,LOCATION_HAND,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401007,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--地灵殿
function c88178002.initial_effect(c)
aux.AddCodeList(c,88178003)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......@@ -26,16 +27,16 @@ function c88178002.initial_effect(c)
e3:SetCondition(c88178002.spcon)
e3:SetTarget(c88178002.sumlimit)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88178002,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,98178002)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c88178002.thtg)
e2:SetOperation(c88178002.thop)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(88178002,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,98178002)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c88178002.thtg)
e4:SetOperation(c88178002.thop)
c:RegisterEffect(e4)
end
function c88178002.filter(c)
return c:IsSetCard(0x3591) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
......@@ -18,7 +18,7 @@ function c88178003.initial_effect(c)
c:RegisterEffect(e2)
end
function c88178003.filter(c)
return c:IsCode(88178002) and c:IsAbleToHand()
return (c:IsCode(88178002) or c:IsCode(88178508)) and c:IsAbleToHand()
end
function c88178003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178003.filter,tp,LOCATION_DECK,0,1,nil) end
......@@ -34,7 +34,7 @@ function c88178003.activate(e,tp,eg,ep,ev,re,r,rp)
end
function c88178003.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsSetCard(0x3591) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and (c:IsSetCard(0x3591) or c:IsSetCard(0x3597)) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c88178003.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
--红魔馆
function c88178101.initial_effect(c)
aux.AddCodeList(c,88178102)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......
--完美潇洒的女仆 十六夜咲夜
function c88178113.initial_effect(c)
c:EnableCounterPermit(0x593)
c:EnableCounterPermit(0x0593)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3593),aux.NonTuner(Card.IsSetCard,0x3593),1)
c:EnableReviveLimit()
c:SetUniqueOnField(1,0,88178113)
......@@ -67,13 +67,13 @@ function c88178113.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(atkval)
c:RegisterEffect(e1,true)
local ct=Duel.GetMatchingGroupCount(c88178113.cfilter1,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
if c:IsRelateToEffect(e) and ct>0 and c:IsCanAddCounter(0x593,ct) then
c:AddCounter(0x593,ct)
if c:IsRelateToEffect(e) and ct>0 and c:IsCanAddCounter(0x0593,ct) then
c:AddCounter(0x0593,ct)
end
end
function c88178113.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x593,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x593,2,REASON_COST)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x0593,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x0593,2,REASON_COST)
end
function c88178113.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
......
--雾之湖
function c88178201.initial_effect(c)
aux.AddCodeList(c,88178102)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......
--白玉楼的亡灵少女 幽幽子
function c88178301.initial_effect(c)
aux.AddMaterialCodeList(c,88178304)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c88178301.splimit)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetTargetRange(POS_FACEUP_ATTACK,1)
e1:SetCondition(c88178301.spcon)
e1:SetOperation(c88178301.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c88178301.efilter)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88178301,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c88178301.spcon1)
e3:SetCost(c88178301.descost)
e3:SetOperation(c88178301.atkop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_UNRELEASABLE_SUM)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e5)
if not c88178301.global_check then
c88178301.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetOperation(c88178301.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c88178301.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:IsRelateToEffect(re) or not re:IsActiveType(TYPE_MONSTER) then return end
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if loc==LOCATION_MZONE and rc:GetFlagEffect(88178301)==0 then
rc:RegisterFlagEffect(88178301,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function c88178301.rfilter(c)
return c:IsFaceup() and c:GetFlagEffect(88178301)>0
end
function c88178301.splimit(e,se,sp,st)
return se:GetHandler():IsCodeListed(c,88178304)
end
function c88178301.spfilter(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c88178301.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c88178301.rfilter,tp,0,LOCATION_MZONE,1,nil,tp)
end
function c88178301.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c88178301.rfilter,tp,0,LOCATION_MZONE,1,7,nil,tp)
local atk=0
local tc=g:GetFirst()
while tc do
local batk=tc:GetAttack()
if batk>0 then
atk=atk+batk
end
tc=g:GetNext()
end
Duel.Release(g,REASON_COST)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END,2)
e2:SetTargetRange(1,0)
e2:SetTarget(c88178301.splimit)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetLabelObject(e)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e3,tp)
end
function c88178301.splimit(e,c)
return not c:IsSetCard(0x595)
end
function c88178301.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c88178301.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c88178301.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttackAbove,1,c,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,Card.IsAttackAbove,1,1,c,1)
Duel.Release(g,REASON_COST)
e:SetLabel(g:GetFirst():GetPreviousAttackOnField())
end
function c88178301.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(e:GetLabel())
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--白玉楼的园艺师 妖梦
function c88178302.initial_effect(c)
aux.AddMaterialCodeList(c,88178304)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88178302,0))
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c88178302.spcon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88178302,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,88178302)
e2:SetTarget(c88178302.thtg)
e2:SetOperation(c88178302.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_ADD_RACE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(RACE_ZOMBIE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(88178302,2))
e4:SetType(EFFECT_TYPE_QUICK_F)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c88178302.condition)
e4:SetOperation(c88178302.operation)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_NO_BATTLE_DAMAGE)
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e6:SetValue(1)
c:RegisterEffect(e6)
end
function c88178302.cfilter(c)
return c:IsSetCard(0x595) and c:IsFaceup()
end
function c88178302.spcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and (Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0) or (Duel.IsExistingMatchingCard(c88178302.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0)
end
function c88178302.thfilter(c)
return aux.IsCodeListed(c,88178304) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c88178302.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178302.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c88178302.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88178302.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c88178302.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and aux.IsCodeListed(re:GetHandler(),88178304)
end
function c88178302.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--白玉楼
function c88178304.initial_effect(c)
aux.AddMaterialCodeList(c,88178304,88178309)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,88178304+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c88178304.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCode(EFFECT_DISABLE)
e2:SetCondition(c88178304.lvcon)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_PIERCE)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x595))
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(88178304,3))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,881783040)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c88178304.thtg1)
e4:SetOperation(c88178304.thop1)
c:RegisterEffect(e4)
end
function c88178304.filter(c)
return c:IsSetCard(0x595) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c88178304.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c88178304.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(88178304,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c88178304.lvcon(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c88178304.thfilter1(c)
return c:IsCode(88178309) and c:IsAbleToHand()
end
function c88178304.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178304.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c88178304.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88178304.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--半分虚幻的园艺师 魂魄妖梦-楼观剑
function c88178312.initial_effect(c)
aux.EnableChangeCode(c,88178302,LOCATION_MZONE+LOCATION_GRAVE)
aux.AddMaterialCodeList(c,88178304)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c88178312.lkcon)
e0:SetOperation(c88178312.lkop)
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88178312,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,88178312)
e1:SetCondition(c88178312.thcon)
e1:SetTarget(c88178312.thtg)
e1:SetOperation(c88178312.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c88178312.imfilter)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88178312,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,88278312)
e3:SetCondition(c88178312.condition)
e3:SetTarget(c88178312.target)
e3:SetOperation(c88178312.operation)
c:RegisterEffect(e3)
end
function c88178312.lkfilter(c,lc,tp)
local flag=c:IsFaceup() and c:IsCanBeLinkMaterial(lc)
if c:IsType(TYPE_MONSTER) then
return flag and c:IsSetCard(0x595)
else
return aux.IsCodeListed(c,88178304) and c:IsType(TYPE_SPELL)
end
end
function c88178312.lvfilter(c)
if c:IsType(TYPE_SPELL) then
if c:IsType(TYPE_LINK) and c:GetLink()>1 then
return 1+0x10000*c:GetLink()
else
return 1
end
else
return 1
end
end
function c88178312.lcheck(tp,sg,lc,minc,ct)
return ct>=minc and sg:CheckWithSumEqual(c88178312.lvfilter,lc:GetLink(),ct,ct) and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0
end
function c88178312.lkchenk(c,tp,sg,mg,lc,ct,minc,maxc)
sg:AddCard(c)
ct=ct+1
local res=c88178312.lcheck(tp,sg,lc,minc,ct) or (ct<maxc and mg:IsExists(c88178312.lkchenk,1,sg,tp,sg,mg,lc,ct,minc,maxc))
sg:RemoveCard(c)
ct=ct-1
return res
end
--
function c88178312.lkcon(e,c)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c88178312.lkfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,c,tp)
local sg=Group.CreateGroup()
for i,pe in ipairs({Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_LMATERIAL)}) do
local pc=pe:GetHandler()
if not mg:IsContains(pc) then return false end
sg:AddCard(pc)
end
local ct=sg:GetCount()
local minc=2
local maxc=2
if ct>maxc then return false end
return c88178312.lcheck(tp,sg,c,minc,ct) or mg:IsExists(c88178312.lkchenk,1,nil,tp,sg,mg,c,ct,minc,maxc) and (not sg or not sg:IsExists(Card.IsLocation,1,c,LOCATION_HAND)) and Duel.IsExistingMatchingCard(c88178312.cs,tp,LOCATION_MZONE,0,1,nil)
end
function c88178312.cs(c)
return c:IsSetCard(0x595)
end
function c88178312.lkop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c88178312.lkfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,c,tp)
local sg=Group.CreateGroup()
for i,pe in ipairs({Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_LMATERIAL)}) do
sg:AddCard(pe:GetHandler())
end
local ct=sg:GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
sg:Select(tp,ct,ct,nil)
local minc=2
local maxc=2
for i=ct,maxc-1 do
local cg=mg:Filter(c88178312.lkchenk,sg,tp,sg,mg,c,i,minc,maxc)
if cg:GetCount()==0 then break end
local minct=1
if c88178312.lcheck(tp,sg,c,minc,i) then
if not Duel.SelectYesNo(tp,210) then break end
minct=0
end
if not sg or not sg:IsExists(Card.IsLocation,1,c,LOCATION_HAND) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local g=cg:Select(tp,minct,1,nil)
if g:GetCount()==0 then break end
sg:Merge(g)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
tg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_SPELL)
cg:Sub(tg)
local g=cg:Select(tp,minct,1,nil)
if g:GetCount()==0 then break end
sg:Merge(g)
end
end
c:SetMaterial(sg)
Duel.SendtoGrave(sg,REASON_MATERIAL+REASON_LINK)
end
function c88178312.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c88178312.thfilter(c)
return aux.IsCodeListed(c,88178304) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c88178312.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178312.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c88178312.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88178312.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 c88178312.imfilter(e,te)
return te:IsActiveType(TYPE_SPELL)
end
function c88178312.condition(e)
return e:GetHandler():GetSequence()>4
end
function c88178312.thfilter1(c,tp)
return aux.IsCodeListed(c,88178304) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c88178312.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178312.thfilter1,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c88178312.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88178312.thfilter1,tp,LOCATION_GRAVE,0,1,1,nil,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--修罗剑『现世妄执』
function c88178313.initial_effect(c)
aux.AddMaterialCodeList(c,88178304)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,88178314+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c88178313.target)
e1:SetOperation(c88178313.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c88178313.spcon)
c:RegisterEffect(e2)
end
function c88178313.filter(c)
return aux.IsCodeListed(c,88178304) and c:IsAbleToHand()
end
function c88178313.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c88178313.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c88178313.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c88178313.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c88178313.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
if Duel.IsExistingMatchingCard(c88178313.actcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(88178313,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=Duel.SelectTarget(tp,c88178313.js,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(dg,nil,0,REASON_EFFECT)
end
end
end
end
function c88178313.actcfilter(c)
return c:IsCode(88178302)
end
function c88178313.js(c)
return aux.IsCodeListed(c,88178304) and c:IsAbleToDeck()
end
function c88178313.cfilter(c)
return c:IsSetCard(0x595)
end
function c88178313.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c88178313.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
--人界剑『悟入幻想』
function c88178314.initial_effect(c)
aux.AddMaterialCodeList(c,88178304)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88178314,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,88178314+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c88178314.target)
e1:SetOperation(c88178314.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c88178314.spcon)
c:RegisterEffect(e2)
end
function c88178314.filter(c)
return c:IsSetCard(0x595) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c88178314.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178314.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3 then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
end
end
function c88178314.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88178314.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(c88178314.actcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(88178314,1)) then
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
function c88178314.actcfilter(c)
return c:IsCode(88178302)
end
function c88178314.cfilter(c)
return c:IsSetCard(0x595) and c:IsFaceup()
end
function c88178314.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c88178314.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
--半分虚幻的园艺师 魂魄妖梦-白楼剑
function c88178315.initial_effect(c)
aux.EnableChangeCode(c,88178302,LOCATION_MZONE+LOCATION_GRAVE)
aux.AddMaterialCodeList(c,88178304)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c88178315.lkcon)
e0:SetOperation(c88178315.lkop)
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88178315,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,88178315)
e1:SetCondition(c88178315.thcon)
e1:SetTarget(c88178315.thtg)
e1:SetOperation(c88178315.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c88178315.imfilter)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88178315,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,88278315)
e3:SetCondition(c88178315.condition)
e3:SetTarget(c88178315.target)
e3:SetOperation(c88178315.operation)
c:RegisterEffect(e3)
end
function c88178315.lkfilter(c,lc,tp)
local flag=c:IsFaceup() and c:IsCanBeLinkMaterial(lc)
if c:IsType(TYPE_MONSTER) then
return flag and c:IsSetCard(0x595)
else
return aux.IsCodeListed(c,88178304) and c:IsType(TYPE_TRAP)
end
end
function c88178315.lvfilter(c)
if c:IsType(TYPE_TRAP) then
if c:IsType(TYPE_LINK) and c:GetLink()>1 then
return 1+0x10000*c:GetLink()
else
return 1
end
else
return 1
end
end
function c88178315.lcheck(tp,sg,lc,minc,ct)
return ct>=minc and sg:CheckWithSumEqual(c88178315.lvfilter,lc:GetLink(),ct,ct) and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0
end
function c88178315.lkchenk(c,tp,sg,mg,lc,ct,minc,maxc)
sg:AddCard(c)
ct=ct+1
local res=c88178315.lcheck(tp,sg,lc,minc,ct) or (ct<maxc and mg:IsExists(c88178315.lkchenk,1,sg,tp,sg,mg,lc,ct,minc,maxc))
sg:RemoveCard(c)
ct=ct-1
return res
end
--
function c88178315.lkcon(e,c)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c88178315.lkfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,c,tp)
local sg=Group.CreateGroup()
for i,pe in ipairs({Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_LMATERIAL)}) do
local pc=pe:GetHandler()
if not mg:IsContains(pc) then return false end
sg:AddCard(pc)
end
local ct=sg:GetCount()
local minc=2
local maxc=2
if ct>maxc then return false end
return c88178315.lcheck(tp,sg,c,minc,ct) or mg:IsExists(c88178315.lkchenk,1,nil,tp,sg,mg,c,ct,minc,maxc) and (not sg or not sg:IsExists(Card.IsLocation,1,c,LOCATION_HAND)) and Duel.IsExistingMatchingCard(c88178315.cs,tp,LOCATION_MZONE,0,1,nil)
end
function c88178315.cs(c)
return c:IsSetCard(0x595)
end
function c88178315.lkop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c88178315.lkfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,c,tp)
local sg=Group.CreateGroup()
for i,pe in ipairs({Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_LMATERIAL)}) do
sg:AddCard(pe:GetHandler())
end
local ct=sg:GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
sg:Select(tp,ct,ct,nil)
local minc=2
local maxc=2
for i=ct,maxc-1 do
local cg=mg:Filter(c88178315.lkchenk,sg,tp,sg,mg,c,i,minc,maxc)
if cg:GetCount()==0 then break end
local minct=1
if c88178315.lcheck(tp,sg,c,minc,i) then
if not Duel.SelectYesNo(tp,210) then break end
minct=0
end
if not sg or not sg:IsExists(Card.IsLocation,1,c,LOCATION_HAND) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local g=cg:Select(tp,minct,1,nil)
if g:GetCount()==0 then break end
sg:Merge(g)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
tg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_SPELL)
cg:Sub(tg)
local g=cg:Select(tp,minct,1,nil)
if g:GetCount()==0 then break end
sg:Merge(g)
end
end
c:SetMaterial(sg)
Duel.SendtoGrave(sg,REASON_MATERIAL+REASON_LINK)
end
function c88178315.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c88178315.thfilter(c)
return aux.IsCodeListed(c,88178304) and c:IsType(TYPE_TRAP) and c:IsAbleToHand()
end
function c88178315.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178315.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c88178315.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88178315.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 c88178315.imfilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
function c88178315.condition(e)
return e:GetHandler():GetSequence()>4
end
function c88178315.thfilter1(c,tp)
return aux.IsCodeListed(c,88178304) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c88178315.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178315.thfilter1,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c88178315.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88178315.thfilter1,tp,LOCATION_GRAVE,0,1,1,nil,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--生命的二刀流 魂魄妖梦
function c88178317.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88178317,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,88178317)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c88178317.spcost)
e1:SetTarget(c88178317.sptg)
e1:SetOperation(c88178317.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88178317,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,88278317)
e2:SetTarget(c88178317.thtg)
e2:SetOperation(c88178317.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_ADD_RACE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(RACE_WARRIOR)
c:RegisterEffect(e3)
end
function c88178317.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c88178317.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 c88178317.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c88178317.splimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
function c88178317.splimit(e,c)
return not c:IsSetCard(0x595)
end
function c88178317.thfilter(c)
return aux.IsCodeListed(c,88178304) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c88178317.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178317.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c88178317.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88178317.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
\ No newline at end of file
--八云家
function c88178401.initial_effect(c)
aux.AddMaterialCodeList(c,88178309)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,88178401+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c88178401.activate)
c:RegisterEffect(e1)
end
function c88178401.filter(c)
return c:IsSetCard(0x596) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c88178401.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c88178401.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(88178401,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--隙间妖怪 八云紫
function c88178402.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88178402,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,88178402)
e1:SetTarget(c88178402.sptg)
e1:SetOperation(c88178402.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88178402,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,88278402)
e2:SetTarget(c88178402.thtg)
e2:SetOperation(c88178402.thop)
c:RegisterEffect(e2)
end
function c88178402.spfilter(c,e,tp)
return c:IsSetCard(0x596) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c88178402.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c88178402.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c88178402.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c88178402.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c88178402.thfilter(c)
return c:IsSetCard(0x596) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToRemove()
end
function c88178402.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178402.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c88178402.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c88178402.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--隙间妖怪的式神 八云蓝
function c88178403.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,88178403)
e1:SetCondition(c88178403.spcon1)
e1:SetTarget(c88178403.sptg)
e1:SetOperation(c88178403.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetRange(LOCATION_REMOVED)
e2:SetCondition(c88178403.spcon2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88178403,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,88278403)
e3:SetTarget(c88178403.thtg)
e3:SetOperation(c88178403.thop)
c:RegisterEffect(e3)
end
function c88178403.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c88178403.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 c88178403.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x596)
end
function c88178403.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c88178403.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c88178403.cfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x596) and c:IsCode(88178402)
end
function c88178403.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c88178403.cfilter2,tp,LOCATION_MZONE,0,1,nil)
end
function c88178403.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x596) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToHand()
end
function c88178403.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c88178403.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c88178403.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c88178403.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c88178403.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--八云恋
function c88178406.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,88178402,88178006,true,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88178406,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c88178406.discon)
e2:SetTarget(c88178406.distg)
e2:SetOperation(c88178406.disop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88178406,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,88178406)
e3:SetCost(c88178406.spcost)
e3:SetTarget(c88178406.sptg)
e3:SetOperation(c88178406.spop)
c:RegisterEffect(e3)
end
function c88178406.discon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and bit.band(Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION),LOCATION_ONFIELD)~=0 and re:GetHandler()~=e:GetHandler()
end
function c88178406.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c88178406.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c88178406.costfilter(c)
return c:IsAbleToDeckAsCost()
end
function c88178406.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c88178406.costfilter,tp,LOCATION_REMOVED,0,1,c) and Duel.IsExistingTarget(c88178406.costfilter,tp,0,LOCATION_REMOVED,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,c88178406.costfilter,tp,LOCATION_REMOVED,0,1,1,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectTarget(tp,c88178406.costfilter,tp,0,LOCATION_REMOVED,1,1,c)
g1:Merge(g2)
Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c88178406.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c88178406.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
\ No newline at end of file
--隙间妖怪的式神的式神 橙
function c88178407.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88178407,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND+LOCATION_REMOVED)
e1:SetCountLimit(1,88178407)
e1:SetCondition(c88178407.spcon)
e1:SetTarget(c88178407.sptg)
e1:SetOperation(c88178407.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88178407,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,88278407)
e2:SetTarget(c88178407.rmtg)
e2:SetOperation(c88178407.rmop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88178407,2))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,88378407)
e3:SetCost(c88178407.lvcost)
e3:SetTarget(c88178407.lvtg)
e3:SetOperation(c88178407.lvop)
c:RegisterEffect(e3)
end
function c88178407.cfilter(c)
return c:IsSetCard(0x596) and c:IsFaceup()
end
function c88178407.spcon(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then return false end
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
or Duel.IsExistingMatchingCard(c88178407.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c88178407.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c88178407.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)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(88178407,3))
end
function c88178407.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c88178407.chkfilter(c)
return c:IsSetCard(0x596) and not c:IsAbleToRemove()
end
function c88178407.rmfilter(c)
return c:IsSetCard(0x596) and c:IsAbleToRemove()
end
function c88178407.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(c88178407.rmfilter,tp,LOCATION_GRAVE,0,1,nil)
and not Duel.IsExistingMatchingCard(c88178407.chkfilter,tp,0,LOCATION_GRAVE,1,nil)
end
local g=Duel.GetMatchingGroup(c88178407.rmfilter,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c88178407.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c88178407.rmfilter,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c88178407.costfilter(c)
return not c:IsCode(88178407) and c:IsSetCard(0x596) and c:IsAbleToRemoveAsCost()
end
function c88178407.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178407.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c88178407.costfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c88178407.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsLevelAbove(0) and not c:IsLevel(8) end
end
function c88178407.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(8)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--操纵境界程度的能力
function c88178408.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,88178408)
e1:SetTarget(c88178408.target)
e1:SetOperation(c88178408.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,88278408)
e2:SetTarget(c88178408.thtg)
e2:SetOperation(c88178408.thop)
c:RegisterEffect(e2)
end
function c88178408.filter(c)
return c:IsSetCard(0x596) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c88178408.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178408.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c88178408.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c88178401.filter,tp,LOCATION_DECK,0,1,1,nil)
local tg=g:GetFirst()
if tg==nil then return end
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
function c88178408.thfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x596) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c88178408.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c88178408.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c88178408.thfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c88178408.thfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c88178408.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--神隐的主犯 八云紫
function c88178409.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88178409,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,88178409)
e1:SetCost(c88178409.cost)
e1:SetTarget(c88178409.target)
e1:SetOperation(c88178409.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_FUSION_SUBSTITUTE)
e2:SetCondition(c88178409.subcon)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,88278409)
e3:SetTarget(c88178409.tdtg)
e3:SetOperation(c88178409.tdop)
c:RegisterEffect(e3)
end
function c88178409.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c88178409.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c88178409.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x596) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c88178409.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c88178409.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c88178409.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c88178409.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c88178409.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c88178409.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c88178409.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c88178409.subcon(e)
return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
end
function c88178409.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c88178409.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--幻想的境界 八云紫
function c88178410.initial_effect(c)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x596),8,2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(aux.indoval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88178410,0))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,88178410)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(c88178410.rmcost)
e3:SetTarget(c88178410.rmtg)
e3:SetOperation(c88178410.rmop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(88178410,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,88278410)
e4:SetTarget(c88178410.thtg)
e4:SetOperation(c88178410.thop)
c:RegisterEffect(e4)
end
function c88178410.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c88178410.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function c88178410.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
function c88178410.thfilter(c)
return c:IsSetCard(0x596) and c:IsAbleToHand()
end
function c88178410.rmfilter(c)
return c:IsSetCard(0x596) and c:IsAbleToRemove()
end
function c88178410.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178410.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c88178410.rmfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c88178410.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c88178410.rmfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if #g1>0 then
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c88178410.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g2>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
end
\ No newline at end of file
--苏醒的冬眠妖怪
function c88178411.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,88178411+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c88178411.condition)
e1:SetTarget(c88178411.target)
e1:SetOperation(c88178411.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,88278411)
e2:SetTarget(c88178411.thtg)
e2:SetOperation(c88178411.thop)
c:RegisterEffect(e2)
end
function c88178411.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
end
function c88178411.filter(c,e,tp)
return c:IsSetCard(0x3596) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c88178411.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c88178411.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c88178411.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c88178411.thfilter(c)
return c:IsSetCard(0x596) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToRemove()
end
function c88178411.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c88178411.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c88178411.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
function c88178411.thfilter1(c,e,tp)
return c:IsSetCard(0x596) and c:IsFaceup()
end
function c88178411.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c88178411.thfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c88178411.thfilter1,tp,LOCATION_REMOVED,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c88178411.thfilter1,tp,LOCATION_REMOVED,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c88178411.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(Group.FromCards(c,tc),nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
--野游的八云家
function c88178414.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x596),aux.NonTuner(Card.IsSetCard,0x596),1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88178414,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,88178414)
e1:SetCondition(c88178414.remcon)
e1:SetTarget(c88178414.remtg)
e1:SetOperation(c88178414.remop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88178414,4))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,88278414)
e2:SetCondition(c88178414.spcon)
e2:SetTarget(c88178414.sptg)
e2:SetOperation(c88178414.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88178414,5))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e3:SetCountLimit(1,88378414)
e3:SetCost(c88178414.damcost)
e3:SetTarget(c88178414.damtg)
e3:SetOperation(c88178414.damop)
c:RegisterEffect(e3)
end
function c88178414.remcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c88178414.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c88178414.remop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil)
local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
local sg=Group.CreateGroup()
if g1:GetCount()>0 and ((g2:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(88178414,1))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1)
end
if g2:GetCount()>0 and ((sg:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(88178414,2))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg2=g2:Select(tp,1,1,nil)
Duel.HintSelection(sg2)
sg:Merge(sg2)
end
if g3:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(88178414,3))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg3=g3:RandomSelect(tp,1)
sg:Merge(sg3)
end
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
function c88178414.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:IsPreviousLocation(LOCATION_MZONE) and rp==1-tp and c:IsPreviousControler(tp)
end
function c88178414.spfilter(c,e,tp)
return c:IsSetCard(0x596) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c88178414.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178414.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end
function c88178414.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c88178414.spfilter),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.Overlay(tc,c)
end
end
function c88178414.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckOrExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),tp,SEQ_DECKSHUFFLE,REASON_COST)
end
function c88178414.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
end
function c88178414.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
\ No newline at end of file
--东方的幻想巫女 博丽灵梦
function c88188002.initial_effect(c)
c:EnableCounterPermit(0x0592)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88188002,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,88188002)
e1:SetTarget(c88188002.thtg)
e1:SetOperation(c88188002.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c88188002.reptg)
e3:SetOperation(c88188002.repop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(88188002,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,88189002)
e4:SetCondition(c88188002.spcon)
e4:SetTarget(c88188002.sptg)
e4:SetOperation(c88188002.spop)
c:RegisterEffect(e4)
end
function c88188002.thfilter(c)
return c:IsSetCard(0x3592) and ((c:IsType(TYPE_SPELL) and (c:IsType(TYPE_CONTINUOUS) or c:IsType(TYPE_EQUIP) or c:IsType(TYPE_FIELD) or c:IsType(TYPE_QUICKPLAY) or c:IsType(TYPE_RITUAL))) or c:IsType(TYPE_TRAP)) and c:IsAbleToHand()
end
function c88188002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88188002.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c88188002.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88188002.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if c:IsRelateToEffect(e) and c:IsCanAddCounter(0x0592,3) then
c:AddCounter(0x0592,3)
end
end
end
function c88188002.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and c:IsCanRemoveCounter(tp,0x0592,1,REASON_EFFECT)
end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c88188002.repop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(tp,0x0592,1,REASON_EFFECT)
end
function c88188002.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c88188002.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 c88188002.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--东方的幻想魔法使 雾雨魔理沙
function c88188003.initial_effect(c)
--to gy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88188003,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,88188003)
e1:SetCost(c88188003.tgcost)
e1:SetTarget(c88188003.tgtg)
e1:SetOperation(c88188003.tgop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetTarget(c88188003.reptg)
e2:SetValue(c88188003.repval)
e2:SetOperation(c88188003.repop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88188003,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,88189003)
e3:SetTarget(c88188003.sptg)
e3:SetOperation(c88188003.spop)
c:RegisterEffect(e3)
end
function c88188003.tgfilter(c)
return c:IsSetCard(0x3592) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c88188003.tgcost(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 c88188003.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88188003.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c88188003.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c88188003.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c88188003.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsSetCard(0x3592) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c88188003.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c88188003.repfilter,1,c,tp) and c:IsAbleToRemove()
and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c88188003.repval(e,c)
return c88188003.repfilter(c,e:GetHandlerPlayer())
end
function c88188003.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
function c88188003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c88188003.filter(c)
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR)
end
function c88188003.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--幻想的人偶使 爱丽丝
function c88198005.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88198005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,88198005+EFFECT_COUNT_CODE_DUEL)
e1:SetTarget(c88198005.target)
e1:SetOperation(c88198005.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,88298005+EFFECT_COUNT_CODE_DUEL)
e2:SetTarget(c88198005.sptg)
e2:SetOperation(c88198005.spop)
c:RegisterEffect(e2)
end
function c88198005.filter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsLevelAbove(3)
end
function c88198005.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c88198005.filter(chkc) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c88198005.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsPlayerCanSpecialSummonMonster(tp,88198007,nil,TYPES_TOKEN_MONSTER,0,0,1,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c88198005.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
function c88198005.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) or tc:GetLevel()<3 then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-2)
tc:RegisterEffect(e1)
if not tc:IsImmuneToEffect(e1) and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,88198007,nil,TYPES_TOKEN_MONSTER,0,0,1,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,88198007)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c88198005.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
function c88198005.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
function c88198005.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsReleasable()
end
function c88198005.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c88198005.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c88198005.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c88198005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,88198008,nil,TYPES_TOKEN_MONSTER,0,0,2,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c88198005.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,88198008,nil,TYPES_TOKEN_MONSTER,0,0,2,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,88198008)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c88198005.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--七色的人偶师 爱丽丝·玛格特罗依德
function c88198006.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,c88198006.tz,aux.NonTuner(Card.IsRace,RACE_SPELLCASTER),2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88198006,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,88198006)
e1:SetTarget(c88198006.remtg)
e1:SetOperation(c88198006.remop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88198006,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,88298006)
e2:SetCondition(c88198006.discon)
e2:SetCost(c88198006.discost)
e2:SetTarget(c88198006.distg)
e2:SetOperation(c88198006.disop)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88198006,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,88398006)
e2:SetCondition(c88198006.spcon)
e2:SetCost(c88198006.spcost)
e2:SetTarget(c88198006.sptg)
e2:SetOperation(c88198006.spop)
c:RegisterEffect(e2)
end
function c88198006.tz(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c88198006.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.IsPlayerCanSpecialSummonMonster(tp,88198007,nil,TYPES_TOKEN_MONSTER,0,0,1,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) and Duel.IsPlayerCanSpecialSummonMonster(tp,88198008,nil,TYPES_TOKEN_MONSTER,0,0,2,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
end
function c88198006.remop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.IsPlayerCanSpecialSummonMonster(tp,88198007,nil,TYPES_TOKEN_MONSTER,0,0,1,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) and Duel.IsPlayerCanSpecialSummonMonster(tp,88198008,nil,TYPES_TOKEN_MONSTER,0,0,2,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) then
local token1=Duel.CreateToken(tp,88198007)
local token2=Duel.CreateToken(tp,88198008)
Duel.SpecialSummon(token1,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(token2,0,tp,tp,false,false,POS_FACEUP)
end
end
function c88198006.discon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp
end
function c88198006.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_TOKEN) and c:IsReleasable()
end
function c88198006.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c88198006.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c88198006.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c88198006.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c88198006.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c88198006.spcfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsRace(RACE_SPELLCASTER) and c:IsPreviousControler(tp)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function c88198006.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c88198006.spcfilter,1,nil,tp)
end
function c88198006.spcost(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 c88198006.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return true end
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c88198006.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--奇妙幻想乡
function c88199001.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,88199001+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c88199001.target)
e1:SetOperation(c88199001.operation)
c:RegisterEffect(e1)
end
function c88199001.filter1(c)
return c:GetType()==TYPE_SPELL and c:IsSetCard(0x3592)
and Duel.IsExistingMatchingCard(c88199001.filter2,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c88199001.filter2(c,code)
return aux.IsCodeListed(c,code) and c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c88199001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88199001.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c88199001.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g1=Duel.SelectMatchingCard(tp,c88199001.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g1:GetCount()==0 then return end
Duel.ConfirmCards(1-tp,g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c88199001.filter2,tp,LOCATION_DECK,0,1,1,nil,g1:GetFirst():GetCode())
Duel.ConfirmCards(1-tp,g2)
if g2:GetCount()~=0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
--幻想乡的被遗忘者 冴月麟
function c88199002.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88199002,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCountLimit(1,88199002)
e1:SetCost(c88199002.cost)
e1:SetTarget(c88199002.target)
e1:SetOperation(c88199002.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88199002,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,88299002)
e2:SetTarget(c88199002.thtg)
e2:SetOperation(c88199002.thop)
c:RegisterEffect(e2)
end
function c88199002.costfilter(c)
return c:IsSetCard(0x3592) and c:IsAbleToRemoveAsCost()
end
function c88199002.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88199002.costfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c88199002.costfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c88199002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c88199002.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c88199002.thfilter(c)
return c:IsSetCard(0x6592) and c:IsAbleToHand()
end
function c88199002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88199002.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c88199002.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88199002.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
\ No newline at end of file
--决斗者的秘宝 星之魔方
function c9300006.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
aux.AddCodeList(c,14175008)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.ritlimit)
c:RegisterEffect(e0)
--left zone
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9300006,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetCondition(c9300006.sccon1)
e1:SetTarget(c9300006.pftg)
e1:SetOperation(c9300006.pfop)
c:RegisterEffect(e1)
--right zone
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9300006,0))
e2:SetCategory(CATEGORY_DICE+CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
e2:SetCondition(c9300006.sccon2)
e2:SetTarget(c9300006.tg2)
e2:SetOperation(c9300006.op2)
c:RegisterEffect(e2)
--hand synchro
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EXTRA_SYNCHRO_MATERIAL)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,9300006)
e3:SetValue(c9300006.matval)
c:RegisterEffect(e3)
--register HOpT
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BE_PRE_MATERIAL)
e4:SetProperty(EFFECT_FLAG_EVENT_PLAYER+EFFECT_FLAG_CANNOT_DISABLE)
e4:SetLabelObject(e1)
e4:SetCondition(c9300006.hsyncon)
e4:SetOperation(c9300006.hsynreg)
c:RegisterEffect(e4)
--pendulum
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetOperation(c9300006.op)
c:RegisterEffect(e5)
--to Pzone
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(9300006,1))
e6:SetCategory(CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
e6:SetRange(LOCATION_GRAVE+LOCATION_EXTRA)
e6:SetCountLimit(1,9301006)
e6:SetCondition(c9300006.pencon)
e6:SetTarget(c9300006.pentg)
e6:SetOperation(c9300006.penop)
c:RegisterEffect(e6)
end
c9300006.toss_dice=true
c9300006.setname="MagiCube"
function c9300006.sccon1(e)
return e:GetHandler()==Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,0) and not e:GetHandler():IsDisabled()
end
function c9300006.filter1(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e) and c:IsDestructable(e)
end
function c9300006.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c9300006.pftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
local res=Duel.IsExistingMatchingCard(c9300006.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c9300006.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD)
end
function c9300006.pfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c9300006.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c9300006.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c9300006.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
local res=false
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
if Duel.Destroy(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)==#mat1 then
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
res=true
end
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
res=true
end
end
end
function c9300006.sccon2(e)
return e:GetHandler()==Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,1) and not e:GetHandler():IsDisabled()
end
function c9300006.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function c9300006.spfilter(c,e,tp,dc)
return c:GetOriginalType()&TYPE_RITUAL~=0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
and c:GetLevel()==dc
end
function c9300006.op2(e,tp,eg,ep,ev,re,r,rp)
local dc=Duel.TossDice(tp,1)
local rec=dc*100
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9300006.spfilter),tp,LOCATION_HAND+LOCATION_PZONE+LOCATION_GRAVE,0,nil,e,tp,dc)
if Duel.Recover(tp,rec,REASON_EFFECT)>0 and g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(9300006,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then
tc:SetMaterial(nil)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
end
function c9300006.matval(e,c)
return c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_TUNER)
end
function c9300006.hsyncon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return r==REASON_SYNCHRO and c9300006.matval(nil,c:GetReasonCard()) and c:IsPreviousLocation(LOCATION_HAND)
end
function c9300006.hsynreg(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():UseCountLimit(tp)
end
function c9300006.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsSummonType(SUMMON_TYPE_RITUAL) then return end
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9300006,2))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_EXTRA_PENDULUM_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetCountLimit(1,9300006)
e2:SetValue(c9300006.pendvalue)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c9300006.pendvalue(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
function c9300006.cfilter(c,tp)
return c:IsFaceup() and c:IsLinkAbove(3) and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsSummonPlayer(tp)
end
function c9300006.pencon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9300006.cfilter,1,nil,tp)
end
function c9300006.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
Duel.SetOperationInfo(0,0,e:GetHandler(),1,0,0)
end
function c9300006.penop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--褪去繁华
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(s.tg)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
end
function s.tgfilter1(c,e,tp)
return c:IsFaceup() and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function s.spfilter(c,e,tp,mc)
return (not c:IsType(TYPE_EFFECT)) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false,POS_FACEUP,c:GetControler()) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tp=e:GetHandler():GetControler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.tgfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.tgfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end
local tgp=tc:GetControler()
local code=tc:GetCode()
local att=tc:GetAttribute()
local rac=tc:GetRace()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tgp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(rac)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(att)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e3)
sc:CompleteProcedure()
end
end
--再来一杯
local s,id=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_DRAW)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--to decktop
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetTarget(s.dttg)
e2:SetOperation(s.dtop)
c:RegisterEffect(e2)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function s.dttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil) and c:IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function s.dtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil)
local tg=g:GetFirst()
if tg==nil then return end
if Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)
end
end
\ No newline at end of file
--功能性饮料 原汁不原味
local s,id=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.cost)
e1:SetTarget(s.tg1)
e1:SetOperation(s.op1)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
--
function s.cfilter(c)
return c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil):GetFirst()
Duel.ConfirmCards(1-tp,tc)
e:SetLabelObject(tc)
end
function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local res=e:GetLabel()==100
e:SetLabel(0)
return res
and Duel.GetMZoneCount(tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0,0x3286,1800,1200,4,nil,nil)
and not c:IsLocation(LOCATION_MZONE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function s.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
local att=tc:GetAttribute()
local rac=tc:GetRace()
if Duel.GetMZoneCount(tp)<1 then return end
if not c:IsRelateToEffect(e) then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0,0x3286,1800,1200,4,nil,nil) then
c:AddMonsterAttribute(TYPE_NORMAL,att)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(rac)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(att)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end
end
---
function s.refilter(c)
return c:IsAbleToRemove() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() and Duel.IsExistingMatchingCard(s.refilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(s.refilter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.refilter,tp,LOCATION_DECK,0,1,1,nil)
local tg=g:GetFirst()
if Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT)~=0 then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
end
......@@ -298,6 +298,7 @@
!setname 0xfb8 水歌
!setname 0x9fb8 水歌 大三角
!setname 0x3fb9 炫灵姬
!setname 0x6fb9 天外之灾
!setname 0x9fb9 缇璐娅
!setname 0xfba LA
!setname 0x1fba LA Da''ath
......@@ -986,6 +987,7 @@
#喜乐之面 564584932 473 0x430-0x43f
!setname 0x430 拟尘妖 M·D·S
!setname 0x431 面灵气
!setname 0x432 旅界
!setname 0x433 秘械龙
!setname 0x43f 妖精骑士
......@@ -1419,6 +1421,7 @@
#Amiya 1957539355 881 0x590-0x59f
!setname 0x590 二重战队
!setname 0x3590 超级二重战队
!setname 0x9590 歌者
!setname 0x3591 地灵殿
!setname 0x5591 古明地觉
!setname 0x6591 古明地恋
......@@ -1426,13 +1429,21 @@
!setname 0xa591 火焰猫磷
!setname 0x3592 东方Project
!setname 0x3593 红魔馆
!setname 0x6592 幻想乡
!setname 0x5593 芙兰
!setname 0x6593 蕾米莉亚
!setname 0x9593 斯卡雷特
!setname 0xa593 帕秋莉
!setname 0x594 雾之湖
!setname 0x595 白玉楼
!setname 0x596 八云
!setname 0x3596 八云紫
!setname 0x5596 八云式
!setname 0x6596 八云鵺
!counter 0x592 巫女指示物
!counter 0x1593 飞刀指示物
!counter 0x3597 旧地狱
#AddCodeList(88178304) 白玉楼卡名记述
#◇Slient Knight - 888 0x9e0-0x9ef
!setname 0x9ec 龙将
......
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