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
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment