Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alstroemeria-silentlove
ygopro-222DIY-cards
Commits
607e625c
Commit
607e625c
authored
Sep 09, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:purerosefallen/ygopro-222DIY-cards
parents
e6355cfd
fd4d2614
Changes
95
Show whitespace changes
Inline
Side-by-side
Showing
95 changed files
with
6343 additions
and
5193 deletions
+6343
-5193
expansions/script/c10199990.lua
expansions/script/c10199990.lua
+34
-2
expansions/script/c11200018.lua
expansions/script/c11200018.lua
+134
-0
expansions/script/c11200019.lua
expansions/script/c11200019.lua
+105
-0
expansions/script/c11200020.lua
expansions/script/c11200020.lua
+86
-0
expansions/script/c11200022.lua
expansions/script/c11200022.lua
+113
-0
expansions/script/c11200024.lua
expansions/script/c11200024.lua
+70
-0
expansions/script/c11200025.lua
expansions/script/c11200025.lua
+109
-0
expansions/script/c11200026.lua
expansions/script/c11200026.lua
+141
-0
expansions/script/c11200027.lua
expansions/script/c11200027.lua
+158
-0
expansions/script/c11200028.lua
expansions/script/c11200028.lua
+114
-0
expansions/script/c11200066.lua
expansions/script/c11200066.lua
+71
-0
expansions/script/c1156012.lua
expansions/script/c1156012.lua
+10
-1
expansions/script/c14801037.lua
expansions/script/c14801037.lua
+117
-95
expansions/script/c14801051.lua
expansions/script/c14801051.lua
+81
-58
expansions/script/c14801053.lua
expansions/script/c14801053.lua
+56
-79
expansions/script/c14801055.lua
expansions/script/c14801055.lua
+100
-88
expansions/script/c14801057.lua
expansions/script/c14801057.lua
+72
-61
expansions/script/c14801059.lua
expansions/script/c14801059.lua
+82
-36
expansions/script/c14801061.lua
expansions/script/c14801061.lua
+94
-95
expansions/script/c14801075.lua
expansions/script/c14801075.lua
+62
-93
expansions/script/c17060805.lua
expansions/script/c17060805.lua
+116
-124
expansions/script/c17060843.lua
expansions/script/c17060843.lua
+17
-24
expansions/script/c17060920.lua
expansions/script/c17060920.lua
+14
-45
expansions/script/c17060921.lua
expansions/script/c17060921.lua
+15
-8
expansions/script/c21520082.lua
expansions/script/c21520082.lua
+153
-153
expansions/script/c21520083.lua
expansions/script/c21520083.lua
+194
-194
expansions/script/c21520085.lua
expansions/script/c21520085.lua
+148
-148
expansions/script/c21520087.lua
expansions/script/c21520087.lua
+237
-237
expansions/script/c21520088.lua
expansions/script/c21520088.lua
+256
-256
expansions/script/c21520175.lua
expansions/script/c21520175.lua
+9
-9
expansions/script/c21520183.lua
expansions/script/c21520183.lua
+215
-215
expansions/script/c21520189.lua
expansions/script/c21520189.lua
+191
-191
expansions/script/c21520190.lua
expansions/script/c21520190.lua
+1
-1
expansions/script/c24562471.lua
expansions/script/c24562471.lua
+51
-51
expansions/script/c33330001.lua
expansions/script/c33330001.lua
+6
-43
expansions/script/c33330002.lua
expansions/script/c33330002.lua
+52
-53
expansions/script/c33330003.lua
expansions/script/c33330003.lua
+38
-40
expansions/script/c33330004.lua
expansions/script/c33330004.lua
+37
-40
expansions/script/c33330005.lua
expansions/script/c33330005.lua
+27
-35
expansions/script/c33330006.lua
expansions/script/c33330006.lua
+32
-40
expansions/script/c33330007.lua
expansions/script/c33330007.lua
+18
-24
expansions/script/c33330008.lua
expansions/script/c33330008.lua
+40
-51
expansions/script/c33330009.lua
expansions/script/c33330009.lua
+32
-39
expansions/script/c33330010.lua
expansions/script/c33330010.lua
+64
-73
expansions/script/c33330011.lua
expansions/script/c33330011.lua
+38
-49
expansions/script/c33330012.lua
expansions/script/c33330012.lua
+61
-58
expansions/script/c33330013.lua
expansions/script/c33330013.lua
+49
-55
expansions/script/c33330014.lua
expansions/script/c33330014.lua
+54
-59
expansions/script/c33330015.lua
expansions/script/c33330015.lua
+83
-92
expansions/script/c33330016.lua
expansions/script/c33330016.lua
+49
-54
expansions/script/c33330017.lua
expansions/script/c33330017.lua
+62
-39
expansions/script/c33330018.lua
expansions/script/c33330018.lua
+92
-90
expansions/script/c33330019.lua
expansions/script/c33330019.lua
+93
-112
expansions/script/c33330020.lua
expansions/script/c33330020.lua
+114
-94
expansions/script/c33330021.lua
expansions/script/c33330021.lua
+111
-94
expansions/script/c33330022.lua
expansions/script/c33330022.lua
+110
-93
expansions/script/c33330023.lua
expansions/script/c33330023.lua
+112
-107
expansions/script/c33330024.lua
expansions/script/c33330024.lua
+98
-98
expansions/script/c33330025.lua
expansions/script/c33330025.lua
+31
-36
expansions/script/c33330026.lua
expansions/script/c33330026.lua
+75
-26
expansions/script/c33330027.lua
expansions/script/c33330027.lua
+61
-64
expansions/script/c33330028.lua
expansions/script/c33330028.lua
+61
-64
expansions/script/c33330029.lua
expansions/script/c33330029.lua
+76
-76
expansions/script/c33330030.lua
expansions/script/c33330030.lua
+130
-109
expansions/script/c33330031.lua
expansions/script/c33330031.lua
+32
-38
expansions/script/c33330032.lua
expansions/script/c33330032.lua
+54
-61
expansions/script/c33330033.lua
expansions/script/c33330033.lua
+55
-61
expansions/script/c33330034.lua
expansions/script/c33330034.lua
+84
-72
expansions/script/c33330093.lua
expansions/script/c33330093.lua
+8
-7
expansions/script/c33330400.lua
expansions/script/c33330400.lua
+6
-6
expansions/script/c33330402.lua
expansions/script/c33330402.lua
+1
-1
expansions/script/c33330404.lua
expansions/script/c33330404.lua
+1
-1
expansions/script/c33330410.lua
expansions/script/c33330410.lua
+1
-1
expansions/script/c33330411.lua
expansions/script/c33330411.lua
+1
-1
expansions/script/c33330412.lua
expansions/script/c33330412.lua
+1
-1
expansions/script/c33330413.lua
expansions/script/c33330413.lua
+1
-1
expansions/script/c33400004.lua
expansions/script/c33400004.lua
+1
-1
expansions/script/c33400007.lua
expansions/script/c33400007.lua
+69
-69
expansions/script/c33400008.lua
expansions/script/c33400008.lua
+1
-1
expansions/script/c33400009.lua
expansions/script/c33400009.lua
+3
-3
expansions/script/c33400010.lua
expansions/script/c33400010.lua
+3
-3
expansions/script/c33400013.lua
expansions/script/c33400013.lua
+90
-90
expansions/script/c33400014.lua
expansions/script/c33400014.lua
+1
-1
expansions/script/c33400033.lua
expansions/script/c33400033.lua
+4
-6
expansions/script/c33400103.lua
expansions/script/c33400103.lua
+66
-66
expansions/script/c33700939.lua
expansions/script/c33700939.lua
+1
-1
expansions/script/c33700940.lua
expansions/script/c33700940.lua
+1
-1
expansions/script/c65020067.lua
expansions/script/c65020067.lua
+79
-79
expansions/script/c65020068.lua
expansions/script/c65020068.lua
+80
-80
expansions/script/c65020069.lua
expansions/script/c65020069.lua
+100
-100
expansions/script/c65020070.lua
expansions/script/c65020070.lua
+102
-102
expansions/script/c65020071.lua
expansions/script/c65020071.lua
+71
-71
expansions/script/c65020072.lua
expansions/script/c65020072.lua
+93
-93
expansions/script/c65020076.lua
expansions/script/c65020076.lua
+1
-3
expansions/script/c65072014.lua
expansions/script/c65072014.lua
+0
-1
No files found.
expansions/script/c10199990.lua
View file @
607e625c
...
@@ -935,16 +935,29 @@ end
...
@@ -935,16 +935,29 @@ end
rsef
.
QO_OPPONENT_TURN
=
rsef
.
RegisterOPTurn
rsef
.
QO_OPPONENT_TURN
=
rsef
.
RegisterOPTurn
--Effect: Register Condition, Cost, Target and Operation
--Effect: Register Condition, Cost, Target and Operation
function
rsef
.
RegisterSolve
(
e
,
con
,
cost
,
tg
,
op
)
function
rsef
.
RegisterSolve
(
e
,
con
,
cost
,
tg
,
op
)
local
code
=
e
:
GetOwner
():
GetCode
()
if
con
then
if
con
then
if
type
(
con
)
~=
"function"
then
Debug
.
Message
(
code
..
" RegisterSolve con must be function"
)
end
e
:
SetCondition
(
con
)
e
:
SetCondition
(
con
)
end
end
if
cost
then
if
cost
then
if
type
(
cost
)
~=
"function"
then
Debug
.
Message
(
code
..
" RegisterSolve cost must be function"
)
end
e
:
SetCost
(
cost
)
e
:
SetCost
(
cost
)
end
end
if
tg
then
if
tg
then
if
type
(
tg
)
~=
"function"
then
Debug
.
Message
(
code
..
" RegisterSolve tg must be function"
)
end
e
:
SetTarget
(
tg
)
e
:
SetTarget
(
tg
)
end
end
if
op
then
if
op
then
if
type
(
op
)
~=
"function"
then
Debug
.
Message
(
code
..
" RegisterSolve op must be function"
)
end
e
:
SetOperation
(
op
)
e
:
SetOperation
(
op
)
end
end
end
end
...
@@ -1975,7 +1988,7 @@ function rscost.lpcost2(lp,max,islabel)
...
@@ -1975,7 +1988,7 @@ function rscost.lpcost2(lp,max,islabel)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
lp
)
end
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
lp
)
end
local
costmaxlp
=
math.floor
(
maxlp
/
lp
)
local
costmaxlp
=
math.floor
(
maxlp
/
lp
)
local
t
=
{}
local
t
=
{}
for
i
=
1
,
m
do
for
i
=
1
,
costmaxlp
do
t
[
i
]
=
i
*
lp
t
[
i
]
=
i
*
lp
end
end
local
cost
=
Duel
.
AnnounceNumber
(
tp
,
table.unpack
(
t
))
local
cost
=
Duel
.
AnnounceNumber
(
tp
,
table.unpack
(
t
))
...
@@ -2450,10 +2463,17 @@ function rscf.SetSpecialSummonProduce(cardtbl,range,con,op,desctbl,ctlimittbl,re
...
@@ -2450,10 +2463,17 @@ function rscf.SetSpecialSummonProduce(cardtbl,range,con,op,desctbl,ctlimittbl,re
local
tc1
,
tc2
,
ignore
=
rsef
.
GetRegisterCard
(
cardtbl
)
local
tc1
,
tc2
,
ignore
=
rsef
.
GetRegisterCard
(
cardtbl
)
if
not
desctbl
then
desctbl
=
rshint
.
spproc
end
if
not
desctbl
then
desctbl
=
rshint
.
spproc
end
local
flag
=
not
tc2
:
IsSummonableCard
()
and
"uc,cd"
or
"uc"
local
flag
=
not
tc2
:
IsSummonableCard
()
and
"uc,cd"
or
"uc"
local
e1
=
rsef
.
Register
(
cardtbl
,
EFFECT_TYPE_FIELD
,
EFFECT_SPSUMMON_PROC
,
desctbl
,
ctlimittbl
,
nil
,
flag
,
range
,
con
,
nil
,
nil
,
op
,
nil
,
nil
,
nil
,
resettbl
)
local
e1
=
rsef
.
Register
(
cardtbl
,
EFFECT_TYPE_FIELD
,
EFFECT_SPSUMMON_PROC
,
desctbl
,
ctlimittbl
,
nil
,
flag
,
range
,
rscf
.
SetSpecialSummonProduce_con
(
con
)
,
nil
,
nil
,
op
,
nil
,
nil
,
nil
,
resettbl
)
return
e1
return
e1
end
end
rssf
.
SetSpecialSummonProduce
=
rscf
.
SetSpecialSummonProduce
rssf
.
SetSpecialSummonProduce
=
rscf
.
SetSpecialSummonProduce
function
rscf
.
SetSpecialSummonProduce_con
(
con
)
return
function
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
con
(
e
,
c
,
tp
)
end
end
--Card/Summon effect: Is monster can normal or special summon
--Card/Summon effect: Is monster can normal or special summon
function
rscf
.
SetSummonCondition
(
cardtbl
,
isnsable
,
sumvalue
,
iseffectspsum
,
resettbl
)
function
rscf
.
SetSummonCondition
(
cardtbl
,
isnsable
,
sumvalue
,
iseffectspsum
,
resettbl
)
local
tc1
,
tc2
,
ignore
=
rsef
.
GetRegisterCard
(
cardtbl
)
local
tc1
,
tc2
,
ignore
=
rsef
.
GetRegisterCard
(
cardtbl
)
...
@@ -2809,6 +2829,7 @@ function rsef.ChangeFunction_Synchro()
...
@@ -2809,6 +2829,7 @@ function rsef.ChangeFunction_Synchro()
end
end
function
rscf
.
SynMixCheckGoal2
(
tp
,
sg
,
minc
,
ct
,
syncard
,
sg1
,
smat
,
gc
)
function
rscf
.
SynMixCheckGoal2
(
tp
,
sg
,
minc
,
ct
,
syncard
,
sg1
,
smat
,
gc
)
local
g
=
rsgf
.
Mix2
(
sg
,
sg1
)
local
g
=
rsgf
.
Mix2
(
sg
,
sg1
)
if
syncard
.
rssyncheckfun
and
not
syncard
.
rssyncheckfun
(
g
,
syncard
,
tp
)
then
return
false
end
local
f
=
Card
.
GetLevel
local
f
=
Card
.
GetLevel
local
f2
=
Card
.
GetSynchroLevel
local
f2
=
Card
.
GetSynchroLevel
local
darktunerg
=
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_TUNER
)
local
darktunerg
=
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_TUNER
)
...
@@ -2883,6 +2904,15 @@ function rscf.AddSynchroMixProcedure_ChangeTunerLevel(c,f1,lv,f2,f3,f4,minc,maxc
...
@@ -2883,6 +2904,15 @@ function rscf.AddSynchroMixProcedure_ChangeTunerLevel(c,f1,lv,f2,f3,f4,minc,maxc
return
e1
return
e1
end
end
rssf
.
AddSynchroMixProcedure_ChangeTunerLevel
=
rscf
.
AddSynchroMixProcedure_ChangeTunerLevel
rssf
.
AddSynchroMixProcedure_ChangeTunerLevel
=
rscf
.
AddSynchroMixProcedure_ChangeTunerLevel
function
rscf
.
AddSynchroMixProcedure_CheckMaterial
(
c
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
extrafilter
)
if
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
then
return
end
local
mt
=
getmetatable
(
c
)
mt
.
rssyncheckfun
=
extrafilter
rsef
.
ChangeFunction_Synchro
()
local
e1
=
rscf
.
AddSynchroMixProcedure
(
c
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
)
return
e1
end
rssf
.
AddSynchroMixProcedure_CheckMaterial
=
rscf
.
AddSynchroMixProcedure_CheckMaterial
--Card effect: Set field info
--Card effect: Set field info
function
rscf
.
SetFieldInfo
(
c
)
function
rscf
.
SetFieldInfo
(
c
)
local
seq
=
c
:
IsOnField
()
and
c
:
GetSequence
()
or
c
:
GetPreviousSequence
()
local
seq
=
c
:
IsOnField
()
and
c
:
GetSequence
()
or
c
:
GetPreviousSequence
()
...
@@ -3193,6 +3223,8 @@ function cm.initial_effect(c)
...
@@ -3193,6 +3223,8 @@ function cm.initial_effect(c)
"rsan" = "Arknights"
"rsan" = "Arknights"
"rsnm" = "Nightmare"
"rsnm" = "Nightmare"
"rsdt" = "DarkTale"
"rsdt" = "DarkTale"
"rseee" = "EEE"
"rshr" = "HarmonicRhythm"
}--]]
}--]]
end
end
end
end
\ No newline at end of file
expansions/script/c11200018.lua
0 → 100644
View file @
607e625c
--地上的月兔 铃仙·优昙华院·因幡
function
c11200018
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
11200018
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_RELEASE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
11200018
)
e1
:
SetTarget
(
c11200018
.
tg1
)
e1
:
SetOperation
(
c11200018
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DICE
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_ATKCHANGE
+
CATEGORY_DAMAGE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetCountLimit
(
1
,
11200118
)
e2
:
SetTarget
(
c11200018
.
tg2
)
e2
:
SetOperation
(
c11200018
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c11200018
.
tfilter1
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
8
,
rc
)
else
return
false
end
end
function
c11200018
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
):
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
if
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
if
ft
>
0
then
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
8
,
c
)
else
return
mg
:
IsExists
(
c11200018
.
tfilter1
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
--
function
c11200018
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
()
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
if
tc
then
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
local
mat
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
8
,
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
c11200018
.
tfilter1
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
8
,
tc
)
mat
:
Merge
(
mat2
)
end
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
e
:
SetLabel
(
mat
:
GetCount
())
if
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
--
function
c11200018
.
tfilter2
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x132
)
and
c
:
IsType
(
TYPE_SPELL
)
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
c
:
GetCode
(),
0x132
,
0x21
,
1100
,
1100
,
4
,
RACE_BEAST
,
ATTRIBUTE_LIGHT
)
end
function
c11200018
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
rcount
=
e
:
GetLabelObject
():
GetLabel
()
if
chk
==
0
then
if
not
e
:
GetLabelObject
()
then
return
false
end
if
not
e
:
GetLabelObject
():
GetLabel
()
then
return
false
end
if
e
:
GetLabelObject
():
GetLabel
()
<
1
then
return
false
end
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DICE
,
nil
,
0
,
tp
,
1
)
end
--
function
c11200018
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
rcount
=
e
:
GetLabelObject
():
GetLabel
()
local
dc1
,
dc2
,
dc3
,
dc4
,
dc5
,
dc6
=
Duel
.
TossDice
(
tp
,
rcount
)
local
dc
=
0
if
dc1
and
dc1
>
0
then
dc
=
dc
+
dc1
end
if
dc2
and
dc2
>
0
then
dc
=
dc
+
dc2
end
if
dc3
and
dc3
>
0
then
dc
=
dc
+
dc3
end
if
dc4
and
dc4
>
0
then
dc
=
dc
+
dc4
end
if
dc5
and
dc5
>
0
then
dc
=
dc
+
dc5
end
if
dc6
and
dc6
>
0
then
dc
=
dc
+
dc6
end
if
dc
%
2
==
1
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
dc
*
450
)
c
:
RegisterEffect
(
e1
)
local
e2_2
=
Effect
.
CreateEffect
(
c
)
e2_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_2
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e2_2
:
SetValue
(
c11200018
.
efilter2_2
)
e2_2
:
SetOwnerPlayer
(
tp
)
e2_2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
)
c
:
RegisterEffect
(
e2_2
)
end
if
dc
==
4
then
Duel
.
Damage
(
tp
,
1100
,
REASON_EFFECT
)
end
if
dc
%
2
==
0
then
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c11200018
.
tfilter2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
sg
:
GetCount
()
<
1
then
return
end
local
tc
=
sg
:
GetFirst
()
tc
:
AddMonsterAttribute
(
TYPE_NORMAL
,
ATTRIBUTE_LIGHT
,
RACE_BEAST
,
4
,
1100
,
1100
)
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummonComplete
()
end
end
--
function
c11200018
.
efilter2_2
(
e
,
re
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
expansions/script/c11200019.lua
0 → 100644
View file @
607e625c
--铃仙·优昙华院·因幡
function
c11200019
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
11200019
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
+
CATEGORY_DICE
+
CATEGORY_DAMAGE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
11200019
)
e1
:
SetCost
(
c11200019
.
cost1
)
e1
:
SetTarget
(
c11200019
.
tg1
)
e1
:
SetOperation
(
c11200019
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
11200019
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
11200119
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c11200019
.
tg2
)
e2
:
SetOperation
(
c11200019
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c11200019
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsPublic
()
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
end
--
function
c11200019
.
tfilter1
(
c
)
return
(
c
:
IsCode
(
24094653
)
or
(
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsRace
(
RACE_BEAST
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)))
and
c
:
IsAbleToHand
()
end
function
c11200019
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DICE
,
nil
,
0
,
tp
,
1
)
end
--
function
c11200019
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
dc
=
Duel
.
TossDice
(
tp
,
1
)
if
dc
>
0
and
dc
<
4
then
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
if
dc
==
4
then
Duel
.
Damage
(
tp
,
1100
,
REASON_EFFECT
)
end
if
dc
>
4
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c11200019
.
tfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
<
1
then
return
end
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
--
function
c11200019
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
sg
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
--
function
c11200019
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
local
e1_1
=
Effect
.
CreateEffect
(
c
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e1_1
:
SetValue
(
1
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e1_1
)
local
e1_2
=
Effect
.
CreateEffect
(
c
)
e1_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_2
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
e1_2
:
SetValue
(
1
)
e1_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e1_2
)
local
e1_3
=
Effect
.
CreateEffect
(
c
)
e1_3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_3
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
e1_3
:
SetValue
(
1
)
e1_3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e1_3
)
local
e1_4
=
Effect
.
CreateEffect
(
c
)
e1_4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_4
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1_4
:
SetValue
(
1
)
e1_4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e1_4
)
local
e1_5
=
Effect
.
CreateEffect
(
c
)
e1_5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_5
:
SetCode
(
EFFECT_MUST_ATTACK
)
e1_5
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e1_5
)
end
--
expansions/script/c11200020.lua
0 → 100644
View file @
607e625c
--月上的逃兵 铃仙·优昙华院·因幡
function
c11200020
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
11200020
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DICE
+
CATEGORY_DAMAGE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
11200020
)
e1
:
SetCost
(
c11200020
.
cost1
)
e1
:
SetTarget
(
c11200020
.
tg1
)
e1
:
SetOperation
(
c11200020
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
11200020
,
1
))
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_HAND
+
LOCATION_MZONE
)
e2
:
SetCondition
(
c11200020
.
con2
)
e2
:
SetCost
(
c11200020
.
cost2
)
e2
:
SetOperation
(
c11200020
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c11200020
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsPublic
()
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
end
--
function
c11200020
.
tfilter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x132
)
and
c
:
IsType
(
TYPE_SPELL
)
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
c
:
GetCode
(),
0x132
,
0x21
,
1100
,
1100
,
4
,
RACE_BEAST
,
ATTRIBUTE_LIGHT
)
end
function
c11200020
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DICE
,
nil
,
0
,
tp
,
1
)
end
--
function
c11200020
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
dc
=
Duel
.
TossDice
(
tp
,
1
)
if
dc
>
0
and
dc
<
4
then
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
if
dc
==
4
then
Duel
.
Damage
(
tp
,
1100
,
REASON_EFFECT
)
end
if
dc
>
4
then
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c11200020
.
tfilter1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
sg
:
GetCount
()
<
1
then
return
end
local
tc
=
sg
:
GetFirst
()
tc
:
AddMonsterAttribute
(
TYPE_NORMAL
,
ATTRIBUTE_LIGHT
,
RACE_BEAST
,
4
,
1100
,
1100
)
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
tc
:
AddMonsterAttributeComplete
()
Duel
.
SpecialSummonComplete
()
end
end
--
function
c11200020
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttacker
():
GetControler
()
~=
tp
end
--
function
c11200020
.
cfilter2
(
c
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsSetCard
(
0x132
)
end
function
c11200020
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsReleasable
()
and
Duel
.
IsExistingMatchingCard
(
c11200020
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c11200020
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Release
(
c
,
REASON_COST
)
end
--
function
c11200020
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
NegateAttack
()
then
return
end
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE_STEP
,
1
)
end
--
expansions/script/c11200022.lua
0 → 100644
View file @
607e625c
--兔·兔
function
c11200022
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
c11200022
.
FusFilter
,
2
,
true
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DICE
+
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
+
CATEGORY_DAMAGE
+
CATEGORY_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
11200022
)
e1
:
SetCondition
(
c11200022
.
con1
)
e1
:
SetTarget
(
c11200022
.
tg1
)
e1
:
SetOperation
(
c11200022
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_TOSS_DICE_NEGATE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c11200022
.
con2
)
e2
:
SetOperation
(
c11200022
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c11200022
.
FusFilter
(
c
)
return
c
:
IsRace
(
RACE_BEAST
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
end
--
function
c11200022
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetSummonType
()
==
SUMMON_TYPE_FUSION
and
c
:
GetMaterialCount
()
>
0
end
--
function
c11200022
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DICE
,
nil
,
0
,
tp
,
1
)
end
--
function
c11200022
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
dc
=
Duel
.
TossDice
(
tp
,
1
)
if
dc
>
0
and
dc
<
4
then
local
num
=
dc
*
300
if
c
:
IsFacedown
()
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
e1_1
=
Effect
.
CreateEffect
(
c
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1_1
:
SetValue
(
num
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e1_1
)
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
sc
=
sg
:
GetFirst
()
while
sc
do
local
e1_2
=
Effect
.
CreateEffect
(
c
)
e1_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1_2
:
SetValue
(
-
num
)
e1_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
sc
:
RegisterEffect
(
e1_2
)
local
e1_3
=
Effect
.
CreateEffect
(
c
)
e1_3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e1_3
:
SetValue
(
-
num
)
e1_3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
sc
:
RegisterEffect
(
e1_3
)
sc
=
sg
:
GetNext
()
end
Duel
.
Damage
(
1
-
tp
,
num
,
REASON_EFFECT
)
end
if
dc
==
4
then
Duel
.
Damage
(
tp
,
1100
,
REASON_EFFECT
)
end
if
dc
>
4
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
<
1
then
return
end
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c11200022
.
ofilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
tg
:
GetCount
()
<
1
then
return
end
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
--
function
c11200022
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetSummonType
()
==
SUMMON_TYPE_FUSION
and
c
:
GetFlagEffect
(
11200022
)
==
0
end
function
c11200022
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
cc
=
Duel
.
GetCurrentChain
()
local
cid
=
Duel
.
GetChainInfo
(
cc
,
CHAININFO_CHAIN_ID
)
if
c11200022
[
0
]
~=
cid
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
11200022
,
1
))
then
Duel
.
Hint
(
HINT_CARD
,
0
,
11200022
)
e
:
GetHandler
():
RegisterFlagEffect
(
11200022
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
dc
=
{
Duel
.
GetDiceResult
()}
local
ac
=
1
local
ct
=
bit
.
band
(
ev
,
0xff
)
+
bit
.
rshift
(
ev
,
16
)
if
ct
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
11200022
,
2
))
local
val
,
idx
=
Duel
.
AnnounceNumber
(
tp
,
table.unpack
(
dc
,
1
,
ct
))
ac
=
idx
+
1
end
dc
[
ac
]
=
7
Duel
.
SetDiceResult
(
table.unpack
(
dc
))
c11200022
[
0
]
=
cid
end
end
expansions/script/c11200024.lua
0 → 100644
View file @
607e625c
--『月面弹跳』
function
c11200024
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
11200024
)
e1
:
SetTarget
(
c11200024
.
tg1
)
e1
:
SetOperation
(
c11200024
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
11200124
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetCost
(
c11200024
.
cost2
)
e2
:
SetTarget
(
c11200024
.
tg2
)
e2
:
SetOperation
(
c11200024
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c11200024
.
tfilter1
(
c
)
return
c
:
IsCode
(
11200019
)
or
(
c
:
IsSetCard
(
0x132
)
and
c
:
IsAbleToHand
())
end
function
c11200024
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c11200024
.
tfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
--
function
c11200024
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c11200024
.
tfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
<
1
then
return
end
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
--
function
c11200024
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToDeckAsCost
()
end
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_COST
)
end
--
function
c11200024
.
tfilter2
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x132
)
and
c
:
IsType
(
TYPE_SPELL
)
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
c
:
GetCode
(),
0x132
,
0x21
,
1100
,
1100
,
4
,
RACE_BEAST
,
ATTRIBUTE_LIGHT
)
end
function
c11200024
.
tg2
(
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
Duel
.
IsExistingMatchingCard
(
c11200024
.
tfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
0
,
tp
,
LOCATION_HAND
)
end
--
function
c11200024
.
op2
(
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
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c11200024
.
tfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
sg
:
GetCount
()
<
1
then
return
end
local
sc
=
sg
:
GetFirst
()
sc
:
AddMonsterAttribute
(
TYPE_NORMAL
,
ATTRIBUTE_LIGHT
,
RACE_BEAST
,
4
,
1100
,
1100
)
Duel
.
SpecialSummonStep
(
sc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummonComplete
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
--
expansions/script/c11200025.lua
0 → 100644
View file @
607e625c
--『地上弹跳』
function
c11200025
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
11200025
)
e1
:
SetCost
(
c11200025
.
cost1
)
e1
:
SetTarget
(
c11200025
.
tg1
)
e1
:
SetOperation
(
c11200025
.
op1
)
c
:
RegisterEffect
(
e1
)
--
if
not
c11200025
.
check
then
c11200025
.
check
=
true
local
e2
=
Effect
.
GlobalEffect
()
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetOperation
(
c11200025
.
op2
)
Duel
.
RegisterEffect
(
e2
,
0
)
end
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
11200125
)
e3
:
SetCost
(
c11200025
.
cost3
)
e3
:
SetTarget
(
c11200025
.
tg3
)
e3
:
SetOperation
(
c11200025
.
op3
)
c
:
RegisterEffect
(
e3
)
--
end
--
function
c11200025
.
cfilter1
(
c
)
return
c
:
IsRace
(
RACE_BEAST
)
and
c
:
IsReleasable
()
end
function
c11200025
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c11200025
.
cfilter1
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c11200025
.
cfilter1
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
Release
(
sg
,
REASON_EFFECT
)
end
--
function
c11200025
.
tfilter1
(
c
)
return
c
:
IsAbleToHand
()
and
c
:
IsSetCard
(
0x132
)
end
function
c11200025
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c11200025
.
tfilter1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
--
function
c11200025
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c11200025
.
tfilter1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetFlagEffect
(
tp
,
11200025
)
>
0
then
return
end
if
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
c
:
GetCode
(),
0x132
,
0x21
,
1100
,
1100
,
4
,
RACE_BEAST
,
ATTRIBUTE_LIGHT
)
then
return
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
11200025
,
0
))
then
c
:
AddMonsterAttribute
(
TYPE_NORMAL
,
ATTRIBUTE_LIGHT
,
RACE_BEAST
,
4
,
1100
,
1100
)
Duel
.
SpecialSummonStep
(
c
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
c
:
AddMonsterAttributeComplete
()
local
e1_1
=
Effect
.
CreateEffect
(
c
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1_1
:
SetValue
(
1
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e1_1
,
true
)
local
e1_2
=
Effect
.
CreateEffect
(
c
)
e1_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_2
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e1_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1_2
:
SetValue
(
LOCATION_REMOVED
)
c
:
RegisterEffect
(
e1_2
,
true
)
Duel
.
SpecialSummonComplete
()
end
end
--
function
c11200025
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
if
not
re
:
IsActiveType
(
TYPE_MONSTER
)
then
return
end
Duel
.
RegisterFlagEffect
(
rc
:
GetControler
(),
11200025
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
--
function
c11200025
.
cost3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToHandAsCost
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToHandAsCost
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_COST
)
end
--
function
c11200025
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
c
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
--
function
c11200025
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
--
expansions/script/c11200026.lua
0 → 100644
View file @
607e625c
--『幻胧月睨』
function
c11200026
.
initial_effect
(
c
)
--
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e0
:
SetValue
(
1
)
c
:
RegisterEffect
(
e0
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
11200026
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c11200026
.
tg1
)
e1
:
SetOperation
(
c11200026
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_DISABLE
)
c
:
RegisterEffect
(
e2
)
--
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e4
:
SetCode
(
EFFECT_SET_CONTROL
)
e4
:
SetCondition
(
c11200026
.
con4
)
e4
:
SetValue
(
c11200026
.
val4
)
c
:
RegisterEffect
(
e4
)
--
if
not
c11200026
.
global_check
then
c11200026
.
global_check
=
true
local
e5
=
Effect
.
GlobalEffect
()
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCode
(
EVENT_CHAINING
)
e5
:
SetOperation
(
c11200026
.
op5
)
Duel
.
RegisterEffect
(
e5
,
0
)
end
--
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_EQUIP
)
e6
:
SetRange
(
LOCATION_SZONE
)
e6
:
SetOperation
(
c11200026
.
op6
)
c
:
RegisterEffect
(
e6
)
--
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_EQUIP
)
e7
:
SetCode
(
EFFECT_CHANGE_ATTRIBUTE
)
e7
:
SetValue
(
ATTRIBUTE_LIGHT
)
c
:
RegisterEffect
(
e7
)
--
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_EQUIP
)
e8
:
SetCode
(
EFFECT_CHANGE_RACE
)
e8
:
SetValue
(
RACE_BEAST
)
c
:
RegisterEffect
(
e8
)
--
end
--
function
c11200026
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
--
function
c11200026
.
op1
(
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
c11200026
.
con4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
e
:
GetHandler
():
GetControler
(),
11200026
)
<
1
end
--
function
c11200026
.
val4
(
e
,
c
)
return
e
:
GetHandlerPlayer
()
end
--
function
c11200026
.
op5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
if
not
re
:
IsActiveType
(
TYPE_MONSTER
)
then
return
end
Duel
.
RegisterFlagEffect
(
rc
:
GetControler
(),
11200026
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
--
function
c11200026
.
op6
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
eg
:
GetFirst
()
~=
c
then
return
end
local
tc
=
c
:
GetEquipTarget
()
if
not
tc
then
return
end
local
e6_1
=
Effect
.
CreateEffect
(
c
)
e6_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6_1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6_1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e6_1
:
SetRange
(
LOCATION_MZONE
)
e6_1
:
SetLabelObject
(
c
)
e6_1
:
SetValue
(
11200019
)
e6_1
:
SetCondition
(
c11200026
.
con6_1
)
tc
:
RegisterEffect
(
e6_1
)
local
e6_2
=
Effect
.
CreateEffect
(
c
)
e6_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e6_2
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e6_2
:
SetValue
(
1
)
e6_2
:
SetLabelObject
(
c
)
e6_2
:
SetCondition
(
c11200026
.
con6_2
)
tc
:
RegisterEffect
(
e6_2
)
local
e6_3
=
Effect
.
CreateEffect
(
c
)
e6_3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6_3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6_3
:
SetCode
(
11200026
)
e6_3
:
SetRange
(
LOCATION_MZONE
)
e6_3
:
SetLabelObject
(
c
)
e6_3
:
SetCondition
(
c11200026
.
con6_2
)
c
:
RegisterEffect
(
e6_3
)
end
--
function
c11200026
.
con6_1
(
e
)
local
c
=
e
:
GetHandler
()
local
g
=
c
:
GetEquipGroup
()
if
g
:
IsContains
(
e
:
GetLabelObject
())
then
return
not
e
:
GetLabelObject
():
IsDisabled
()
else
return
false
end
end
--
function
c11200026
.
con6_2
(
e
)
local
c
=
e
:
GetHandler
()
local
g
=
c
:
GetEquipGroup
()
local
p
=
e
:
GetLabelObject
():
GetControler
()
if
g
:
IsContains
(
e
:
GetLabelObject
())
then
return
c
:
IsControler
(
p
)
and
c
:
GetOwner
()
~=
p
and
not
e
:
GetLabelObject
():
IsDisabled
()
else
return
false
end
end
--
expansions/script/c11200027.lua
0 → 100644
View file @
607e625c
--乌冬
function
c11200027
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_RECOVER
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
11200027
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c11200027
.
tg1
)
e1
:
SetOperation
(
c11200027
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
11200027
,
0
))
e2
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_RECOVER
+
CATEGORY_DICE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
11200027
)
e2
:
SetCost
(
c11200027
.
cost2
)
e2
:
SetOperation
(
c11200027
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c11200027
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
700
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
700
)
end
--
function
c11200027
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
end
--
function
c11200027
.
cost2
(
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
c11200027
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
dc
=
Duel
.
TossDice
(
tp
,
1
)
if
dc
>
0
and
dc
<
5
then
local
e2_1
=
Effect
.
CreateEffect
(
c
)
e2_1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2_1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2_1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2_1
:
SetCondition
(
c11200027
.
con2_1
)
e2_1
:
SetOperation
(
c11200027
.
op2_1
)
e2_1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2_1
,
tp
)
local
e2_2
=
Effect
.
CreateEffect
(
c
)
e2_2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2_2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2_2
:
SetCondition
(
c11200027
.
con2_2
)
e2_2
:
SetOperation
(
c11200027
.
op2_2
)
e2_2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2_2
,
tp
)
local
e2_3
=
Effect
.
CreateEffect
(
c
)
e2_3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2_3
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e2_3
:
SetCondition
(
c11200027
.
con2_3
)
e2_3
:
SetOperation
(
c11200027
.
op2_3
)
e2_3
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2_3
,
tp
)
end
if
dc
>
4
then
local
e2_4
=
Effect
.
CreateEffect
(
c
)
e2_4
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2_4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2_4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2_4
:
SetCondition
(
c11200027
.
con2_4
)
e2_4
:
SetOperation
(
c11200027
.
op2_4
)
e2_4
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2_4
,
tp
)
local
e2_5
=
Effect
.
CreateEffect
(
c
)
e2_5
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2_5
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2_5
:
SetCondition
(
c11200027
.
con2_5
)
e2_5
:
SetOperation
(
c11200027
.
op2_5
)
e2_5
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2_5
,
tp
)
local
e2_6
=
Effect
.
CreateEffect
(
c
)
e2_6
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2_6
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e2_6
:
SetCondition
(
c11200027
.
con2_6
)
e2_6
:
SetOperation
(
c11200027
.
op2_6
)
e2_6
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2_6
,
tp
)
end
end
--
function
c11200027
.
cfilter2_1
(
c
,
sp
)
return
c
:
GetSummonPlayer
()
==
sp
end
function
c11200027
.
con2_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c11200027
.
cfilter2_1
,
1
,
nil
,
1
-
tp
)
and
(
not
re
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
or
re
:
IsHasType
(
EFFECT_TYPE_CONTINUOUS
))
end
function
c11200027
.
op2_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Recover
(
tp
,
700
,
REASON_EFFECT
)
end
--
function
c11200027
.
con2_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c11200027
.
cfilter2_1
,
1
,
nil
,
1
-
tp
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
and
not
re
:
IsHasType
(
EFFECT_TYPE_CONTINUOUS
)
end
function
c11200027
.
op2_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
11200027
,
RESET_CHAIN
,
0
,
1
)
end
--
function
c11200027
.
con2_3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
11200027
)
>
0
end
function
c11200027
.
op2_3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
n
=
Duel
.
GetFlagEffect
(
tp
,
11200027
)
Duel
.
ResetFlagEffect
(
tp
,
11200027
)
Duel
.
Recover
(
tp
,
n
*
700
,
REASON_EFFECT
)
end
--
function
c11200027
.
con2_4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c11200027
.
cfilter2_1
,
1
,
nil
,
1
-
tp
)
and
(
not
re
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
or
re
:
IsHasType
(
EFFECT_TYPE_CONTINUOUS
))
end
function
c11200027
.
op2_4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
11200028
)
>=
3
then
return
end
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
RegisterFlagEffect
(
tp
,
11200028
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
--
function
c11200027
.
con2_5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c11200027
.
cfilter2_1
,
1
,
nil
,
1
-
tp
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
and
not
re
:
IsHasType
(
EFFECT_TYPE_CONTINUOUS
)
end
function
c11200027
.
op2_5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
11200029
,
RESET_CHAIN
,
0
,
1
)
end
--
function
c11200027
.
con2_6
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
11200029
)
>
0
end
function
c11200027
.
op2_6
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
n
=
Duel
.
GetFlagEffect
(
tp
,
11200029
)
local
num
=
Duel
.
GetFlagEffect
(
tp
,
11200028
)
if
n
>
3
-
num
then
n
=
3
-
num
end
Duel
.
ResetFlagEffect
(
tp
,
11200029
)
if
n
>
0
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
while
n
>
0
do
Duel
.
RegisterFlagEffect
(
tp
,
11200028
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
n
=
n
-
1
end
end
--
expansions/script/c11200028.lua
0 → 100644
View file @
607e625c
--幻之月
function
c11200028
.
initial_effect
(
c
)
--
if
not
c11200028
.
global_check
then
c11200028
.
global_check
=
true
local
e0
=
Effect
.
GlobalEffect
()
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetCode
(
EVENT_CHAINING
)
e0
:
SetCondition
(
c11200028
.
con0
)
e0
:
SetOperation
(
c11200028
.
op0
)
Duel
.
RegisterEffect
(
e0
,
0
)
end
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DICE
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
11200028
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c11200028
.
tg1
)
e1
:
SetOperation
(
c11200028
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetOperation
(
c11200028
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c11200028
.
con0
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
re
:
GetHandler
():
IsCode
(
11200019
)
end
--
function
c11200028
.
op0
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
rp
,
11200025
,
0
,
0
,
0
)
end
--
function
c11200028
.
tfilter1
(
c
)
return
(
c
:
IsCode
(
24094653
)
or
(
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsRace
(
RACE_BEAST
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)))
and
c
:
IsAbleToHand
()
end
function
c11200028
.
tg1
(
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
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
c
:
GetCode
(),
0x132
,
0x21
,
1100
,
1100
,
4
,
RACE_BEAST
,
ATTRIBUTE_LIGHT
)
and
Duel
.
IsExistingMatchingCard
(
c11200028
.
tfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DICE
,
nil
,
0
,
tp
,
1
)
end
--
function
c11200028
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
dc
=
Duel
.
TossDice
(
tp
,
1
)
if
dc
==
1
or
dc
==
2
or
dc
==
3
or
dc
==
4
then
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
c
:
GetCode
(),
0x132
,
0x21
,
1100
,
1100
,
4
,
RACE_BEAST
,
ATTRIBUTE_LIGHT
)
then
c
:
AddMonsterAttribute
(
TYPE_EFFECT
)
Duel
.
SpecialSummonStep
(
c
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
c
:
AddMonsterAttributeComplete
()
Duel
.
SpecialSummonComplete
()
end
elseif
dc
==
5
or
dc
==
6
then
local
b1
=
Duel
.
IsExistingMatchingCard
(
c11200028
.
tfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
local
b2
=
Duel
.
GetFlagEffect
(
tp
,
11200025
)
<
1
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
if
not
(
b1
or
b2
)
then
return
end
local
off
=
1
local
ops
=
{}
local
opval
=
{}
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
11200028
,
0
)
opval
[
off
-
1
]
=
1
off
=
off
+
1
end
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
11200028
,
1
)
opval
[
off
-
1
]
=
2
off
=
off
+
1
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
sel
=
opval
[
op
]
if
sel
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c11200028
.
tfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
<
1
then
return
end
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
else
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
else
end
end
--
function
c11200028
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e2_1
=
Effect
.
CreateEffect
(
c
)
e2_1
:
SetType
(
EFFECT_TYPE_FIELD
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2_1
:
SetTarget
(
c11200028
.
tg2_1
)
e2_1
:
SetValue
(
700
)
e2_1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
)
Duel
.
RegisterEffect
(
e2_1
,
tp
)
local
e2_2
=
e2_1
:
Clone
()
e2_2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
Duel
.
RegisterEffect
(
e2_2
,
tp
)
end
--
function
c11200028
.
tg2_1
(
e
,
c
)
return
c
:
IsRace
(
RACE_BEAST
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
end
--
expansions/script/c11200066.lua
0 → 100644
View file @
607e625c
--远古的欺诈师 因幡帝
function
c11200066
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_MONSTER_SSET
)
e1
:
SetValue
(
TYPE_TRAP
)
c
:
RegisterEffect
(
e1
)
--
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCondition
(
c11200066
.
con3
)
e3
:
SetTarget
(
c11200066
.
tg3
)
e3
:
SetOperation
(
c11200066
.
op3
)
c
:
RegisterEffect
(
e3
)
--
end
--
--
function
c11200066
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
not
eg
then
return
false
end
local
tc
=
eg
:
GetFirst
()
if
chkc
then
return
chkc
==
tc
end
if
chk
==
0
then
return
ep
~=
tp
and
tc
:
IsFaceup
()
and
tc
:
GetAttack
()
>=
1000
and
tc
:
IsOnField
()
and
tc
:
IsCanBeEffectTarget
(
e
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsSetCard
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
0xffee
)
end
Duel
.
SetTargetCard
(
eg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
0
,
0
)
end
--
function
c11200066
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
if
tc
:
IsFacedown
()
then
return
end
if
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
if
tc
:
GetAttack
()
<
1000
then
return
end
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsSetCard
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
0xffee
)
if
sg
:
GetCount
()
<
1
then
return
end
local
sc
=
sg
:
GetFirst
()
if
sc
:
IsLocation
(
LOCATION_GRAVE
)
then
Duel
.
MoveSequence
(
sc
,
0
)
Duel
.
ConfirmDecktop
(
tp
,
1
)
else
Duel
.
SendtoDeck
(
sc
,
nil
,
0
,
REASON_EFFECT
)
end
end
--
function
c11200066
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
and
c
:
IsPreviousPosition
(
POS_FACEDOWN
)
end
--
function
c11200066
.
tg3
(
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
c11200066
.
op3
(
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
--
expansions/script/c1156012.lua
View file @
607e625c
...
@@ -56,11 +56,20 @@ function c1156012.op1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -56,11 +56,20 @@ function c1156012.op1(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
--
--
--
function
c1156012
.
cfilter2
(
c
)
return
c
:
IsFacedown
()
or
(
not
c
:
IsAttribute
(
ATTRIBUTE_WATER
))
end
function
c1156012
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1156012
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSequence
()
>=
5
local
c
=
e
:
GetHandler
()
return
c
:
GetSequence
()
>=
5
and
not
Duel
.
IsExistingMatchingCard
(
c1156012
.
cfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
--
--
function
c1156012
.
limit2
(
e
,
re
,
tp
)
function
c1156012
.
limit2
(
e
,
re
,
tp
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
re
:
GetHandler
():
IsAttribute
(
ATTRIBUTE_WATER
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
re
:
GetHandler
():
IsAttribute
(
ATTRIBUTE_WATER
)
end
end
--
--
expansions/script/c14801037.lua
View file @
607e625c
--灾厄
重融合
--灾厄
岩兽 雷德王
function
c14801037
.
initial_effect
(
c
)
function
c14801037
.
initial_effect
(
c
)
--Activate
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
14801037
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
14801037
,
0
))
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetTarget
(
c14801037
.
target
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetOperation
(
c14801037
.
activate
)
e1
:
SetCountLimit
(
1
,
14801037
)
e1
:
SetTarget
(
c14801037
.
thtg
)
e1
:
SetOperation
(
c14801037
.
thop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--draw
local
e4
=
e1
:
Clone
()
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e2
:
SetDescription
(
aux
.
Stringid
(
14801037
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
14801037
,
1
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_GRAV
E
)
e2
:
SetRange
(
LOCATION_MZON
E
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
,
14801037
)
e2
:
SetCountLimit
(
1
,
148010371
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetTarget
(
c14801037
.
tdtg
)
e2
:
SetCondition
(
c14801037
.
spcon
)
e2
:
SetOperation
(
c14801037
.
tdop
)
e2
:
SetTarget
(
c14801037
.
sptg
)
e2
:
SetOperation
(
c14801037
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
14801037
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetCountLimit
(
1
,
148010372
)
e3
:
SetCondition
(
c14801037
.
spbcon
)
e3
:
SetTarget
(
c14801037
.
spbtg
)
e3
:
SetOperation
(
c14801037
.
spbop
)
c
:
RegisterEffect
(
e3
)
end
end
function
c14801037
.
filter0
(
c
)
function
c14801037
.
thfilter
(
c
)
return
(
c
:
IsLocation
(
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
or
c
:
IsFaceup
())
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
return
(
c
:
IsSetCard
(
0x4800
)
and
c
:
IsType
(
TYPE_MONSTER
))
and
not
c
:
IsCode
(
14801037
)
and
c
:
IsAbleToHand
()
end
end
function
c14801037
.
filter1
(
c
,
e
)
function
c14801037
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c14801037
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c14801037
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c14801037
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
end
function
c14801037
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
function
c14801037
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x4800
)
and
(
not
f
or
f
(
c
))
local
tc
=
Duel
.
GetFirstTarget
()
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
if
tc
:
IsRelateToEffect
(
e
)
then
end
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
function
c14801037
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg
=
Duel
.
GetMatchingGroup
(
c14801037
.
filter0
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c14801037
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c14801037
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
return
res
end
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
end
function
c14801037
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801037
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
ph
=
Duel
.
GetCurrentPhase
()
local
mg
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
c14801037
.
filter1
),
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
and
Duel
.
GetTurnPlayer
()
==
1
-
tp
local
sg1
=
Duel
.
GetMatchingGroup
(
c14801037
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg
,
nil
,
chkf
)
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
)
local
mg3
=
nil
end
local
sg2
=
nil
function
c14801037
.
thfilter1
(
c
)
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
return
c
:
IsFaceup
()
and
(
c
:
IsSetCard
(
0x4800
)
and
c
:
IsType
(
TYPE_MONSTER
))
and
c
:
IsAbleToGrave
()
if
ce
~=
nil
then
end
local
fgroup
=
ce
:
GetTarget
()
function
c14801037
.
thfilter2
(
c
)
mg3
=
fgroup
(
ce
,
e
,
tp
)
return
c
:
IsFaceup
()
and
(
c
:
IsSetCard
(
0x4800
)
and
c
:
IsType
(
TYPE_MONSTER
))
and
c
:
IsAbleToGrave
()
and
c
:
GetSequence
()
<
5
local
mf
=
ce
:
GetValue
()
end
sg2
=
Duel
.
GetMatchingGroup
(
c14801037
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
function
c14801037
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x4800
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c14801037
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
local
b
=
false
if
ft
>
0
then
b
=
Duel
.
IsExistingTarget
(
c14801037
.
thfilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
else
b
=
Duel
.
IsExistingTarget
(
c14801037
.
thfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
return
b
and
Duel
.
IsExistingTarget
(
c14801037
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
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
end
Duel
.
SendtoDeck
(
mat
,
nil
,
2
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
local
g1
=
nil
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
ft
>
0
then
g1
=
Duel
.
SelectTarget
(
tp
,
c14801037
.
thfilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
else
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
g1
=
Duel
.
SelectTarget
(
tp
,
c14801037
.
thfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
end
tc
:
CompleteProcedure
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
c14801037
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g1
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g2
,
1
,
0
,
0
)
e
:
SetLabelObject
(
g1
:
GetFirst
())
end
function
c14801037
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc1
,
tc2
=
Duel
.
GetFirstTarget
()
if
tc1
~=
e
:
GetLabelObject
()
then
tc1
,
tc2
=
tc2
,
tc1
end
if
tc1
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoGrave
(
tc1
,
REASON_EFFECT
)
>
0
and
tc1
:
IsLocation
(
LOCATION_GRAVE
)
and
tc2
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc2
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c14801037
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c14801037
.
spbcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
return
bit
.
band
(
r
,
REASON_EFFECT
+
REASON_BATTLE
)
~=
0
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
function
c14801037
.
spbfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x4800
)
and
not
c
:
IsCode
(
14801037
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c14801037
.
spbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c14801037
.
spbfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c14801037
.
spbfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c14801037
.
spbfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
end
function
c14801037
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801037
.
spbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoDeck
(
c
,
nil
,
0
,
REASON_EFFECT
)
~=
0
and
c
:
IsLocation
(
LOCATION_DECK
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
ShuffleDeck
(
tp
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
end
end
expansions/script/c14801051.lua
View file @
607e625c
--灾厄
魔鸟 桑德里阿斯
--灾厄
炎双 庞墩
function
c14801051
.
initial_effect
(
c
)
function
c14801051
.
initial_effect
(
c
)
--spsummon
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFun2
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x4800
),
aux
.
FilterBoolFunction
(
Card
.
IsFusionAttribute
,
ATTRIBUTE_FIRE
),
true
)
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
fuslimit
)
c
:
RegisterEffect
(
e1
)
--attackall
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
14801051
,
0
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetValue
(
1
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
14801051
)
e2
:
SetTarget
(
c14801051
.
target
)
e2
:
SetOperation
(
c14801051
.
operation
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e1
=
e2
:
Clone
()
--damage
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
14801051
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
14801051
,
0
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetCategory
(
CATEGORY_DAMAGE
+
CATEGORY_DECKDES
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
148010511
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetTarget
(
c14801051
.
thtg
)
e3
:
SetCountLimit
(
1
,
14801051
)
e3
:
SetOperation
(
c14801051
.
thop
)
e3
:
SetCondition
(
c14801051
.
damcon
)
e3
:
SetCost
(
c14801051
.
damcost
)
e3
:
SetTarget
(
c14801051
.
damtg
)
e3
:
SetOperation
(
c14801051
.
damop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
--dambage
e4
:
SetCode
(
EVENT_TO_GRAVE
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCondition
(
c14801051
.
thcon
)
e4
:
SetDescription
(
aux
.
Stringid
(
14801051
,
1
))
e4
:
SetCategory
(
CATEGORY_DAMAGE
)
e4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_QUICK_O
)
e4
:
SetRange
(
LOCATION_GRAVE
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetCountLimit
(
1
,
148010511
)
e4
:
SetCost
(
aux
.
bfgcost
)
e4
:
SetCondition
(
c14801051
.
dambcon
)
e4
:
SetTarget
(
c14801051
.
dambtg
)
e4
:
SetOperation
(
c14801051
.
dambop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
c14801051
.
filter2
(
c
,
e
,
tp
)
function
c14801051
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsSetCard
(
0x4800
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
and
Duel
.
GetTurnPlayer
()
==
1
-
tp
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
)
end
function
c14801051
.
costfilter
(
c
)
return
(
c
:
IsSetCard
(
0x4800
)
and
c
:
IsType
(
TYPE_FUSION
))
and
c
:
IsAbleToGrave
()
end
function
c14801051
.
damcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c14801051
.
costfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c14801051
.
costfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c14801051
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c14801051
.
ctfilter
(
c
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c14801051
.
filter2
(
chkc
,
e
,
tp
)
end
return
c
:
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c14801051
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c14801051
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
end
function
c14801051
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801051
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
Duel
.
GetFirstTarget
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c14801051
.
ctfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
if
tc
:
IsRelateToEffect
(
e
)
then
local
ct
=
Duel
.
GetMatchingGroupCount
(
c14801051
.
ctfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SetTargetPlayer
(
1
-
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
ct
*
400
)
end
end
function
c14801051
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801051
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
c14801051
.
ctfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
Duel
.
Damage
(
p
,
ct
*
400
,
REASON_EFFECT
)
end
end
function
c14801051
.
thfilter
(
c
)
function
c14801051
.
dambcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsSetCard
(
0x4800
)
and
not
c
:
IsCode
(
14801051
)
and
c
:
IsAbleToHand
(
)
return
aux
.
exccon
(
e
)
and
Duel
.
GetTurnPlayer
()
==
1
-
tp
and
(
Duel
.
GetCurrentPhase
()
>=
PHASE_BATTLE_START
and
Duel
.
GetCurrentPhase
()
<=
PHASE_BATTLE
)
end
end
function
c14801051
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c14801051
.
dambtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c14801051
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
0xe
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetTargetPlayer
(
1
-
tp
)
local
dam
=
Duel
.
GetFieldGroupCount
(
1
-
tp
,
0xe
,
0
)
*
200
Duel
.
SetTargetParam
(
dam
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
dam
)
end
end
function
c14801051
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801051
.
dambop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c14801051
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
dam
=
Duel
.
GetFieldGroupCount
(
1
-
tp
,
0xe
,
0
)
*
200
if
g
:
GetCount
()
>
0
then
Duel
.
Damage
(
p
,
dam
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
expansions/script/c14801053.lua
View file @
607e625c
--灾厄
魔鸟 鲁格赛特
--灾厄
冥硫 霍
function
c14801053
.
initial_effect
(
c
)
function
c14801053
.
initial_effect
(
c
)
--link summon
--fusion material
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x4800
),
2
,
99
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--destroy
aux
.
AddFusionProcFun2
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x4800
),
aux
.
FilterBoolFunction
(
Card
.
IsFusionAttribute
,
ATTRIBUTE_DARK
),
true
)
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
14801053
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetValue
(
aux
.
fuslimit
)
e1
:
SetCondition
(
c14801053
.
descon
)
e1
:
SetTarget
(
c14801053
.
destg
)
e1
:
SetOperation
(
c14801053
.
desop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
negate
--
destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
14801053
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
14801053
,
0
))
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
14801053
)
e2
:
SetCondition
(
c14801053
.
decon
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetTarget
(
c14801053
.
destg
)
e2
:
SetCondition
(
c14801053
.
discon
)
e2
:
SetOperation
(
c14801053
.
desop
)
e2
:
SetTarget
(
c14801053
.
distg
)
e2
:
SetOperation
(
c14801053
.
disop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
special summon
--
indes
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
14801053
,
2
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetValue
(
1
)
e3
:
SetCountLimit
(
1
,
148010531
)
e3
:
SetCondition
(
c14801053
.
spcon2
)
e3
:
SetTarget
(
c14801053
.
sptg2
)
e3
:
SetOperation
(
c14801053
.
spop2
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--negate
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
14801053
,
1
))
e4
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetCode
(
EVENT_CHAINING
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e4
:
SetRange
(
LOCATION_GRAVE
)
e4
:
SetCountLimit
(
1
,
14801053
)
e4
:
SetCondition
(
c14801053
.
negcon
)
e4
:
SetCost
(
aux
.
bfgcost
)
e4
:
SetTarget
(
c14801053
.
negtg
)
e4
:
SetOperation
(
c14801053
.
negop
)
c
:
RegisterEffect
(
e4
)
end
function
c14801053
.
decon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_FUSION
)
end
end
function
c14801053
.
des
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801053
.
des
filter
(
c
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
end
function
c14801053
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c14801053
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsOnField
()
and
c14801053
.
desfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
c
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c14801053
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c14801053
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
end
function
c14801053
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801053
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
c
)
if
tc
:
IsRelateToEffect
(
e
)
then
if
g
:
GetCount
()
>
0
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
end
end
function
c14801053
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801053
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
aux
.
exccon
(
e
)
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
ep
==
1
-
tp
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsChainNegatable
(
ev
)
and
Duel
.
IsChainNegatable
(
ev
)
and
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
end
end
function
c14801053
.
dis
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c14801053
.
neg
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
end
end
function
c14801053
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801053
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_COPY_INHERIT
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetValue
(
500
)
c
:
RegisterEffect
(
e1
)
end
end
function
c14801053
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
(
c
:
GetReasonPlayer
()
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
GetPreviousControler
()
==
tp
))
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
function
c14801053
.
spfilter2
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x4800
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c14801053
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c14801053
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c14801053
.
spop2
(
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
,
c14801053
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
expansions/script/c14801055.lua
View file @
607e625c
--灾厄
融合兽 雷霆杀手
--灾厄
恶兽 基路伯
function
c14801055
.
initial_effect
(
c
)
function
c14801055
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--spsummon
--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
)
c
:
RegisterEffect
(
e0
)
--handes
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
14801003
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
14801055
,
0
))
e1
:
SetCategory
(
CATEGORY_HANDES
)
e1
:
SetCategory
(
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c14801003
.
condition
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c14801003
.
target
)
e1
:
SetCountLimit
(
1
,
14801055
)
e1
:
SetOperation
(
c14801003
.
operation
)
e1
:
SetCondition
(
c14801055
.
spcon
)
e1
:
SetTarget
(
c14801055
.
sptg
)
e1
:
SetOperation
(
c14801055
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--disabl
e
--damag
e
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
14801003
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
14801055
,
1
))
e2
:
SetCategory
(
CATEGORY_DISABLE
)
e2
:
SetCategory
(
CATEGORY_DAMAGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c14801055
.
damcon
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetTarget
(
c14801055
.
damtg
)
e2
:
SetCountLimit
(
1
)
e2
:
SetOperation
(
c14801055
.
damop
)
e2
:
SetTarget
(
c14801003
.
distg
)
e2
:
SetOperation
(
c14801003
.
disop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--indes
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e4
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e4
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e4
)
end
end
function
c14801003
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801055
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
local
ph
=
Duel
.
GetCurrentPhase
()
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
and
Duel
.
GetTurnPlayer
()
==
1
-
tp
and
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
)
end
end
function
c14801003
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c14801055
.
filter1
(
c
,
e
)
if
chk
==
0
then
return
true
end
return
c
:
IsLocation
(
LOCATION_HAND
)
and
not
c
:
IsImmuneToEffect
(
e
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_HANDES
,
0
,
0
,
1
-
tp
,
1
)
end
function
c14801003
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
ep
,
LOCATION_HAND
,
0
)
local
sg
=
g
:
RandomSelect
(
ep
,
1
)
Duel
.
SendtoGrave
(
sg
,
REASON_DISCARD
+
REASON_EFFECT
)
end
end
function
c14801003
.
disfilter
(
c
)
function
c14801055
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
gc
,
chkf
)
return
c
:
IsFaceup
()
and
not
(
c
:
GetAttack
()
==
0
and
c
:
IsDisabled
())
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x4800
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
gc
,
chkf
)
end
end
function
c14801003
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c14801055
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c14801003
.
disfilter
(
chkc
)
end
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c14801003
.
disfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
if
chk
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
chkf
=
tp
local
g
=
Duel
.
SelectTarget
(
tp
,
c14801003
.
disfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
local
res
=
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c14801055
.
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
(
c14801055
.
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
)
end
end
function
c148010
03
.
dis
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c148010
55
.
sp
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
chkf
=
tp
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsImmuneToEffect
(
e
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c14801055
.
filter1
,
nil
,
e
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c14801055
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
c
,
chkf
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
local
mg2
=
nil
e1
:
SetValue
(
0
)
local
sg2
=
nil
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
tc
:
RegisterEffect
(
e1
)
if
ce
~=
nil
then
local
e2
=
Effect
.
CreateEffect
(
c
)
local
fgroup
=
ce
:
GetTarget
()
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
mg2
=
fgroup
(
ce
,
e
,
tp
)
e2
:
SetCode
(
EFFECT_DISABLE
)
local
mf
=
ce
:
GetValue
()
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
sg2
=
Duel
.
GetMatchingGroup
(
c14801055
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
c
,
chkf
)
tc
:
RegisterEffect
(
e2
)
end
local
e3
=
Effect
.
CreateEffect
(
c
)
if
(
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
sg1
:
GetCount
()
>
0
)
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
sg
=
sg1
:
Clone
()
e3
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
if
sg2
then
sg
:
Merge
(
sg2
)
end
e3
:
SetValue
(
RESET_TURN_SET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
tc
:
RegisterEffect
(
e3
)
local
tc
=
tg
:
GetFirst
()
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
e4
=
Effect
.
CreateEffect
(
c
)
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
c
,
chkf
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
tc
:
SetMaterial
(
mat1
)
e4
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
Duel
.
BreakEffect
()
tc
:
RegisterEffect
(
e4
)
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
end
tc
:
CompleteProcedure
()
end
end
end
end
function
c14801055
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
:
IsRelateToBattle
()
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsReason
(
REASON_BATTLE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
end
function
c14801055
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
500
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
500
)
end
function
c14801055
.
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
expansions/script/c14801057.lua
View file @
607e625c
--灾厄
融合兽 加拉德隆王
--灾厄
疾兽 百慕达
function
c14801057
.
initial_effect
(
c
)
function
c14801057
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--special summon
--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
)
c
:
RegisterEffect
(
e0
)
--atk/def
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetDescription
(
aux
.
Stringid
(
14801057
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetValue
(
c14801057
.
val
)
e1
:
SetCountLimit
(
1
,
14801057
)
e1
:
SetCondition
(
c14801057
.
spcon
)
e1
:
SetTarget
(
c14801057
.
sptg
)
e1
:
SetOperation
(
c14801057
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
--atk/def
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x4800
))
e2
:
SetValue
(
500
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--indes
local
e4
=
e2
:
Clone
()
e4
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e4
)
--tohand
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetDescription
(
aux
.
Stringid
(
14801057
,
1
))
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetValue
(
1
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
148010571
)
e3
:
SetCondition
(
c14801057
.
thcon
)
e3
:
SetTarget
(
c14801057
.
thtg
)
e3
:
SetOperation
(
c14801057
.
thop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--destroy
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_DESTROY
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
,
14801057
)
e4
:
SetCondition
(
c14801057
.
descon1
)
e4
:
SetTarget
(
c14801057
.
destg
)
e4
:
SetOperation
(
c14801057
.
desop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EVENT_BECOME_TARGET
)
e5
:
SetCondition
(
c14801057
.
descon2
)
c
:
RegisterEffect
(
e5
)
end
end
function
c14801057
.
val
(
e
,
c
)
function
c14801057
.
cfilter
(
c
)
return
Duel
.
GetMatchingGroupCount
(
Card
.
IsSetCard
,
c
:
GetControler
(),
LOCATION_GRAVE
,
0
,
nil
,
0x4800
)
*
300
return
c
:
IsFacedown
()
or
not
c
:
IsSetCard
(
0x4800
)
end
function
c14801057
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsExistingMatchingCard
(
c14801057
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c14801057
.
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
c14801057
.
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
end
function
c14801057
.
descon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801057
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsContains
(
e
:
GetHandler
()
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
c14801057
.
descon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801057
.
thfilter
(
c
)
return
rp
==
1
-
tp
and
eg
:
IsContains
(
e
:
GetHandler
()
)
return
(
c
:
IsSetCard
(
0x4800
)
and
c
:
IsType
(
TYPE_MONSTER
))
and
not
c
:
IsCode
(
14801057
)
and
c
:
IsAbleToHand
(
)
end
end
function
c14801057
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c14801057
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c14801057
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
end
function
c14801057
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801057
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c14801057
.
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
end
expansions/script/c14801059.lua
View file @
607e625c
--灾厄融合兽 贝蒙杰多
--灾厄深渊 古维拉
function
c14801059
.
initial_effect
(
c
)
function
c14801059
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFun2
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x4800
),
aux
.
FilterBoolFunction
(
Card
.
IsFusionAttribute
,
ATTRIBUTE_WATER
),
true
)
--spsummon condition
--spsummon condition
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e0
)
e1
:
SetValue
(
aux
.
fuslimit
)
--Immune
c
:
RegisterEffect
(
e1
)
--pos
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetDescription
(
aux
.
Stringid
(
14801059
,
0
))
e2
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e2
:
SetCategory
(
CATEGORY_POSITION
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetValue
(
aux
.
tgoval
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCondition
(
c14801059
.
pocon
)
e2
:
SetCountLimit
(
1
,
14801059
)
e2
:
SetTarget
(
c14801059
.
postg
)
e2
:
SetOperation
(
c14801059
.
posop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e1
=
e2
:
Clone
()
--destroy
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--pierce
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetDescription
(
aux
.
Stringid
(
14801059
,
1
))
e3
:
SetCode
(
EFFECT_PIERCE
)
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_BATTLE_START
)
e3
:
SetTarget
(
c14801059
.
targ
)
e3
:
SetOperation
(
c14801059
.
op
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--negate
--disable attack
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetDescription
(
aux
.
Stringid
(
14801059
,
2
))
e4
:
SetCode
(
EFFECT_DISABLE
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_GRAVE
)
e4
:
SetTarget
(
c14801059
.
distg
)
e4
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e4
:
SetCountLimit
(
1
,
148010591
)
e4
:
SetCost
(
aux
.
bfgcost
)
e4
:
SetCondition
(
c14801059
.
atkcon
)
e4
:
SetOperation
(
c14801059
.
atkop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
c14801059
.
distg
(
e
,
c
)
function
c14801059
.
pocon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
==
e
:
GetHandler
():
GetBattleTarget
()
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_FUSION
)
end
function
c14801059
.
filters
(
c
)
return
c
:
IsCanChangePosition
()
end
function
c14801059
.
postg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c14801059
.
filters
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c14801059
.
filters
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c14801059
.
filters
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
1
,
0
,
0
)
end
function
c14801059
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENSE
,
POS_FACEUP_ATTACK
,
POS_FACEUP_ATTACK
,
POS_FACEUP_ATTACK
)
end
end
function
c14801059
.
targ
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
d
=
Duel
.
GetAttackTarget
()
if
chk
==
0
then
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
and
d
~=
nil
and
d
:
IsFaceup
()
and
d
:
IsDefensePos
()
and
d
:
IsRelateToBattle
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
d
,
1
,
0
,
0
)
end
function
c14801059
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
d
=
Duel
.
GetAttackTarget
()
if
d
~=
nil
and
d
:
IsRelateToBattle
()
and
d
:
IsDefensePos
()
then
Duel
.
Destroy
(
d
,
REASON_EFFECT
)
end
end
function
c14801059
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
aux
.
exccon
(
e
)
end
function
c14801059
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateAttack
()
end
end
\ No newline at end of file
expansions/script/c14801061.lua
View file @
607e625c
--灾厄
融合龙 奇美拉柏洛斯
--灾厄
异兽 布鲁顿
function
c14801061
.
initial_effect
(
c
)
function
c14801061
.
initial_effect
(
c
)
--fusion material
--negate attack
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x4800
),
5
,
true
)
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetDescription
(
aux
.
Stringid
(
14801061
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetValue
(
aux
.
fuslimit
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
14801061
)
e1
:
SetCondition
(
c14801061
.
dimcom
)
e1
:
SetTarget
(
c14801061
.
dimtg
)
e1
:
SetOperation
(
c14801061
.
dimop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--Immune
--synchro effect
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetDescription
(
aux
.
Stringid
(
14801061
,
1
))
e2
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
aux
.
tgoval
)
e2
:
SetHintTiming
(
0
,
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e2
:
SetCountLimit
(
1
,
148010611
)
e2
:
SetCondition
(
c14801061
.
sccon
)
e2
:
SetTarget
(
c14801061
.
sctg
)
e2
:
SetOperation
(
c14801061
.
scop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
--tohand
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetValue
(
1
)
e3
:
SetDescription
(
aux
.
Stringid
(
14801061
,
2
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
148010612
)
e3
:
SetCondition
(
c14801061
.
thcon
)
e3
:
SetTarget
(
c14801061
.
thtg
)
e3
:
SetOperation
(
c14801061
.
thop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--Equip
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
14801061
,
1
))
e5
:
SetCategory
(
CATEGORY_EQUIP
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_DESTROYED
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetTarget
(
c14801061
.
eqtg
)
e5
:
SetOperation
(
c14801061
.
eqop
)
c
:
RegisterEffect
(
e5
)
--Destroy
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
14801061
,
2
))
e6
:
SetCategory
(
CATEGORY_DESTROY
)
e6
:
SetType
(
EFFECT_TYPE_IGNITION
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCountLimit
(
1
)
e6
:
SetCost
(
c14801061
.
descost
)
e6
:
SetTarget
(
c14801061
.
destg
)
e6
:
SetOperation
(
c14801061
.
desop
)
c
:
RegisterEffect
(
e6
)
end
end
function
c14801061
.
filter
(
c
,
e
,
tp
)
function
c14801061
.
dimfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
GetPreviousControler
()
==
1
-
tp
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x4800
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
and
c
:
IsCanBeEffectTarget
(
e
)
and
not
c
:
IsForbidden
()
end
end
function
c14801061
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c14801061
.
dimcom
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chkc
then
return
eg
:
IsContains
(
chkc
)
and
c14801061
.
filter
(
chkc
,
e
,
tp
)
end
local
at
=
Duel
.
GetAttacker
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
return
at
:
GetControler
()
==
1
-
tp
and
Duel
.
IsExistingMatchingCard
(
c14801061
.
dimfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
eg
:
IsExists
(
c14801061
.
filter
,
1
,
nil
,
e
,
tp
)
end
end
local
g
=
eg
:
Filter
(
c14801061
.
filter
,
nil
,
e
,
tp
)
function
c14801061
.
dimtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
nil
local
c
=
e
:
GetHandler
()
if
g
:
GetCount
()
>
1
then
if
chk
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
else
tc
=
g
:
GetFirst
()
end
end
Duel
.
SetTargetCard
(
tc
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
tc
,
1
,
0
,
0
)
end
end
function
c14801061
.
eq
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801061
.
dim
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
NegateAttack
()
if
not
Duel
.
Equip
(
tp
,
tc
,
c
,
false
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
c14801061
.
eqlimit
)
tc
:
RegisterEffect
(
e1
)
end
end
end
end
function
c14801061
.
eqlimit
(
e
,
c
)
function
c14801061
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetOwner
()
==
c
if
Duel
.
GetTurnPlayer
()
==
tp
then
return
false
end
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
end
function
c14801061
.
mfilter
(
c
)
return
c
:
IsSetCard
(
0x4800
)
end
end
function
c14801061
.
tgfilter
(
c
,
tp
)
function
c14801061
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
c
:
IsAbleToGraveAsCost
()
if
chk
==
0
then
and
Duel
.
IsExistingMatchingCard
(
c14801061
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
c
:
GetRace
())
local
mg
=
Duel
.
GetMatchingGroup
(
c14801061
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
nil
,
mg
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c14801061
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetMatchingGroup
(
c14801061
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
nil
,
mg
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
nil
,
mg
)
end
end
end
function
c14801061
.
desfilter
(
c
,
rc
)
function
c14801061
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
rc
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
c14801061
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c14801061
.
thfilter
(
c
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetEquipGroup
():
IsExists
(
c14801061
.
tgfilter
,
1
,
nil
,
tp
)
end
return
c
:
IsSetCard
(
0x4800
)
and
not
c
:
IsCode
(
14801061
)
and
c
:
IsAbleToHand
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
e
:
GetHandler
():
GetEquipGroup
():
FilterSelect
(
tp
,
c14801061
.
tgfilter
,
1
,
1
,
nil
,
tp
)
e
:
SetLabel
(
g
:
GetFirst
():
GetRace
())
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c14801061
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c14801061
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c14801061
.
thfilter
(
chkc
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c14801061
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
e
:
GetLabel
())
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c14801061
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c14801061
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
end
function
c14801061
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801061
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c14801061
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
e
:
GetLabel
())
local
tc
=
Duel
.
GetFirstTarget
()
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
end
expansions/script/c14801075.lua
View file @
607e625c
--灾厄
融合
--灾厄
守卫 金古乔
function
c14801075
.
initial_effect
(
c
)
function
c14801075
.
initial_effect
(
c
)
--Activate
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFun2
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x4800
),
aux
.
FilterBoolFunction
(
Card
.
IsFusionAttribute
,
ATTRIBUTE_WIND
),
true
)
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
14801075
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetValue
(
aux
.
fuslimit
)
e1
:
SetTarget
(
c14801075
.
target
)
e1
:
SetOperation
(
c14801075
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--salvage
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetDescription
(
aux
.
Stringid
(
14801075
,
1
))
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetCost
(
c14801075
.
thcost
)
e2
:
SetTarget
(
c14801075
.
imtg
)
e2
:
SetTarget
(
c14801075
.
thtg
)
e2
:
SetValue
(
1
)
e2
:
SetOperation
(
c14801075
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e4
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e4
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e4
)
--special summon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
14801075
,
0
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetRange
(
LOCATION_GRAVE
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e5
:
SetCondition
(
c14801075
.
spcon
)
e5
:
SetCountLimit
(
1
,
14801075
)
e5
:
SetCost
(
aux
.
bfgcost
)
e5
:
SetTarget
(
c14801075
.
sptg
)
e5
:
SetOperation
(
c14801075
.
spop
)
c
:
RegisterEffect
(
e5
)
end
end
function
c14801075
.
filter1
(
c
,
e
)
function
c14801075
.
imtg
(
e
,
c
)
return
not
c
:
IsImmuneToEffect
(
e
)
return
c
:
IsSetCard
(
0x4800
)
and
not
c
:
IsCode
(
14801075
)
end
end
function
c14801075
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
function
c14801075
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x4800
)
and
(
not
f
or
f
(
c
))
local
ph
=
Duel
.
GetCurrentPhase
()
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
return
aux
.
exccon
(
e
)
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
and
Duel
.
GetTurnPlayer
()
==
1
-
tp
and
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
end
end
function
c14801075
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c14801075
.
spfilter
(
c
,
e
,
tp
)
if
chk
==
0
then
return
((
c
:
IsSetCard
(
0x4800
)
and
c
:
IsType
(
TYPE_FUSION
))
and
not
c
:
IsCode
(
14801075
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c14801075
.
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
(
c14801075
.
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
end
function
c14801075
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801075
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
chkf
=
tp
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c14801075
.
spfilter
(
chkc
,
e
,
tp
)
end
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c14801075
.
filter1
,
nil
,
e
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
local
sg1
=
Duel
.
GetMatchingGroup
(
c14801075
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
and
Duel
.
IsExistingTarget
(
c14801075
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
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
(
c14801075
.
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
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c14801075
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
tg
:
GetFirst
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
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
c14801075
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x4800
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c14801075
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c14801075
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c14801075
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c14801075
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c14801075
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14801075
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
end
end
end
end
expansions/script/c17060805.lua
View file @
607e625c
...
@@ -3,120 +3,25 @@ local m=17060805
...
@@ -3,120 +3,25 @@ local m=17060805
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
cm
.
dfc_front_side
=
m
cm
.
dfc_front_side
=
m
cm
.
dfc_back_side
=
17060843
cm
.
dfc_back_side
=
17060843
function
cm
.
initial_effect
(
c
,
alterf
)
function
cm
.
initial_effect
(
c
)
--xyz summon
--xyz summon
local
e0
=
Effect
.
CreateEffect
(
c
)
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_WARRIOR
),
4
,
2
,
cm
.
ovfilter
,
aux
.
Stringid
(
m
,
13
),
2
,
cm
.
xyzop
)
e0
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
c
:
EnableReviveLimit
()
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
--pendulum summon
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
aux
.
EnablePendulumAttribute
(
c
,
false
)
e0
:
SetRange
(
LOCATION_EXTRA
)
--pendulum set
e0
:
SetCondition
(
function
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCountFromEx
(
tp
)
local
ct
=-
ft
local
nmb
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
if
Duel
.
GetFieldGroupCount
(
c
:
GetControler
(),
LOCATION_MZONE
,
0
)
==
0
then
nmb
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
)
end
if
(
not
min
or
min
<=
1
)
and
nmb
:
IsExists
(
cm
.
ovfilter
,
1
,
nil
)
then
return
true
end
local
minc
=
2
local
maxc
=
2
if
min
then
if
min
>
minc
then
minc
=
min
end
if
max
<
maxc
then
maxc
=
max
end
if
minc
>
maxc
then
return
false
end
end
return
ct
<
minc
and
Duel
.
CheckXyzMaterial
(
c
,
cm
.
xyzfilter
,
4
,
minc
,
maxc
,
nmb
)
end
)
e0
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
og
,
min
,
max
)
if
og
and
not
min
then
return
true
end
local
ft
=
Duel
.
GetLocationCountFromEx
(
tp
)
local
ct
=-
ft
local
nmb
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
if
Duel
.
GetFieldGroupCount
(
c
:
GetControler
(),
LOCATION_MZONE
,
0
)
==
0
then
nmb
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
)
end
local
minc
=
2
local
maxc
=
2
if
min
then
if
min
>
minc
then
minc
=
min
end
if
max
<
maxc
then
maxc
=
max
end
end
local
b1
=
ct
<
minc
and
Duel
.
CheckXyzMaterial
(
c
,
cm
.
xyzfilter
,
4
,
minc
,
maxc
,
nmb
)
local
b2
=
(
not
min
or
min
<=
1
)
and
nmb
:
IsExists
(
cm
.
ovfilter
,
1
,
nil
)
local
g
=
nil
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
17060805
,
0
)))
then
e
:
SetLabel
(
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
g
=
nmb
:
FilterSelect
(
tp
,
cm
.
ovfilter
,
1
,
1
,
nil
,
c
)
if
op
then
op
(
e
,
tp
,
1
,
g
:
GetFirst
())
end
else
e
:
SetLabel
(
0
)
g
=
Duel
.
SelectXyzMaterial
(
tp
,
c
,
cm
.
xyzfilter
,
4
,
minc
,
maxc
,
nmb
)
end
if
g
then
g
:
KeepAlive
()
e
:
SetLabelObject
(
g
)
return
true
else
return
false
end
end
)
e0
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
if
og
and
not
min
then
local
sg
=
Group
.
CreateGroup
()
local
tc
=
og
:
GetFirst
()
while
tc
do
local
sg1
=
tc
:
GetOverlayGroup
()
sg
:
Merge
(
sg1
)
tc
=
og
:
GetNext
()
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
c
:
SetMaterial
(
og
)
Duel
.
Overlay
(
c
,
og
)
else
local
mg
=
e
:
GetLabelObject
()
if
e
:
GetLabel
()
==
1
then
local
tcode
=
e
:
GetHandler
().
dfc_back_side
e
:
GetHandler
():
SetEntityCode
(
tcode
,
true
)
e
:
GetHandler
():
ReplaceEffect
(
tcode
,
0
,
0
)
Duel
.
ShuffleExtra
(
tp
)
local
mg2
=
mg
:
GetFirst
():
GetOverlayGroup
()
if
mg2
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
c
,
mg2
)
end
else
local
sg
=
Group
.
CreateGroup
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
local
sg1
=
tc
:
GetOverlayGroup
()
sg
:
Merge
(
sg1
)
tc
=
mg
:
GetNext
()
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
end
c
:
SetMaterial
(
mg
)
Duel
.
Overlay
(
c
,
mg
)
mg
:
DeleteGroup
()
end
end
)
e0
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e0
)
--atk up
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCo
de
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCo
untLimit
(
1
)
e1
:
SetTarget
Range
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
cm
.
pctg
)
e1
:
Set
Value
(
2000
)
e1
:
Set
Operation
(
cm
.
pcop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--to deck
--to deck
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DAMAGE
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCondition
(
cm
.
tdcon
)
e2
:
SetCondition
(
cm
.
tdcon
)
...
@@ -129,30 +34,101 @@ end)
...
@@ -129,30 +34,101 @@ end)
e3
:
SetValue
(
cm
.
valcheck
)
e3
:
SetValue
(
cm
.
valcheck
)
e3
:
SetLabelObject
(
e2
)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--pendulum
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCondition
(
cm
.
pencon
)
e4
:
SetTarget
(
cm
.
pentg
)
e4
:
SetOperation
(
cm
.
penop
)
c
:
RegisterEffect
(
e4
)
--XYZ
--XYZ
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
6
))
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
6
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCode
(
EVENT_
ATTACK_ANNOUNCE
)
e5
:
SetCode
(
EVENT_
SPSUMMON_SUCCESS
)
e5
:
SetRange
(
LOCATION_EXTRA
)
e5
:
SetRange
(
LOCATION_EXTRA
)
e5
:
SetCondition
(
cm
.
xyzcon1
)
e5
:
SetHintTiming
(
0
,
TIMING_END_PHASE
+
TIMING_EQUIP
)
e5
:
SetProperty
()
e5
:
SetCondition
(
cm
.
xyzcon
)
e5
:
SetCost
(
cm
.
xyzcost1
)
e5
:
SetCost
(
cm
.
xyzcost1
)
e5
:
SetTarget
(
cm
.
xyztg1
)
e5
:
SetTarget
(
cm
.
xyztg1
)
e5
:
SetOperation
(
cm
.
xyzop1
)
e5
:
SetOperation
(
cm
.
xyzop1
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e5
:
Clone
()
e6
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e6
:
SetCondition
(
cm
.
xyzcon1
)
c
:
RegisterEffect
(
e6
)
end
cm
.
pendulum_level
=
4
cm
.
is_named_with_Fencing
=
1
cm
.
is_named_with_Million_Arthur
=
1
function
cm
.
IsFencing
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_Fencing
end
function
cm
.
IsMillion_Arthur
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_Million_Arthur
end
function
iCount
(
name
,
tp
,
m
,
id
)
return
((
name
==
"get"
or
name
==
"set"
)
and
{(
name
==
"get"
and
{
tonumber
(((
Duel
.
GetFlagEffect
(
tp
,
m
)
==
nil
)
and
{
0
}
or
{
Duel
.
GetFlagEffect
(
tp
,
m
)})[
1
])}
or
{
Debug
.
Message
(
""
,
"请使用Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)"
)
})[
1
]}
or
{(
bit
.
band
(
iCount
(
"get"
,
tp
,
m
,
id
),
math.pow
(
2
,
id
-
1
))
==
0
and
{
true
}
or
{
false
})[
1
]})[
1
]
end
end
function
cm
.
ovfilter
(
c
)
function
cm
.
ovfilter
(
c
)
return
(
c
:
IsRace
(
RACE_WARRIOR
)
and
c
:
IsType
(
TYPE_XYZ
)
or
not
c
:
IsLocation
(
LOCATION_MZONE
))
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsType
(
TYPE_XYZ
)
and
(
c
:
IsRace
(
RACE_WARRIOR
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsSetCard
(
0x700
)
or
not
c
:
IsLocation
(
LOCATION_GRAVE
))
end
function
cm
.
xyzop
(
e
,
tp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
and
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
end
Duel
.
PayLPCost
(
tp
,
math.floor
(
Duel
.
GetLP
(
tp
)
/
2
))
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
local
tcode
=
c
.
dfc_back_side
c
:
SetEntityCode
(
tcode
,
true
)
c
:
ReplaceEffect
(
tcode
,
0
,
0
)
Duel
.
ShuffleExtra
(
tp
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
c
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
RESET_LEAVE
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
m
,
3
))
end
function
cm
.
pcfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsForbidden
()
end
end
function
cm
.
xyzfilter
(
c
)
function
cm
.
pctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
(
not
c
:
IsLocation
(
LOCATION_MZONE
))
if
chk
==
0
then
return
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
and
(
c
:
IsSetCard
(
0x700
)
or
not
c
:
IsLocation
(
LOCATION_GRAVE
))
and
Duel
.
IsExistingMatchingCard
(
cm
.
pcfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
end
function
cm
.
pcop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
and
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
pcfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
MoveToField
(
g
:
GetFirst
(),
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
end
function
cm
.
tdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
tdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
and
e
:
GetLabel
()
==
1
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
and
e
:
GetLabel
()
==
1
end
end
function
cm
.
filter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
cm
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
function
cm
.
valcheck
(
e
,
c
)
function
cm
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
local
g
=
c
:
GetMaterial
()
if
g
:
IsExists
(
Card
.
IsType
,
1
,
nil
,
TYPE_XYZ
)
then
if
g
:
IsExists
(
Card
.
IsType
,
1
,
nil
,
TYPE_XYZ
)
then
...
@@ -161,19 +137,28 @@ function cm.valcheck(e,c)
...
@@ -161,19 +137,28 @@ function cm.valcheck(e,c)
e
:
GetLabelObject
():
SetLabel
(
0
)
e
:
GetLabelObject
():
SetLabel
(
0
)
end
end
end
end
function
cm
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
pencon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_MZONE
,
e
:
GetHandler
())
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
g
:
GetCount
()
>
0
end
return
bit
.
band
(
r
,
REASON_EFFECT
+
REASON_BATTLE
)
~=
0
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
end
end
function
cm
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
pentg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_MZONE
,
aux
.
ExceptThisCard
(
e
))
if
chk
==
0
then
return
Duel
.
CheckLocation
(
tp
,
LOCATION_SZONE
,
6
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_SZONE
,
7
)
end
if
g
:
GetCount
()
>
0
then
end
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
function
cm
.
penop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
CheckLocation
(
tp
,
LOCATION_SZONE
,
6
)
and
not
Duel
.
CheckLocation
(
tp
,
LOCATION_SZONE
,
7
)
then
return
false
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
end
end
function
cm
.
spfilter
(
c
,
sp
)
return
c
:
GetSummonPlayer
()
==
sp
end
function
cm
.
xyzcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
spfilter
,
1
,
nil
,
1
-
tp
)
end
function
cm
.
xyzcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
xyzcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
and
Duel
.
GetAttackTarget
()
==
nil
return
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
end
end
function
cm
.
xyzcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
xyzcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
@@ -209,3 +194,10 @@ function cm.atkval(e,c)
...
@@ -209,3 +194,10 @@ function cm.atkval(e,c)
local
g
=
e
:
GetHandler
():
GetOverlayGroup
():
Filter
(
cm
.
atkfilter
,
nil
)
local
g
=
e
:
GetHandler
():
GetOverlayGroup
():
Filter
(
cm
.
atkfilter
,
nil
)
return
g
:
GetSum
(
Card
.
GetAttack
)
return
g
:
GetSum
(
Card
.
GetAttack
)
end
end
function
cm
.
deffilter
(
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
GetDefense
()
>=
0
end
function
cm
.
defval
(
e
,
c
)
local
g
=
e
:
GetHandler
():
GetOverlayGroup
():
Filter
(
cm
.
deffilter
,
nil
)
return
g
:
GetSum
(
Card
.
GetDefense
)
end
\ No newline at end of file
expansions/script/c17060843.lua
View file @
607e625c
...
@@ -9,7 +9,7 @@ function cm.initial_effect(c)
...
@@ -9,7 +9,7 @@ function cm.initial_effect(c)
aux
.
EnablePendulumAttribute
(
c
,
false
)
aux
.
EnablePendulumAttribute
(
c
,
false
)
--immune
--immune
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
17060843
,
0
))
e0
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e0
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e0
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e0
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
...
@@ -17,28 +17,21 @@ function cm.initial_effect(c)
...
@@ -17,28 +17,21 @@ function cm.initial_effect(c)
e0
:
SetCondition
(
cm
.
imcon
)
e0
:
SetCondition
(
cm
.
imcon
)
e0
:
SetValue
(
cm
.
efilter
)
e0
:
SetValue
(
cm
.
efilter
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
--
--
atk
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetValue
(
1
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--atk
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
cm
.
cost
)
e2
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e2
)
--back
--back
local
e8
=
Effect
.
CreateEffect
(
c
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetCode
(
EVENT_
LEAVE_FIELD
)
e8
:
SetCode
(
EVENT_
ADJUST
)
e8
:
SetRange
(
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
+
LOCATION_HAND
+
LOCATION_EXTRA
)
e8
:
SetRange
(
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
+
LOCATION_HAND
+
LOCATION_EXTRA
)
e8
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_SET_AVAILABLE
)
e8
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_SET_AVAILABLE
)
e8
:
SetCondition
(
cm
.
backon
)
e8
:
SetCondition
(
cm
.
backon
)
...
@@ -69,12 +62,12 @@ end
...
@@ -69,12 +62,12 @@ end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e
2
=
Effect
.
CreateEffect
(
c
)
local
e
1
=
Effect
.
CreateEffect
(
c
)
e
2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e
1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e
2
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e
1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e
2
:
SetValue
(
c
:
GetAttack
()
*
2
)
e
1
:
SetValue
(
c
:
GetAttack
()
*
2
)
e
2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
e
1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e
2
)
c
:
RegisterEffect
(
e
1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
...
...
expansions/script/c17060920.lua
View file @
607e625c
...
@@ -4,28 +4,17 @@ local cm=_G["c"..m]
...
@@ -4,28 +4,17 @@ local cm=_G["c"..m]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--pendulum summon
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
17060920
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
cm
.
thcost
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e1
)
--scale
--scale
local
e
2
=
Effect
.
CreateEffect
(
c
)
local
e
0
=
Effect
.
CreateEffect
(
c
)
e
2
:
SetDescription
(
aux
.
Stringid
(
17060920
,
1
))
e
0
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e
2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SPECIAL_SUMMON
)
e
0
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SPECIAL_SUMMON
)
e
2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e
0
:
SetType
(
EFFECT_TYPE_IGNITION
)
e
2
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e
0
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e
2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e
0
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e
2
:
SetCountLimit
(
1
,
17060920
)
e
0
:
SetCountLimit
(
1
,
m
)
e
2
:
SetTarget
(
cm
.
sptg
)
e
0
:
SetTarget
(
cm
.
sptg
)
e
2
:
SetOperation
(
cm
.
spop
)
e
0
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e
2
)
c
:
RegisterEffect
(
e
0
)
end
end
cm
.
is_named_with_Million_Arthur
=
1
cm
.
is_named_with_Million_Arthur
=
1
cm
.
is_named_with_Symphony
=
1
cm
.
is_named_with_Symphony
=
1
...
@@ -37,35 +26,15 @@ function cm.IsSymphony(c)
...
@@ -37,35 +26,15 @@ function cm.IsSymphony(c)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_Symphony
return
m
and
m
.
is_named_with_Symphony
end
end
function
cm
.
thcost
(
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
cm
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x2702
)
and
c
:
IsAbleToHand
()
return
cm
.
IsSymphony
(
c
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
cm
.
thfilter1
(
c
)
return
c
:
IsAbleToHand
()
end
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_PZONE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
thfilter
1
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_PZONE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
thfilter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
thfilter
1
,
tp
,
LOCATION_PZONE
,
0
,
1
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
thfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
thfilter
1
,
tp
,
LOCATION_PZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
...
...
expansions/script/c17060921.lua
View file @
607e625c
...
@@ -6,17 +6,17 @@ function cm.initial_effect(c)
...
@@ -6,17 +6,17 @@ function cm.initial_effect(c)
aux
.
EnablePendulumAttribute
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--to hand
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
17060921
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
17060921
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetOperation
(
cm
.
thop
)
e1
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--scale
--scale
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
17060921
,
1
))
e0
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e0
:
SetType
(
EFFECT_TYPE_IGNITION
)
e0
:
SetType
(
EFFECT_TYPE_IGNITION
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e0
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
...
@@ -34,8 +34,15 @@ function cm.IsSymphony(c)
...
@@ -34,8 +34,15 @@ function cm.IsSymphony(c)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_Symphony
return
m
and
m
.
is_named_with_Symphony
end
end
function
iCount
(
name
,
tp
,
m
,
id
)
return
((
name
==
"get"
or
name
==
"set"
)
and
{(
name
==
"get"
and
{
tonumber
(((
Duel
.
GetFlagEffect
(
tp
,
m
)
==
nil
)
and
{
0
}
or
{
Duel
.
GetFlagEffect
(
tp
,
m
)})[
1
])}
or
{
Debug
.
Message
(
""
,
"请使用Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)"
)
})[
1
]}
or
{(
bit
.
band
(
iCount
(
"get"
,
tp
,
m
,
id
),
math.pow
(
2
,
id
-
1
))
==
0
and
{
true
}
or
{
false
})[
1
]})[
1
]
end
function
cm
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsFaceup
()
and
(
c
:
IsSetCard
(
0x2702
)
or
c
:
IsSetCard
(
0x700
))
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
return
c
:
IsFaceup
()
and
cm
.
IsSymphony
(
c
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsCode
(
17060921
)
and
c
:
IsAbleToHand
()
end
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
...
@@ -58,16 +65,16 @@ function cm.spfilter2(c,e,tp)
...
@@ -58,16 +65,16 @@ function cm.spfilter2(c,e,tp)
end
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_PZONE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
thfilter1
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_PZONE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
thfilter1
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
17060921
)
==
0
and
Duel
.
IsExistingTarget
(
cm
.
thfilter1
,
tp
,
LOCATION_PZONE
,
0
,
1
,
nil
)
if
chk
==
0
then
return
iCount
(
0
,
tp
,
m
,
1
)
and
Duel
.
IsExistingTarget
(
cm
.
thfilter1
,
tp
,
LOCATION_PZONE
,
0
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
thfilter1
,
tp
,
LOCATION_PZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
thfilter1
,
tp
,
LOCATION_PZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TO
HAND
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TO
DECK
,
g
,
1
,
0
,
0
)
Duel
.
RegisterFlagEffect
(
tp
,
17060921
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Sendto
Hand
(
tc
,
nil
,
REASON_EFFECT
)
~=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Sendto
Deck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
~=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
then
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
...
...
expansions/script/c21520082.lua
View file @
607e625c
expansions/script/c21520083.lua
View file @
607e625c
expansions/script/c21520085.lua
View file @
607e625c
expansions/script/c21520087.lua
View file @
607e625c
expansions/script/c21520088.lua
View file @
607e625c
expansions/script/c21520175.lua
View file @
607e625c
...
@@ -181,29 +181,29 @@ function c21520175.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -181,29 +181,29 @@ function c21520175.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local
gc
=
Duel
.
GetMatchingGroupCount
(
c21520175
.
drfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
nil
)
local
gc
=
Duel
.
GetMatchingGroupCount
(
c21520175
.
drfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
nil
)
local
h
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
local
h
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
local
fchk
=
Duel
.
IsExistingMatchingCard
(
c21520175
.
fcfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
local
fchk
=
Duel
.
IsExistingMatchingCard
(
c21520175
.
fcfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
local
d
=
gc
*
100
local
d
=
gc
*
300
if
fchk
then
d
=
d
*
2
end
local
ops
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
21520175
,
3
),
aux
.
Stringid
(
21520175
,
4
))
local
ops
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
21520175
,
3
),
aux
.
Stringid
(
21520175
,
4
))
e
:
SetLabel
(
ops
)
e
:
SetLabel
(
ops
)
if
ops
==
0
then
if
ops
==
0
then
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
21520175
,
3
))
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
21520175
,
3
))
if
fchk
then
d
=
d
*
2
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
d
)
Duel
.
SetTargetParam
(
d
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
0
,
0
,
1
-
tp
,
d
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
0
,
0
,
1
-
tp
,
gc
*
300
)
elseif
ops
==
1
then
elseif
ops
==
1
then
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
21520175
,
4
))
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
21520175
,
4
))
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
3
-
h
)
Duel
.
SetTargetParam
(
2
-
h
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
3
-
h
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
-
h
)
end
end
end
end
function
c21520175
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c21520175
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
ops
=
e
:
GetLabel
()
local
ops
=
e
:
GetLabel
()
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
fchk
=
Duel
.
IsExistingMatchingCard
(
c21520175
.
fcfilter
,
t
p
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
local
fchk
=
Duel
.
IsExistingMatchingCard
(
c21520175
.
fcfilter
,
p
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
if
ops
==
0
then
if
ops
==
0
then
local
gc
=
Duel
.
GetMatchingGroupCount
(
c21520175
.
drfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
nil
)
*
1
00
local
gc
=
Duel
.
GetMatchingGroupCount
(
c21520175
.
drfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
nil
)
*
3
00
if
fchk
then
gc
=
gc
*
2
end
if
fchk
then
gc
=
gc
*
2
end
Duel
.
Damage
(
p
,
gc
,
REASON_EFFECT
)
Duel
.
Damage
(
p
,
gc
,
REASON_EFFECT
)
elseif
ops
==
1
then
elseif
ops
==
1
then
...
@@ -211,9 +211,9 @@ function c21520175.drop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -211,9 +211,9 @@ function c21520175.drop(e,tp,eg,ep,ev,re,r,rp)
if
hc
>=
3
then
return
end
if
hc
>=
3
then
return
end
Duel
.
Draw
(
p
,
3
-
hc
,
REASON_EFFECT
)
Duel
.
Draw
(
p
,
3
-
hc
,
REASON_EFFECT
)
local
hg
=
Duel
.
GetFieldGroup
(
1
-
p
,
LOCATION_HAND
,
0
)
local
hg
=
Duel
.
GetFieldGroup
(
1
-
p
,
LOCATION_HAND
,
0
)
if
not
fchk
and
Duel
.
SelectYesNo
(
1
-
p
,
aux
.
Stringid
(
21520175
,
5
))
then
if
hg
:
GetCount
()
>
0
and
not
fchk
and
Duel
.
SelectYesNo
(
1
-
p
,
aux
.
Stringid
(
21520175
,
5
))
then
Duel
.
Hint
(
HINT_CARD
,
p
,
21520175
)
Duel
.
Hint
(
HINT_CARD
,
p
,
21520175
)
if
hg
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
hg
,
REASON_EFFECT
+
REASON_DISCARD
)
end
Duel
.
SendtoGrave
(
hg
,
REASON_EFFECT
+
REASON_DISCARD
)
Duel
.
Draw
(
1
-
p
,
3
-
hg
:
GetCount
(),
REASON_EFFECT
)
Duel
.
Draw
(
1
-
p
,
3
-
hg
:
GetCount
(),
REASON_EFFECT
)
end
end
end
end
...
...
expansions/script/c21520183.lua
View file @
607e625c
expansions/script/c21520189.lua
View file @
607e625c
expansions/script/c21520190.lua
View file @
607e625c
...
@@ -6,7 +6,7 @@ function c21520190.initial_effect(c)
...
@@ -6,7 +6,7 @@ function c21520190.initial_effect(c)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
7
,
21520190
)
e1
:
SetCountLimit
(
1
,
21520190
)
e1
:
SetCondition
(
c21520190
.
spcon
)
e1
:
SetCondition
(
c21520190
.
spcon
)
e1
:
SetOperation
(
c21520190
.
spop
)
e1
:
SetOperation
(
c21520190
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
...
expansions/script/c24562471.lua
View file @
607e625c
...
@@ -7,7 +7,7 @@ function c24562471.initial_effect(c)
...
@@ -7,7 +7,7 @@ function c24562471.initial_effect(c)
e2
:
SetCode
(
EVENT_DAMAGE
)
e2
:
SetCode
(
EVENT_DAMAGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
,
24562471
)
e2
:
SetCondition
(
c24562471
.
drcon
)
e2
:
SetCondition
(
c24562471
.
drcon
)
e2
:
SetTarget
(
c24562471
.
drtg
)
e2
:
SetTarget
(
c24562471
.
drtg
)
e2
:
SetOperation
(
c24562471
.
drop
)
e2
:
SetOperation
(
c24562471
.
drop
)
...
...
expansions/script/c33330001.lua
View file @
607e625c
...
@@ -2,54 +2,17 @@
...
@@ -2,54 +2,17 @@
local
m
=
33330001
local
m
=
33330001
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--
I
ndes
--
i
ndes
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetValue
(
1
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
--direct atk
e2
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Direct Attack
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
c
:
RegisterEffect
(
e3
)
--search
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
33330001
,
0
))
e4
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCountLimit
(
1
,
m
)
e4
:
SetCost
(
c33330001
.
thcost
)
e4
:
SetTarget
(
c33330001
.
thtg
)
e4
:
SetOperation
(
c33330001
.
thop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e5
)
end
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
filter2
(
c
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsType
(
TYPE_FIELD
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter2
,
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
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
\ No newline at end of file
expansions/script/c33330002.lua
View file @
607e625c
--深界探窟者 雷古
--深界探窟者 雷古
local
m
=
33330002
function
c33330002
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--th2
cm
.
search
=
{
33330026
,
33330015
}
--检 索 的 卡
function
cm
.
initial_effect
(
c
)
--To Hand 1
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
33330002
,
1
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCountLimit
(
1
,
33330102
)
e1
:
SetCost
(
c
m
.
thcost1
)
e1
:
SetCost
(
c
33330002
.
cost
)
e1
:
SetTarget
(
c
m
.
thtg1
)
e1
:
SetTarget
(
c
33330002
.
target
)
e1
:
SetOperation
(
c
m
.
thop1
)
e1
:
SetOperation
(
c
33330002
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
To Hand 2
--
tohand
local
e
2
=
Effect
.
CreateEffect
(
c
)
local
e
4
=
Effect
.
CreateEffect
(
c
)
e
2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e
4
:
SetDescription
(
aux
.
Stringid
(
33330002
,
0
))
e
2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e
4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e
2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e
4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e
2
:
SetRange
(
LOCATION_MZONE
)
e
4
:
SetRange
(
LOCATION_MZONE
)
e
2
:
SetCountLimit
(
1
,
m
+
100
)
e
4
:
SetCountLimit
(
1
,
33330002
)
e
2
:
SetCost
(
cm
.
thcost2
)
e
4
:
SetCost
(
c33330002
.
thcost
)
e
2
:
SetTarget
(
cm
.
thtg2
)
e
4
:
SetTarget
(
c33330002
.
thtg
)
e
2
:
SetOperation
(
cm
.
thop2
)
e
4
:
SetOperation
(
c33330002
.
thop
)
c
:
RegisterEffect
(
e
2
)
c
:
RegisterEffect
(
e
4
)
end
end
cm
.
card_code_list
=
cm
.
search
function
c33330002
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
--To Hand 1
function
cm
.
thfilter1
(
c
)
return
c
:
IsType
(
TYPE_EQUIP
)
and
c
:
IsSetCard
(
0x556
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
)
end
function
cm
.
thtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
thop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
--To Hand 2
function
cm
.
thfilter2
(
c
,
code
)
return
c
:
IsCode
(
code
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thcost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
ct
=
g
:
GetCount
()
local
ct
=
g
:
GetCount
()
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
and
ct
>
0
and
g
:
FilterCount
(
Card
.
IsAbleToRemove
,
nil
)
==
ct
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
and
ct
>
0
and
g
:
FilterCount
(
Card
.
IsAbleToRemove
,
nil
)
==
ct
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
end
function
cm
.
thtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330002
.
filter1
(
c
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
cm
.
search
[
1
])
return
c
:
IsCode
(
33330026
)
and
c
:
IsAbleToHand
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
cm
.
search
[
2
])
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
function
c33330002
.
filter2
(
c
)
return
c
:
IsCode
(
33330015
)
and
c
:
IsAbleToHand
()
end
end
function
cm
.
thop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330002
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g1
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
thfilter2
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
nil
,
cm
.
search
[
1
])
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330002
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
thfilter2
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
nil
,
cm
.
search
[
2
])
and
Duel
.
IsExistingMatchingCard
(
c33330002
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
2
,
tp
,
LOCATION_DECK
)
end
function
c33330002
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g1
=
Duel
.
GetMatchingGroup
(
c33330002
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
c33330002
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g1
:
GetCount
()
>
0
and
g2
:
GetCount
()
>
0
then
if
g1
:
GetCount
()
>
0
and
g2
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg1
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg1
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
...
@@ -75,3 +54,23 @@ function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
...
@@ -75,3 +54,23 @@ function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ConfirmCards
(
1
-
tp
,
sg1
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg1
)
end
end
end
end
function
c33330002
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsAbleToGraveAsCost
,
1
,
1
,
REASON_COST
)
end
function
c33330002
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_EQUIP
)
and
c
:
IsSetCard
(
0x556
)
and
c
:
IsAbleToHand
()
end
function
c33330002
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330002
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c33330002
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33330002
.
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
expansions/script/c33330003.lua
View file @
607e625c
--深界探窟者 娜娜奇
--深界探窟者 娜娜奇
local
m
=
33330003
function
c33330003
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--search
function
cm
.
initial_effect
(
c
)
--Special Summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
33330003
,
0
))
e1
:
SetCategory
(
CATEGORY_
SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_
TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_
SUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_
TO_GRAVE
)
e1
:
SetProperty
(
EFFECT_FLAG_D
ELAY
+
EFFECT_FLAG_D
AMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCountLimit
(
1
,
33330003
)
e1
:
SetTarget
(
c
m
.
sptg
)
e1
:
SetTarget
(
c
33330003
.
thtg1
)
e1
:
SetOperation
(
c
m
.
spop
)
e1
:
SetOperation
(
c
33330003
.
tgop1
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
--special summon
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
33330003
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
33330103
)
e2
:
SetTarget
(
c33330003
.
sptg1
)
e2
:
SetOperation
(
c33330003
.
spop1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Search
local
e3
=
e2
:
Clone
()
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCountLimit
(
1
,
m
+
100
)
e3
:
SetTarget
(
cm
.
thtg
)
e3
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
--Special Summon
function
c33330003
.
spfilter1
(
c
,
e
,
tp
)
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x557
)
and
c
:
GetLevel
()
<=
4
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x557
)
and
c
:
IsLevelBelow
(
4
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330003
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c33330003
.
spfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
end
function
c
m
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330003
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
Get
MZoneCount
(
tp
)
<
1
then
return
end
if
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c
m
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c
33330003
.
spfilter1
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
--Search
function
c33330003
.
thfilter1
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x557
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x557
)
and
c
:
IsAbleToHand
()
end
end
function
c
m
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
33330003
.
thtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
33330003
.
thfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c
m
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330003
.
tgop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33330003
.
thfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
\ No newline at end of file
expansions/script/c33330004.lua
View file @
607e625c
--深界探窟者 马璐璐库
--深界探窟者 马璐璐库
local
m
=
33330004
function
c33330004
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--spsummon
function
cm
.
initial_effect
(
c
)
--Special Summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
33330004
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCountLimit
(
1
,
33330004
)
e1
:
SetCost
(
c
m
.
sp
cost
)
e1
:
SetCost
(
c
33330004
.
cost
)
e1
:
SetTarget
(
c
m
.
sptg
)
e1
:
SetTarget
(
c
33330004
.
target
)
e1
:
SetOperation
(
c
m
.
spop
)
e1
:
SetOperation
(
c
33330004
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Return Grave
--
tog
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
33330004
,
1
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_D
ELAY
+
EFFECT_FLAG_D
AMAGE_STEP
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetTarget
(
c
m
.
tgtg
)
e2
:
SetTarget
(
c
33330004
.
tgtg1
)
e2
:
SetOperation
(
c
m
.
tgop
)
e2
:
SetOperation
(
c
33330004
.
tgop1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
--Special Summon
function
c33330004
.
tgtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
costfilter
(
c
,
tp
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_REMOVED
,
LOCATION_REMOVED
,
1
,
nil
)
end
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x556
)
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
0
,
LOCATION_REMOVED
)
end
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
function
c33330004
.
tgop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsSetCard
(
0x1556
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_REMOVED
,
LOCATION_REMOVED
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_RETURN
)
end
end
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330004
.
costfilter
(
c
,
ft
,
tp
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
cm
.
costfilter
,
1
,
nil
,
ft
,
tp
)
end
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x556
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
cm
.
costfilter
,
1
,
1
,
nil
,
ft
,
tp
)
and
(
ft
>
0
or
(
c
:
IsControler
(
tp
)
and
c
:
GetSequence
()
<
5
))
end
function
c33330004
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
return
ft
>-
1
and
Duel
.
CheckReleaseGroup
(
tp
,
c33330004
.
costfilter
,
1
,
nil
,
ft
,
tp
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c33330004
.
costfilter
,
1
,
1
,
nil
,
ft
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
Duel
.
Release
(
g
,
REASON_COST
)
end
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330004
.
filter
(
c
,
e
,
tp
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
return
c
:
IsSetCard
(
0x1556
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c33330004
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330004
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
LOCATION_DECK
)
end
end
function
c
m
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330004
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
Get
MZoneCount
(
tp
)
<
1
then
return
end
if
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
sp
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
33330004
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
--Return Grave
function
cm
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_REMOVED
,
LOCATION_REMOVED
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
0
,
LOCATION_REMOVED
)
end
function
cm
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_REMOVED
,
LOCATION_REMOVED
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_RETURN
)
end
end
expansions/script/c33330005.lua
View file @
607e625c
--深界生骸 米蒂
--深界生骸 米蒂
local
m
=
33330005
function
c33330005
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--search
function
cm
.
initial_effect
(
c
)
--Special Summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
33330005
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_DUEL
)
e1
:
SetCountLimit
(
1
,
33330003
+
EFFECT_COUNT_CODE_DUEL
)
e1
:
SetCondition
(
cm
.
spcon
)
e1
:
SetCost
(
c33330005
.
spcost
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetTarget
(
c33330005
.
target
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
c33330005
.
operation
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--Cost
Duel
.
AddCustomActivityCounter
(
33330005
,
ACTIVITY_SPSUMMON
,
c33330005
.
counterfilter
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SPSUMMON
,
cm
.
counterfilter
)
end
end
--Cost
function
c33330005
.
counterfilter
(
c
)
function
cm
.
counterfilter
(
c
)
return
c
:
IsSetCard
(
0x556
)
return
c
:
IsSetCard
(
0x556
)
end
end
function
c
m
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
function
c
33330005
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
not
c
:
IsSetCard
(
0x556
)
return
not
c
:
IsSetCard
(
0x556
)
end
end
function
c
m
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
33330005
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
m
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
33330005
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetTarget
(
cm
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetLabelObject
(
e
)
e1
:
SetTarget
(
c33330005
.
splimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
--Special Summon
function
c33330005
.
filter
(
c
,
e
,
tp
)
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
33330005
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsCode
(
m
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
c
m
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
33330005
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
Get
MZoneCount
(
tp
)
>
0
if
chk
==
0
then
return
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c
m
.
sp
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c
33330005
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
end
function
c
m
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330005
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ft
=
Duel
.
Get
MZoneCount
(
tp
)
local
ft
=
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<
1
then
return
end
if
ft
<
=
0
then
return
end
if
ft
>
2
then
ft
=
2
end
if
ft
>
2
then
ft
=
2
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c
m
.
sp
filter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
ft
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c
33330005
.
filter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
ft
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
...
...
expansions/script/c33330006.lua
View file @
607e625c
--深界生物 血口之绳
--深界生物 血口之绳
local
m
=
33330006
function
c33330006
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--special summon
cm
.
counter
=
0x1556
--指 示 物
cm
.
atk
=
500
--攻 击 力
function
cm
.
initial_effect
(
c
)
--Hand Special Summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c
m
.
h
spcon
)
e1
:
SetCondition
(
c
33330006
.
spcon
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Counter
--
special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
33330006
,
0
))
e2
:
SetCategory
(
CATEGORY_COUNTER
)
e2
:
SetCategory
(
CATEGORY_COUNTER
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetTarget
(
c
m
.
cttg
)
e2
:
SetTarget
(
c
33330006
.
ctg1
)
e2
:
SetOperation
(
c
m
.
ctop
)
e2
:
SetOperation
(
c
33330006
.
cop1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
Xyz Material
--
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_BE_MATERIAL
)
e3
:
SetCode
(
EVENT_BE_MATERIAL
)
e3
:
SetCondition
(
c
m
.
atkcon
)
e3
:
SetCondition
(
c
33330006
.
atkcon
)
e3
:
SetOperation
(
c
m
.
atkop
)
e3
:
SetOperation
(
c
33330006
.
atkop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
--Hand Special Summon
function
c33330006
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
hspfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x556
)
end
function
cm
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
hspfilter
,
tp
,
LOCATION_FZONE
,
0
,
1
,
nil
)
end
--Counter
function
cm
.
cttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
~=
nil
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
0
,
0
)
end
function
cm
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
tc
and
tc
:
IsFaceup
()
and
tc
:
IsCanAddCounter
(
cm
.
counter
,
1
)
then
tc
:
AddCounter
(
cm
.
counter
,
1
)
end
end
--Xyz Material
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
==
REASON_XYZ
return
r
==
REASON_XYZ
end
end
function
c
m
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330006
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
rc
=
c
:
GetReasonCard
()
local
rc
=
c
:
GetReasonCard
()
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
cm
.
atk
)
e1
:
SetValue
(
500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
rc
:
RegisterEffect
(
e1
)
rc
:
RegisterEffect
(
e1
)
end
end
function
c33330006
.
ctg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
0
,
0
)
end
function
c33330006
.
cop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
tc
and
tc
:
IsFaceup
()
and
tc
:
IsCanAddCounter
(
0x1009
,
1
)
then
tc
:
AddCounter
(
0x1019
,
1
)
end
end
function
c33330006
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x556
)
end
function
c33330006
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c33330006
.
filter
,
c
:
GetControler
(),
LOCATION_FZONE
,
0
,
1
,
nil
)
end
\ No newline at end of file
expansions/script/c33330007.lua
View file @
607e625c
--通往深界的升降机
--通往深界的升降机
local
m
=
33330007
function
c33330007
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--special summon
function
cm
.
initial_effect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
--Destroy & Draw
e2
:
SetDescription
(
aux
.
Stringid
(
33330007
,
0
))
local
e1
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DRAW
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DRAW
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetTarget
(
c33330007
.
destg1
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetOperation
(
c33330007
.
desop1
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
end
end
--Destroy & Draw
function
c33330007
.
destg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
desfilter
(
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsDestructable
()
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
)
if
chk
==
0
then
return
g
:
GetCount
()
>
0
and
Duel
.
IsPlayerCanDraw
(
tp
,
g
:
GetCount
())
end
if
chk
==
0
then
return
g
:
GetCount
()
>
0
and
Duel
.
IsPlayerCanDraw
(
tp
,
g
:
GetCount
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
g
:
GetCount
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
g
:
GetCount
())
end
end
function
c
m
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330007
.
desop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
local
ct
=
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
local
ct
=
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
if
ct
>
0
then
if
ct
>
0
then
Duel
.
Draw
(
tp
,
ct
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
ct
,
REASON_EFFECT
)
...
...
expansions/script/c33330008.lua
View file @
607e625c
--深界生物 泣尸鸟
--深界生物 泣尸鸟
local
m
=
33330008
function
c33330008
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--d a
cm
.
counter
=
0x1556
--指 示 物
local
e4
=
Effect
.
CreateEffect
(
c
)
cm
.
atk
=-
1000
--攻 击 力
e4
:
SetDescription
(
aux
.
Stringid
(
33330008
,
0
))
function
cm
.
initial_effect
(
c
)
e4
:
SetCategory
(
CATEGORY_DESTROY
)
--Atk Down
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCost
(
c33330008
.
cost
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetCondition
(
c33330008
.
condition
)
e1
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetOperation
(
c33330008
.
operation
)
e1
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
c
:
RegisterEffect
(
e4
)
e1
:
SetTarget
(
cm
.
atktg
)
--rec
e1
:
SetValue
(
cm
.
atkval
)
local
e3
=
Effect
.
CreateEffect
(
c
)
c
:
RegisterEffect
(
e1
)
e3
:
SetDescription
(
aux
.
Stringid
(
33330008
,
1
))
--Atk Up
e3
:
SetCategory
(
CATEGORY_RECOVER
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e3
:
SetCondition
(
aux
.
bdocon
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetTarget
(
c33330008
.
attg
)
e2
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e3
:
SetOperation
(
c33330008
.
atop
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
c
:
RegisterEffect
(
e3
)
e2
:
SetCondition
(
aux
.
bdocon
)
e2
:
SetOperation
(
cm
.
atop
)
c
:
RegisterEffect
(
e2
)
end
end
--Atk Down
function
c33330008
.
attg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
atktg
(
e
,
tc
)
if
chk
==
0
then
return
Duel
.
GetCounter
(
tp
,
LOCATION_ONFIELD
,
0
,
0x1019
)
>
0
end
local
c
=
e
:
GetHandler
()
Duel
.
SetTargetPlayer
(
tp
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
ct
=
Duel
.
GetCounter
(
tp
,
LOCATION_ONFIELD
,
0
,
0x1019
)
return
(
ph
==
PHASE_DAMAGE
or
ph
==
PHASE_DAMAGE_CAL
)
and
c
:
IsRelateToBattle
()
and
tc
:
IsFaceup
()
and
c
:
GetBattleTarget
()
==
tc
Duel
.
SetTargetParam
(
ct
*
100
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
ct
*
100
)
end
function
c33330008
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
end
end
function
cm
.
atkval
(
e
,
c
)
function
c33330008
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
Duel
.
GetCounter
(
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
0
,
cm
.
counter
)
*
cm
.
atk
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
chk
==
0
then
return
tc
and
tc
:
IsCode
(
33330019
)
and
tc
:
IsFaceup
()
and
tc
:
IsCanAddCounter
(
0x1009
,
1
)
end
tc
:
AddCounter
(
0x1019
,
1
)
end
end
--Atk Up
function
c33330008
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
c
:
GetBattleTarget
()
return
c
:
IsChainAttackable
()
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
end
local
e1
=
Effect
.
CreateEffect
(
c
)
function
c33330008
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
Duel
.
ChainAttack
()
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
tc
:
GetBaseAttack
())
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
c
:
RegisterEffect
(
e1
)
if
Duel
.
GetCurrentPhase
()
>=
PHASE_BATTLE_START
and
Duel
.
GetCurrentPhase
()
<=
PHASE_BATTLE
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
c
:
RegisterEffect
(
e2
)
end
end
end
end
\ No newline at end of file
expansions/script/c33330009.lua
View file @
607e625c
--深界生物 龙鬃螺鸠
--深界生物 龙鬃螺鸠
local
m
=
33330009
function
c33330009
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--xyz summon
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--Xyz Summon
aux
.
AddXyzProcedure
(
c
,
nil
,
6
,
2
)
aux
.
AddXyzProcedure
(
c
,
nil
,
6
,
2
)
--Negate
c
:
EnableReviveLimit
()
--negate activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
33330009
,
0
))
e1
:
SetCategory
(
CATEGORY_NEGATE
)
e1
:
SetCategory
(
CATEGORY_NEGATE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c33330009
.
condition
)
e1
:
SetCondition
(
cm
.
ngcon
)
e1
:
SetCost
(
c33330009
.
cost
)
e1
:
SetCost
(
cm
.
ngcost
)
e1
:
SetTarget
(
c33330009
.
target
)
e1
:
SetTarget
(
cm
.
ngtg
)
e1
:
SetOperation
(
c33330009
.
operation
)
e1
:
SetOperation
(
cm
.
ngop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Destroy R
eplace
--
destroy r
eplace
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
c
m
.
reptg
)
e2
:
SetTarget
(
c
33330009
.
reptg
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
--Negate
function
c33330009
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
ngcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
2
,
REASON_EFFECT
)
end
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
rp
~=
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
if
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
then
and
Duel
.
IsChainDisablable
(
ev
)
and
re
:
GetHandler
():
IsAbleToChangeControler
()
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
2
,
2
,
REASON_EFFECT
)
and
not
re
:
GetHandler
():
IsType
(
TYPE_TOKEN
)
return
true
else
return
false
end
end
end
function
cm
.
ngcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330009
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
--local og=e:GetHandler():GetOverlayGroup()
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
rp
~=
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
Duel
.
IsChainDisablable
(
ev
)
and
re
:
GetHandler
():
IsAbleToChangeControler
()
and
not
re
:
GetHandler
():
IsType
(
TYPE_TOKEN
)
-- if chk==0 then return og:GetCount()>0 and og:IsExists(Card.IsSetCard,1,nil,0x556) end
-- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
-- local g=og:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x556)
-- Duel.SendtoGrave(g,REASON_COST)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
end
function
cm
.
ngtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330009
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
og
=
e
:
GetHandler
():
GetOverlayGroup
()
if
chk
==
0
then
return
og
:
GetCount
()
>
0
and
og
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x556
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVEXYZ
)
local
g
=
og
:
FilterSelect
(
tp
,
Card
.
IsSetCard
,
1
,
1
,
nil
,
0x556
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c33330009
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsType
(
TYPE_XYZ
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsType
(
TYPE_XYZ
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
end
function
c
m
.
ngop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330009
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
Duel
.
NegateActivation
(
ev
)
and
rc
:
IsRelateToEffect
(
re
)
and
not
rc
:
IsType
(
TYPE_TOKEN
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
Duel
.
NegateActivation
(
ev
)
and
rc
:
IsRelateToEffect
(
re
)
and
not
rc
:
IsType
(
TYPE_TOKEN
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
...
@@ -58,12 +60,3 @@ function cm.ngop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -58,12 +60,3 @@ function cm.ngop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Overlay
(
c
,
Group
.
FromCards
(
rc
))
Duel
.
Overlay
(
c
,
Group
.
FromCards
(
rc
))
end
end
end
end
\ No newline at end of file
--Destroy Replace
function
cm
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
c
:
IsReason
(
REASON_REPLACE
)
and
c
:
IsReason
(
REASON_EFFECT
)
and
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_EFFECT
)
end
if
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
then
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
return
true
else
return
false
end
end
\ No newline at end of file
expansions/script/c33330010.lua
View file @
607e625c
--深界生物 宿鼠
--深界生物 宿鼠
local
m
=
33330010
function
c33330010
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--link summon
cm
.
counter
=
0x1556
--指 示 物
cm
.
rec1
=
1000
--特 召 回 血 量
cm
.
rec2
=
500
--指 示 物 回 血
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--Link Summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x556
),
2
,
2
)
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x556
),
2
,
2
)
--Destroy & Recover
c
:
EnableReviveLimit
()
--seq
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
33330010
,
1
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_RECOVER
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetTarget
(
c33330010
.
target
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetOperation
(
c33330010
.
activate
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Move
--
d r
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
33330010
,
0
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_RECOVER
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetTarget
(
cm
.
mvtg
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetOperation
(
cm
.
mvop
)
e2
:
SetCountLimit
(
1
,
33330010
)
e2
:
SetTarget
(
c33330010
.
destg
)
e2
:
SetOperation
(
c33330010
.
desop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
Indes
--
rec X
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_ADD_COUNTER
+
0x1019
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetOperation
(
c33330010
.
rop2
)
e3
:
SetRange
(
LOCATION_MZONE
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCountLimit
(
1
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e3
:
SetCost
(
cm
.
indcost
)
e5
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetOperation
(
cm
.
indop
)
e5
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
c
:
RegisterEffect
(
e3
)
e5
:
SetTarget
(
aux
.
TRUE
)
e5
:
SetLabelObject
(
e3
)
c
:
RegisterEffect
(
e5
)
--rec X
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
33330010
,
2
))
e4
:
SetCategory
(
CATEGORY_RECOVER
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_CUSTOM
+
33330010
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetTarget
(
c33330010
.
rtg
)
e4
:
SetOperation
(
c33330010
.
rop
)
c
:
RegisterEffect
(
e4
)
end
end
--Destroy & Recover
function
c33330010
.
rop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
RaiseEvent
(
e
:
GetHandler
(),
EVENT_CUSTOM
+
33330010
,
e
,
0
,
tp
,
tp
,
0
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
chk
==
0
then
return
tc
~=
nil
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
tp
,
LOCATION_FZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
cm
.
rec1
)
end
end
function
c
m
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330010
.
rtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
chk
==
0
then
return
true
end
if
tc
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
Recover
(
tp
,
cm
.
rec1
,
REASON_EFFECT
)
Duel
.
SetTargetParam
(
100
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
100
)
end
end
--Move
function
c33330010
.
rop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
mvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
end
function
c33330010
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_CONTROL
)
>
0
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_CONTROL
)
>
0
end
end
end
function
c
m
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330010
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
...
@@ -64,32 +71,16 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -64,32 +71,16 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
local
nseq
=
math.log
(
s
,
2
)
local
nseq
=
math.log
(
s
,
2
)
Duel
.
MoveSequence
(
c
,
nseq
)
Duel
.
MoveSequence
(
c
,
nseq
)
end
end
--Indes
function
c33330010
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
indfilter
(
c
,
tp
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
return
c
:
IsFaceup
()
and
c
:
IsCanRemoveCounter
(
tp
,
cm
.
counter
,
1
,
REASON_COST
)
if
chk
==
0
then
return
tc
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
tp
,
LOCATION_FZONE
)
function
cm
.
indcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
500
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
indfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
indfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
tc
:
RemoveCounter
(
tp
,
cm
.
counter
,
1
,
REASON_COST
)
Duel
.
SetTargetCard
(
tc
)
end
end
function
cm
.
indop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330010
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
tc
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
Duel
.
Recover
(
tp
,
500
,
REASON_EFFECT
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
cm
.
efilter
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
end
end
end
function
cm
.
efilter
(
e
,
te
)
return
te
:
GetHandlerPlayer
()
~=
e
:
GetHandlerPlayer
()
end
\ No newline at end of file
expansions/script/c33330011.lua
View file @
607e625c
--深界生物 毯毯鼠
--深界生物 毯毯鼠
local
m
=
33330011
function
c33330011
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--link summon
cm
.
counter
=
0x1556
--指 示 物
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x556
),
1
,
1
)
cm
.
count
=
1
--放 置 数 量
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
c
:
EnableCounterPermit
(
cm
.
counter
)
--d r
--Link Summon
aux
.
AddLinkProcedure
(
c
,
cm
.
mfilter
,
1
,
1
)
--Destroy & Counter
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_COUNTER
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e1
)
--Negate Attack
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
33330011
,
0
))
e2
:
Set
Type
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
Set
Category
(
CATEGORY_DESTROY
+
CATEGORY_RECOVER
)
e2
:
Set
Code
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
Set
Type
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
Set
Range
(
LOCATION_MZONE
)
e2
:
Set
Code
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
Set
CountLimit
(
1
,
m
)
e2
:
Set
Property
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCo
st
(
cm
.
atkcost
)
e2
:
SetCo
untLimit
(
1
,
33330011
)
e2
:
Set
Condition
(
cm
.
atkcon
)
e2
:
Set
Target
(
c33330011
.
destg
)
e2
:
SetOperation
(
c
m
.
atk
op
)
e2
:
SetOperation
(
c
33330011
.
des
op
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--disable attack
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
33330011
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetCost
(
c33330011
.
atkcost
)
e1
:
SetCondition
(
c33330011
.
atkcon
)
e1
:
SetOperation
(
c33330011
.
atkop
)
c
:
RegisterEffect
(
e1
)
end
function
c33330011
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0x1019
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveCounter
(
tp
,
0x1019
,
1
,
REASON_COST
)
end
end
--Link Summon
function
c33330011
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
mfilter
(
c
)
Duel
.
NegateAttack
()
return
not
c
:
IsCode
(
m
)
and
c
:
IsLinkSetCard
(
0x556
)
end
end
--Destroy & Counter
function
c33330011
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
Duel
.
GetTurnPlayer
()
~=
tp
end
function
c33330011
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
chk
==
0
then
return
tc
and
e
:
GetHandler
():
IsCanAddCounter
(
cm
.
counter
,
1
)
end
if
chk
==
0
then
return
tc
and
e
:
GetHandler
():
IsCanAddCounter
(
0x1019
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
tp
,
LOCATION_FZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
e
:
GetHandler
()
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
0
,
0
)
end
end
function
c
m
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330011
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
tc
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
e
:
GetHandler
():
IsFaceup
()
then
if
tc
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
e
:
GetHandler
():
IsFaceup
()
then
e
:
GetHandler
():
AddCounter
(
cm
.
counter
,
1
)
e
:
GetHandler
():
AddCounter
(
0x1019
,
1
)
end
end
end
end
--Negate Attack
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
GetFirst
():
IsControler
(
1
-
tp
)
end
function
cm
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
cm
.
counter
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveCounter
(
tp
,
cm
.
counter
,
1
,
REASON_COST
)
end
function
cm
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateAttack
()
end
\ No newline at end of file
expansions/script/c33330012.lua
View file @
607e625c
--生骸公主 ファプタ
--生骸公主 ファプタ
local
m
=
33330012
function
c33330012
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--link summon
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x556
),
2
,
2
)
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x556
),
2
,
2
)
--Destroy & Draw
c
:
EnableReviveLimit
()
--seq
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
33330012
,
1
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetTarget
(
c33330012
.
target
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetOperation
(
c33330012
.
activate
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Move
--
d r
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
33330012
,
0
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DRAW
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetTarget
(
cm
.
mvtg
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetOperation
(
cm
.
mvop
)
e2
:
SetCountLimit
(
1
,
33330012
)
e2
:
SetTarget
(
c33330012
.
destg
)
e2
:
SetOperation
(
c33330012
.
desop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Special Summon
--Special Summon
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e4
:
SetDescription
(
aux
.
Stringid
(
33330012
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetTarget
(
cm
.
sptg
)
e4
:
SetCondition
(
c33330012
.
sumcon
)
e3
:
SetOperation
(
cm
.
spop
)
e4
:
SetTarget
(
c33330012
.
sumtg
)
c
:
RegisterEffect
(
e3
)
e4
:
SetOperation
(
c33330012
.
sumop
)
c
:
RegisterEffect
(
e4
)
end
end
--Destroy & Draw
function
c33330012
.
sumcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
chk
==
0
then
return
tc
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330012
.
filter
(
c
,
e
,
tp
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsRankBelow
(
4
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
true
)
if
tc
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
end
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
function
c33330012
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c33330012
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetTargetCard
(
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c33330012
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCountFromEx
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33330012
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
c
:
IsRelateToEffect
(
e
)
then
Duel
.
Overlay
(
tc
,
Group
.
FromCards
(
c
))
end
end
end
end
--Move
function
c33330012
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
mvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_CONTROL
)
>
0
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_CONTROL
)
>
0
end
end
end
function
c
m
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330012
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
...
@@ -61,20 +68,16 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -61,20 +68,16 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
local
nseq
=
math.log
(
s
,
2
)
local
nseq
=
math.log
(
s
,
2
)
Duel
.
MoveSequence
(
c
,
nseq
)
Duel
.
MoveSequence
(
c
,
nseq
)
end
end
--Special Summon
function
c33330012
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
spfilter
(
c
,
e
,
tp
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsRankBelow
(
4
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
if
chk
==
0
then
return
tc
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
tp
,
LOCATION_FZONE
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
if
chk
==
0
then
return
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330012
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCountFromEx
(
tp
)
<
1
then
return
end
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
if
tc
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
if
g
:
GetCount
()
>
0
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
Overlay
(
g
:
GetFirst
(),
e
:
GetHandler
())
end
end
end
end
expansions/script/c33330013.lua
View file @
607e625c
--破晓之花 プルシュカ
--破晓之花 プルシュカ
local
m
=
33330013
function
c33330013
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--link summon
cm
.
atk
=
500
--攻 击 上 升
cm
.
search
=
{
33330034
}
--检 索 的 卡
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--Link Summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x556
),
2
,
2
)
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x556
),
2
,
2
)
--Destroy & Search
c
:
EnableReviveLimit
()
--seq
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
33330013
,
1
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetTarget
(
c33330013
.
target
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetOperation
(
c33330013
.
activate
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Move
--
d r
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
33330013
,
0
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetTarget
(
cm
.
mvtg
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetOperation
(
cm
.
mvop
)
e2
:
SetCountLimit
(
1
,
33330013
)
e2
:
SetTarget
(
c33330013
.
destg
)
e2
:
SetOperation
(
c33330013
.
desop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
Atk Up
--
atk/def
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTarget
(
c
m
.
atktg
)
e3
:
SetTarget
(
c
33330013
.
atktg
)
e3
:
SetValue
(
cm
.
atk
)
e3
:
SetValue
(
500
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
cm
.
card_code_list
=
cm
.
search
function
c33330013
.
atktg
(
e
,
c
)
--Destroy & Search
return
c
:
GetMutualLinkedGroupCount
()
>
0
and
c
:
IsSetCard
(
0x556
)
function
cm
.
thfilter
(
c
)
return
c
:
IsAbleToHand
()
and
c
:
IsCode
(
cm
.
search
[
1
])
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
chk
==
0
then
return
tc
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
tc
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
tc
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
--Move
function
c33330013
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
mvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_CONTROL
)
>
0
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_CONTROL
)
>
0
end
end
end
function
c
m
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330013
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
...
@@ -70,7 +47,24 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -70,7 +47,24 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
local
nseq
=
math.log
(
s
,
2
)
local
nseq
=
math.log
(
s
,
2
)
Duel
.
MoveSequence
(
c
,
nseq
)
Duel
.
MoveSequence
(
c
,
nseq
)
end
end
--Atk Up
function
c33330013
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
atktg
(
e
,
c
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
return
c
:
GetMutualLinkedGroupCount
()
>
0
and
c
:
IsSetCard
(
0x556
)
if
chk
==
0
then
return
tc
and
Duel
.
IsExistingMatchingCard
(
c33330013
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
tp
,
LOCATION_FZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
tc
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c33330013
.
thfilter
(
c
)
return
c
:
IsAbleToHand
()
and
c
:
IsCode
(
33330034
)
end
function
c33330013
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
tc
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
c33330013
.
thfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330013
.
thfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
end
expansions/script/c33330014.lua
View file @
607e625c
--深界的至宝 雷古
--深界的至宝 雷古
local
m
=
33330014
function
c33330014
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--link summon
function
cm
.
initial_effect
(
c
)
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x556
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--Link Summon
--seq
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x556
),
2
)
--Destroy & Search
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
33330014
,
1
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetTarget
(
c33330014
.
target
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetOperation
(
c33330014
.
activate
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Move
--
d r
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
33330014
,
0
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetTarget
(
cm
.
mvtg
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetOperation
(
cm
.
mvop
)
e2
:
SetCountLimit
(
1
,
33330014
)
e2
:
SetTarget
(
c33330014
.
destg
)
e2
:
SetOperation
(
c33330014
.
desop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
Special S
ummon
--
special s
ummon
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e3
:
SetDescription
(
aux
.
Stringid
(
33330014
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
c
m
.
sptg
)
e3
:
SetTarget
(
c
33330014
.
sptg
)
e3
:
SetOperation
(
c
m
.
spop
)
e3
:
SetOperation
(
c
33330014
.
spop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
--Destroy & Search
function
c33330014
.
filter
(
c
,
e
,
tp
,
zone
)
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
chk
==
0
then
return
tc
or
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
if
tc
then
g
:
AddCard
(
tc
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
LOCATION_ONFIELD
)
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
if
tc
then
g
:
AddCard
(
tc
)
end
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
--Move
function
cm
.
mvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_CONTROL
)
>
0
end
end
function
cm
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
local
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
0
)
local
nseq
=
math.log
(
s
,
2
)
Duel
.
MoveSequence
(
c
,
nseq
)
end
--Special Summon
function
cm
.
spfilter
(
c
,
e
,
tp
,
zone
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
zone
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
zone
)
end
end
function
c
m
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
33330014
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
tp
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
tp
)
return
zone
~=
0
and
Duel
.
IsExistingMatchingCard
(
c
m
.
sp
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
return
zone
~=
0
and
Duel
.
IsExistingMatchingCard
(
c
33330014
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
end
function
c
m
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330014
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
tp
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
tp
)
if
zone
==
0
then
return
end
if
zone
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
sp
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
33330014
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
end
end
end
end
function
c33330014
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_CONTROL
)
>
0
end
end
function
c33330014
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
local
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
0
)
local
nseq
=
math.log
(
s
,
2
)
Duel
.
MoveSequence
(
c
,
nseq
)
end
function
c33330014
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
chk
==
0
then
return
tc
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
g
:
AddCard
(
tc
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
LOCATION_ONFIELD
)
end
function
c33330014
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
if
tc
then
g
:
AddCard
(
tc
)
end
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c33330015.lua
View file @
607e625c
--深界的黑暗面 雷古
--深界的黑暗面 雷古
local
m
=
33330015
function
c33330015
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
atk
=
1500
--攻 击 上 升
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--
Special Summon Limit
--
spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
ritlimit
)
e1
:
SetValue
(
aux
.
ritlimit
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Destroy & Remove
--
r d
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
33330015
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_REMOVE
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_D
ELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetProperty
(
EFFECT_FLAG_D
AMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetTarget
(
c
m
.
destg
)
e2
:
SetTarget
(
c
33330015
.
destg
)
e2
:
SetOperation
(
c
m
.
desop
)
e2
:
SetOperation
(
c
33330015
.
desop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
Reflect
--
reflect battle dam
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_REFLECT_BATTLE_DAMAGE
)
e3
:
SetCode
(
EFFECT_REFLECT_BATTLE_DAMAGE
)
e3
:
SetValue
(
1
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--Atk Up
--atk up
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e6
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e4
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e6
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e6
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e6
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCondition
(
c33330015
.
atkcon
)
e4
:
SetCondition
(
cm
.
atkcon
)
e6
:
SetTarget
(
c33330015
.
atktg
)
e4
:
SetTarget
(
cm
.
atktg
)
e6
:
SetOperation
(
c33330015
.
atkop
)
e4
:
SetOperation
(
cm
.
atkop
)
c
:
RegisterEffect
(
e6
)
c
:
RegisterEffect
(
e4
)
end
end
--Destroy & Remove
function
c33330015
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
return
c
==
Duel
.
GetAttacker
()
or
c
==
Duel
.
GetAttackTarget
()
end
function
c33330015
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
local
ct
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
TYPE_FIELD
)
return
ct
>
0
and
c
:
GetFlagEffect
(
33330015
)
==
0
end
c
:
RegisterFlagEffect
(
33330015
,
RESET_CHAIN
,
0
,
1
)
end
function
c33330015
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ct
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
TYPE_FIELD
)
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
ct
>
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESET_CHAIN
)
e1
:
SetValue
(
ct
*
1500
)
c
:
RegisterEffect
(
e1
)
end
end
function
c33330015
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
chk
==
0
then
return
tc
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
if
chk
==
0
then
return
tc
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
tp
,
LOCATION_FZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
g
:
GetCount
(),
1
-
tp
,
LOCATION_MZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
g
:
GetCount
(),
1
-
tp
,
LOCATION_MZONE
)
end
end
function
c
m
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330015
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
tc
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
if
tc
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
<
1
then
return
end
if
g
:
GetCount
()
<=
0
then
return
end
if
Duel
.
Remove
(
g
,
0
,
REASON_EFFECT
+
REASON_TEMPORARY
)
~=
0
then
if
Duel
.
Remove
(
g
,
0
,
REASON_EFFECT
+
REASON_TEMPORARY
)
~=
0
then
local
fid
=
c
:
GetFieldID
()
local
fid
=
c
:
GetFieldID
()
local
rct
=
1
local
rct
=
1
local
og
=
Duel
.
GetOperatedGroup
()
local
og
=
Duel
.
GetOperatedGroup
()
local
oc
=
og
:
GetFirst
()
local
oc
=
og
:
GetFirst
()
while
oc
do
while
oc
do
oc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
,
fid
)
oc
:
RegisterFlagEffect
(
33330015
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
,
fid
)
oc
=
og
:
GetNext
()
oc
=
og
:
GetNext
()
end
end
og
:
KeepAlive
()
og
:
KeepAlive
()
...
@@ -69,73 +88,45 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -69,73 +88,45 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetLabel
(
fid
)
e1
:
SetLabel
(
fid
)
e1
:
SetLabelObject
(
og
)
e1
:
SetLabelObject
(
og
)
e1
:
SetCondition
(
cm
.
retcon
)
e1
:
SetCondition
(
c33330015
.
retcon
)
e1
:
SetOperation
(
cm
.
retop
)
e1
:
SetOperation
(
c33330015
.
retop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
Duel
.
GetTurnCount
())
e1
:
SetValue
(
Duel
.
GetTurnCount
())
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
end
end
end
function
c
m
.
retfilter
(
c
,
fid
)
function
c
33330015
.
retfilter
(
c
,
fid
)
return
c
:
GetFlagEffectLabel
(
m
)
==
fid
return
c
:
GetFlagEffectLabel
(
33330015
)
==
fid
end
end
function
c
m
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330015
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetTurnCount
()
==
e
:
GetValue
()
then
return
false
end
if
Duel
.
GetTurnCount
()
==
e
:
GetValue
()
then
return
false
end
local
g
=
e
:
GetLabelObject
()
local
g
=
e
:
GetLabelObject
()
if
not
g
:
IsExists
(
c
m
.
retfilter
,
1
,
nil
,
e
:
GetLabel
())
then
if
not
g
:
IsExists
(
c
33330015
.
retfilter
,
1
,
nil
,
e
:
GetLabel
())
then
g
:
DeleteGroup
()
g
:
DeleteGroup
()
e
:
Reset
()
e
:
Reset
()
return
false
return
false
else
return
true
end
else
return
true
end
end
end
function
c
m
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330015
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
e
:
GetLabelObject
()
local
g
=
e
:
GetLabelObject
()
local
sg
=
g
:
Filter
(
c
m
.
retfilter
,
nil
,
e
:
GetLabel
())
local
sg
=
g
:
Filter
(
c
33330015
.
retfilter
,
nil
,
e
:
GetLabel
())
g
:
DeleteGroup
()
g
:
DeleteGroup
()
local
ct
,
rg
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ct
,
tg
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
),
Group
.
CreateGroup
(
)
if
sg
:
GetCount
()
>
ct
and
ct
>
0
then
if
sg
:
GetCount
()
>
ct
and
ct
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
rg
=
sg
:
Select
(
tp
,
ct
,
ct
,
nil
)
tg
=
sg
:
Select
(
tp
,
ct1
,
ct1
,
nil
)
else
rg
=
sg
end
end
local
tc
=
rg
:
GetFirst
()
sg
:
Sub
(
tg
)
local
tc
=
tg
:
GetFirst
()
while
tc
do
while
tc
do
Duel
.
ReturnToField
(
tc
)
Duel
.
ReturnToField
(
tc
)
tc
=
r
g
:
GetNext
()
tc
=
t
g
:
GetNext
()
end
end
sg
:
Sub
(
rg
)
tc
=
sg
:
GetFirst
()
tc
=
sg
:
GetFirst
()
while
tc
do
while
tc
do
Duel
.
ReturnToField
(
tc
)
Duel
.
ReturnToField
(
tc
)
tc
=
sg
:
GetNext
()
tc
=
sg
:
GetNext
()
end
end
end
end
--Atk Up
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
==
Duel
.
GetAttacker
()
or
c
==
Duel
.
GetAttackTarget
()
end
function
cm
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
local
ct
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
TYPE_FIELD
)
return
ct
>
0
and
c
:
GetFlagEffect
(
m
)
==
0
end
c
:
RegisterFlagEffect
(
m
,
RESET_CHAIN
,
0
,
1
)
end
function
cm
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ct
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
TYPE_FIELD
)
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
ct
>
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
ct
*
cm
.
atk
)
e1
:
SetReset
(
RESET_EVENT
+
RESET_CHAIN
)
c
:
RegisterEffect
(
e1
)
end
end
expansions/script/c33330016.lua
View file @
607e625c
--白笛 歼灭之莱莎
--白笛 歼灭之莱莎
local
m
=
33330016
function
c33330016
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--link summon
cm
.
atk
=
500
--攻 击 上 升
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--Link Summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x556
),
2
)
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x556
),
2
)
--Destroy & Search
c
:
EnableReviveLimit
()
--seq
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
33330016
,
1
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetTarget
(
c33330016
.
target
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetOperation
(
c33330016
.
activate
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Move
--
d r
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
33330016
,
0
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetTarget
(
cm
.
mvtg
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetOperation
(
cm
.
mvop
)
e2
:
SetCountLimit
(
1
,
33330016
)
e2
:
SetTarget
(
c33330016
.
destg
)
e2
:
SetOperation
(
c33330016
.
desop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
Atk Up
--
atk
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e3
:
SetTarget
(
c
m
.
buff
tg
)
e3
:
SetTarget
(
c
33330016
.
ind
tg
)
e3
:
SetValue
(
cm
.
atk
)
e3
:
SetValue
(
500
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--Indes
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
e3
:
Clone
(
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e4
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e4
:
SetTarget
(
c33330016
.
indtg
)
e4
:
SetValue
(
1
)
e4
:
SetValue
(
1
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
--Destroy & Search
function
c33330016
.
indtg
(
e
,
c
)
function
cm
.
thfilter
(
c
)
return
e
:
GetHandler
():
GetLinkedGroup
():
IsContains
(
c
)
return
c
:
IsAbleToHand
()
and
c
:
IsCode
(
cm
.
search
[
1
])
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
chk
==
0
then
return
tc
and
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
1
-
tp
,
LOCATION_ONFIELD
)
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
tc
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
end
--Move
function
c33330016
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
mvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_CONTROL
)
>
0
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_CONTROL
)
>
0
end
end
end
function
c
m
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330016
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
...
@@ -74,7 +56,20 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -74,7 +56,20 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
local
nseq
=
math.log
(
s
,
2
)
local
nseq
=
math.log
(
s
,
2
)
Duel
.
MoveSequence
(
c
,
nseq
)
Duel
.
MoveSequence
(
c
,
nseq
)
end
end
--Atk Up
function
c33330016
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
bufftg
(
e
,
c
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
return
e
:
GetHandler
():
GetLinkedGroup
():
IsContains
(
c
)
if
chk
==
0
then
return
tc
and
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
2
,
0
,
LOCATION_ONFIELD
)
end
function
c33330016
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
tc
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
tg
)
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
end
end
end
expansions/script/c33330017.lua
View file @
607e625c
--白笛 不动如山之奥森
--白笛 不动如山之奥森
local
m
=
33330017
function
c33330017
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--xyz summon
cm
.
mat
=
{
33330004
}
--素 材 要 求
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x556
),
4
,
3
)
cm
.
counter
=
0x1556
--指 示 物
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--Xyz Summon
--
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x556
),
4
,
2
)
local
e4
=
Effect
.
CreateEffect
(
c
)
--Remove
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e4
:
SetValue
(
c33330017
.
indesval
)
e4
:
SetCondition
(
c33330017
.
con
)
c
:
RegisterEffect
(
e4
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
E
VENT_DAMAGE_STEP_END
)
e1
:
SetCode
(
E
FFECT_EXTRA_ATTACK
)
e1
:
SetCondition
(
c
m
.
rm
con
)
e1
:
SetCondition
(
c
33330017
.
con
)
e1
:
Set
Operation
(
cm
.
rmop
)
e1
:
Set
Value
(
c33330017
.
atkval
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Destroy Replac
e
--
to grav
e
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetDescription
(
aux
.
Stringid
(
13893596
,
0
))
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_COUNTER
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCountLimit
(
2
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetTarget
(
cm
.
reptg
)
e2
:
SetTarget
(
c33330017
.
ctg
)
e2
:
SetOperation
(
cm
.
repop
)
e2
:
SetOperation
(
c33330017
.
cop
)
e2
:
SetValue
(
cm
.
repval
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--des
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e5
:
SetOperation
(
c33330017
.
desop
)
c
:
RegisterEffect
(
e5
)
end
end
cm
.
card_code_list
=
cm
.
mat
function
c33330017
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--Remove
if
e
:
GetHandler
():
GetCounter
(
0x1009
)
>=
3
then
function
cm
.
rmcon
(
e
)
Duel
.
Hint
(
HINT_CARD
,
0
,
33330017
)
return
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
Card
.
IsCode
,
1
,
nil
,
cm
.
mat
[
1
])
and
aux
.
bdocon
(
e
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
end
end
function
cm
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330017
.
ctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
Duel
.
GetAttacker
()
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanAddCounter
(
0x1019
,
1
)
end
if
tc
==
e
:
GetHandler
()
then
tc
=
Duel
.
GetAttackTarget
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
0
,
0
)
if
tc
then
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_RULE
)
end
end
end
--Destroy Replace
function
c33330017
.
cop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
repfilter
(
c
,
tp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x556
)
and
c
:
IsControler
(
tp
)
if
c
and
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsCanAddCounter
(
0x1009
,
1
)
then
and
c
:
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
c
:
AddCounter
(
0x1019
,
1
)
local
g
=
Duel
.
GetMatchingGroup
(
c33330017
.
adfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
then
for
tc
in
aux
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
-
300
)
tc
:
RegisterEffect
(
e1
)
end
end
end
end
function
c33330017
.
adfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
end
end
function
cm
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330017
.
atkval
(
e
)
if
chk
==
0
then
return
eg
:
IsExists
(
cm
.
repfilter
,
1
,
nil
,
tp
)
and
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
cm
.
counter
,
1
,
REASON_COST
)
end
return
e
:
GetHandler
():
GetOverlayCount
()
-
1
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
end
function
c
m
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330017
.
indesval
(
e
,
re
,
rp
)
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
cm
.
counter
,
1
,
REASON_COST
)
return
re
:
GetHandler
()
~=
e
:
GetHandler
(
)
end
end
function
c
m
.
repval
(
e
,
c
)
function
c
33330017
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
cm
.
repfilter
(
c
,
e
:
GetHandlerPlayer
()
)
return
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
Card
.
IsCode
,
1
,
nil
,
33330004
)
end
end
\ No newline at end of file
expansions/script/c33330018.lua
View file @
607e625c
--白笛 崭新之波多尔多
--白笛 崭新之波多尔多
local
m
=
33330018
function
c33330018
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--xyz summon
cm
.
token
=
{
33330035
}
--衍 生 物
cm
.
counter
=
0x1556
--指 示 物
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--Xyz Summon
aux
.
AddXyzProcedure
(
c
,
nil
,
8
,
2
)
aux
.
AddXyzProcedure
(
c
,
nil
,
8
,
2
)
--Activate Limit
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
--direct
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetCondition
(
cm
.
actcon
)
e1
:
SetValue
(
cm
.
aclimit
)
c
:
RegisterEffect
(
e1
)
--Token
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
33330018
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
aux
.
bdcon
)
e2
:
SetCondition
(
c33330018
.
condition
)
e2
:
SetCost
(
cm
.
tkcost
)
e2
:
SetCost
(
c33330018
.
cost
)
e2
:
SetTarget
(
cm
.
tktg
)
e2
:
SetOperation
(
c33330018
.
operation
)
e2
:
SetOperation
(
cm
.
tkop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
Direct Attack
--
actlimit
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
Set
Condition
(
cm
.
drcon
)
e3
:
Set
TargetRange
(
0
,
1
)
e3
:
Set
Cost
(
cm
.
drcos
t
)
e3
:
Set
Value
(
c33330018
.
aclimi
t
)
e3
:
Set
Operation
(
cm
.
drop
)
e3
:
Set
Condition
(
c33330018
.
actcon
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--token
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
33330018
,
1
))
e5
:
SetCategory
(
CATEGORY_TOKEN
+
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e5
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e5
:
SetCost
(
c33330018
.
rcost
)
e5
:
SetCondition
(
c33330018
.
actcon
)
e5
:
SetTarget
(
c33330018
.
tktg
)
e5
:
SetOperation
(
c33330018
.
tkop
)
c
:
RegisterEffect
(
e5
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
33330018
,
2
))
e1
:
SetCategory
(
CATEGORY_RECOVER
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCost
(
c33330018
.
recost
)
e1
:
SetTarget
(
c33330018
.
retg
)
e1
:
SetOperation
(
c33330018
.
reop
)
c
:
RegisterEffect
(
e1
)
end
end
--Activate Limit
function
c33330018
.
recost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
actcon
(
e
)
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x1019
,
1
,
REASON_COST
)
end
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
local
ct
=
Duel
.
GetCounter
(
tp
,
1
,
0
,
0x1019
)
end
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0x1019
,
ct
,
REASON_COST
)
function
cm
.
aclimit
(
e
,
re
,
tp
)
e
:
SetLabel
(
ct
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
--Token
function
cm
.
tkfilter
(
c
,
tp
)
return
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
function
cm
.
tkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
cm
.
tkfilter
,
1
,
nil
,
tp
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
cm
.
tkfilter
,
1
,
1
,
nil
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
cm
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
cm
.
token
[
1
],
0
,
0x4011
,
2000
,
2000
,
8
,
RACE_ZOMBIE
,
ATTRIBUTE_DARK
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
cm
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
cm
.
token
[
1
],
0
,
0x4011
,
2000
,
2000
,
8
,
RACE_ZOMBIE
,
ATTRIBUTE_DARK
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
cm
.
token
[
1
])
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
cm
.
descost
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
token
:
RegisterEffect
(
e1
)
end
end
function
cm
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
cm
.
counter
,
1
,
REASON_COST
)
end
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
cm
.
counter
,
1
,
REASON_COST
)
end
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330018
.
retg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDestructable
()
end
local
ct
=
e
:
GetLabel
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
ct
*
300
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
ct
*
300
)
end
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330018
.
reop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
end
end
end
--Direct Attack
function
c33330018
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsAbleToEnterBP
()
and
not
e
:
GetHandler
():
IsHasEffect
(
EFFECT_DIRECT_ATTACK
)
return
Duel
.
IsAbleToEnterBP
()
and
not
e
:
GetHandler
():
IsHasEffect
(
EFFECT_DIRECT_ATTACK
)
end
end
function
c
m
.
dr
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
33330018
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
end
function
c
m
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330018
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
end
end
function
c33330018
.
costfilter
(
c
,
ft
,
tp
)
return
(
ft
>
0
or
(
c
:
IsControler
(
tp
)
and
c
:
GetSequence
()
<
5
))
end
function
c33330018
.
rcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
return
ft
>-
1
and
Duel
.
CheckReleaseGroup
(
tp
,
c33330018
.
costfilter
,
1
,
nil
,
ft
,
tp
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c33330018
.
costfilter
,
1
,
1
,
nil
,
ft
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c33330018
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
33330035
,
0
,
0x4011
,
2000
,
2000
,
8
,
RACE_ZOMBIE
,
ATTRIBUTE_DARK
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c33330018
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
33330035
,
0
,
0x4011
,
2000
,
2000
,
8
,
RACE_ZOMBIE
,
ATTRIBUTE_DARK
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
33330035
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
function
c33330018
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
c33330018
.
actcon
(
e
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
end
expansions/script/c33330019.lua
View file @
607e625c
--深界一层-阿比斯之渊
--深界一层-阿比斯之渊
local
m
=
33330019
function
c33330019
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
search
=
{
33330002
,
33330038
,
33330020
}
--检 索 对 象
cm
.
counter
=
0x1556
--指 示 物
cm
.
damage
=
100
--伤 害 倍 数
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
cm
.
counter
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--Search
--indestructable
local
e21
=
Effect
.
CreateEffect
(
c
)
e21
:
SetType
(
EFFECT_TYPE_FIELD
)
e21
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e21
:
SetRange
(
LOCATION_SZONE
)
e21
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e21
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x556
))
e21
:
SetValue
(
1
)
c
:
RegisterEffect
(
e21
)
--Pos Change
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCategory
(
CATEGORY_HANDES
+
CATEGORY_COUNTER
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetCode
(
EFFECT_SET_POSITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
+
EFFECT_FLAG_IGNORE_RANGE
)
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetValue
(
POS_FACEUP_ATTACK
)
e2
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Change Field
--damage reduce
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetOperation
(
cm
.
ctop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetLabelObject
(
e3
)
e4
:
SetTargetRange
(
1
,
0
)
e4
:
SetCondition
(
cm
.
fdcon
)
e4
:
SetValue
(
c33330019
.
damval
)
e4
:
SetTarget
(
cm
.
fdtg
)
e4
:
SetOperation
(
cm
.
fdop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--search
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DAMAGE
)
e5
:
SetDescription
(
aux
.
Stringid
(
33330019
,
0
))
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCost
(
c33330019
.
cost
)
e5
:
SetTarget
(
c33330019
.
tg
)
e5
:
SetOperation
(
c33330019
.
op
)
c
:
RegisterEffect
(
e5
)
--xxxx
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
33330019
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_DESTROY
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCondition
(
c33330019
.
con2
)
e3
:
SetTarget
(
c33330019
.
tg2
)
e3
:
SetOperation
(
c33330019
.
op2
)
c
:
RegisterEffect
(
e3
)
--count
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e7
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e7
:
SetOperation
(
c33330019
.
contop
)
c
:
RegisterEffect
(
e7
)
e3
:
SetLabelObject
(
e7
)
end
end
cm
.
card_code_list
=
cm
.
search
function
c33330019
.
contop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--Activate
e
:
SetLabel
(
e
:
GetHandler
():
GetCounter
(
0x1019
))
function
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0x3556
)
and
c
:
IsAbleToHand
()
end
end
function
c
m
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
33330019
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
local
c
=
e
:
GetHandler
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
return
c
:
IsReason
(
REASON_EFFECT
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330019
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
chk
==
0
then
return
true
end
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
ct
*
1000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c33330019
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330019
.
filter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
Damage
(
tp
,
ct
*
1000
,
REASON_EFFECT
)
end
end
end
end
--Search
function
c33330019
.
filter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsCode
(
33330019
)
and
c
:
IsAbleToHand
()
return
c
:
IsCode
(
cm
.
search
[
1
])
and
c
:
IsAbleToHand
()
end
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330019
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0x1019
,
3
,
REASON_COST
)
end
and
e
:
GetHandler
():
IsCanAddCounter
(
cm
.
counter
,
1
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0x1019
,
3
,
REASON_COST
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_HANDES
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330019
.
filter2
(
c
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
return
c
:
IsCode
(
33330020
)
and
c
:
IsAbleToHand
()
if
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
)
~=
0
and
e
:
GetHandler
():
AddCounter
(
cm
.
counter
,
1
)
then
local
tc
=
Duel
.
GetFirstMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
tc
then
Duel
.
BreakEffect
()
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
end
end
--Change Field
function
c33330019
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330019
.
filter2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
e
:
SetLabel
(
e
:
GetHandler
():
GetCounter
(
cm
.
counter
))
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
500
)
end
function
cm
.
fdfilter1
(
c
)
return
c
:
IsCode
(
cm
.
search
[
2
])
and
c
:
IsAbleToHand
()
end
function
cm
.
fdfilter2
(
c
,
tp
)
return
c
:
IsCode
(
cm
.
search
[
3
])
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
)
end
function
cm
.
fdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
end
function
cm
.
fdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
local
sel
=
0
if
Duel
.
IsExistingMatchingCard
(
cm
.
fdfilter2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
then
sel
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
),
aux
.
Stringid
(
m
,
3
))
+
1
else
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
))
sel
=
1
e
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DAMAGE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
1
,
tp
,
ct
*
cm
.
damage
)
end
e
:
SetLabel
(
sel
)
end
end
function
cm
.
fdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330019
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sel
=
e
:
GetLabel
()
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
or
Duel
.
Damage
(
tp
,
500
,
REASON_EFFECT
)
<=
0
then
return
end
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
e
:
GetLabelObject
():
SetLabel
(
0
)
if
sel
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
fdfilter1
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330019
.
filter2
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
Duel
.
Damage
(
tp
,
ct
*
cm
.
damage
,
REASON_EFFECT
)
end
else
function
c33330019
.
damval
(
e
,
re
,
val
,
r
,
rp
,
rc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
if
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
fdfilter2
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
)
e
:
GetHandler
():
AddCounter
(
0x1019
,
1
)
local
tc
=
g
:
GetFirst
()
return
0
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
tc
:
AddCounter
(
cm
.
counter
,
ct
)
end
end
return
val
end
end
\ No newline at end of file
expansions/script/c33330020.lua
View file @
607e625c
--深界二层-诱惑之森
--深界二层-诱惑之森
local
m
=
33330020
function
c33330020
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
search
=
{
33330004
,
33330038
,
33330021
}
--检 索 对 象
cm
.
counter
=
0x1556
--指 示 物
cm
.
damage
=
200
--伤 害 倍 数
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
cm
.
counter
)
--Activate
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
33330020
,
0
))
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetDescription
(
aux
.
Stringid
(
33330020
,
1
))
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCost
(
c33330020
.
tcost
)
e1
:
SetTarget
(
c33330020
.
ttg
)
e1
:
SetOperation
(
c33330020
.
top
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--Search
--search
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_COUNTER
)
e5
:
SetDescription
(
aux
.
Stringid
(
33330020
,
3
))
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_FZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetTarget
(
c33330020
.
tg
)
e5
:
SetOperation
(
c33330020
.
op
)
c
:
RegisterEffect
(
e5
)
--xxxx
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
33330020
,
4
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCondition
(
c33330020
.
con2
)
e3
:
SetTarget
(
c33330020
.
tg2
)
e3
:
SetOperation
(
c33330020
.
op2
)
c
:
RegisterEffect
(
e3
)
--count
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e7
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e7
:
SetOperation
(
c33330020
.
contop
)
c
:
RegisterEffect
(
e7
)
e3
:
SetLabelObject
(
e7
)
--atk change
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
33330020
,
2
))
e2
:
SetCategory
(
CATEGORY_COUNTER
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetCategory
(
CATEGORY_COUNTER
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetCo
untLimit
(
1
)
e2
:
SetCo
ndition
(
c33330020
.
atkcon
)
e2
:
SetTarget
(
c
m
.
thtg
)
e2
:
SetTarget
(
c
33330020
.
atktg2
)
e2
:
SetOperation
(
c
m
.
th
op
)
e2
:
SetOperation
(
c
33330020
.
atk
op
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Change Field
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetOperation
(
cm
.
ctop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetLabelObject
(
e3
)
e4
:
SetCondition
(
cm
.
fdcon
)
e4
:
SetTarget
(
cm
.
fdtg
)
e4
:
SetOperation
(
cm
.
fdop
)
c
:
RegisterEffect
(
e4
)
end
cm
.
card_code_list
=
cm
.
search
--Search
function
cm
.
thfilter
(
c
)
return
c
:
IsCode
(
cm
.
search
[
1
])
and
c
:
IsAbleToHand
()
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanAddCounter
(
cm
.
counter
,
1
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330020
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
return
tp
==
Duel
.
GetTurnPlayer
()
and
Duel
.
GetAttacker
():
IsSetCard
(
0x556
)
if
e
:
GetHandler
():
AddCounter
(
cm
.
counter
,
1
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
--Change Field
function
c33330020
.
atktg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0x1019
,
1
,
REASON_EFFECT
)
end
e
:
SetLabel
(
e
:
GetHandler
():
GetCounter
(
cm
.
counter
)
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
0
,
tp
,
1
)
end
end
function
cm
.
fdfilter1
(
c
)
function
c33330020
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsCode
(
cm
.
search
[
2
])
and
c
:
IsAbleToHand
()
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
or
e
:
GetHandler
():
IsFacedown
()
or
not
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0x1019
,
1
,
REASON_EFFECT
)
then
return
end
e
:
GetHandler
():
RemoveCounter
(
tp
,
0x1019
,
1
,
REASON_EFFECT
)
end
end
function
c
m
.
fdfilter2
(
c
,
t
p
)
function
c
33330020
.
contop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
r
p
)
return
c
:
IsCode
(
cm
.
search
[
3
])
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
)
e
:
SetLabel
(
e
:
GetHandler
():
GetCounter
(
0x1019
)
)
end
end
function
cm
.
fdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330020
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
local
c
=
e
:
GetHandler
()
return
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
end
function
c
m
.
fdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
33330020
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
local
sel
=
0
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
ct
*
500
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
fdfilter2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
then
sel
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
),
aux
.
Stringid
(
m
,
3
))
+
1
else
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
))
sel
=
1
e
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DAMAGE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
1
,
tp
,
ct
*
cm
.
damage
)
end
e
:
SetLabel
(
sel
)
end
end
function
cm
.
fdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330020
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sel
=
e
:
GetLabel
()
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
e
:
GetLabelObject
():
SetLabel
(
0
)
if
Duel
.
Damage
(
tp
,
ct
*
500
,
REASON_EFFECT
)
<=
0
then
return
end
if
sel
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
fdfilter1
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330020
.
filter3
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
Duel
.
Damage
(
tp
,
ct
*
cm
.
damage
,
REASON_EFFECT
)
end
else
function
c33330020
.
filter3
(
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
return
c
:
IsCode
(
33330021
)
and
c
:
IsAbleToHand
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
fdfilter2
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
)
end
local
tc
=
g
:
GetFirst
()
function
c33330020
.
filter2
(
c
)
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
return
c
:
IsCode
(
33330004
)
and
c
:
IsAbleToHand
()
local
te
=
tc
:
GetActivateEffect
()
end
local
tep
=
tc
:
GetControler
()
function
c33330020
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
cost
=
te
:
GetCost
()
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanAddCounter
(
0x1019
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c33330020
.
filter2
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
tp
,
0
)
tc
:
AddCounter
(
cm
.
counter
,
ct
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
)
end
function
c33330020
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
c
:
AddCounter
(
0x1019
,
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330020
.
filter2
),
tp
,
LOCATION_GRAVE
+
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
c33330020
.
tcost
(
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
c33330020
.
filter
(
c
)
return
c
:
IsCode
(
33330019
)
and
c
:
IsAbleToHand
()
end
function
c33330020
.
ttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330020
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
)
end
function
c33330020
.
top
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330020
.
filter
),
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
\ No newline at end of file
expansions/script/c33330021.lua
View file @
607e625c
--深界三层-大断层
--深界三层-大断层
local
m
=
33330021
function
c33330021
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
search
=
{
33330006
,
33330038
,
33330022
}
--检 索 对 象
cm
.
counter
=
0x1556
--指 示 物
cm
.
damage
=
300
--伤 害 倍 数
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
cm
.
counter
)
--Activate
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
33330021
,
0
))
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetDescription
(
aux
.
Stringid
(
33330021
,
1
))
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCost
(
c33330021
.
tcost
)
e1
:
SetTarget
(
c33330021
.
ttg
)
e1
:
SetOperation
(
c33330021
.
top
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Search
--
cannot be target
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCategory
(
CATEGORY_COUNTER
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
Set
CountLimit
(
1
)
e2
:
Set
TargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x556
)
)
e2
:
Set
Operation
(
cm
.
thop
)
e2
:
Set
Value
(
c33330021
.
indesval
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Change Field
--s c
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetOperation
(
cm
.
ctop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e4
:
SetDescription
(
aux
.
Stringid
(
33330021
,
2
))
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
+
CATEGORY_COUNTER
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetCountLimit
(
1
,
33330021
)
e4
:
SetCountLimit
(
1
,
33330021
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetTarget
(
c33330021
.
stg
)
e4
:
SetLabelObject
(
e3
)
e4
:
SetOperation
(
c33330021
.
sop
)
e4
:
SetCondition
(
cm
.
fdcon
)
e4
:
SetTarget
(
cm
.
fdtg
)
e4
:
SetOperation
(
cm
.
fdop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--xxxx
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
33330021
,
3
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCondition
(
c33330021
.
con2
)
e3
:
SetTarget
(
c33330021
.
tg2
)
e3
:
SetOperation
(
c33330021
.
op2
)
c
:
RegisterEffect
(
e3
)
--count
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e7
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e7
:
SetOperation
(
c33330021
.
contop
)
c
:
RegisterEffect
(
e7
)
e3
:
SetLabelObject
(
e7
)
end
end
cm
.
card_code_list
=
cm
.
search
function
c33330021
.
contop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--Search
e
:
SetLabel
(
e
:
GetHandler
():
GetCounter
(
0x1019
))
function
cm
.
thfilter
(
c
)
return
c
:
IsCode
(
cm
.
search
[
1
])
and
c
:
IsAbleToHand
()
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanAddCounter
(
cm
.
counter
,
1
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330021
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
c
=
e
:
GetHandler
()
if
e
:
GetHandler
():
AddCounter
(
cm
.
counter
,
1
)
then
return
c
:
IsPreviousPosition
(
POS_FACEUP
)
local
tc
=
Duel
.
GetFirstMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
tc
and
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
end
end
--Change Field
function
c33330021
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
true
end
e
:
SetLabel
(
e
:
GetHandler
():
GetCounter
(
cm
.
counter
))
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
ct
*
500
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
end
function
cm
.
fdfilter1
(
c
)
function
c33330021
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsCode
(
cm
.
search
[
2
])
and
c
:
IsAbleToHand
()
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
if
Duel
.
Damage
(
tp
,
ct
*
500
,
REASON_EFFECT
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330021
.
filter3
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
function
c
m
.
fdfilter2
(
c
,
tp
)
function
c
33330021
.
filter3
(
c
)
return
c
:
IsCode
(
cm
.
search
[
3
])
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
)
return
c
:
IsCode
(
33330022
)
and
c
:
IsAbleToHand
(
)
end
end
function
c
m
.
fdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330021
.
sfilter
(
c
)
return
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
return
c
:
IsAbleToHand
()
and
c
:
IsCode
(
33330006
)
end
end
function
cm
.
fdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330021
.
stg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanAddCounter
(
0x1019
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c33330021
.
sfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
)
end
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
local
sel
=
0
if
Duel
.
IsExistingMatchingCard
(
cm
.
fdfilter2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
then
sel
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
),
aux
.
Stringid
(
m
,
3
))
+
1
else
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
))
sel
=
1
e
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DAMAGE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
1
,
tp
,
ct
*
cm
.
damage
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
tp
,
0
)
end
e
:
SetLabel
(
sel
)
end
end
function
cm
.
fdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330021
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sel
=
e
:
GetLabel
()
local
c
=
e
:
GetHandler
()
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
e
:
GetLabelObject
():
SetLabel
(
0
)
c
:
AddCounter
(
0x1019
,
1
)
if
sel
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
fdfilter1
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330021
.
sfilter
),
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
Duel
.
Damage
(
tp
,
ct
*
cm
.
damage
,
REASON_EFFECT
)
end
else
function
c33330021
.
indesval
(
e
,
re
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
fdfilter2
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
)
end
local
tc
=
g
:
GetFirst
()
function
c33330021
.
tcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
local
te
=
tc
:
GetActivateEffect
()
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
local
tep
=
tc
:
GetControler
()
end
local
cost
=
te
:
GetCost
()
function
c33330021
.
filter
(
c
)
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
return
c
:
IsCode
(
33330019
)
and
c
:
IsAbleToHand
()
tc
:
AddCounter
(
cm
.
counter
,
ct
)
end
function
c33330021
.
ttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330021
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
)
end
function
c33330021
.
top
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330021
.
filter
),
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
expansions/script/c33330022.lua
View file @
607e625c
--深界三层-大断层
--深界三层-大断层
local
m
=
33330022
function
c33330022
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
search
=
{
33330038
,
33330023
}
--检 索 对 象
cm
.
counter
=
0x1556
--指 示 物
cm
.
damage
=
500
--伤 害 倍 数
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
cm
.
counter
)
--Activate
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
33330022
,
0
))
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetDescription
(
aux
.
Stringid
(
33330022
,
1
))
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCost
(
c33330022
.
tcost
)
e1
:
SetTarget
(
c33330022
.
ttg
)
e1
:
SetOperation
(
c33330022
.
top
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Special Summon
--
cannot be target
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_COUNTER
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
Set
CountLimit
(
2
)
e2
:
Set
TargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x556
)
)
e2
:
Set
Operation
(
cm
.
spop
)
e2
:
Set
Value
(
c33330022
.
indesval
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Change Field
--s c
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetOperation
(
cm
.
ctop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e4
:
SetDescription
(
aux
.
Stringid
(
33330022
,
2
))
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_COUNTER
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetCountLimit
(
1
,
m
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetCountLimit
(
2
)
e4
:
SetLabelObject
(
e3
)
e4
:
SetTarget
(
c33330022
.
stg
)
e4
:
SetCondition
(
cm
.
fdcon
)
e4
:
SetOperation
(
c33330022
.
sop
)
e4
:
SetTarget
(
cm
.
fdtg
)
e4
:
SetOperation
(
cm
.
fdop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--xxxx
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
33330022
,
3
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCondition
(
c33330022
.
con2
)
e3
:
SetTarget
(
c33330022
.
tg2
)
e3
:
SetOperation
(
c33330022
.
op2
)
c
:
RegisterEffect
(
e3
)
--count
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e7
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e7
:
SetOperation
(
c33330022
.
contop
)
c
:
RegisterEffect
(
e7
)
e3
:
SetLabelObject
(
e7
)
end
function
c33330022
.
contop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
SetLabel
(
e
:
GetHandler
():
GetCounter
(
0x1019
))
end
function
c33330022
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
end
cm
.
card_code_list
=
cm
.
search
function
c33330022
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
--Special Summon
if
chk
==
0
then
return
true
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
local
ct
=
e
:
GetLabelObject
():
GetLabel
(
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsType
(
TYPE_MONSTER
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
ct
*
500
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330022
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
e
:
GetHandler
():
IsCanAddCounter
(
cm
.
counter
,
1
)
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
if
Duel
.
Damage
(
tp
,
ct
*
500
,
REASON_EFFECT
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330022
.
filter3
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c33330022
.
filter3
(
c
)
return
c
:
IsCode
(
33330023
)
and
c
:
IsAbleToHand
()
end
function
c33330022
.
sfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c33330022
.
stg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanAddCounter
(
0x1019
,
1
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c33330022
.
sfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
tp
,
0
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330022
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<
1
then
return
end
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
c
:
AddCounter
(
0x1019
,
1
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
sp
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
33330022
.
s
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
if
g
:
GetCount
()
>
0
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
e
:
GetHandler
():
AddCounter
(
cm
.
counter
,
1
)
g
:
GetFirst
():
AddCounter
(
0x1019
,
1
)
g
:
GetFirst
():
AddCounter
(
cm
.
counter
,
1
)
end
end
end
end
--Change Field
function
c33330022
.
indesval
(
e
,
re
,
rp
)
function
cm
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
e
:
SetLabel
(
e
:
GetHandler
():
GetCounter
(
cm
.
counter
))
end
end
function
cm
.
fdfilter1
(
c
)
function
c33330022
.
tcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
c
:
IsCode
(
cm
.
search
[
1
])
and
c
:
IsAbleToHand
()
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
end
function
c
m
.
fdfilter2
(
c
,
tp
)
function
c
33330022
.
filter
(
c
)
return
c
:
IsCode
(
cm
.
search
[
2
])
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
)
return
c
:
IsCode
(
33330019
)
and
c
:
IsAbleToHand
(
)
end
end
function
cm
.
fdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330022
.
ttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330022
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
)
end
end
function
cm
.
fdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330022
.
top
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
true
end
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
local
sel
=
0
if
Duel
.
IsExistingMatchingCard
(
cm
.
fdfilter2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
then
sel
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
),
aux
.
Stringid
(
m
,
3
))
+
1
else
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
))
sel
=
1
e
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DAMAGE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
1
,
tp
,
ct
*
cm
.
damage
)
end
e
:
SetLabel
(
sel
)
end
function
cm
.
fdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sel
=
e
:
GetLabel
()
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
e
:
GetLabelObject
():
SetLabel
(
0
)
if
sel
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
fdfilter1
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330022
.
filter
),
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
Duel
.
Damage
(
tp
,
ct
*
cm
.
damage
,
REASON_EFFECT
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
fdfilter2
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
tc
:
AddCounter
(
cm
.
counter
,
ct
)
end
end
end
expansions/script/c33330023.lua
View file @
607e625c
--深界三层-大断层
--深界三层-大断层
local
m
=
33330023
function
c33330023
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
search
=
{
33330038
,
33330000
}
--检 索 对 象
cm
.
counter
=
0x1556
--指 示 物
cm
.
damage
=
1250
--伤 害 倍 数
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
cm
.
counter
)
--Activate
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
33330023
,
0
))
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetDescription
(
aux
.
Stringid
(
33330023
,
1
))
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCost
(
c33330023
.
tcost
)
e1
:
SetTarget
(
c33330023
.
ttg
)
e1
:
SetOperation
(
c33330023
.
top
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Special Summon
--
cannot be target
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCategory
(
CATEGORY_COUNTER
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DAMAGE
)
e2
:
SetCode
(
EFFECT_CANNOT_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
Set
CountLimit
(
1
)
e2
:
Set
TargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x556
)
)
e2
:
Set
Operation
(
cm
.
spop
)
e2
:
Set
Value
(
1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Change Field
--s c
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetOperation
(
cm
.
ctop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e4
:
SetDescription
(
aux
.
Stringid
(
33330023
,
2
))
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_COUNTER
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetCountLimit
(
1
,
m
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetCountLimit
(
1
,
33330023
)
e4
:
SetLabelObject
(
e3
)
e4
:
SetTarget
(
c33330023
.
stg
)
e4
:
SetCondition
(
cm
.
fdcon
)
e4
:
SetOperation
(
c33330023
.
sop
)
e4
:
SetTarget
(
cm
.
fdtg
)
e4
:
SetOperation
(
cm
.
fdop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--xxxx
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
33330023
,
3
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCondition
(
c33330023
.
con2
)
e3
:
SetTarget
(
c33330023
.
tg2
)
e3
:
SetOperation
(
c33330023
.
op2
)
c
:
RegisterEffect
(
e3
)
--count
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e7
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e7
:
SetOperation
(
c33330023
.
contop
)
c
:
RegisterEffect
(
e7
)
e3
:
SetLabelObject
(
e7
)
end
end
cm
.
card_code_list
=
cm
.
search
function
c33330023
.
contop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--Special Summon
e
:
SetLabel
(
e
:
GetHandler
():
GetCounter
(
0x1019
))
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330023
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
e
:
GetHandler
():
IsCanAddCounter
(
cm
.
counter
,
1
)
local
c
=
e
:
GetHandler
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
return
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
function
c33330023
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
true
end
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
ct
*
2000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c33330023
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
if
Duel
.
Damage
(
tp
,
ct
*
2000
,
REASON_EFFECT
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330023
.
filter3
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c33330023
.
filter3
(
c
)
return
c
:
IsCode
(
33330024
)
and
c
:
IsAbleToHand
()
end
function
c33330023
.
sfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c33330023
.
stg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanAddCounter
(
0x1019
,
1
)
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c33330023
.
sfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
tp
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
0
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330023
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
e
:
GetHandler
():
AddCounter
(
cm
.
counter
,
1
)
then
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
c
:
AddCounter
(
0x1019
,
1
)
if
Duel
.
GetLocationCountFromEx
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
sp
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33330023
.
s
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
if
g
:
GetCount
()
>
0
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
Duel
.
Damage
(
tp
,
g
:
GetFirst
():
GetBaseAttack
(),
REASON_EFFECT
)
g
:
GetFirst
():
AddCounter
(
0x1019
,
1
)
end
end
end
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
(
cm
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
cm
.
splimit
(
e
,
c
)
return
not
c
:
IsSetCard
(
0x556
)
end
--Change Field
function
cm
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
SetLabel
(
e
:
GetHandler
():
GetCounter
(
cm
.
counter
))
end
end
function
c
m
.
fdfilter1
(
c
)
function
c
33330023
.
indesval
(
e
,
re
,
rp
)
return
c
:
IsCode
(
cm
.
search
[
1
])
and
c
:
IsAbleToHand
(
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
end
function
cm
.
fdfilter2
(
c
,
tp
)
function
c33330023
.
tcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
c
:
IsCode
(
cm
.
search
[
2
])
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
end
function
c
m
.
fdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330023
.
filter
(
c
)
return
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
return
c
:
IsCode
(
33330019
)
and
c
:
IsAbleToHand
(
)
end
end
function
cm
.
fdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330023
.
ttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330023
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
)
end
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
)
local
sel
=
0
if
Duel
.
IsExistingMatchingCard
(
cm
.
fdfilter2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
then
sel
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
),
aux
.
Stringid
(
m
,
3
))
+
1
else
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
))
sel
=
1
e
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DAMAGE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
1
,
tp
,
ct
*
cm
.
damage
)
end
e
:
SetLabel
(
sel
)
end
end
function
cm
.
fdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330023
.
top
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sel
=
e
:
GetLabel
()
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
e
:
GetLabelObject
():
SetLabel
(
0
)
if
sel
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
fdfilter1
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330023
.
filter
),
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
Duel
.
Damage
(
tp
,
ct
*
cm
.
damage
,
REASON_EFFECT
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
fdfilter2
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
tc
:
AddCounter
(
cm
.
counter
,
ct
)
end
end
end
expansions/script/c33330024.lua
View file @
607e625c
--深界三层-大断层
--深界三层-大断层
local
m
=
33330024
function
c33330024
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
search
=
{
33330038
,
33330025
}
--检 索 对 象
cm
.
counter
=
0x1556
--指 示 物
cm
.
atk
=
500
--攻 击 上 升
cm
.
damage
=
1000
--伤 害 倍 数
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
cm
.
counter
)
--Activate
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
33330024
,
0
))
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
33330024
,
1
))
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCost
(
c33330024
.
tcost
)
e1
:
SetTarget
(
c33330024
.
ttg
)
e1
:
SetOperation
(
c33330024
.
top
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Search
--
Atk
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetCost
(
cm
.
thcost
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x556
))
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetValue
(
500
)
e2
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Atk Up
--s c
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x556
))
e3
:
SetValue
(
cm
.
atk
)
c
:
RegisterEffect
(
e3
)
--Draw
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e4
:
SetDescription
(
aux
.
Stringid
(
33330024
,
2
))
e4
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_COUNTER
+
CATEGORY_DRAW
)
e4
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_COUNTER
+
CATEGORY_DRAW
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCountLimit
(
1
,
33330024
)
e4
:
SetTarget
(
c
m
.
dr
tg
)
e4
:
SetTarget
(
c
33330024
.
s
tg
)
e4
:
SetOperation
(
c
m
.
dr
op
)
e4
:
SetOperation
(
c
33330024
.
s
op
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--
Count
--
xxxx
local
e
5
=
Effect
.
CreateEffect
(
c
)
local
e
3
=
Effect
.
CreateEffect
(
c
)
e
5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e
3
:
SetDescription
(
aux
.
Stringid
(
33330024
,
3
)
)
e
5
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e
3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DAMAGE
)
e
5
:
SetOperation
(
cm
.
ctop
)
e
3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
c
:
RegisterEffect
(
e5
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
--To Hand
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCondition
(
c33330024
.
con2
)
e
6
:
SetDescription
(
aux
.
Stringid
(
m
,
3
)
)
e
3
:
SetTarget
(
c33330024
.
tg2
)
e
6
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DAMAGE
)
e
3
:
SetOperation
(
c33330024
.
op2
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
c
:
RegisterEffect
(
e3
)
e6
:
SetCode
(
EVENT_LEAVE_FIELD
)
--count
e6
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e
6
:
SetLabelObject
(
e5
)
e
7
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e
6
:
SetCondition
(
cm
.
sccon
)
e
7
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e
6
:
SetTarget
(
cm
.
sctg
)
e
7
:
SetOperation
(
c33330024
.
contop
)
e6
:
SetOperation
(
cm
.
scop
)
c
:
RegisterEffect
(
e7
)
c
:
RegisterEffect
(
e6
)
e3
:
SetLabelObject
(
e7
)
end
end
cm
.
card_code_list
=
cm
.
search
function
c33330024
.
contop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--Search
e
:
SetLabel
(
e
:
GetHandler
():
GetCounter
(
0x1019
))
function
cm
.
thfilter
(
c
)
return
c
:
IsCode
(
cm
.
search
[
1
])
and
c
:
IsAbleToHand
()
end
end
function
c
m
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
33330024
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
local
c
=
e
:
GetHandler
()
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
return
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330024
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
true
end
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
ct
*
1000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330024
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
if
Duel
.
Damage
(
1
-
tp
,
ct
*
1000
,
REASON_EFFECT
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330024
.
filter3
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
--Draw
function
c33330024
.
filter3
(
c
)
function
cm
.
drfilter
(
c
)
return
c
:
IsCode
(
33330025
)
and
c
:
IsAbleToHand
()
end
function
c33330024
.
sfilter
(
c
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsAbleToGrave
()
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsAbleToGrave
()
end
end
function
cm
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330024
.
stg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanAddCounter
(
cm
.
counter
,
1
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanAddCounter
(
0x1019
,
1
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c33330024
.
sfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
and
Duel
.
IsExistingMatchingCard
(
cm
.
drfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
tp
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
tp
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
function
c
m
.
dr
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330024
.
s
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
or
not
c
:
AddCounter
(
cm
.
counter
,
1
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
c
:
AddCounter
(
0x1019
,
1
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
drfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33330024
.
sfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
BreakEffect
()
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
end
end
--Count
function
c33330024
.
indesval
(
e
,
re
,
rp
)
function
cm
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
e
:
SetLabel
(
e
:
GetHandler
():
GetCounter
(
cm
.
counter
))
end
end
--To Hand
function
c33330024
.
tcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
scfilter
(
c
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
return
c
:
IsCode
(
cm
.
search
[
2
])
and
c
:
IsAbleToHand
(
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
end
function
c
m
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330024
.
filter
(
c
)
return
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
return
c
:
IsCode
(
33330019
)
and
c
:
IsAbleToHand
(
)
end
end
function
cm
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c33330024
.
ttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330024
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
)
end
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
ct
*
cm
.
damage
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
end
function
cm
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330024
.
top
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
if
Duel
.
Damage
(
tp
,
ct
*
cm
.
damage
,
REASON_EFFECT
)
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
scfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330024
.
filter
),
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
tp
,
g
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
expansions/script/c33330025.lua
View file @
607e625c
--绝界行
--绝界行
local
m
=
33330025
function
c33330025
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Extra S
ummon
--
extra s
ummon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
e2
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
e2
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x556
))
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x556
))
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Send Deck Top
--lock draw
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e7
:
SetDescription
(
aux
.
Stringid
(
33330025
,
0
))
e3
:
SetCategory
(
CATEGORY_TODECK
)
e7
:
SetCategory
(
CATEGORY_TODECK
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e7
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
cm
.
tdcon
)
e7
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetTarget
(
cm
.
tdtg
)
e7
:
SetCondition
(
c33330025
.
drcon
)
e3
:
SetOperation
(
cm
.
tdop
)
e7
:
SetTarget
(
c33330025
.
drtg
)
c
:
RegisterEffect
(
e3
)
e7
:
SetOperation
(
c33330025
.
drop
)
c
:
RegisterEffect
(
e7
)
end
end
--Send Deck Top
function
c33330025
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
tdfilter
(
c
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsType
(
TYPE_FIELD
)
and
c
:
IsAbleToDeck
()
end
function
cm
.
tdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
cm
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330025
.
tdfilter
(
c
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
return
c
:
IsType
(
TYPE_FIELD
)
and
c
:
IsSetCard
(
0x556
)
and
c
:
IsAbleToDeck
()
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
function
c33330025
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330025
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c33330025
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
tp
,
LOCATION_GRAVE
)
end
end
function
cm
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330025
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c33330025
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoDeck
(
g
,
1
-
tp
,
0
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
<=
0
then
return
end
if
Duel
.
SendtoDeck
(
g
,
1
-
tp
,
0
,
REASON_EFFECT
)
==
0
then
return
end
local
sg
=
Duel
.
GetOperatedGroup
()
local
sg
=
Duel
.
GetOperatedGroup
()
local
ct
=
0
for
tc
in
aux
.
Next
(
sg
)
do
for
tc
in
aux
.
Next
(
sg
)
do
if
tc
:
IsLocation
(
LOCATION_DECK
)
then
if
tc
:
IsLocation
(
LOCATION_DECK
)
then
tc
:
ReverseInDeck
()
tc
:
ReverseInDeck
()
ct
=
ct
+
1
end
end
end
Duel
.
SortDecktop
(
tp
,
1
-
tp
,
ct
)
end
end
end
end
expansions/script/c33330026.lua
View file @
607e625c
--深界的诅咒
--深界的诅咒
local
m
=
33330026
function
c33330026
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
aux
.
AddRitualProcGreater2
(
c
,
cm
.
ritual_filter
,
LOCATION_HAND
+
LOCATION_DECK
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
--Destroy Replace
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c33330026
.
target
)
e1
:
SetOperation
(
c33330026
.
activate
)
c
:
RegisterEffect
(
e1
)
--destroy replace
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetTarget
(
c
m
.
reptg
)
e2
:
SetTarget
(
c
33330026
.
reptg
)
e2
:
SetValue
(
c
m
.
repval
)
e2
:
SetValue
(
c
33330026
.
repval
)
e2
:
SetOperation
(
c
m
.
repop
)
e2
:
SetOperation
(
c
33330026
.
repop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
--Activate
c33330026
.
fit_monster
=
{
33330015
}
function
cm
.
ritual_filter
(
c
)
function
c33330026
.
repfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
c
:
IsFaceup
()
and
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsSetCard
(
0x556
)
and
c
:
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
end
end
--Destroy Replace
function
c33330026
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
repfilter
(
c
,
tp
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
and
eg
:
IsExists
(
c33330026
.
repfilter
,
1
,
nil
,
tp
)
end
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x556
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
end
function
cm
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
and
eg
:
IsExists
(
cm
.
repfilter
,
1
,
nil
,
tp
)
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
end
function
c
m
.
repval
(
e
,
c
)
function
c
33330026
.
repval
(
e
,
c
)
return
c
m
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
return
c
33330026
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
end
function
c
m
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330026
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
c33330026
.
filter
(
c
,
e
,
tp
,
m
,
ft
)
if
not
c
:
IsCode
(
33330015
)
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
if
ft
>
0
then
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
10
,
c
)
else
return
mg
:
IsExists
(
c33330026
.
mfilterf
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
function
c33330026
.
mfilterf
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
10
,
rc
)
else
return
false
end
end
function
c33330026
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
c33330026
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c33330026
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c33330026
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
local
mat
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
12
,
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
c33330026
.
mfilterf
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
12
,
tc
)
mat
:
Merge
(
mat2
)
end
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
expansions/script/c33330027.lua
View file @
607e625c
--深界遗物-免除诅咒之笼
--深界遗物-免除诅咒之笼
local
m
=
33330027
function
c33330027
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
def
=
500
--守 备 力
function
cm
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c
m
.
target
)
e1
:
SetTarget
(
c
33330027
.
target
)
e1
:
SetOperation
(
c
m
.
operation
)
e1
:
SetOperation
(
c
33330027
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--Equip Limit
--Def up
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e4
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e4
:
SetValue
(
500
)
c
:
RegisterEffect
(
e4
)
--Untargetable
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetValue
(
1
)
e2
:
SetValue
(
cm
.
eqlimit
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
Def Up
--
Equip limit
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e3
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e3
:
SetValue
(
cm
.
def
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetValue
(
c33330027
.
eqlimit
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--Indes
--search
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e6
:
SetDescription
(
aux
.
Stringid
(
33330027
,
0
))
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e6
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetValue
(
1
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
c
:
RegisterEffect
(
e4
)
e6
:
SetCode
(
EVENT_LEAVE_FIELD
)
--Search
e6
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e6
:
SetCondition
(
c33330027
.
thcon
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e6
:
SetTarget
(
c33330027
.
thtg
)
e5
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e6
:
SetOperation
(
c33330027
.
thop
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
c
:
RegisterEffect
(
e6
)
e5
:
SetCode
(
EVENT_LEAVE_FIELD
)
e5
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e5
:
SetCondition
(
cm
.
thcon
)
e5
:
SetTarget
(
cm
.
thtg
)
e5
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e5
)
end
end
--Activate
function
c33330027
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
filter
(
c
,
e
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
return
c
:
IsFaceup
()
and
cm
.
eqlimit
(
e
,
c
)
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c33330027
.
thfilter
(
c
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
filter
(
chkc
)
end
return
c
:
IsSetCard
(
0x3556
)
and
c
:
IsAbleToHand
()
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
e
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
e
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330027
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
Duel
.
GetFirstTarget
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330027
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
end
function
c33330027
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33330027
.
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
end
end
--Equip Limit
function
c33330027
.
eqlimit
(
e
,
c
)
function
cm
.
eqlimit
(
e
,
c
)
return
c
:
IsSetCard
(
0x556
)
return
c
:
IsSetCard
(
0x556
)
end
end
--Search
function
c33330027
.
filter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x556
)
return
c
:
IsSetCard
(
0x3556
)
and
c
:
IsAbleToHand
()
end
end
function
c
m
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330027
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_MZONE
and
c33330027
.
filter
(
chkc
)
end
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c33330027
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SelectTarget
(
tp
,
c33330027
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_
TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_
EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330027
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tc
=
Duel
.
GetFirstTarget
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
expansions/script/c33330028.lua
View file @
607e625c
--深界遗物-免除诅咒之笼
--深界遗物-免除诅咒之笼
local
m
=
33330028
function
c33330028
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
atk
=
500
--攻 击 力
function
cm
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c
m
.
target
)
e1
:
SetTarget
(
c
33330028
.
target
)
e1
:
SetOperation
(
c
m
.
operation
)
e1
:
SetOperation
(
c
33330028
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--Equip Limit
--Def up
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetValue
(
500
)
c
:
RegisterEffect
(
e4
)
--Untargetable
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e2
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetValue
(
4
)
e2
:
SetValue
(
cm
.
eqlimit
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
Atk Up
--
Equip limit
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e3
:
SetValue
(
cm
.
atk
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetValue
(
c33330028
.
eqlimit
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--Level Up
--search
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e6
:
SetDescription
(
aux
.
Stringid
(
33330028
,
0
))
e4
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e6
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetValue
(
4
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
c
:
RegisterEffect
(
e4
)
e6
:
SetCode
(
EVENT_LEAVE_FIELD
)
--Search
e6
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e6
:
SetCondition
(
c33330028
.
thcon
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e6
:
SetTarget
(
c33330028
.
thtg
)
e5
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e6
:
SetOperation
(
c33330028
.
thop
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
c
:
RegisterEffect
(
e6
)
e5
:
SetCode
(
EVENT_LEAVE_FIELD
)
e5
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e5
:
SetCondition
(
cm
.
thcon
)
e5
:
SetTarget
(
cm
.
thtg
)
e5
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e5
)
end
end
--Activate
function
c33330028
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
filter
(
c
,
e
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
return
c
:
IsFaceup
()
and
cm
.
eqlimit
(
e
,
c
)
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c33330028
.
thfilter
(
c
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
filter
(
chkc
)
end
return
c
:
IsSetCard
(
0x3556
)
and
c
:
IsAbleToHand
()
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
e
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
e
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330028
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
Duel
.
GetFirstTarget
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330028
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
end
function
c33330028
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33330028
.
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
end
end
--Equip Limit
function
c33330028
.
eqlimit
(
e
,
c
)
function
cm
.
eqlimit
(
e
,
c
)
return
c
:
IsSetCard
(
0x556
)
return
c
:
IsSetCard
(
0x556
)
end
end
--Search
function
c33330028
.
filter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x556
)
return
c
:
IsSetCard
(
0x3556
)
and
c
:
IsAbleToHand
()
end
end
function
c
m
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330028
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_MZONE
and
c33330028
.
filter
(
chkc
)
end
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c33330028
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SelectTarget
(
tp
,
c33330028
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_
TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_
EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330028
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tc
=
Duel
.
GetFirstTarget
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
expansions/script/c33330029.lua
View file @
607e625c
--深界遗物-免除诅咒之笼
--深界遗物-免除诅咒之笼
local
m
=
33330029
function
c33330029
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c
m
.
target
)
e1
:
SetTarget
(
c
33330029
.
target
)
e1
:
SetOperation
(
c
m
.
operation
)
e1
:
SetOperation
(
c
33330029
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--Equip Limit
--Def up
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetValue
(
cm
.
eqlimit
)
c
:
RegisterEffect
(
e2
)
--To Hand
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetValue
(
-
500
)
e4
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetCondition
(
cm
.
sccon
)
e4
:
SetTarget
(
cm
.
sctg
)
e4
:
SetOperation
(
cm
.
scop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--Search
--atk
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
33330029
,
0
))
e5
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e5
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e5
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetCondition
(
cm
.
thcon
)
e2
:
SetCondition
(
c33330029
.
ctcon
)
e5
:
SetTarget
(
cm
.
thtg
)
e2
:
SetOperation
(
c33330029
.
ctop
)
e5
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e5
)
--Equip limit
end
local
e3
=
Effect
.
CreateEffect
(
c
)
--Activate
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
function
cm
.
filter
(
c
,
e
)
e3
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
return
c
:
IsFaceup
()
and
cm
.
eqlimit
(
e
,
c
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetValue
(
c33330029
.
eqlimit
)
c
:
RegisterEffect
(
e3
)
--search
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
33330029
,
1
))
e6
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetCode
(
EVENT_LEAVE_FIELD
)
e6
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e6
:
SetCondition
(
c33330029
.
thcon
)
e6
:
SetTarget
(
c33330029
.
thtg
)
e6
:
SetOperation
(
c33330029
.
thop
)
c
:
RegisterEffect
(
e6
)
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c33330029
.
ctcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
filter
(
chkc
)
end
local
tc
=
e
:
GetHandler
():
GetEquipTarget
()
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
e
)
end
return
Duel
.
GetAttacker
()
==
tc
and
tc
:
GetBattleTarget
()
and
tc
:
GetBattleTarget
():
IsControler
(
1
-
tp
)
and
tc
:
GetBattleTarget
():
IsAttackAbove
(
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
e
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330029
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
e
:
GetHandler
():
GetEquipTarget
()
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
bc
=
tc
:
GetBattleTarget
()
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
bc
:
IsControler
(
1
-
tp
)
and
bc
:
IsRelateToBattle
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
-
200
)
bc
:
RegisterEffect
(
e1
)
end
end
end
end
--Equip Limit
function
c33330029
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
eqlimit
(
e
,
c
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
return
c
:
IsSetCard
(
0x556
)
end
--To Hand
function
cm
.
scfilter
(
c
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsAbleToHand
()
end
end
function
c
m
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330029
.
thfilter
(
c
)
return
ep
~=
tp
and
eg
:
GetFirst
()
==
e
:
GetHandler
():
GetEquipTarget
()
return
c
:
IsSetCard
(
0x3556
)
and
c
:
IsAbleToHand
()
end
end
function
c
m
.
sc
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
33330029
.
th
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
sc
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
33330029
.
th
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c
m
.
sc
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330029
.
th
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
scfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33330029
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
--Search
function
c33330029
.
eqlimit
(
e
,
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x556
)
return
c
:
IsSetCard
(
0x3556
)
and
c
:
IsAbleToHand
()
end
end
function
c
m
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330029
.
filter
(
c
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x556
)
end
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330029
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_MZONE
and
c33330029
.
filter
(
chkc
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c33330029
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c33330029
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330029
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tc
=
Duel
.
GetFirstTarget
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
expansions/script/c33330030.lua
View file @
607e625c
--深界探窟者 黎明卿
--深界探窟者 黎明卿
local
m
=
33330030
function
c33330030
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--pendulum summon
function
cm
.
initial_effect
(
c
)
--Pendulum Summon
aux
.
EnablePendulumAttribute
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--Destroy
--xyzlimit
local
eb
=
Effect
.
CreateEffect
(
c
)
eb
:
SetType
(
EFFECT_TYPE_SINGLE
)
eb
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
eb
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
eb
:
SetValue
(
c33330030
.
xyzval
)
c
:
RegisterEffect
(
eb
)
--destroy
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
33330030
,
0
))
e5
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_PZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetTarget
(
c33330030
.
destg
)
e5
:
SetOperation
(
c33330030
.
desop
)
c
:
RegisterEffect
(
e5
)
--special
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
33330030
,
2
))
e6
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetCode
(
EVENT_DESTROYED
)
e6
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e6
:
SetTarget
(
c33330030
.
pentg
)
e6
:
SetOperation
(
c33330030
.
penop
)
c
:
RegisterEffect
(
e6
)
--lv
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
33330030
,
3
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_
P
ZONE
)
e1
:
SetRange
(
LOCATION_
M
ZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetCost
(
c33330030
.
lvcost
)
e1
:
SetOperation
(
cm
.
desop
)
e1
:
SetTarget
(
c33330030
.
lvtg
)
e1
:
SetOperation
(
c33330030
.
lvop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--Self Destroy
--zxczxcvzxvzxvzxvzxvzvxzxvzxv
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
cm
.
sdtg
)
e2
:
SetOperation
(
cm
.
sdop
)
c
:
RegisterEffect
(
e2
)
--Xyz Limit
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetValue
(
cm
.
xyzval
)
c
:
RegisterEffect
(
e3
)
--Level 8
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_PZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCode
(
EVENT_ADJUST
)
e4
:
SetCost
(
cm
.
lvcost
)
e4
:
SetOperation
(
c33330030
.
check
)
e4
:
SetTarget
(
cm
.
lvtg
)
--c:RegisterEffect(e4)
e4
:
SetOperation
(
cm
.
lvop
)
--self destroy
c
:
RegisterEffect
(
e4
)
local
evb2
=
Effect
.
CreateEffect
(
c
)
--Special Summon
evb2
:
SetDescription
(
aux
.
Stringid
(
33330030
,
1
))
local
e5
=
Effect
.
CreateEffect
(
c
)
evb2
:
SetCategory
(
CATEGORY_DESTROY
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
evb2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
evb2
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
evb2
:
SetRange
(
LOCATION_PZONE
)
e5
:
SetCode
(
EVENT_DESTROYED
)
evb2
:
SetCountLimit
(
1
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
evb2
:
SetTarget
(
c33330030
.
destg2
)
e5
:
SetTarget
(
cm
.
sptg
)
evb2
:
SetOperation
(
c33330030
.
desop2
)
e5
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
evb2
)
c
:
RegisterEffect
(
e5
)
Duel
.
AddCustomActivityCounter
(
33330030
,
ACTIVITY_SPSUMMON
,
c33330030
.
counterfilter
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SPSUMMON
,
cm
.
counterfilter
)
end
end
function
c33330030
.
gfilter
(
c
,
g
)
--Destroy
return
not
g
:
IsContains
(
c
)
function
cm
.
thfilter
(
c
)
end
return
c
:
IsCode
(
m
)
and
c
:
IsAbleToHand
()
and
(
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_DECK
))
function
c33330030
.
check
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
e
:
GetHandler
()
function
cm
.
desfilter
(
c
)
local
cg
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
local
fid
=
c
:
GetFieldID
()
end
if
cg
:
GetCount
()
<=
0
then
return
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
for
tc
in
aux
.
Next
(
cg
)
do
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
local
rfid
=
tc
:
GetFieldID
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
if
rfid
>
fid
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
)
Debug
.
Message
(
"111"
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_EXTRA
)
Duel
.
RaiseSingleEvent
(
c
,
EVENT_CUSTOM
+
33330030
,
e
,
0
,
0
,
0
,
0
)
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
--Self Destroy
function
cm
.
sdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDestructable
(
e
)
and
Duel
.
GetTurnPlayer
()
==
tp
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
cm
.
sdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
end
end
end
--Xyz Limit
function
c33330030
.
xyzval
(
e
,
c
)
function
cm
.
xyzval
(
e
,
c
)
if
not
c
then
return
false
end
if
not
c
then
return
false
end
return
not
c
:
IsSetCard
(
0x556
)
return
not
c
:
IsSetCard
(
0x556
)
end
end
--Level 8
function
c33330030
.
counterfilter
(
c
)
function
cm
.
counterfilter
(
c
)
if
not
c
:
IsSummonType
(
SUMMON_TYPE_XYZ
)
then
return
true
end
return
not
c
:
IsSummonType
(
SUMMON_TYPE_XYZ
)
or
c
:
IsSetCard
(
0x556
)
return
c
:
IsSetCard
(
0x556
)
end
end
function
c
m
.
lvcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
33330030
.
lvcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
m
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
33330030
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetTarget
(
cm
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c33330030
.
splimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
cm
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
function
c33330030
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
sumtype
==
SUMMON_TYPE_XYZ
and
c
:
IsSetCard
(
0x556
)
if
bit
.
band
(
sumtype
,
SUMMON_TYPE_XYZ
)
==
0
then
return
false
end
return
not
c
:
IsSetCard
(
0x556
)
end
end
function
c
m
.
lvfilter
(
c
)
function
c
33330030
.
lvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
1
)
and
not
c
:
IsLevel
(
8
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330030
.
lvfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
end
function
c
m
.
lvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
33330030
.
lvfilter
(
c
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
lvfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
return
c
:
IsFaceup
()
and
c
:
GetLevel
()
>
0
and
c
:
GetLevel
()
~=
8
end
end
function
c
m
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330030
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sg
=
Duel
.
GetMatchingGroup
(
c
m
.
lvfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
sg
=
Duel
.
GetMatchingGroup
(
c
33330030
.
lvfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tc
=
sg
:
GetFirst
()
if
sg
:
GetCount
()
<=
0
then
return
end
while
tc
do
for
tc
in
aux
.
Next
(
sg
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
()
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e1
:
SetValue
(
8
)
e1
:
SetValue
(
8
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
tc
=
sg
:
GetNext
()
end
end
function
c33330030
.
destg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDestructable
(
e
)
and
Duel
.
GetTurnPlayer
()
==
tp
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c33330030
.
desop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
end
end
end
--Special Summon
function
c33330030
.
pentg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330030
.
penop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
c
=
e
:
GetHandler
()
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
c33330030
.
thfilter
(
c
)
return
c
:
IsCode
(
33330030
)
and
c
:
IsAbleToHand
()
and
(
c
:
IsFaceup
()
or
not
c
:
IsLocation
(
LOCATION_REMOVED
))
end
function
c33330030
.
desfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
end
function
c33330030
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330030
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c33330030
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
+
LOCATION_PZONE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
+
LOCATION_PZONE
)
end
function
c33330030
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33330030
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330030
.
thfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
+
LOCATION_PZONE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
expansions/script/c33330031.lua
View file @
607e625c
--深界之怒-火葬炮
--深界之怒-火葬炮
local
m
=
33330031
function
c33330031
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
check
=
{
33330028
}
--发 动 要 求
function
cm
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetHintTiming
(
0
,
TIMING_MAIN_END
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
cm
.
condition
)
e1
:
SetCondition
(
c33330031
.
condition
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetTarget
(
c33330031
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
e1
:
SetOperation
(
c33330031
.
activate
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
To G
rave
--
to g
rave
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
33330031
,
0
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c
m
.
tgtg
)
e2
:
SetTarget
(
c
33330031
.
tgtg
)
e2
:
SetOperation
(
c
m
.
tgop
)
e2
:
SetOperation
(
c
33330031
.
tgop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
cm
.
card_code_list
=
cm
.
check
function
c33330031
.
tgfilter
(
c
)
--Activate
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
function
cm
.
cfilter
(
c
)
end
return
c
:
IsCode
(
cm
.
check
[
1
])
and
c
:
IsFaceup
()
function
c33330031
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330031
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c33330031
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33330031
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
function
c33330031
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
and
Duel
.
IsExistingMatchingCard
(
c33330031
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
end
function
c
m
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330031
.
cfilter
(
c
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
return
c
:
IsCode
(
33330028
)
and
c
:
IsFaceup
(
)
end
end
function
c
m
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
33330031
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
end
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
end
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_MZONE
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_MZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
g
:
GetCount
(),
0
,
LOCATION_MZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
g
:
GetCount
(),
0
,
LOCATION_MZONE
)
end
end
function
c
m
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330031
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_MZONE
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_MZONE
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_RULE
)
Duel
.
SendtoGrave
(
g
,
REASON_RULE
)
...
@@ -47,25 +56,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -47,25 +56,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
c
m
.
actlimit
)
e1
:
SetValue
(
c
33330031
.
actlimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
cm
.
actlimit
(
e
,
re
,
tp
)
function
c33330031
.
actlimit
(
e
,
re
,
tp
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
--To Grave
function
cm
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
cm
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
end
expansions/script/c33330032.lua
View file @
607e625c
--深界庇护所 娜娜奇的小屋
--深界庇护所 娜娜奇的小屋
local
m
=
33330032
function
c33330032
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--Activate(effect)
cm
.
counter
=
0x1556
--指 示 物
local
e4
=
Effect
.
CreateEffect
(
c
)
cm
.
recover
=
500
--回 复 倍 数
e4
:
SetCategory
(
CATEGORY_RECOVER
)
function
cm
.
initial_effect
(
c
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_PLAYER_TARGET
)
--Activate
e4
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCategory
(
CATEGORY_RECOVER
)
e4
:
SetCondition
(
c33330032
.
condition
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e4
:
SetTarget
(
c33330032
.
target
)
e1
:
SetCode
(
EVENT_CHAINING
)
e4
:
SetOperation
(
c33330032
.
activate
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_PLAYER_TARGET
)
c
:
RegisterEffect
(
e4
)
e1
:
SetCondition
(
cm
.
condition
)
--tohand
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
--To Hand
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
33330032
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
cm
.
thcon
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetCondition
(
c33330032
.
thcon
)
e2
:
SetOperation
(
cm
.
thop
)
e2
:
SetTarget
(
c33330032
.
thtg
)
e2
:
SetOperation
(
c33330032
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
--Activate
function
c33330032
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
function
c33330032
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsAbleToHand
()
end
function
c33330032
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330032
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c33330032
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c33330032
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
end
function
c33330032
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsHasCategory
(
CATEGORY_DESTROY
)
return
re
:
IsHasCategory
(
CATEGORY_DESTROY
)
end
end
function
c
m
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
33330032
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCounter
(
tp
,
1
,
0
,
cm
.
counter
)
>
0
end
if
chk
==
0
then
return
Duel
.
GetCounter
(
tp
,
1
,
0
,
0x1019
)
>
0
end
local
ct
=
Duel
.
GetCounter
(
tp
,
1
,
0
,
cm
.
counter
)
local
ct
=
Duel
.
GetCounter
(
tp
,
1
,
0
,
0x1019
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
ct
*
cm
.
recover
)
Duel
.
SetTargetParam
(
ct
*
500
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
ct
*
cm
.
recover
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
ct
*
500
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330032
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
ct
=
Duel
.
GetCounter
(
tp
,
1
,
0
,
0x1019
)
local
ct
=
Duel
.
GetCounter
(
tp
,
1
,
0
,
cm
.
counter
)
if
ct
>
0
and
Duel
.
Recover
(
tp
,
ct
*
500
,
REASON_EFFECT
)
~=
0
then
if
ct
>
0
and
Duel
.
Recover
(
tp
,
ct
*
cm
.
recover
,
REASON_EFFECT
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e1
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
...
@@ -55,21 +66,3 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -55,21 +66,3 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
end
end
--To Hand
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
\ No newline at end of file
expansions/script/c33330033.lua
View file @
607e625c
--深界の生骸 米蒂
--深界の生骸 米蒂
local
m
=
33330033
function
c33330033
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
--xyz summon
cm
.
counter
=
0x1556
--指 示 物
cm
.
atk
=
700
--攻 击 力
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--Xyz Summon
aux
.
AddXyzProcedure
(
c
,
nil
,
4
,
2
)
aux
.
AddXyzProcedure
(
c
,
nil
,
4
,
2
)
--Destroy
c
:
EnableReviveLimit
()
--remove
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
33330033
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_COUNTER
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_COUNTER
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetTarget
(
c
m
.
des
tg
)
e1
:
SetTarget
(
c
33330033
.
d
tg
)
e1
:
SetOperation
(
c
m
.
des
op
)
e1
:
SetOperation
(
c
33330033
.
d
op
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
Atk U
p
--
attacku
p
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
cm
.
atkcon
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetValue
(
cm
.
atkval
)
e2
:
SetCondition
(
c33330033
.
acon
)
e2
:
SetValue
(
c33330033
.
attackup
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Special Summon
--Special Summon
local
e
3
=
Effect
.
CreateEffect
(
c
)
local
e
4
=
Effect
.
CreateEffect
(
c
)
e
3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e
4
:
SetDescription
(
aux
.
Stringid
(
33330033
,
1
))
e
3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e
4
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e
3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e
4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e
3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e
4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e
3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e
4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e
3
:
SetCondition
(
cm
.
sp
con
)
e
4
:
SetCondition
(
c33330033
.
sum
con
)
e
3
:
SetTarget
(
cm
.
sp
tg
)
e
4
:
SetTarget
(
c33330033
.
sum
tg
)
e
3
:
SetOperation
(
cm
.
sp
op
)
e
4
:
SetOperation
(
c33330033
.
sum
op
)
c
:
RegisterEffect
(
e
3
)
c
:
RegisterEffect
(
e
4
)
end
end
--Destroy
function
c33330033
.
sumcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
if
chk
==
0
then
return
g
:
GetCount
()
>
0
and
e
:
GetHandler
():
IsCanAddCounter
(
cm
.
counter
,
g
:
GetCount
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
g
:
GetCount
(),
tp
,
0
)
end
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330033
.
filter
(
c
,
e
,
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsRankBelow
(
6
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
true
)
if
g
:
GetCount
()
>
0
then
end
local
ct
=
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
function
c33330033
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c33330033
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetTargetCard
(
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c33330033
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
ct
>
0
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
Duel
.
GetLocationCountFromEx
(
tp
)
<=
0
then
return
end
c
:
AddCounter
(
cm
.
counter
,
ct
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33330033
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
c
:
IsRelateToEffect
(
e
)
then
Duel
.
Overlay
(
tc
,
Group
.
FromCards
(
c
))
end
end
end
end
--Atk Up
function
c33330033
.
acon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x557
)
return
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x557
)
end
end
function
cm
.
atkval
(
e
,
c
)
function
c33330033
.
attackup
(
e
,
c
)
return
c
:
GetCounter
(
cm
.
counter
)
*
cm
.
atk
return
c
:
GetCounter
(
0x1019
)
*
700
end
--Special Summon
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsRankBelow
(
6
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
end
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330033
.
dtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
g
:
GetCount
()
>
0
and
e
:
GetHandler
():
IsCanAddCounter
(
0x1019
,
g
:
GetCount
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
g
:
GetCount
(),
tp
,
0
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330033
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCountFromEx
(
tp
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
g
:
GetFirst
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
if
tc
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
c
:
IsRelateToEffect
(
e
)
then
if
g
:
GetCount
()
>
0
then
Duel
.
Overlay
(
tc
,
c
)
local
ct
=
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
if
ct
>
0
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
c
:
AddCounter
(
0x1019
,
ct
)
end
end
end
end
end
\ No newline at end of file
expansions/script/c33330034.lua
View file @
607e625c
--深界遗物 探窟者的白笛
--深界遗物 探窟者的白笛
local
m
=
33330034
function
c33330034
.
initial_effect
(
c
)
local
cm
=
_G
[
"c"
..
m
]
cm
.
counter
=
0x1019
--指 示 物
cm
.
atk
=
500
--攻 击 力
function
cm
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c
m
.
target
)
e1
:
SetTarget
(
c
33330034
.
target
)
e1
:
SetOperation
(
c
m
.
operation
)
e1
:
SetOperation
(
c
33330034
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--Equip Limit
--Equip limit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetValue
(
cm
.
eqlimit
)
c
:
RegisterEffect
(
e2
)
--Atk Up
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e3
:
SetValue
(
cm
.
atkval
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetValue
(
c33330034
.
eqlimit
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--Immune
--atk
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetDescription
(
aux
.
Stringid
(
33330034
,
0
))
e4
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e2
:
SetCategory
(
CATEGORY_COUNTER
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e4
:
SetValue
(
cm
.
efilter
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
c
:
RegisterEffect
(
e4
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
--Search
e2
:
SetRange
(
LOCATION_SZONE
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCondition
(
c33330034
.
ctcon
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetTarget
(
c33330034
.
cttg
)
e5
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetOperation
(
c33330034
.
ctop
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
c
:
RegisterEffect
(
e2
)
e5
:
SetCode
(
EVENT_LEAVE_FIELD
)
--search
e5
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCondition
(
cm
.
thcon
)
e6
:
SetDescription
(
aux
.
Stringid
(
33330034
,
1
))
e5
:
SetTarget
(
cm
.
thtg
)
e6
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e5
:
SetOperation
(
cm
.
thop
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
c
:
RegisterEffect
(
e5
)
e6
:
SetCode
(
EVENT_LEAVE_FIELD
)
end
e6
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
--Activate
e6
:
SetCondition
(
c33330034
.
thcon
)
function
cm
.
filter
(
c
,
e
)
e6
:
SetTarget
(
c33330034
.
thtg
)
return
c
:
IsFaceup
()
and
cm
.
eqlimit
(
e
,
c
)
e6
:
SetOperation
(
c33330034
.
thop
)
end
c
:
RegisterEffect
(
e6
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
e
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
e
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330034
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
end
end
end
--Equip Limit
function
c33330034
.
thfilter
(
c
)
function
cm
.
eqlimit
(
e
,
c
)
return
c
:
IsSetCard
(
0x3556
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x556
)
end
end
--Atk Up
function
c33330034
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
atkval
(
e
,
c
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33330034
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
return
Duel
.
GetCounter
(
e
:
GetHandlerPlayer
(),
1
,
0
,
cm
.
counter
)
*
cm
.
atk
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
--Immune
function
c33330034
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
efilter
(
e
,
te
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
return
te
:
GetOwnerPlayer
()
~=
e
:
GetHandlerPlayer
()
and
te
:
GetOwner
()
~=
e
:
GetOwner
()
and
te
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33330034
.
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
end
--Search
function
c33330034
.
ctcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thfilter
(
c
)
local
tc
=
e
:
GetHandler
():
GetEquipTarget
(
)
return
c
:
IsSetCard
(
0x3556
)
and
c
:
IsAbleToHand
()
return
Duel
.
GetAttacker
()
==
tc
end
end
function
c
m
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
33330034
.
thfilter2
(
c
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
return
c
:
IsSetCard
(
0x556
)
and
c
:
IsType
(
TYPE_EQUIP
)
and
c
:
IsAbleToHand
(
)
end
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33330034
.
cttg
(
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
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
chk
==
0
then
return
tc
and
tc
:
IsCanAddCounter
(
0x1019
,
2
)
and
Duel
.
IsExistingMatchingCard
(
c33330034
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
tc
,
2
,
tp
,
0
)
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33330034
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
tc
and
tc
:
IsFaceup
()
and
tc
:
IsCanAddCounter
(
0x1019
,
2
)
then
tc
:
AddCounter
(
0x1019
,
2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33330034
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
function
c33330034
.
eqlimit
(
e
,
c
)
return
c
:
IsSetCard
(
0x556
)
end
function
c33330034
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x556
)
end
function
c33330034
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_MZONE
and
c33330034
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c33330034
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c33330034
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c33330034
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
end
end
end
expansions/script/c33330093.lua
View file @
607e625c
...
@@ -12,7 +12,6 @@ function cm.initial_effect(c)
...
@@ -12,7 +12,6 @@ function cm.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
()
e1
:
SetCondition
(
cm
.
spcon
)
e1
:
SetCondition
(
cm
.
spcon
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
e1
:
SetOperation
(
cm
.
spop
)
...
@@ -23,7 +22,7 @@ e1:SetCountLimit()
...
@@ -23,7 +22,7 @@ e1:SetCountLimit()
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
33330093
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
cm
.
chtg
)
e2
:
SetTarget
(
cm
.
chtg
)
e2
:
SetOperation
(
cm
.
chop
)
e2
:
SetOperation
(
cm
.
chop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
...
@@ -73,7 +72,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -73,7 +72,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
sump
=
1
-
tp
sump
=
1
-
tp
sel_zone
=
sel_zone
>>
16
sel_zone
=
sel_zone
>>
16
end
end
local
dam
=
0
local
dam
=
false
if
Duel
.
SpecialSummonStep
(
sc
,
0
,
tp
,
sump
,
false
,
false
,
POS_FACEUP
,
sel_zone
)
then
if
Duel
.
SpecialSummonStep
(
sc
,
0
,
tp
,
sump
,
false
,
false
,
POS_FACEUP
,
sel_zone
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
...
@@ -90,12 +89,14 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -90,12 +89,14 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetValue
(
LOCATION_HAND
)
e2
:
SetValue
(
LOCATION_HAND
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_REDIRECT
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_REDIRECT
)
sc
:
RegisterEffect
(
e2
,
true
)
sc
:
RegisterEffect
(
e2
,
true
)
dam
=
sc
:
GetBaseAttack
()
dam
=
true
end
end
Duel
.
SpecialSummonComplete
()
Duel
.
SpecialSummonComplete
()
if
dam
>
0
then
if
dam
then
Duel
.
SetLP
(
tp
,
Duel
.
GetLP
(
tp
)
-
dam
)
Duel
.
BreakEffect
()
Duel
.
SetLP
(
1
-
tp
,
Duel
.
GetLP
(
1
-
tp
)
-
dam
)
Duel
.
Damage
(
tp
,
sc
:
GetBaseAttack
(),
REASON_EFFECT
,
true
)
Duel
.
Damage
(
1
-
tp
,
sc
:
GetBaseAttack
(),
REASON_EFFECT
,
true
)
Duel
.
RDComplete
()
end
end
end
end
end
end
...
...
expansions/script/c33330400.lua
View file @
607e625c
...
@@ -33,7 +33,7 @@ function rsnm.SummonFun(c,code,type2,isgrave,istograve)
...
@@ -33,7 +33,7 @@ function rsnm.SummonFun(c,code,type2,isgrave,istograve)
end
end
function
rsnm
.
counterfilter
(
c
)
function
rsnm
.
counterfilter
(
c
)
if
c
:
GetSummonLocation
()
&
LOCATION_HAND
+
LOCATION_DECK
==
0
then
return
true
end
if
c
:
GetSummonLocation
()
&
LOCATION_HAND
+
LOCATION_DECK
==
0
then
return
true
end
return
c
:
IsSetCard
(
0x
6
552
)
return
c
:
IsSetCard
(
0x
4
552
)
end
end
function
rsnm
.
spcfilter
(
c
,
tp
)
function
rsnm
.
spcfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToDeckAsCost
()
and
Duel
.
GetMZoneCount
(
tp
,
c
,
tp
)
>
0
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToDeckAsCost
()
and
Duel
.
GetMZoneCount
(
tp
,
c
,
tp
)
>
0
...
@@ -50,7 +50,7 @@ function rsnm.spop(e,tp)
...
@@ -50,7 +50,7 @@ function rsnm.spop(e,tp)
end
end
function
rsnm
.
spcfilter2
(
c
,
e
)
function
rsnm
.
spcfilter2
(
c
,
e
)
local
val
=
e
:
GetValue
()
local
val
=
e
:
GetValue
()
return
c
:
IsSetCard
(
0x
6
552
)
and
((
val
==
0
and
c
:
IsAbleToDeckAsCost
())
or
(
val
==
1
and
c
:
IsAbleToGraveAsCost
()))
return
c
:
IsSetCard
(
0x
4
552
)
and
((
val
==
0
and
c
:
IsAbleToDeckAsCost
())
or
(
val
==
1
and
c
:
IsAbleToGraveAsCost
()))
end
end
function
rsnm
.
spcfilter3
(
c
,
tp
)
function
rsnm
.
spcfilter3
(
c
,
tp
)
return
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
return
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
...
@@ -92,7 +92,7 @@ function rsnm.limop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -92,7 +92,7 @@ function rsnm.limop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
rsnm
.
splimit
(
e
,
c
)
function
rsnm
.
splimit
(
e
,
c
)
if
c
:
IsLocation
(
LOCATION_HAND
+
LOCATION_DECK
)
then
return
not
c
:
IsSetCard
(
0x
6
552
)
if
c
:
IsLocation
(
LOCATION_HAND
+
LOCATION_DECK
)
then
return
not
c
:
IsSetCard
(
0x
4
552
)
else
return
false
else
return
false
end
end
end
end
...
@@ -100,7 +100,7 @@ function rsnm.thcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -100,7 +100,7 @@ function rsnm.thcon(e,tp,eg,ep,ev,re,r,rp)
return
rp
==
1
-
tp
and
e
:
GetHandler
():
GetPreviousControler
()
==
tp
return
rp
==
1
-
tp
and
e
:
GetHandler
():
GetPreviousControler
()
==
tp
end
end
function
rsnm
.
thfilter
(
c
)
function
rsnm
.
thfilter
(
c
)
return
c
:
IsAbleToHand
()
and
c
:
IsSetCard
(
0x
6
552
)
return
c
:
IsAbleToHand
()
and
c
:
IsSetCard
(
0x
4
552
)
end
end
function
rsnm
.
thop
(
e
,
tp
)
function
rsnm
.
thop
(
e
,
tp
)
rsof
.
SelectHint
(
tp
,
"th"
)
rsof
.
SelectHint
(
tp
,
"th"
)
...
@@ -157,7 +157,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -157,7 +157,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local
c
=
aux
.
ExceptThisCard
(
e
)
local
c
=
aux
.
ExceptThisCard
(
e
)
if
not
c
then
return
end
if
not
c
then
return
end
local
tc
=
e
:
GetLabelObject
()
local
tc
=
e
:
GetLabelObject
()
if
not
tc
:
IsSetCard
(
0x
6
552
)
then
return
end
if
not
tc
:
IsSetCard
(
0x
4
552
)
then
return
end
local
e1
=
rsef
.
SV_IMMUNE_EFFECT
(
c
,
cm
.
val
,
nil
,
rsreset
.
est_pend
)
local
e1
=
rsef
.
SV_IMMUNE_EFFECT
(
c
,
cm
.
val
,
nil
,
rsreset
.
est_pend
)
e1
:
SetOwnerPlayer
(
tp
)
e1
:
SetOwnerPlayer
(
tp
)
local
te
=
tc
.
flip_effect
local
te
=
tc
.
flip_effect
...
@@ -175,7 +175,7 @@ function cm.poscon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -175,7 +175,7 @@ function cm.poscon(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
return
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
end
end
function
cm
.
posfilter
(
c
)
function
cm
.
posfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x
6
552
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x
4
552
)
end
end
function
cm
.
posop
(
e
,
tp
)
function
cm
.
posop
(
e
,
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
posfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
posfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
...
...
expansions/script/c33330402.lua
View file @
607e625c
...
@@ -7,7 +7,7 @@ function cm.initial_effect(c)
...
@@ -7,7 +7,7 @@ function cm.initial_effect(c)
local
e4
=
rsnm
.
FilpFun
(
c
,
m
,
"eq"
,
nil
,
rsop
.
target
({
cm
.
eqfilter
,
"eq"
,
0
,
LOCATION_MZONE
},{
cm
.
cfilter
,
nil
,
LOCATION_MZONE
}),
cm
.
op
)
local
e4
=
rsnm
.
FilpFun
(
c
,
m
,
"eq"
,
nil
,
rsop
.
target
({
cm
.
eqfilter
,
"eq"
,
0
,
LOCATION_MZONE
},{
cm
.
cfilter
,
nil
,
LOCATION_MZONE
}),
cm
.
op
)
end
end
function
cm
.
cfilter
(
c
)
function
cm
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x
6
552
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x
4
552
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
end
end
function
cm
.
eqfilter
(
c
,
e
,
tp
)
function
cm
.
eqfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToChangeControler
()
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
return
c
:
IsFaceup
()
and
c
:
IsAbleToChangeControler
()
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
...
...
expansions/script/c33330404.lua
View file @
607e625c
...
@@ -7,7 +7,7 @@ function cm.initial_effect(c)
...
@@ -7,7 +7,7 @@ function cm.initial_effect(c)
local
e4
=
rsnm
.
FilpFun
(
c
,
m
,
"th,sp"
,
nil
,
rsop
.
target
({
Card
.
IsAbleToHand
,
"th"
,
LOCATION_MZONE
},{
cm
.
spfilter
,
"sp"
,
LOCATION_HAND
}),
cm
.
op
,
true
)
local
e4
=
rsnm
.
FilpFun
(
c
,
m
,
"th,sp"
,
nil
,
rsop
.
target
({
Card
.
IsAbleToHand
,
"th"
,
LOCATION_MZONE
},{
cm
.
spfilter
,
"sp"
,
LOCATION_HAND
}),
cm
.
op
,
true
)
end
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x
6
552
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
return
c
:
IsSetCard
(
0x
4
552
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
end
end
function
cm
.
op
(
e
,
tp
)
function
cm
.
op
(
e
,
tp
)
rsof
.
SelectHint
(
tp
,
"th"
)
rsof
.
SelectHint
(
tp
,
"th"
)
...
...
expansions/script/c33330410.lua
View file @
607e625c
...
@@ -60,7 +60,7 @@ function cm.fun(g,e,tp)
...
@@ -60,7 +60,7 @@ function cm.fun(g,e,tp)
end
end
end
end
function
cm
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsAbleToHand
()
and
c
:
IsSetCard
(
0x
6
552
)
return
c
:
IsAbleToHand
()
and
c
:
IsSetCard
(
0x
4
552
)
end
end
function
cm
.
thop
(
e
,
tp
)
function
cm
.
thop
(
e
,
tp
)
rsof
.
SelectHint
(
tp
,
"th"
)
rsof
.
SelectHint
(
tp
,
"th"
)
...
...
expansions/script/c33330411.lua
View file @
607e625c
...
@@ -34,7 +34,7 @@ function cm.resfilter(c,e,tp)
...
@@ -34,7 +34,7 @@ function cm.resfilter(c,e,tp)
return
c
:
IsReleasable
()
and
c
:
IsFaceup
()
and
Duel
.
GetMZoneCount
(
tp
,
c
,
tp
)
>
0
return
c
:
IsReleasable
()
and
c
:
IsFaceup
()
and
Duel
.
GetMZoneCount
(
tp
,
c
,
tp
)
>
0
end
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x
6
552
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
return
c
:
IsSetCard
(
0x
4
552
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
end
end
function
cm
.
spop
(
e
,
tp
)
function
cm
.
spop
(
e
,
tp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
...
...
expansions/script/c33330412.lua
View file @
607e625c
...
@@ -15,7 +15,7 @@ function cm.op(e,tp)
...
@@ -15,7 +15,7 @@ function cm.op(e,tp)
local
e1
=
rsef
.
FV_CANNOT_BE_TARGET
({
c
,
tp
},
"effect"
,
aux
.
tgoval
,
aux
.
TargetBoolFunction
(
Card
.
IsFacedown
),{
LOCATION_MZONE
,
0
},
nil
,
rsreset
.
pend
)
local
e1
=
rsef
.
FV_CANNOT_BE_TARGET
({
c
,
tp
},
"effect"
,
aux
.
tgoval
,
aux
.
TargetBoolFunction
(
Card
.
IsFacedown
),{
LOCATION_MZONE
,
0
},
nil
,
rsreset
.
pend
)
end
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x
6
552
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
and
not
c
:
IsCode
(
m
)
return
c
:
IsSetCard
(
0x
4
552
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
and
not
c
:
IsCode
(
m
)
end
end
function
cm
.
spop
(
e
,
tp
)
function
cm
.
spop
(
e
,
tp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
...
...
expansions/script/c33330413.lua
View file @
607e625c
...
@@ -15,7 +15,7 @@ function cm.con(e,c)
...
@@ -15,7 +15,7 @@ function cm.con(e,c)
return
Duel
.
IsExistingMatchingCard
(
cm
.
resfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
resfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
end
function
cm
.
resfilter
(
c
)
function
cm
.
resfilter
(
c
)
return
c
:
GetOriginalType
()
&
TYPE_MONSTER
~=
0
and
c
:
IsReleasable
()
return
c
:
GetOriginalType
()
&
TYPE_MONSTER
~=
0
and
c
:
Is
Type
(
TYPE_TRAP
)
and
c
:
Is
Releasable
()
end
end
function
cm
.
op
(
e
,
tp
)
function
cm
.
op
(
e
,
tp
)
rsof
.
SelectHint
(
tp
,
"res"
)
rsof
.
SelectHint
(
tp
,
"res"
)
...
...
expansions/script/c33400004.lua
View file @
607e625c
...
@@ -21,7 +21,7 @@ function c33400004.initial_effect(c)
...
@@ -21,7 +21,7 @@ function c33400004.initial_effect(c)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
33400004
)
e2
:
SetCountLimit
(
1
,
33400004
+
10000
)
e2
:
SetTarget
(
c33400004
.
target
)
e2
:
SetTarget
(
c33400004
.
target
)
e2
:
SetOperation
(
c33400004
.
operation
)
e2
:
SetOperation
(
c33400004
.
operation
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
...
...
expansions/script/c33400007.lua
View file @
607e625c
--时崎狂三-祈福
--时崎狂三-祈福
function
c33400007
.
initial_effect
(
c
)
function
c33400007
.
initial_effect
(
c
)
--link summon
--link summon
aux
.
AddLinkProcedure
(
c
,
nil
,
2
,
2
,
c33400007
.
lcheck
)
aux
.
AddLinkProcedure
(
c
,
c33400007
.
mfilter
,
2
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--activate from hand
--activate from hand
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
@@ -33,8 +33,8 @@ function c33400007.initial_effect(c)
...
@@ -33,8 +33,8 @@ function c33400007.initial_effect(c)
e3
:
SetOperation
(
c33400007
.
thop
)
e3
:
SetOperation
(
c33400007
.
thop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c33400007
.
lcheck
(
g
)
function
c33400007
.
mfilter
(
c
)
return
g
:
IsExists
(
Card
.
IsLinkSetCard
,
1
,
nil
,
0x3341
)
return
c
:
IsLinkSetCard
(
0x3341
)
end
end
function
c33400007
.
afilter
(
c
)
function
c33400007
.
afilter
(
c
)
return
c
:
IsSetCard
(
0x3340
)
and
c
:
IsType
(
TYPE_QUICKPLAY
)
return
c
:
IsSetCard
(
0x3340
)
and
c
:
IsType
(
TYPE_QUICKPLAY
)
...
...
expansions/script/c33400008.lua
View file @
607e625c
...
@@ -88,7 +88,7 @@ function c33400008.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -88,7 +88,7 @@ function c33400008.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
function
c33400008
.
mfilter
(
c
)
function
c33400008
.
mfilter
(
c
)
return
c
:
IsLinkSetCard
(
0x
341
)
return
c
:
IsLinkSetCard
(
0x3
341
)
end
end
function
c33400008
.
afilter
(
c
)
function
c33400008
.
afilter
(
c
)
return
c
:
IsSetCard
(
0x3340
)
and
c
:
IsType
(
TYPE_QUICKPLAY
)
return
c
:
IsSetCard
(
0x3340
)
and
c
:
IsType
(
TYPE_QUICKPLAY
)
...
...
expansions/script/c33400009.lua
View file @
607e625c
--时崎狂三-暗影之主
--时崎狂三-暗影之主
function
c33400009
.
initial_effect
(
c
)
function
c33400009
.
initial_effect
(
c
)
--link summon
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x341
),
2
,
99
,
c33400009
.
lcheck
)
aux
.
AddLinkProcedure
(
c
,
c33400009
.
mfilter
,
2
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--activate from hand
--activate from hand
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
@@ -43,8 +43,8 @@ function c33400009.initial_effect(c)
...
@@ -43,8 +43,8 @@ function c33400009.initial_effect(c)
e3
:
SetOperation
(
c33400009
.
desop
)
e3
:
SetOperation
(
c33400009
.
desop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c33400009
.
lcheck
(
g
)
function
c33400009
.
mfilter
(
c
)
return
g
:
IsExists
(
Card
.
IsLinkSetCard
,
1
,
nil
,
0x3341
)
return
c
:
IsLinkSetCard
(
0x3341
)
end
end
function
c33400009
.
afilter
(
c
)
function
c33400009
.
afilter
(
c
)
return
c
:
IsSetCard
(
0x3340
)
and
c
:
IsType
(
TYPE_QUICKPLAY
)
return
c
:
IsSetCard
(
0x3340
)
and
c
:
IsType
(
TYPE_QUICKPLAY
)
...
...
expansions/script/c33400010.lua
View file @
607e625c
--时崎狂三-梦魇
--时崎狂三-梦魇
function
c33400010
.
initial_effect
(
c
)
function
c33400010
.
initial_effect
(
c
)
--link summon
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x341
),
3
,
99
,
c33400010
.
lcheck
)
aux
.
AddLinkProcedure
(
c
,
c33400010
.
mfilter
,
2
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--activate from hand
--activate from hand
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
@@ -59,8 +59,8 @@ function c33400010.initial_effect(c)
...
@@ -59,8 +59,8 @@ function c33400010.initial_effect(c)
e5
:
SetLabelObject
(
e4
)
e5
:
SetLabelObject
(
e4
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
end
end
function
c33400010
.
lcheck
(
g
)
function
c33400010
.
mfilter
(
c
)
return
g
:
IsExists
(
Card
.
IsLinkSetCard
,
1
,
nil
,
0x3341
)
return
c
:
IsLinkSetCard
(
0x3341
)
end
end
function
c33400010
.
afilter
(
c
)
function
c33400010
.
afilter
(
c
)
return
c
:
IsSetCard
(
0x3340
)
and
c
:
IsType
(
TYPE_QUICKPLAY
)
return
c
:
IsSetCard
(
0x3340
)
and
c
:
IsType
(
TYPE_QUICKPLAY
)
...
...
expansions/script/c33400013.lua
View file @
607e625c
expansions/script/c33400014.lua
View file @
607e625c
--时崎狂三 奇袭
--时崎狂三 奇袭
function
c33400014
.
initial_effect
(
c
)
function
c33400014
.
initial_effect
(
c
)
--xyz summon
--xyz summon
aux
.
AddXyzProcedure
(
c
,
nil
,
8
,
2
,
nil
,
nil
,
99
)
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x3341
),
8
,
2
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--direct attack
--direct attack
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c33400033.lua
View file @
607e625c
...
@@ -242,11 +242,9 @@ function c33400033.distg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -242,11 +242,9 @@ function c33400033.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
end
end
function
c33400033
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33400033
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
33400033
,
6
))
then
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c33400033
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c33400033
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
...
...
expansions/script/c33400103.lua
View file @
607e625c
expansions/script/c33700939.lua
View file @
607e625c
...
@@ -4,7 +4,7 @@ local m=33700939
...
@@ -4,7 +4,7 @@ local m=33700939
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
cm
.
ffilter
,
2
7
,
true
)
aux
.
AddFusionProcFunRep
(
c
,
cm
.
ffilter
,
2
,
true
)
local
e1
=
rscf
.
SetSpecialSummonProduce
(
c
,
LOCATION_EXTRA
,
cm
.
con
,
cm
.
op
)
local
e1
=
rscf
.
SetSpecialSummonProduce
(
c
,
LOCATION_EXTRA
,
cm
.
con
,
cm
.
op
)
local
e2
=
rsef
.
I
(
c
,{
m
,
0
},{
1
,
m
},
"tg,th,se"
,
nil
,
LOCATION_MZONE
,
nil
,
nil
,
cm
.
tg2
,
cm
.
op2
)
local
e2
=
rsef
.
I
(
c
,{
m
,
0
},{
1
,
m
},
"tg,th,se"
,
nil
,
LOCATION_MZONE
,
nil
,
nil
,
cm
.
tg2
,
cm
.
op2
)
end
end
...
...
expansions/script/c33700940.lua
View file @
607e625c
...
@@ -4,7 +4,7 @@ local m=33700940
...
@@ -4,7 +4,7 @@ local m=33700940
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
cm
.
ffilter
,
9
,
true
)
aux
.
AddFusionProcFunRep
(
c
,
cm
.
ffilter
,
2
,
true
)
local
e1
=
rscf
.
SetSpecialSummonProduce
(
c
,
LOCATION_EXTRA
,
cm
.
con
,
cm
.
op
)
local
e1
=
rscf
.
SetSpecialSummonProduce
(
c
,
LOCATION_EXTRA
,
cm
.
con
,
cm
.
op
)
local
f1
=
function
(
tp
,
re
,
rp
)
local
f1
=
function
(
tp
,
re
,
rp
)
return
tp
~=
rp
return
tp
~=
rp
...
...
expansions/script/c65020067.lua
View file @
607e625c
expansions/script/c65020068.lua
View file @
607e625c
expansions/script/c65020069.lua
View file @
607e625c
expansions/script/c65020070.lua
View file @
607e625c
expansions/script/c65020071.lua
View file @
607e625c
expansions/script/c65020072.lua
View file @
607e625c
expansions/script/c65020076.lua
View file @
607e625c
...
@@ -65,13 +65,11 @@ end
...
@@ -65,13 +65,11 @@ end
function
c65020076
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c65020076
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c65020076
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c65020076
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
and
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
2
,
e
:
GetHandler
()
)
end
and
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c65020076
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
local
g1
=
Duel
.
SelectTarget
(
tp
,
c65020076
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
g1
:
AddCard
(
e
:
GetHandler
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
g1
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
g1
)
g1
:
RemoveCard
(
e
:
GetHandler
())
g1
:
Merge
(
g2
)
g1
:
Merge
(
g2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g1
,
2
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g1
,
2
,
0
,
0
)
end
end
...
...
expansions/script/c65072014.lua
View file @
607e625c
...
@@ -11,7 +11,6 @@ function c65072014.initial_effect(c)
...
@@ -11,7 +11,6 @@ function c65072014.initial_effect(c)
e2
:
SetOperation
(
c65072014
.
desop
)
e2
:
SetOperation
(
c65072014
.
desop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
c65072014
.
card_code_list
=
{
65072000
}
function
c65072014
.
desfilter
(
c
)
function
c65072014
.
desfilter
(
c
)
return
c
:
IsFaceup
()
and
((
c
:
IsCode
(
65071999
)
and
c
:
IsType
(
TYPE_EFFECT
))
or
aux
.
IsCodeListed
(
c
,
65072000
))
return
c
:
IsFaceup
()
and
((
c
:
IsCode
(
65071999
)
and
c
:
IsType
(
TYPE_EFFECT
))
or
aux
.
IsCodeListed
(
c
,
65072000
))
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment