Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
7c31031c
Commit
7c31031c
authored
Sep 16, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push by Appveyor
parent
8c949867
Changes
55
Hide whitespace changes
Inline
Side-by-side
Showing
55 changed files
with
2236 additions
and
766 deletions
+2236
-766
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c10114001.lua
expansions/script/c10114001.lua
+11
-6
expansions/script/c10114002.lua
expansions/script/c10114002.lua
+16
-11
expansions/script/c10114003.lua
expansions/script/c10114003.lua
+11
-9
expansions/script/c10114004.lua
expansions/script/c10114004.lua
+2
-1
expansions/script/c10114005.lua
expansions/script/c10114005.lua
+15
-21
expansions/script/c10114006.lua
expansions/script/c10114006.lua
+13
-15
expansions/script/c10114007.lua
expansions/script/c10114007.lua
+33
-27
expansions/script/c10114008.lua
expansions/script/c10114008.lua
+33
-18
expansions/script/c10114009.lua
expansions/script/c10114009.lua
+25
-46
expansions/script/c10114010.lua
expansions/script/c10114010.lua
+29
-15
expansions/script/c10114011.lua
expansions/script/c10114011.lua
+56
-17
expansions/script/c10114012.lua
expansions/script/c10114012.lua
+28
-19
expansions/script/c10115001.lua
expansions/script/c10115001.lua
+68
-31
expansions/script/c10115002.lua
expansions/script/c10115002.lua
+41
-53
expansions/script/c10115003.lua
expansions/script/c10115003.lua
+61
-54
expansions/script/c10115004.lua
expansions/script/c10115004.lua
+27
-59
expansions/script/c10116001.lua
expansions/script/c10116001.lua
+92
-38
expansions/script/c10116002.lua
expansions/script/c10116002.lua
+74
-45
expansions/script/c10116003.lua
expansions/script/c10116003.lua
+63
-41
expansions/script/c10116004.lua
expansions/script/c10116004.lua
+56
-59
expansions/script/c10116005.lua
expansions/script/c10116005.lua
+48
-38
expansions/script/c10116006.lua
expansions/script/c10116006.lua
+74
-52
expansions/script/c10116007.lua
expansions/script/c10116007.lua
+84
-0
expansions/script/c10173035.lua
expansions/script/c10173035.lua
+76
-0
expansions/script/c10173036.lua
expansions/script/c10173036.lua
+103
-0
expansions/script/c10173037.lua
expansions/script/c10173037.lua
+72
-0
expansions/script/c10173038.lua
expansions/script/c10173038.lua
+107
-0
expansions/script/c10173043.lua
expansions/script/c10173043.lua
+39
-0
expansions/script/c10173052.lua
expansions/script/c10173052.lua
+118
-0
expansions/script/c10173053.lua
expansions/script/c10173053.lua
+110
-0
expansions/script/c10173054.lua
expansions/script/c10173054.lua
+98
-0
expansions/script/c13254076.lua
expansions/script/c13254076.lua
+7
-0
expansions/script/c13254088.lua
expansions/script/c13254088.lua
+28
-0
expansions/script/c13254093.lua
expansions/script/c13254093.lua
+28
-0
expansions/script/c13254096.lua
expansions/script/c13254096.lua
+28
-0
expansions/script/c13254098.lua
expansions/script/c13254098.lua
+28
-0
expansions/script/c13254102.lua
expansions/script/c13254102.lua
+28
-0
expansions/script/c13254103.lua
expansions/script/c13254103.lua
+28
-0
expansions/script/c13254104.lua
expansions/script/c13254104.lua
+28
-0
expansions/script/c13254105.lua
expansions/script/c13254105.lua
+28
-0
expansions/script/c13257330.lua
expansions/script/c13257330.lua
+5
-3
expansions/script/c13257331.lua
expansions/script/c13257331.lua
+54
-0
expansions/script/c2170701.lua
expansions/script/c2170701.lua
+2
-5
expansions/script/c2170703.lua
expansions/script/c2170703.lua
+48
-41
expansions/script/c2170704.lua
expansions/script/c2170704.lua
+8
-0
expansions/script/c2170706.lua
expansions/script/c2170706.lua
+9
-10
expansions/script/c2170709.lua
expansions/script/c2170709.lua
+7
-0
expansions/script/c2170710.lua
expansions/script/c2170710.lua
+39
-22
expansions/script/c2170711.lua
expansions/script/c2170711.lua
+7
-0
expansions/script/c2170712.lua
expansions/script/c2170712.lua
+38
-9
expansions/script/c2170713.lua
expansions/script/c2170713.lua
+7
-0
expansions/script/c2170714.lua
expansions/script/c2170714.lua
+95
-0
expansions/strings.conf
expansions/strings.conf
+2
-0
lflist.conf
lflist.conf
+1
-1
No files found.
expansions/222DIY.cdb
View file @
7c31031c
No preview for this file type
expansions/script/c10114001.lua
View file @
7c31031c
...
...
@@ -32,7 +32,8 @@ function c10114001.initial_effect(c)
e0
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetOperation
(
c10114001
.
spop2
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
c10114001
.
specialsummon_effect
=
e2
end
function
c10114001
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
@@ -75,7 +76,7 @@ function c10114001.thcon(e,tp,eg,ep,ev,re,r,rp)
return
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
end
function
c10114001
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x3331
)
and
(
c
:
IsAbleToHand
()
or
(
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsSSetable
()))
end
function
c10114001
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
true
end
...
...
@@ -83,9 +84,13 @@ function c10114001.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function
c10114001
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10114001
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c10114001
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
not
tc
then
return
end
local
setable
=
tc
:
IsType
(
TYPE_SPELL
)
and
tc
:
IsSSetable
()
if
setable
and
(
not
tc
:
IsAbleToHand
()
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
10114001
,
2
)))
then
Duel
.
SSet
(
tp
,
tc
)
else
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
expansions/script/c10114002.lua
View file @
7c31031c
...
...
@@ -32,7 +32,8 @@ function c10114002.initial_effect(c)
e0
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetOperation
(
c10114002
.
spop2
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
c10114002
.
specialsummon_effect
=
e2
end
function
c10114002
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
@@ -84,19 +85,23 @@ function c10114002.spgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
)
end
function
c10114002
.
spgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
gc
=
Duel
.
SelectMatchingCard
(
tp
,
c10114002
.
spgfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
if
gc
and
not
gc
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
and
Duel
.
SpecialSummon
(
gc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
--cannot trigger
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
gc
:
RegisterEffect
(
e1
,
true
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c10114002
.
spgfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
if
tc
then
if
tc
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
and
Duel
.
IsChainDisablable
(
0
)
then
Duel
.
NegateEffect
(
0
)
return
end
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
--cannot trigger
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
,
true
)
end
end
end
expansions/script/c10114003.lua
View file @
7c31031c
...
...
@@ -32,7 +32,8 @@ function c10114003.initial_effect(c)
e0
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetOperation
(
c10114003
.
spop2
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
c10114003
.
specialsummon_effect
=
e2
end
function
c10114003
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
@@ -71,24 +72,25 @@ function c10114003.spop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c10114003
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
end
function
c10114003
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x3331
)
and
(
c
:
IsAbleToHand
()
or
(
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsSSetable
()))
end
function
c10114003
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c10114003
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10114003
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c10114003
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
not
tc
then
return
end
local
setable
=
tc
:
IsType
(
TYPE_SPELL
)
and
tc
:
IsSSetable
()
if
setable
and
(
not
tc
:
IsAbleToHand
()
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
10114001
,
2
)))
then
Duel
.
SSet
(
tp
,
tc
)
else
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
expansions/script/c10114004.lua
View file @
7c31031c
...
...
@@ -32,7 +32,8 @@ function c10114004.initial_effect(c)
e0
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetOperation
(
c10114004
.
spop2
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
c10114004
.
specialsummon_effect
=
e2
end
function
c10114004
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c10114005.lua
View file @
7c31031c
...
...
@@ -14,17 +14,17 @@ function c10114005.initial_effect(c)
e1
:
SetTarget
(
c10114005
.
sptg
)
e1
:
SetOperation
(
c10114005
.
spop
)
c
:
RegisterEffect
(
e1
)
--
SendtoGra
ve
--
remo
ve
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
10114005
,
1
))
e2
:
SetCategory
(
CATEGORY_
TOGRA
VE
)
e2
:
SetCategory
(
CATEGORY_
REMO
VE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
10114005
)
e2
:
SetCondition
(
c10114005
.
sg
con
)
e2
:
SetTarget
(
c10114005
.
sg
tg
)
e2
:
SetOperation
(
c10114005
.
sg
op
)
e2
:
SetCondition
(
c10114005
.
rm
con
)
e2
:
SetTarget
(
c10114005
.
rm
tg
)
e2
:
SetOperation
(
c10114005
.
rm
op
)
c
:
RegisterEffect
(
e2
)
--fuck condition
local
e0
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -32,7 +32,8 @@ function c10114005.initial_effect(c)
e0
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetOperation
(
c10114005
.
spop2
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
c10114005
.
specialsummon_effect
=
e2
end
function
c10114005
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
@@ -71,23 +72,16 @@ function c10114005.spop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c10114005
.
sgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c10114005
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
end
function
c10114005
.
sgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c10114005
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_
TOGRAVE
,
nil
,
1
,
1
-
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_
REMOVE
,
nil
,
3
,
1
-
tp
,
LOCATION_DECK
)
end
function
c10114005
.
sgfilter
(
c
)
return
c
:
IsFacedown
()
and
c
:
IsAbleToGrave
()
end
function
c10114005
.
sgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c10114005
.
sgfilter
,
tp
,
0
,
LOCATION_EXTRA
,
nil
)
if
g
:
GetCount
()
==
0
then
return
end
local
sg
=
g
:
RandomSelect
(
tp
,
1
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
function
c10114005
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
==
0
then
return
end
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
3
)
Duel
.
DisableShuffleCheck
()
Duel
.
Remove
(
g
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c10114006.lua
View file @
7c31031c
...
...
@@ -17,14 +17,14 @@ function c10114006.initial_effect(c)
--Remove
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
10114006
,
1
))
e2
:
SetCategory
(
CATEGORY_
REMOVE
)
e2
:
SetCategory
(
CATEGORY_
TODECK
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
10114006
)
e2
:
SetCondition
(
c10114006
.
rm
con
)
e2
:
SetTarget
(
c10114006
.
rm
tg
)
e2
:
SetOperation
(
c10114006
.
rm
op
)
e2
:
SetCondition
(
c10114006
.
td
con
)
e2
:
SetTarget
(
c10114006
.
td
tg
)
e2
:
SetOperation
(
c10114006
.
td
op
)
c
:
RegisterEffect
(
e2
)
--fuck condition
local
e0
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -32,7 +32,8 @@ function c10114006.initial_effect(c)
e0
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetOperation
(
c10114006
.
spop2
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
c10114006
.
specialsummon_effect
=
e2
end
function
c10114006
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
@@ -71,21 +72,18 @@ function c10114006.spop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c10114006
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c10114006
.
tdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
end
function
c10114006
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c10114006
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_
REMOVE
,
nil
,
1
,
0
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_
TODECK
,
nil
,
1
,
0
,
LOCATION_GRAVE
)
end
function
c10114006
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
1
,
nil
)
function
c10114006
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
Card
.
IsAbleToDeck
),
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
3
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c10114007.lua
View file @
7c31031c
...
...
@@ -13,45 +13,51 @@ function c10114007.initial_effect(c)
e1
:
SetCost
(
c10114007
.
spcost
)
e1
:
SetTarget
(
c10114007
.
sptg
)
e1
:
SetOperation
(
c10114007
.
spop
)
c
:
RegisterEffect
(
e1
)
--
atkdef
c
:
RegisterEffect
(
e1
)
--atkdef
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x3331
))
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetValue
(
300
)
e2
:
SetDescription
(
aux
.
Stringid
(
10114007
,
1
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
10114007
)
e2
:
SetCondition
(
c10114007
.
adcon
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e3
)
e2
:
SetOperation
(
c10114007
.
adop
)
c
:
RegisterEffect
(
e2
)
--fuck then condition
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetOperation
(
c10114007
.
spop2
)
c
:
RegisterEffect
(
e4
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetOperation
(
c10114007
.
spop2
)
c
:
RegisterEffect
(
e3
)
c10114007
.
specialsummon_effect
=
e2
end
function
c10114007
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
end
function
c10114007
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x3331
))
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
350
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c10114007
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
then
c
:
RegisterFlagEffect
(
10114007
,
RESET_EVENT
+
0x1ff0000
,
0
,
1
)
end
c
:
RegisterFlagEffect
(
10114107
,
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c10114007
.
adcon
(
e
)
return
e
:
GetHandler
():
GetFlagEffect
(
10114007
)
>
0
end
function
c10114007
.
spcon
(
e
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
e
:
GetHandler
():
GetFlagEffect
(
10114107
)
==
0
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
function
c10114007
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetLabel
(
100
)
return
true
...
...
expansions/script/c10114008.lua
View file @
7c31031c
...
...
@@ -14,39 +14,54 @@ function c10114008.initial_effect(c)
e1
:
SetTarget
(
c10114008
.
sptg
)
e1
:
SetOperation
(
c10114008
.
spop
)
c
:
RegisterEffect
(
e1
)
--
cannot be target
--
lv
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c10114008
.
ctcon
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x3331
))
e2
:
SetValue
(
aux
.
tgval
)
c
:
RegisterEffect
(
e2
)
e2
:
SetDescription
(
aux
.
Stringid
(
10114008
,
1
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
10114008
)
e2
:
SetCondition
(
c10114008
.
lvcon
)
e2
:
SetTarget
(
c10114008
.
lvtg
)
e2
:
SetOperation
(
c10114008
.
lvop
)
c
:
RegisterEffect
(
e2
)
--fuck then condition
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetOperation
(
c10114008
.
spop2
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
c10114008
.
specialsummon_effect
=
e2
end
function
c10114008
.
lvcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
end
function
c10114008
.
lvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
567
)
local
lv
=
Duel
.
AnnounceNumber
(
tp
,
4
,
5
,
6
,
7
)
Duel
.
SetTargetParam
(
lv
)
end
function
c10114008
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
lv
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PARAM
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL_FINAL
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
2
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x3331
))
e1
:
SetValue
(
lv
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c10114008
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
then
c
:
RegisterFlagEffect
(
10114008
,
RESET_EVENT
+
0x1ff0000
,
0
,
1
)
end
c
:
RegisterFlagEffect
(
10114108
,
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c10114008
.
ctcon
(
e
)
return
e
:
GetHandler
():
GetFlagEffect
(
10114008
)
>
0
end
function
c10114008
.
spcon
(
e
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
e
:
GetHandler
():
GetFlagEffect
(
10114108
)
==
0
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
function
c10114008
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetLabel
(
100
)
...
...
expansions/script/c10114009.lua
View file @
7c31031c
...
...
@@ -16,42 +16,43 @@ function c10114009.initial_effect(c)
c
:
RegisterEffect
(
e1
)
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c10114009
.
incon
)
e2
:
SetTarget
(
c10114009
.
reptg
)
e2
:
SetValue
(
c10114009
.
repval
)
--c:RegisterEffect(e2)
--local g=Group.CreateGroup()
--g:KeepAlive()
--e2:SetLabelObject(g)
--indes normal ver
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e4
:
SetTarget
(
c10114009
.
reptg2
)
e4
:
SetValue
(
c10114009
.
indct
)
c
:
RegisterEffect
(
e4
)
e2
:
SetDescription
(
aux
.
Stringid
(
10114009
,
1
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
10114009
)
e2
:
SetCondition
(
c10114009
.
indcon
)
e2
:
SetOperation
(
c10114009
.
indop
)
c
:
RegisterEffect
(
e2
)
--fuck then condition
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetOperation
(
c10114009
.
spop2
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
c10114009
.
specialsummon_effect
=
e2
end
function
c10114009
.
indcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
end
function
c10114009
.
indop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTarget
(
c10114009
.
reptg
)
e1
:
SetValue
(
c10114009
.
indct
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c10114009
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
then
c
:
RegisterFlagEffect
(
10114009
,
RESET_EVENT
+
0x1ff0000
,
0
,
1
)
end
c
:
RegisterFlagEffect
(
10114109
,
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c10114009
.
reptg
2
(
e
,
c
)
function
c10114009
.
reptg
(
e
,
c
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
IsFaceup
()
end
function
c10114009
.
indct
(
e
,
re
,
r
,
rp
)
...
...
@@ -59,30 +60,8 @@ function c10114009.indct(e,re,r,rp)
return
1
else
return
0
end
end
function
c10114009
.
repfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
GetFlagEffect
(
10114209
)
==
0
and
c
:
IsSetCard
(
0x3331
)
end
function
c10114009
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
eg
:
IsExists
(
c10114009
.
repfilter
,
1
,
nil
,
tp
)
end
local
g
=
eg
:
Filter
(
c10114009
.
repfilter
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
while
tc
do
tc
:
RegisterFlagEffect
(
10114209
,
RESET_EVENT
+
0x1fc0000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
10114009
,
1
))
tc
=
g
:
GetNext
()
end
e
:
GetLabelObject
():
Clear
()
e
:
GetLabelObject
():
Merge
(
g
)
return
true
end
function
c10114009
.
repval
(
e
,
c
)
local
g
=
e
:
GetLabelObject
()
return
g
:
IsContains
(
c
)
end
function
c10114009
.
incon
(
e
)
return
e
:
GetHandler
():
GetFlagEffect
(
10114009
)
>
0
end
function
c10114009
.
spcon
(
e
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
e
:
GetHandler
():
GetFlagEffect
(
10114109
)
==
0
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
function
c10114009
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetLabel
(
100
)
...
...
expansions/script/c10114010.lua
View file @
7c31031c
...
...
@@ -16,35 +16,49 @@ function c10114010.initial_effect(c)
c
:
RegisterEffect
(
e1
)
--disable search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_TO_HAND
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c10114010
.
incon
)
e2
:
SetTargetRange
(
0
,
LOCATION_DECK
)
c
:
RegisterEffect
(
e2
)
e2
:
SetDescription
(
aux
.
Stringid
(
10114010
,
2
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
10114010
)
e2
:
SetCondition
(
c10114010
.
dscon
)
e2
:
SetOperation
(
c10114010
.
dsop
)
c
:
RegisterEffect
(
e2
)
--fuck then condition
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetOperation
(
c10114010
.
spop2
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
c10114010
.
specialsummon_effect
=
e2
end
function
c10114010
.
dscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
end
function
c10114010
.
dsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_TO_HAND
)
e1
:
SetTargetRange
(
0
,
LOCATION_DECK
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetCode
(
EFFECT_CANNOT_DRAW
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetTargetRange
(
0
,
1
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c10114010
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
then
c
:
RegisterFlagEffect
(
10114010
,
RESET_EVENT
+
0x1ff0000
,
0
,
1
)
end
c
:
RegisterFlagEffect
(
10114110
,
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c10114010
.
incon
(
e
)
return
e
:
GetHandler
():
GetFlagEffect
(
10114010
)
>
0
end
function
c10114010
.
spcon
(
e
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
e
:
GetHandler
():
GetFlagEffect
(
10114110
)
==
0
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
function
c10114010
.
filter
(
c
,
e
,
tp
,
count
)
return
((
c
:
IsLevelBelow
(
7
)
and
count
==
1
)
or
((
e
:
GetLabel
()
==
1
or
e
:
GetHandler
():
GetFlagEffect
(
10114010
)
>
0
)
and
c
:
GetLevel
()
==
4
and
count
==
2
))
and
c
:
IsSetCard
(
0x3331
)
and
not
c
:
IsCode
(
10114010
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
expansions/script/c10114011.lua
View file @
7c31031c
...
...
@@ -13,15 +13,18 @@ function c10114011.initial_effect(c)
e1
:
SetCost
(
c10114011
.
spcost
)
e1
:
SetTarget
(
c10114011
.
sptg
)
e1
:
SetOperation
(
c10114011
.
spop
)
c
:
RegisterEffect
(
e1
)
--
cannot
set
c
:
RegisterEffect
(
e1
)
--
disable
set
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SSET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
0
,
1
)
e2
:
SetCondition
(
c10114011
.
incon
)
e2
:
SetDescription
(
aux
.
Stringid
(
10114011
,
2
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
10114011
)
e2
:
SetCondition
(
c10114011
.
setcon
)
e2
:
SetCondition
(
c10114011
.
settg
)
e2
:
SetOperation
(
c10114011
.
setop
)
c
:
RegisterEffect
(
e2
)
--fuck then condition
local
e3
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -29,23 +32,59 @@ function c10114011.initial_effect(c)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetOperation
(
c10114011
.
spop2
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
c10114011
.
specialsummon_effect
=
e2
end
function
c10114011
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
end
function
c10114011
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFacedown
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c10114011
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFacedown
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_MSET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetTarget
(
aux
.
TRUE
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_SSET
)
Duel
.
RegisterEffect
(
e2
,
tp
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_TURN_SET
)
Duel
.
RegisterEffect
(
e3
,
tp
)
local
e4
=
e1
:
Clone
()
e4
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e4
:
SetTarget
(
c10114011
.
sumlimit
)
Duel
.
RegisterEffect
(
e4
,
tp
)
local
e5
=
e1
:
Clone
()
e5
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e5
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e5
:
SetTargetRange
(
0
,
LOCATION_ONFIELD
)
e5
:
SetTarget
(
c10114011
.
distg
)
Duel
.
RegisterEffect
(
e5
,
tp
)
end
function
c10114011
.
distg
(
e
,
c
)
return
c
:
IsFacedown
()
end
function
c10114011
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
return
bit
.
band
(
sumpos
,
POS_FACEDOWN
)
>
0
end
function
c10114011
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
then
c
:
RegisterFlagEffect
(
10114011
,
RESET_EVENT
+
0x1ff0000
,
0
,
1
)
end
c
:
RegisterFlagEffect
(
10114111
,
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c10114011
.
incon
(
e
)
return
e
:
GetHandler
():
GetFlagEffect
(
10114011
)
>
0
end
function
c10114011
.
spcon
(
e
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
e
:
GetHandler
():
GetFlagEffect
(
10114111
)
==
0
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
function
c10114011
.
filter
(
c
,
e
,
tp
,
count
)
return
((
c
:
IsLevelBelow
(
7
)
and
count
==
1
)
or
((
e
:
GetLabel
()
==
1
or
e
:
GetHandler
():
GetFlagEffect
(
10114011
)
>
0
)
and
c
:
GetLevel
()
==
4
and
count
==
2
))
and
c
:
IsSetCard
(
0x3331
)
and
not
c
:
IsCode
(
10114011
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
expansions/script/c10114012.lua
View file @
7c31031c
...
...
@@ -13,40 +13,49 @@ function c10114012.initial_effect(c)
e1
:
SetCost
(
c10114012
.
spcost
)
e1
:
SetTarget
(
c10114012
.
sptg
)
e1
:
SetOperation
(
c10114012
.
spop
)
c
:
RegisterEffect
(
e1
)
--disable
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e2
:
SetCondition
(
c10114012
.
incon
)
e2
:
SetTarget
(
c10114012
.
distg
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
10114012
,
2
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
10114012
)
e2
:
SetCondition
(
c10114012
.
necon
)
e2
:
SetOperation
(
c10114012
.
neop
)
c
:
RegisterEffect
(
e2
)
--fuck then condition
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetOperation
(
c10114012
.
spop2
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
c10114012
.
specialsummon_effect
=
e2
end
function
c10114012
.
necon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
end
function
c10114012
.
neop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTarget
(
c10114012
.
distg
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c10114012
.
distg
(
e
,
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
or
c
:
GetSummonLocation
()
==
LOCATION_DECK
end
function
c10114012
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
re
and
re
:
GetHandler
():
IsSetCard
(
0x3331
)
then
c
:
RegisterFlagEffect
(
10114012
,
RESET_EVENT
+
0x1ff0000
,
0
,
1
)
end
c
:
RegisterFlagEffect
(
10114112
,
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c10114012
.
distg
(
e
,
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
c
:
IsAttackBelow
(
e
:
GetHandler
():
GetAttack
())
end
function
c10114012
.
incon
(
e
)
return
e
:
GetHandler
():
GetFlagEffect
(
10114012
)
>
0
end
function
c10114012
.
spcon
(
e
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
e
:
GetHandler
():
GetFlagEffect
(
10114112
)
==
0
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
function
c10114012
.
filter
(
c
,
e
,
tp
,
count
)
return
((
c
:
IsLevelBelow
(
7
)
and
count
==
1
)
or
((
e
:
GetLabel
()
==
1
or
e
:
GetHandler
():
GetFlagEffect
(
10114012
)
>
0
)
and
c
:
GetLevel
()
==
4
and
count
==
2
))
and
c
:
IsSetCard
(
0x3331
)
and
not
c
:
IsCode
(
10114012
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
expansions/script/c10115001.lua
View file @
7c31031c
--夜鸦·寻觅者D
function
c10115001
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x3331
),
4
,
2
,
nil
,
nil
,
5
)
aux
.
AddXyzProcedure
(
c
,
nil
,
4
,
2
)
c
:
EnableReviveLimit
()
--
tohand
--
copy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
10115001
,
1
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetDescription
(
aux
.
Stringid
(
10115001
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
10115001
)
e1
:
SetTarget
(
c10115001
.
thtg
)
e1
:
SetOperation
(
c10115001
.
thop
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_MAIN_END
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c10115001
.
copycon
)
e1
:
SetCost
(
c10115001
.
copycost
)
e1
:
SetTarget
(
c10115001
.
copytg
)
e1
:
SetOperation
(
c10115001
.
copyop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
10115001
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
10115001
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
10115001
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_MAIN_END
)
e2
:
SetCondition
(
c10115001
.
spcon
)
...
...
@@ -34,12 +38,11 @@ function c10115001.initial_effect(c)
e3
:
SetOperation
(
c10115001
.
spop2
)
c
:
RegisterEffect
(
e3
)
end
function
c10115001
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RegisterFlagEffect
(
10115101
,
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c10115001
.
spcon
(
e
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
e
:
GetHandler
():
GetFlagEffect
(
10115101
)
==
0
return
c10115001
.
copycon
(
e
)
and
e
:
GetHandler
():
GetFlagEffect
(
10115101
)
==
0
end
function
c10115001
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
...
...
@@ -49,13 +52,11 @@ end
function
c10115001
.
filter
(
c
,
e
,
tp
)
return
c
:
IsLevelBelow
(
5
)
and
c
:
IsSetCard
(
0x3331
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c10115001
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c10115001
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
)
end
function
c10115001
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
...
...
@@ -64,23 +65,59 @@ function c10115001.spop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c10115001
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
og
=
c
:
GetOverlayGroup
()
local
tg
=
og
:
Filter
(
Card
.
IsAbleToHand
,
nil
)
if
chk
==
0
then
return
og
:
GetCount
()
>=
2
and
tg
:
GetCount
()
>=
1
and
c
:
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_EFFECT
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_OVERLAY
)
function
c10115001
.
copycon
(
e
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
function
c10115001
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
not
c
:
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_EFFECT
)
then
return
end
c
:
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
local
g
=
c
:
GetOverlayGroup
():
Filter
(
Card
.
IsAbleToHand
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
function
c10115001
.
copycost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c10115001
.
copyfilter
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
c
.
specialsummon_effect
or
not
c
:
IsSetCard
(
0x3331
)
then
return
false
end
local
target
=
c
.
specialsummon_effect
:
GetTarget
()
return
not
target
or
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
end
function
c10115001
.
copytg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
and
c10115001
.
copyfilter
(
chkc
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c10115001
.
copyfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
tc
=
Duel
.
SelectTarget
(
tp
,
c10115001
.
copyfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
):
GetFirst
()
local
te
=
tc
.
specialsummon_effect
Duel
.
ClearTargetCard
()
e
:
SetCategory
(
te
:
GetCategory
())
e
:
SetProperty
(
te
:
GetProperty
())
if
not
e
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
e
:
SetProperty
(
te
:
GetProperty
()
+
EFFECT_FLAG_CARD_TARGET
)
end
local
tg
=
te
:
GetTarget
()
if
tg
then
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
te
:
SetLabelObject
(
e
:
GetLabelObject
())
e
:
SetLabelObject
(
te
)
end
function
c10115001
.
copyop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
te
=
e
:
GetLabelObject
()
if
not
te
then
return
end
e
:
SetLabelObject
(
te
:
GetLabelObject
())
local
op
=
te
:
GetOperation
()
if
op
then
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
function
c10115001
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
0
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsControler
(
1
-
tp
)
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10115001
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
,
tc
:
GetRank
())
local
sc
=
g
:
GetFirst
()
if
sc
then
local
mg
=
tc
:
GetOverlayGroup
()
if
mg
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
sc
,
mg
)
end
sc
:
SetMaterial
(
Group
.
FromCards
(
tc
))
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
tc
))
Duel
.
SpecialSummon
(
sc
,
SUMMON_TYPE_XYZ
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
sc
:
CompleteProcedure
()
end
end
\ No newline at end of file
expansions/script/c10115002.lua
View file @
7c31031c
...
...
@@ -3,13 +3,14 @@ function c10115002.initial_effect(c)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x3331
),
5
,
2
)
c
:
EnableReviveLimit
()
--
fucking self&opp
o
--
woca
o
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
10115002
,
1
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
10115002
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c10115002
.
cost
)
e1
:
SetTarget
(
c10115002
.
target
)
e1
:
SetOperation
(
c10115002
.
operation
)
...
...
@@ -20,7 +21,6 @@ function c10115002.initial_effect(c)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
10115002
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_MAIN_END
)
e2
:
SetCondition
(
c10115002
.
spcon
)
...
...
@@ -36,90 +36,78 @@ function c10115002.initial_effect(c)
e3
:
SetOperation
(
c10115002
.
spop2
)
c
:
RegisterEffect
(
e3
)
end
function
c10115002
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RegisterFlagEffect
(
10115102
,
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c10115002
.
fkfilter1
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
and
c
:
IsAbleToChangeControler
()
end
function
c10115002
.
fkfilter2
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsFacedown
()
and
c
:
IsAbleToHand
()
function
c10115002
.
eqfilter
(
c
,
tp
)
if
c
:
IsType
(
TYPE_MONSTER
)
then
return
(
c
:
IsControler
(
tp
)
or
c
:
IsAbleToChangeControler
())
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
else
return
c
:
IsAbleToHand
()
end
end
function
c10115002
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
gc1
=
Duel
.
GetMatchingGroupCount
(
c10115002
.
fkfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
e
:
GetHandler
())
local
gc2
=
Duel
.
GetMatchingGroupCount
(
c10115002
.
fkfilter2
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
nil
)
if
chk
==
0
then
return
gc1
>
0
or
gc2
>
0
end
if
gc1
==
0
and
gc2
>
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
0
,
LOCATION_SZONE
)
if
chkc
then
return
c10115002
.
eqfilter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c10115002
.
eqfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
(),
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c10115002
.
eqfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
(),
tp
)
if
g
:
GetFirst
():
IsType
(
TYPE_MONSTER
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
g
,
1
,
0
,
0
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
end
function
c10115002
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
g1
=
Duel
.
GetMatchingGroup
(
c10115002
.
fkfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
c
)
local
g2
=
Duel
.
GetMatchingGroup
(
c10115002
.
fkfilter2
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
nil
)
g1
:
Merge
(
g2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
10115002
,
2
))
local
g
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsLocation
(
LOCATION_MZONE
)
then
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
return
end
if
not
Duel
.
Equip
(
tp
,
tc
,
c
,
false
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_COPY_INHERIT
+
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c10115002
.
eqlimit
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_OWNER_RELATE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2
:
SetValue
(
300
)
tc
:
RegisterEffect
(
e2
)
else
Duel
.
SendtoHand
(
g
,
tp
,
REASON_EFFECT
)
local
tc
,
c
=
Duel
.
GetFirstTarget
(),
e
:
GetHandler
()
if
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
if
tc
:
IsType
(
TYPE_MONSTER
)
then
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
return
end
if
not
Duel
.
Equip
(
tp
,
tc
,
c
,
false
)
then
return
end
tc
:
RegisterFlagEffect
(
10115002
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
e
:
SetLabelObject
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_COPY_INHERIT
+
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c10115002
.
eqlimit
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_OWNER_RELATE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2
:
SetValue
(
300
)
tc
:
RegisterEffect
(
e2
)
else
Duel
.
SendtoHand
(
tc
,
tp
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
function
c10115002
.
eqlimit
(
e
,
c
)
return
e
:
GetOwner
()
==
c
end
function
c10115002
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c10115002
.
spcon
(
e
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
e
:
GetHandler
():
GetFlagEffect
(
10115102
)
==
0
end
function
c10115002
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToExtraAsCost
()
end
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_COST
)
end
function
c10115002
.
filter
(
c
,
e
,
tp
)
return
c
:
IsLevelBelow
(
6
)
and
c
:
IsSetCard
(
0x3331
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c10115002
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c10115002
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
)
end
function
c10115002
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
...
...
expansions/script/c10115003.lua
View file @
7c31031c
...
...
@@ -3,31 +3,33 @@ function c10115003.initial_effect(c)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x3331
),
6
,
2
)
c
:
EnableReviveLimit
()
--
special summon
--
negate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
10115003
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
10114004
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_MAIN_END
)
e1
:
SetCondition
(
c10115003
.
spcon
)
e1
:
SetCost
(
c10115003
.
spcost
)
e1
:
SetTarget
(
c10115003
.
sptg
)
e1
:
SetOperation
(
c10115003
.
spop
)
c
:
RegisterEffect
(
e1
)
--immue
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
10115003
,
1
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
10114004
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c10115003
.
imcost
)
e1
:
SetTarget
(
c10115003
.
imtg
)
e1
:
SetOperation
(
c10115003
.
imop
)
c
:
RegisterEffect
(
e1
)
e1
:
SetCost
(
c10115003
.
necost
)
e1
:
SetCondition
(
c10115003
.
necon
)
e1
:
SetTarget
(
c10115003
.
netg
)
e1
:
SetOperation
(
c10115003
.
neop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
10115003
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_MAIN_END
)
e2
:
SetCondition
(
c10115003
.
spcon
)
e2
:
SetCost
(
c10115003
.
spcost
)
e2
:
SetTarget
(
c10115003
.
sptg
)
e2
:
SetOperation
(
c10115003
.
spop
)
c
:
RegisterEffect
(
e2
)
--fuck then condition
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
...
...
@@ -36,64 +38,69 @@ function c10115003.initial_effect(c)
e3
:
SetOperation
(
c10115003
.
spop2
)
c
:
RegisterEffect
(
e3
)
end
function
c10115003
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RegisterFlagEffect
(
10115103
,
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c10115003
.
imfilter
(
c
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
IsFaceup
()
end
function
c10115003
.
imtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c10115003
.
imfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c10115003
.
necost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c10115003
.
imop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10115003
.
imfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetValue
(
c10115003
.
efilter
)
e1
:
SetOwnerPlayer
(
tp
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
g
:
GetFirst
():
RegisterEffect
(
e1
)
function
c10115003
.
necon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetCurrentChain
()
<
2
then
return
false
end
for
i
=
1
,
ev
do
local
te
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
)
local
tc
=
te
:
GetHandler
()
if
tc
:
IsControler
(
1
-
tp
)
and
Duel
.
IsChainNegatable
(
i
)
then
return
true
end
end
return
false
end
function
c10115003
.
efilter
(
e
,
re
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
function
c10115003
.
netg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
ng
=
Group
.
CreateGroup
()
local
dg
=
Group
.
CreateGroup
()
for
i
=
1
,
ev
do
local
te
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
)
local
tc
=
te
:
GetHandler
()
if
tc
:
IsControler
(
1
-
tp
)
then
ng
:
AddCard
(
tc
)
end
if
tc
:
IsRelateToEffect
(
te
)
then
dg
:
AddCard
(
tc
)
end
end
Duel
.
SetTargetCard
(
dg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
ng
,
ng
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
dg
,
dg
:
GetCount
(),
0
,
0
)
end
function
c10115003
.
imcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
function
c10115003
.
neop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
dg
=
Group
.
CreateGroup
()
for
i
=
1
,
ev
do
local
te
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
)
local
tc
=
te
:
GetHandler
()
if
tc
:
IsControler
(
1
-
tp
)
and
Duel
.
NegateActivation
(
i
)
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
te
)
then
dg
:
AddCard
(
tc
)
end
end
Duel
.
Destroy
(
dg
,
REASON_EFFECT
)
end
function
c10115003
.
spcon
(
e
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
e
:
GetHandler
():
GetFlagEffect
(
10115103
)
==
0
end
function
c10115003
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToExtraAsCost
()
end
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_COST
)
end
function
c10115003
.
filter
(
c
,
e
,
tp
)
return
c
:
IsLevelBelow
(
7
)
and
c
:
IsSetCard
(
0x3331
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c10115003
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c10115003
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
)
end
function
c10115003
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
...
...
expansions/script/c10115004.lua
View file @
7c31031c
...
...
@@ -5,19 +5,22 @@ function c10115004.initial_effect(c)
c
:
EnableReviveLimit
()
--actlimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
10115004
,
1
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetDescription
(
aux
.
Stringid
(
10115004
,
0
))
e1
:
SetCategory
(
CATEGORY_ANNOUNCE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
10115004
)
e1
:
SetHintTiming
(
0
,
0x1e0
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c10115004
.
cost
)
e1
:
SetOperation
(
c10115004
.
op
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
10115004
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
10115004
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
10115004
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_MAIN_END
)
e2
:
SetCondition
(
c10115004
.
spcon
)
...
...
@@ -33,84 +36,49 @@ function c10115004.initial_effect(c)
e3
:
SetOperation
(
c10115004
.
spop2
)
c
:
RegisterEffect
(
e3
)
end
function
c10115004
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c10115004
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
564
)
local
ac
=
Duel
.
AnnounceCard
(
tp
,
TYPE_MONSTER
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
564
)
local
ac2
=
Duel
.
AnnounceCard
(
tp
,
TYPE_SPELL
+
TYPE_TRAP
)
local
c
=
e
:
GetHandler
()
--activate limit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
1
)
e1
:
SetOperation
(
c10115004
.
aclimit1
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetCode
(
EFFECT_FORBIDDEN
)
e1
:
SetTargetRange
(
0x7f
,
0x7f
)
e1
:
SetTarget
(
c10115004
.
bantg
)
e1
:
SetLabel
(
ac
)
e1
:
SetValue
(
ac2
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
)
Duel
.
RegisterEffect
(
e1
,
tp
)
e1
:
SetLabelObject
(
e3
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EVENT_CHAIN_NEGATED
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
1
)
e2
:
SetOperation
(
c10115004
.
aclimit2
)
Duel
.
RegisterEffect
(
e2
,
tp
)
e2
:
SetLabelObject
(
e3
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
1
)
e3
:
SetTargetRange
(
0
,
1
)
e3
:
SetCondition
(
c10115004
.
econ
)
e3
:
SetValue
(
aux
.
TRUE
)
e3
:
SetLabel
(
0
)
Duel
.
RegisterEffect
(
e3
,
tp
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
e4
:
SetOperation
(
c10115004
.
clear
)
e4
:
SetLabelObject
(
e3
)
Duel
.
RegisterEffect
(
e4
,
tp
)
end
function
c10115004
.
clear
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetLabelObject
():
SetLabel
(
0
)
end
function
c10115004
.
aclimit1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
ep
==
tp
then
return
end
e
:
GetLabelObject
():
SetLabel
(
e
:
GetLabelObject
():
GetLabel
()
+
1
)
end
function
c10115004
.
aclimit2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
ep
==
tp
then
return
end
e
:
GetLabelObject
():
SetLabel
(
e
:
GetLabelObject
():
GetLabel
()
-
1
)
end
function
c10115004
.
econ
(
e
)
return
e
:
GetLabel
()
>=
2
function
c10115004
.
bantg
(
e
,
c
)
return
c
:
IsCode
(
e
:
GetLabel
())
or
c
:
IsCode
(
e
:
GetValue
())
end
function
c10115004
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RegisterFlagEffect
(
10115104
,
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c10115004
.
spcon
(
e
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
e
:
GetHandler
():
GetFlagEffect
(
10115104
)
==
0
end
function
c10115004
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToExtraAsCost
()
end
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_COST
)
end
function
c10115004
.
filter
(
c
,
e
,
tp
,
count
)
return
((
c
:
IsLevelBelow
(
7
)
and
count
==
1
)
or
(
c
:
GetLevel
()
==
4
and
count
==
2
))
and
c
:
IsSetCard
(
0x3331
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c10115004
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
return
(
Duel
.
IsExistingMatchingCard
(
c10115004
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
1
)
and
ft
>-
1
)
or
(
Duel
.
IsExistingMatchingCard
(
c10115004
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
2
,
nil
,
e
,
tp
,
2
)
and
ft
>
0
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
)
end
function
c10115004
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<=
0
then
return
end
...
...
expansions/script/c10116001.lua
View file @
7c31031c
...
...
@@ -23,7 +23,7 @@ function c10116001.initial_effect(c)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_DISABLE_SUMMON
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x3331
)
)
e3
:
SetTarget
(
c10116001
.
sumfilter
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_RANGE
+
EFFECT_FLAG_SET_AVAILABLE
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
...
...
@@ -34,6 +34,7 @@ function c10116001.initial_effect(c)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e6
:
SetRange
(
LOCATION_FZONE
)
e6
:
SetCondition
(
c10116001
.
sumscon
)
e6
:
SetOperation
(
c10116001
.
sumsuc
)
c
:
RegisterEffect
(
e6
)
local
e7
=
e6
:
Clone
()
...
...
@@ -45,50 +46,102 @@ function c10116001.initial_effect(c)
e8
:
SetCode
(
EVENT_CHAIN_END
)
e8
:
SetOperation
(
c10116001
.
sumsuc2
)
c
:
RegisterEffect
(
e8
)
--set
--
activate or
set
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
Set
Type
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e9
:
Set
Code
(
EVENT_SPSUMMON_SUCCESS
)
e9
:
Set
Description
(
aux
.
Stringid
(
10116001
,
0
)
)
e9
:
Set
Type
(
EFFECT_TYPE_QUICK_O
)
e9
:
SetRange
(
LOCATION_FZONE
)
e9
:
SetDescription
(
aux
.
Stringid
(
10116001
,
1
))
e9
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e9
:
SetCountLimit
(
1
,
10116001
)
e9
:
SetCondition
(
c10116001
.
setcon
)
e9
:
SetTarget
(
c10116001
.
settg
)
e9
:
SetOperation
(
c10116001
.
setop
)
c
:
RegisterEffect
(
e9
)
end
function
c10116001
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c10116001
.
cfilter
,
1
,
nil
,
tp
)
e9
:
SetCode
(
EVENT_FREE_CHAIN
)
e9
:
SetCountLimit
(
1
)
e9
:
SetHintTiming
(
0
,
0x1e0
)
e9
:
SetCondition
(
c10116001
.
accon
)
e9
:
SetTarget
(
c10116001
.
actg
)
e9
:
SetOperation
(
c10116001
.
acop
)
c
:
RegisterEffect
(
e9
)
if
not
c10116001
.
global_check
then
c10116001
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetOperation
(
c10116001
.
spcheckop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c10116001
.
accon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
10116001
)
>
0
end
function
c10116001
.
cfilter
(
c
,
tp
)
return
c
:
GetSummonPlayer
()
==
tp
and
c
:
IsSetCard
(
0x3331
)
and
(
c
:
IsLevelAbove
(
5
)
or
c
:
IsRankAbove
(
5
))
and
c
:
IsFaceup
()
and
c
:
GetReasonEffect
()
and
c
:
GetReasonEffect
():
GetHandler
():
IsSetCard
(
0x3331
)
and
c
:
GetReasonEffect
():
GetHandler
():
IsType
(
TYPE_MONSTER
)
function
c10116001
.
spcheckop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
eg
:
IsExists
(
c10116001
.
checkfilter
,
1
,
nil
)
then
Duel
.
RegisterFlagEffect
(
eg
:
GetFirst
():
GetSummonPlayer
(),
10116001
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c10116001
.
checkfilter
(
c
)
local
lv
=
c
:
GetOriginalLevel
()
if
c
:
IsType
(
TYPE_XYZ
)
then
lv
=
c
:
GetOriginalRank
()
end
return
c
:
IsSetCard
(
0x3331
)
and
c
:
IsSetCard
(
0x3331
)
and
lv
>=
5
and
c
:
IsFaceup
()
end
function
c10116001
.
setfilter
(
c
)
return
c
:
IsSetCard
(
0x3331
)
and
bit
.
band
(
c
:
GetType
(),
0x10002
)
==
0x10002
and
c
:
IsSSetable
()
function
c10116001
.
actg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c10116001
.
acfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
end
function
c10116001
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c10116001
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
function
c10116001
.
acfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x3331
)
and
bit
.
band
(
c
:
GetType
(),
0x10002
)
==
0x10002
and
(
c
:
GetActivateEffect
():
IsActivatable
(
tp
)
or
c
:
IsSSetable
())
end
function
c10116001
.
set
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c10116001
.
ac
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10116001
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
10116001
,
2
))
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c10116001
.
acfilter
),
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
not
tc
then
return
end
local
b1
=
tc
:
IsSSetable
()
local
b2
=
tc
:
GetActivateEffect
():
IsActivatable
(
tp
)
if
b1
and
(
not
b2
or
not
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
10116001
,
3
)))
then
Duel
.
SSet
(
tp
,
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
else
Duel
.
Hint
(
HINT_CARD
,
0
,
tc
:
GetOriginalCode
())
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
local
target
=
te
:
GetTarget
()
local
operation
=
te
:
GetOperation
()
tc
:
CancelToGrave
(
false
)
tc
:
CreateEffectRelation
(
te
)
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
if
target
then
target
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
if
g
and
g
:
GetCount
()
>
0
then
local
tg
=
g
:
GetFirst
()
while
tg
do
tg
:
CreateEffectRelation
(
te
)
tg
=
g
:
GetNext
()
end
end
tc
:
SetStatus
(
STATUS_ACTIVATED
,
true
)
if
operation
then
operation
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
tc
:
ReleaseEffectRelation
(
te
)
if
g
and
g
:
GetCount
()
>
0
then
tg
=
g
:
GetFirst
()
while
tg
do
tg
:
ReleaseEffectRelation
(
te
)
tg
=
g
:
GetNext
()
end
end
Duel
.
RegisterFlagEffect
(
tp
,
tc
:
GetOriginalCode
(),
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RaiseEvent
(
tc
,
EVENT_CHAIN_SOLVED
,
te
,
0
,
tp
,
tp
,
Duel
.
GetCurrentChain
())
end
end
function
c10116001
.
sumfilter
(
e
,
c
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
GetSummonPlayer
()
==
e
:
GetHandlerPlayer
()
end
function
c10116001
.
sumsuc2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
GetFlagEffect
(
10116001
)
~=
0
then
Duel
.
SetChainLimitTillChainEnd
(
c10116001
.
chainlm
)
end
e
:
GetHandler
():
ResetFlagEffect
(
10116001
)
end
function
c10116001
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetCurrentChain
()
==
0
then
Duel
.
SetChainLimitTillChainEnd
(
c10116001
.
chainlm
)
...
...
@@ -96,16 +149,17 @@ function c10116001.sumsuc(e,tp,eg,ep,ev,re,r,rp)
e
:
GetHandler
():
RegisterFlagEffect
(
10116001
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c10116001
.
sfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3331
)
function
c10116001
.
sumscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c10116001
.
sfilter
,
1
,
nil
,
tp
)
end
function
c10116001
.
sfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3331
)
and
c
:
GetSummonPlayer
()
==
tp
end
function
c10116001
.
chainlm
(
e
,
ep
,
tp
)
return
ep
==
tp
end
function
c10116001
.
efilter
(
e
,
ct
)
local
te
=
Duel
.
GetChainInfo
(
ct
,
CHAININFO_TRIGGERING_EFFECT
)
return
(
te
:
IsHasCategory
(
CATEGORY_SPECIAL_SUMMON
)
or
te
:
IsHasCategory
(
CATEGORY_SUMMON
))
and
te
:
GetHandler
():
IsSetCard
(
0x3331
)
end
local
p
=
e
:
GetHandlerPlayer
()
local
te
,
tp
=
Duel
.
GetChainInfo
(
ct
,
CHAININFO_TRIGGERING_EFFECT
,
CHAININFO_TRIGGERING_PLAYER
)
return
te
:
IsHasCategory
(
CATEGORY_SPECIAL_SUMMON
)
and
te
:
GetHandler
():
IsSetCard
(
0x3331
)
and
p
==
tp
end
\ No newline at end of file
expansions/script/c10116002.lua
View file @
7c31031c
...
...
@@ -2,61 +2,90 @@
function
c10116002
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DAMAGE
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x1e0
)
e1
:
SetCountLimit
(
1
,
10116002
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCo
st
(
c10116002
.
cost
)
e1
:
SetCo
ndition
(
c10116002
.
condition
)
e1
:
SetTarget
(
c10116002
.
target
)
e1
:
SetOperation
(
c10116002
.
activate
)
c
:
RegisterEffect
(
e1
)
Duel
.
AddCustomActivityCounter
(
10116002
,
ACTIVITY_CHAIN
,
aux
.
FALSE
)
c
:
RegisterEffect
(
e1
)
end
function
c10116002
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
10116002
,
tp
,
ACTIVITY_CHAIN
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
aux
.
TRUE
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c10116002
.
cfilter
(
c
)
function
c10116002
.
confilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3331
)
end
function
c10116002
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c10116002
.
confilter
,
tp
,
LOCATION_MZONE
,
0
,
3
,
nil
)
and
Duel
.
GetFlagEffect
(
tp
,
10116002
)
<=
0
end
function
c10116002
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c10116002
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
~=
e
:
GetHandler
()
end
local
c
=
e
:
GetHandler
()
local
b1
=
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
local
b2
=
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
c
)
local
b3
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_EXTRA
,
1
,
nil
)
if
chk
==
0
then
return
b1
or
b2
or
b3
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EFFECT
)
local
ops
=
{}
local
opval
=
{}
local
off
=
1
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
10116002
,
1
)
opval
[
off
-
1
]
=
1
off
=
off
+
1
end
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
10116002
,
2
)
opval
[
off
-
1
]
=
2
off
=
off
+
1
end
if
b3
then
ops
[
off
]
=
aux
.
Stringid
(
10116002
,
3
)
opval
[
off
-
1
]
=
3
off
=
off
+
1
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
sel
=
opval
[
op
]
e
:
SetLabel
(
sel
)
if
sel
==
1
then
e
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e
:
SetCategory
(
CATEGORY_HANDES
+
CATEGORY_DRAW
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_HANDES
,
nil
,
0
,
tp
,
1
)
elseif
sel
==
2
then
e
:
SetCategory
(
CATEGORY_DESTROY
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
else
e
:
SetCategory
(
CATEGORY_REMOVE
)
e
:
SetProperty
(
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
1
-
tp
,
LOCATION_EXTRA
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
800
)
end
function
c10116002
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
c10116002
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
ct
,
nil
)
if
g
:
GetCount
()
>
0
then
local
dc
=
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
local
tg
=
Duel
.
GetMatchingGroup
(
c10116002
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
nil
)
local
sg
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
)
if
dc
>=
1
then
Duel
.
Damage
(
1
-
tp
,
800
,
REASON_EFFECT
)
end
if
dc
>=
3
and
tg
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tgg
=
tg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
tgg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tgg
)
end
if
dc
>=
5
and
sg
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
local
sel
=
e
:
GetLabel
()
if
sel
==
1
then
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
==
2
then
Duel
.
ShuffleHand
(
p
)
Duel
.
BreakEffect
()
Duel
.
DiscardHand
(
p
,
nil
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
)
end
elseif
se1
==
2
then
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
else
local
rg
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_EXTRA
,
nil
)
if
rg
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
tp
,
rg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
rg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
end
function
c10116002
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
IsAbleToHand
()
end
end
\ No newline at end of file
expansions/script/c10116003.lua
View file @
7c31031c
...
...
@@ -2,60 +2,82 @@
function
c10116003
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetDescription
(
aux
.
Stringid
(
10116003
,
0
))
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCountLimit
(
1
,
10116003
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetHintTiming
(
TIMING_END_PHASE
)
e1
:
SetCost
(
c10116003
.
cost
)
e1
:
SetTarget
(
c10116003
.
target
)
e1
:
SetOperation
(
c10116003
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--lv down
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
10116003
,
1
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetCost
(
c10116003
.
lvcost
)
e2
:
SetOperation
(
c10116003
.
lvop
)
c
:
RegisterEffect
(
e2
)
end
function
c10116003
.
lvcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeckAsCost
()
end
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
2
,
REASON_COST
)
end
function
c10116003
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
LOCATION_HAND
,
0
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x3331
))
e1
:
SetValue
(
-
3
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c10116003
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c10116003
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10116003
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoDeck
(
g
,
tp
,
2
,
REASON_COST
)
e
:
SetLabel
(
1
)
return
true
end
function
c10116003
.
tfilter
(
c
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
IsFaceup
()
end
function
c10116003
.
costfilter
(
c
)
return
c
:
IsAbleToDeckOrExtraAsCost
()
and
c
:
IsSetCard
(
0x3331
)
and
c
:
IsType
(
TYPE_MONSTER
)
function
c10116003
.
costfilter
(
c
,
e
,
tp
)
return
c
:
IsAbleToDeckOrExtraAsCost
()
and
c
:
IsSetCard
(
0x3331
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
((
c
:
IsLocation
(
LOCATION_HAND
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
)
or
(
c
:
IsFaceup
()
and
c
:
IsLocation
(
LOCATION_MZONE
)))
and
Duel
.
IsExistingMatchingCard
(
c10116003
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
c
)
end
function
c10116003
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
function
c10116003
.
filter
(
c
,
e
,
tp
,
rc
)
local
lv
=
rc
:
GetOriginalLevel
()
if
rc
:
IsType
(
TYPE_XYZ
)
then
lv
=
rc
:
GetOriginalRank
()
end
return
c
:
IsSetCard
(
0x3331
)
and
((
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
(
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
or
rc
:
IsLocation
(
LOCATION_MZONE
)))
or
c
:
IsAbleToHand
())
and
not
c
:
IsCode
(
rc
:
GetCode
())
and
c
:
IsLevelBelow
(
lv
)
end
function
c10116003
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c10116003
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
function
c10116003
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
e
:
GetLabel
()
~=
1
then
return
false
end
e
:
SetLabel
(
0
)
return
Duel
.
IsExistingMatchingCard
(
c10116003
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetFlagEffect
(
tp
,
10116003
)
<=
0
end
e
:
SetLabel
(
0
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10116003
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetFirst
():
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
Duel
.
SendtoDeck
(
g
,
tp
,
2
,
REASON_COST
)
e
:
SetLabelObject
(
g
:
GetFirst
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
)
end
function
c10116003
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
c
,
rc
=
e
:
GetHandler
(),
e
:
GetLabelObject
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c10116003
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
if
tc
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
--cannot trigger
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
,
true
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e3
:
SetCountLimit
(
1
)
e3
:
SetOperation
(
c10116003
.
tdop
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e3
,
true
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c10116003
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
rc
):
GetFirst
()
if
not
tc
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
(
not
tc
:
IsAbleToHand
()
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
10116003
,
2
)))
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
function
c10116003
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
2
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c10116004.lua
View file @
7c31031c
...
...
@@ -2,77 +2,74 @@
function
c10116004
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetDescription
(
aux
.
Stringid
(
10116004
,
2
))
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c10116004
.
cost
)
e1
:
SetCountLimit
(
1
,
10116004
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetHintTiming
(
TIMING_END_PHASE
)
e1
:
SetCondition
(
c10116004
.
condition
)
e1
:
SetTarget
(
c10116004
.
target
)
e1
:
SetOperation
(
c10116004
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
function
c10116004
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
nil
if
e
:
GetLabel
()
==
1
then
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10116004
.
sfilter1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
elseif
e
:
GetLabel
()
==
2
then
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10116004
.
sfilter2
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
end
if
g
and
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
c10116004
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeckAsCost
()
end
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
2
,
REASON_COST
)
end
function
c10116004
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3331
)
and
c
:
IsAbleToDeckAsCost
()
and
Duel
.
IsExistingMatchingCard
(
c10116004
.
sfilter1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
function
c10116004
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
or
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
<
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
and
Duel
.
GetFlagEffect
(
tp
,
10116004
)
<=
0
end
function
c10116004
.
sfilter1
(
c
,
e
,
tp
)
return
c
:
GetLevel
()
==
4
and
c
:
IsRace
(
RACE_WARRIOR
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
function
c10116004
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
IsAbleToHand
()
end
function
c10116004
.
filter2
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
GetLevel
()
==
4
and
c
:
IsRace
(
RACE_WARRIOR
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsAbleToDeckAsCost
()
and
Duel
.
IsExistingMatchingCard
(
c10116004
.
sfilter2
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
function
c10116004
.
sfilter2
(
c
,
e
,
tp
)
function
c10116004
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c10116004
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g1
=
Duel
.
GetMatchingGroup
(
c10116004
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
,
tp
)
local
g2
=
Duel
.
GetMatchingGroup
(
c10116004
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
,
tp
)
if
chk
==
0
then
if
e
:
GetLabel
()
~=
100
then
return
false
end
e
:
SetLabel
(
0
)
return
g1
:
GetCount
()
>
0
or
g2
:
GetCount
()
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EFFECT
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
c10116004
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
c10116004
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
if
chk
==
0
then
return
b1
or
b2
end
local
op
=
0
if
g1
:
GetCount
()
>
0
and
g2
:
GetCount
()
>
0
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
10116004
,
0
),
aux
.
Stringid
(
10116004
,
1
))
elseif
g1
:
GetCount
()
<
0
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
10116004
,
1
))
op
=
1
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
10116004
,
0
))
if
b1
and
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
10116004
,
0
),
aux
.
Stringid
(
10116004
,
1
))
elseif
b1
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
10116004
,
0
))
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
10116004
,
1
))
+
1
end
if
op
==
0
then
e
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
else
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
e
:
SetLabel
(
op
)
end
function
c10116004
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
op
,
g
=
e
:
GetLabel
()
if
op
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10116004
.
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
else
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10116004
.
spfilter
,
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
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
10116004
,
3
))
then
Duel
.
BreakEffect
()
local
e1
=
Effect
.
CreateEffect
(
g
:
GetFirst
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c10116004
.
aclimit
)
g
:
GetFirst
():
RegisterEffect
(
e1
,
true
)
end
end
e
:
SetLabel
(
op
+
1
)
local
g
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
if
op
==
0
then
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10116004
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
else
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10116004
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
)
end
function
c10116004
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetLabel
(
100
)
return
true
function
c10116004
.
aclimit
(
e
,
re
,
tp
)
return
re
:
GetCode
()
==
EVENT_SPSUMMON_SUCCESS
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
\ No newline at end of file
expansions/script/c10116005.lua
View file @
7c31031c
...
...
@@ -2,14 +2,12 @@
function
c10116005
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e1
:
SetDescription
(
aux
.
Stringid
(
10116005
,
0
))
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCondition
(
c10116005
.
condition
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c10116005
.
target
)
e1
:
SetOperation
(
c10116005
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--NegateAttack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
10116005
,
1
))
...
...
@@ -17,66 +15,78 @@ function c10116005.initial_effect(c)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
10116005
)
e2
:
SetCondition
(
c10116005
.
necon
)
e2
:
SetCost
(
c10116005
.
necost
)
e2
:
SetTarget
(
c10116005
.
netg
)
e2
:
SetOperation
(
c10116005
.
neop
)
c
:
RegisterEffect
(
e2
)
end
function
c10116005
.
netg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c10116005
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
and
Duel
.
IsExistingTarget
(
c10116005
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c10116005
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c10116005
.
necon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
end
function
c10116005
.
necost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeckAsCost
()
end
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
2
,
REASON_COST
)
end
function
c10116005
.
neop
(
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
,
c10116005
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
not
g
:
GetFirst
():
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
Duel
.
BreakEffect
()
if
Duel
.
NegateAttack
()
then
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
Duel
.
NegateAttack
()
and
not
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
10116005
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
end
end
function
c10116005
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c10116005
.
tgfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsControler
(
tp
)
and
c
:
IsSetCard
(
0x3331
)
and
c
:
IsOnField
()
function
c10116005
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3331
)
end
function
c10116005
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
or
rp
==
tp
then
return
false
end
local
tg
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
tg
and
tg
:
IsExists
(
c10116005
.
tgfilter
,
1
,
nil
,
tp
)
and
Duel
.
IsChainDisablable
(
ev
)
end
function
c10116005
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
c10116005
.
announce_filter
=
{
0x3331
,
OPCODE_ISSETCARD
}
local
ac
=
Duel
.
AnnounceCardFilter
(
tp
,
table.unpack
(
c10116005
.
announce_filter
))
Duel
.
SetTargetParam
(
ac
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ANNOUNCE
,
nil
,
0
,
tp
,
ANNOUNCE_CARD_FILTER
)
end
function
c10116005
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateActivation
(
ev
)
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
local
ac
,
c
,
ph
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PARAM
),
e
:
GetHandler
(),
Duel
.
GetCurrentPhase
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x3331
))
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
c10116005
.
efilter
)
e1
:
SetLabel
(
ac
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_INACTIVATE
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetValue
(
c10116005
.
chainfilter
)
e2
:
SetLabel
(
ac
)
Duel
.
RegisterEffect
(
e2
,
tp
)
local
e3
=
e2
:
Clone
()
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_DISEFFECT
)
e3
:
SetValue
(
c10116005
.
chainfilter
)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
function
c10116005
.
chainfilter
(
e
,
ct
)
local
p
=
e
:
GetHandlerPlayer
()
local
te
,
tp
=
Duel
.
GetChainInfo
(
ct
,
CHAININFO_TRIGGERING_EFFECT
,
CHAININFO_TRIGGERING_PLAYER
)
return
p
==
tp
and
te
:
GetHandler
():
IsCode
(
e
:
GetLabel
())
end
function
c10116005
.
efilter
(
e
,
te
)
return
te
:
GetOwnerPlayer
()
~=
e
:
GetHandlerPlayer
()
end
\ No newline at end of file
expansions/script/c10116006.lua
View file @
7c31031c
...
...
@@ -2,69 +2,91 @@
function
c10116006
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
+
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_END_PHASE
,
0x1e0
)
e1
:
SetCountLimit
(
1
,
10116006
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c10116006
.
target
)
e1
:
SetOperation
(
c10116006
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c10116006
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
eg
:
IsContains
(
chkc
)
and
c10116006
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
eg
:
IsExists
(
c10116006
.
filter
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
eg
:
FilterSelect
(
tp
,
c10116006
.
filter
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetTargetCard
(
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c10116006
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c10116006
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
10114013
,
0x3331
,
0x4011
,
0
,
0
,
1
,
RACE_MACHINE
,
ATTRIBUTE_DARK
)
and
Duel
.
GetFlagEffect
(
tp
,
10116006
)
<=
0
end
local
ct
=
Duel
.
GetMatchingGroupCount
(
c10116006
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ct
=
1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c10116006
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
ct
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
g
:
GetCount
(),
0
,
0
)
end
function
c10116006
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsCanBeEffectTarget
(
e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
GetReasonPlayer
()
~=
tp
function
c10116006
.
filter
(
c
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
IsAbleToRemove
()
end
function
c10116006
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
lv
=
tc
:
GetLevel
()
Duel
.
BreakEffect
()
local
g
=
Duel
.
GetMatchingGroup
(
c10116006
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
if
lv
>=
4
then
--battleins
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
--immue
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e2
:
SetValue
(
c10116006
.
efilter
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
end
if
lv
>=
6
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
if
not
sc
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
then
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
local
c
,
g
=
e
:
GetHandler
(),
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
<=
0
then
return
end
local
ct
=
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
if
ct
<=
0
then
return
end
local
rg
=
Duel
.
GetOperatedGroup
()
rg
:
KeepAlive
()
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
10114013
,
0x3331
,
0x4011
,
0
,
0
,
1
,
RACE_MACHINE
,
ATTRIBUTE_DARK
)
then
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ct
=
1
end
for
i
=
1
,
ct
do
local
token
=
Duel
.
CreateToken
(
tp
,
10114013
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
token
:
RegisterEffect
(
e1
,
true
)
end
Duel
.
SpecialSummonComplete
()
end
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
local
tc
,
fid
=
rg
:
GetFirst
(),
c
:
GetFieldID
()
while
tc
do
tc
:
RegisterFlagEffect
(
10116006
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
,
fid
)
tc
=
rg
:
GetNext
()
end
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetCountLimit
(
1
)
e2
:
SetOperation
(
c10116006
.
endop
)
Duel
.
RegisterEffect
(
e2
,
tp
)
e2
:
SetLabelObject
(
rg
)
e2
:
SetLabel
(
fid
)
end
end
function
c10116006
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
function
c10116006
.
endop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
10116006
)
local
g
,
mg
=
Duel
.
GetMatchingGroup
(
c10116006
.
desfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
),
e
:
GetLabelObject
()
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
local
tg
,
ft
,
sg
=
mg
:
Filter
(
c10116006
.
spfilter
,
nil
,
e
,
tp
),
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<=
0
or
tg
:
GetCount
()
<=
0
then
mg
:
DeleteGroup
()
e
:
Reset
()
return
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
if
ft
>=
tg
:
GetCount
()
then
sg
=
tg
:
Clone
()
else
local
ct
=
math.min
(
tg
:
GetCount
(),
ft
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
sg
=
tg
:
Select
(
tp
,
ft
,
ft
,
nil
)
end
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
c10116006
.
desfilter
(
c
)
return
c
:
IsCode
(
10114013
)
and
c
:
IsFaceup
()
end
function
c10116006
.
efilter
(
e
,
re
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
function
c10116006
.
spfilter
(
c
,
e
,
tp
)
return
c
:
GetFlagEffectLabel
(
10116006
)
==
e
:
GetLabel
()
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
\ No newline at end of file
expansions/script/c10116007.lua
0 → 100644
View file @
7c31031c
--夜鸦协同阵列
function
c10116007
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
10116007
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
10116007
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetHintTiming
(
TIMING_END_PHASE
)
e1
:
SetTarget
(
c10116007
.
target
)
e1
:
SetOperation
(
c10116007
.
activate
)
c
:
RegisterEffect
(
e1
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
10116007
,
1
))
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetCost
(
c10116007
.
tdcost
)
e2
:
SetTarget
(
c10116007
.
tdtg
)
e2
:
SetOperation
(
c10116007
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
function
c10116007
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeckAsCost
()
end
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
2
,
REASON_COST
)
end
function
c10116007
.
tdfilter
(
c
)
return
c
:
IsSetCard
(
0x3331
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
end
function
c10116007
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c10116007
.
tdfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c10116007
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c10116007
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
99
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c10116007
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
function
c10116007
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
Duel
.
IsExistingMatchingCard
(
c10116007
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
)
end
function
c10116007
.
filter2
(
c
,
e
,
tp
,
rc
)
local
lv
=
rc
:
GetOriginalLevel
()
if
rc
:
IsType
(
TYPE_XYZ
)
then
lv
=
rc
:
GetOriginalRank
()
end
return
c
:
GetRank
()
<=
lv
and
c
:
IsSetCard
(
0x3331
)
and
rc
:
IsCanBeXyzMaterial
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
not
c
:
IsCode
(
rc
:
GetCode
())
end
function
c10116007
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c10116007
.
filter1
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingTarget
(
c10116007
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetFlagEffect
(
tp
,
10116007
)
<=
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c10116007
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c10116007
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
0
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsControler
(
1
-
tp
)
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10116007
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
)
local
sc
=
g
:
GetFirst
()
if
sc
then
local
mg
=
tc
:
GetOverlayGroup
()
if
mg
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
sc
,
mg
)
end
sc
:
SetMaterial
(
Group
.
FromCards
(
tc
))
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
tc
))
Duel
.
SpecialSummon
(
sc
,
SUMMON_TYPE_XYZ
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
sc
:
CompleteProcedure
()
end
end
\ No newline at end of file
expansions/script/c10173035.lua
0 → 100644
View file @
7c31031c
--食人宝箱国王
function
c10173035
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
nil
,
11
,
2
,
c10173035
.
ovfilter
,
aux
.
Stringid
(
10173035
,
0
),
2
,
nil
)
c
:
EnableReviveLimit
()
--immune (FAQ in Card Target)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
c10173035
.
target
)
e1
:
SetValue
(
c10173035
.
efilter
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
c
:
RegisterEffect
(
e3
)
local
e4
=
e1
:
Clone
()
c
:
RegisterEffect
(
e4
)
local
e5
=
e1
:
Clone
()
c
:
RegisterEffect
(
e5
)
--indes
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
10173035
,
1
))
e6
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e6
:
SetCountLimit
(
1
)
e6
:
SetCost
(
c10173035
.
indcost
)
e6
:
SetTarget
(
c10173035
.
indtg
)
e6
:
SetOperation
(
c10173035
.
indop
)
c
:
RegisterEffect
(
e6
)
e1
:
SetLabel
(
0
)
e2
:
SetLabel
(
1
)
e3
:
SetLabel
(
2
)
e4
:
SetLabel
(
3
)
e5
:
SetLabel
(
4
)
end
function
c10173035
.
indcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c10173035
.
indtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c10173035
.
indop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c10173035
.
ovfilter
(
c
)
local
rk
=
c
:
GetRank
()
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
and
(
rk
==
1
or
rk
==
2
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
end
function
c10173035
.
target
(
e
,
c
)
return
c
:
GetSequence
()
==
e
:
GetLabel
()
end
function
c10173035
.
efilter
(
e
,
te
)
if
te
:
GetOwnerPlayer
()
==
e
:
GetHandlerPlayer
()
then
return
false
end
if
not
te
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
true
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
return
not
g
:
IsContains
(
Duel
.
GetFieldCard
(
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
e
:
GetLabel
()))
end
\ No newline at end of file
expansions/script/c10173036.lua
0 → 100644
View file @
7c31031c
--无敌卡A
function
c10173036
.
initial_effect
(
c
)
--effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
10173036
,
0
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
10173036
)
e1
:
SetHintTiming
(
0
,
0x1c0
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCost
(
c10173036
.
cost
)
e1
:
SetOperation
(
c10173036
.
operation
)
c
:
RegisterEffect
(
e1
)
if
not
c10173036
.
global_check
then
c10173036
.
global_check
=
true
Real_Scl
=
{}
Dark_Scl
=
{}
Real_Scl
[
0
]
=
0
Dark_Scl
[
0
]
=
0
local
ge1
=
Effect
.
GlobalEffect
()
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
ge1
:
SetOperation
(
c10173036
.
checkop1
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
ge1
:
Clone
()
ge2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
Duel
.
RegisterEffect
(
ge2
,
0
)
local
ge3
=
ge1
:
Clone
()
ge3
:
SetCode
(
EVENT_FLIP_SUMMON_SUCCESS
)
Duel
.
RegisterEffect
(
ge3
,
0
)
local
ge4
=
ge1
:
Clone
()
ge4
:
SetCode
(
EVENT_CHAINING
)
ge4
:
SetOperation
(
c10173036
.
checkop2
)
Duel
.
RegisterEffect
(
ge4
,
0
)
local
ge5
=
ge1
:
Clone
()
ge5
:
SetCode
(
EVENT_CHAIN_SOLVED
)
ge5
:
SetOperation
(
c10173036
.
checkop3
)
Duel
.
RegisterEffect
(
ge5
,
0
)
local
ge6
=
Effect
.
CreateEffect
(
c
)
ge6
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
ge6
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge6
:
SetOperation
(
c10173036
.
reset
)
Duel
.
RegisterEffect
(
ge6
,
0
)
end
end
function
c10173036
.
checkop3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
for
k
,
v
in
ipairs
(
Dark_Scl
)
do
if
v
==
re
:
GetHandler
():
GetCode
()
then
return
end
end
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
Dark_Scl
[
#
Dark_Scl
+
1
]
=
re
:
GetHandler
():
GetCode
()
end
end
function
c10173036
.
checkop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
Dark_Scl
[
#
Dark_Scl
+
1
]
=
re
:
GetHandler
():
GetCode
()
end
end
function
c10173036
.
reset
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Real_Scl
=
{}
Dark_Scl
=
{}
Real_Scl
[
0
]
=
0
Dark_Scl
[
0
]
=
0
end
function
c10173036
.
checkop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
while
tc
do
Real_Scl
[
#
Real_Scl
+
1
]
=
tc
:
GetCode
()
tc
=
eg
:
GetNext
()
end
end
function
c10173036
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c10173036
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetTarget
(
c10173036
.
tg
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
2
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
Duel
.
RegisterEffect
(
e2
,
tp
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_FLIP_SUMMON
)
Duel
.
RegisterEffect
(
e3
,
tp
)
local
e4
=
e1
:
Clone
()
e4
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e4
:
SetValue
(
c10173036
.
tg2
)
Duel
.
RegisterEffect
(
e4
,
tp
)
end
function
c10173036
.
tg2
(
e
,
re
,
tp
)
return
re
:
GetHandler
():
IsCode
(
table.unpack
(
Dark_Scl
))
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
function
c10173036
.
tg
(
e
,
c
)
return
c
:
IsCode
(
table.unpack
(
Real_Scl
))
end
\ No newline at end of file
expansions/script/c10173037.lua
0 → 100644
View file @
7c31031c
--这张卡
function
c10173037
.
initial_effect
(
c
)
--fusion substitute
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_FUSION_SUBSTITUTE
)
e1
:
SetCondition
(
c10173037
.
subcon
)
c
:
RegisterEffect
(
e1
)
--fusion
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99423156
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
10173037
)
e2
:
SetTarget
(
c10173037
.
fustg
)
e2
:
SetOperation
(
c10173037
.
fusop
)
c
:
RegisterEffect
(
e2
)
end
function
c10173037
.
subcon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_REMOVED
)
and
e
:
GetHandler
():
GetFlagEffect
(
10173037
)
>
0
end
function
c10173037
.
filter0
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
end
function
c10173037
.
filter1
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c10173037
.
filter2
(
c
,
e
,
tp
,
m
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
)
end
function
c10173037
.
fustg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
c
:
RegisterFlagEffect
(
10173037
,
RESET_CHAIN
+
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
false
end
local
mg
=
Duel
.
GetMatchingGroup
(
c10173037
.
filter0
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
local
tf
=
Duel
.
IsExistingMatchingCard
(
c10173037
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg
)
c
:
ResetFlagEffect
(
10173037
)
return
tf
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c10173037
.
fusop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
c
:
IsRelateToEffect
(
e
)
then
c
:
RegisterFlagEffect
(
10173037
,
RESET_CHAIN
+
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
end
local
mg
=
Duel
.
GetMatchingGroup
(
c10173037
.
filter1
,
tp
,
LOCATION_REMOVED
,
0
,
nil
,
e
)
local
sg
=
Duel
.
GetMatchingGroup
(
c10173037
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg
)
if
sg
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tc
=
sg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
tc
:
RegisterEffect
(
e2
)
local
mat
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg
)
c
:
ResetFlagEffect
(
10173037
)
tc
:
SetMaterial
(
mat
)
Duel
.
SendtoDeck
(
mat
,
nil
,
2
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
\ No newline at end of file
expansions/script/c10173038.lua
0 → 100644
View file @
7c31031c
--超维霸王`.`
function
c10173038
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionAttribute
,
ATTRIBUTE_DARK
),
2
,
false
)
--Destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
10173038
,
0
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_BATTLE_START
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
c10173038
.
destg
)
e3
:
SetOperation
(
c10173038
.
desop
)
c
:
RegisterEffect
(
e3
)
--battle indestructable
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e4
:
SetValue
(
1
)
c
:
RegisterEffect
(
e4
)
--immune
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e5
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetValue
(
c10173038
.
efilter
)
c
:
RegisterEffect
(
e5
)
--atk&def
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
3576031
,
0
))
e6
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e6
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCountLimit
(
1
)
e6
:
SetCondition
(
c10173038
.
adcon
)
e6
:
SetOperation
(
c10173038
.
adop
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e7
:
SetValue
(
c10173038
.
valcheck
)
e7
:
SetLabelObject
(
e6
)
c
:
RegisterEffect
(
e7
)
end
function
c10173038
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
e
:
GetHandler
():
GetSummonType
(),
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
and
e
:
GetLabel
()
==
1
end
function
c10173038
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
if
g
:
IsExists
(
Card
.
IsFusionCode
,
1
,
nil
,
10113076
)
then
e
:
GetLabelObject
():
SetLabel
(
1
)
else
e
:
GetLabelObject
():
SetLabel
(
0
)
end
end
function
c10173038
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
g
:
GetCount
()
<=
0
then
return
end
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
400
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
end
function
c10173038
.
efilter
(
e
,
te
)
local
c
=
e
:
GetHandler
()
local
ec
=
te
:
GetHandler
()
if
te
:
GetHandlerPlayer
()
==
e
:
GetHandlerPlayer
()
or
ec
:
IsHasCardTarget
(
c
)
or
(
te
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
and
te
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
and
c
:
IsRelateToEffect
(
te
))
then
return
false
end
return
true
end
function
c10173038
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
g1
=
g
:
GetMinGroup
(
Card
.
GetAttack
)
local
g2
=
Duel
.
GetMatchingGroup
(
c10173038
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
g1
then
g2
:
Merge
(
g1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g2
,
g2
:
GetCount
(),
1
-
tp
,
LOCATION_ONFIELD
)
end
function
c10173038
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
g1
=
g
:
GetMinGroup
(
Card
.
GetAttack
)
local
g2
=
Duel
.
GetMatchingGroup
(
c10173038
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
g1
then
g2
:
Merge
(
g1
)
end
if
g2
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g2
,
REASON_EFFECT
)
end
end
function
c10173038
.
desfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
expansions/script/c10173043.lua
0 → 100644
View file @
7c31031c
--对象狂热者
function
c10173043
.
initial_effect
(
c
)
--effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
10173043
,
0
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
10173043
)
e1
:
SetHintTiming
(
0
,
0x1c0
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCost
(
c10173043
.
cost
)
e1
:
SetOperation
(
c10173043
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c10173043
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c10173043
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Group
.
CreateGroup
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
2
)
e1
:
SetTarget
(
c10173043
.
target
)
e1
:
SetValue
(
c10173043
.
efilter
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c10173043
.
target
(
e
,
c
)
local
g
,
te
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
,
CHAININFO_TRIGGERING_EFFECT
)
return
not
(
te
and
te
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
))
or
not
(
g
and
g
:
IsContains
(
c
))
end
function
c10173043
.
efilter
(
e
,
te
)
return
te
:
GetOwnerPlayer
()
~=
e
:
GetHandlerPlayer
()
end
expansions/script/c10173052.lua
0 → 100644
View file @
7c31031c
--喜剧小丑
function
c10173052
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
10173052
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
10173052
)
e1
:
SetTarget
(
c10173052
.
actg
)
e1
:
SetOperation
(
c10173052
.
acop
)
c
:
RegisterEffect
(
e1
)
--fusion
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
10173052
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
10173152
)
e3
:
SetTarget
(
c10173052
.
sptg
)
e3
:
SetOperation
(
c10173052
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c10173052
.
actg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
564
)
local
ac
=
Duel
.
AnnounceCard
(
tp
,
TYPE_MONSTER
)
Duel
.
SetTargetParam
(
ac
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ANNOUNCE
,
nil
,
0
,
tp
,
ANNOUNCE_CARD
)
end
function
c10173052
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ac
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PARAM
)
local
c
=
e
:
GetHandler
()
local
token
=
Duel
.
CreateToken
(
tp
,
ac
)
local
att
=
token
:
GetAttribute
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_ADD_FUSION_CODE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
+
LOCATION_GRAVE
+
LOCATION_HAND
,
0
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0xa332
))
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
ac
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CHANGE_FUSION_ATTRIBUTE
)
e2
:
SetValue
(
c10173052
.
fusval
)
e2
:
SetLabel
(
att
)
c
:
RegisterEffect
(
e2
)
end
function
c10173052
.
fusval
(
e
,
c
,
rp
)
if
c
:
GetAttribute
()
==
e
:
GetLabel
()
then
return
c
:
GetAttribute
()
else
return
c
:
GetAttribute
()
+
e
:
GetLabel
()
end
end
function
c10173052
.
filter0
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
end
function
c10173052
.
filter1
(
c
,
e
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c10173052
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
gc
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
gc
)
end
function
c10173052
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
local
mg1
=
Duel
.
GetMatchingGroup
(
c10173052
.
filter0
,
tp
,
LOCATION_GRAVE
,
0
,
c
)
local
res
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c10173052
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
c
)
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
(
c10173052
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
c
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c10173052
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsImmuneToEffect
(
e
)
then
return
end
local
mg1
=
Duel
.
GetMatchingGroup
(
c10173052
.
filter1
,
tp
,
LOCATION_GRAVE
,
0
,
c
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c10173052
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
c
)
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
(
c10173052
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
c
)
end
if
(
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
sg1
:
GetCount
()
>
0
)
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
c
)
tc
:
SetMaterial
(
mat1
)
Duel
.
Remove
(
mat1
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
c
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
expansions/script/c10173053.lua
0 → 100644
View file @
7c31031c
--喜剧小丑的副手
function
c10173053
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
10173053
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
10173053
)
e1
:
SetTarget
(
c10173053
.
sptg
)
e1
:
SetOperation
(
c10173053
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--return
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
10173053
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
10173153
)
e3
:
SetTarget
(
c10173053
.
thtg
)
e3
:
SetOperation
(
c10173053
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c10173053
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xa332
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c10173053
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c10173053
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c10173053
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10173053
.
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
c10173053
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
tp
)
end
function
c10173053
.
spfilter
(
c
,
e
,
tp
,
g
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
g
:
IsExists
(
c10173053
.
spfilter2
,
1
,
nil
,
c
,
chkf
,
e
:
GetHandler
())
end
function
c10173053
.
spfilter2
(
c
,
fusc
,
chkf
,
rc
)
return
fusc
:
CheckFusionMaterial
(
Group
.
FromCards
(
c
,
rc
),
c
,
chkf
)
end
function
c10173053
.
cfilter
(
c
,
tp
,
e
)
return
c
:
IsControler
(
tp
)
and
c
:
IsRelateToEffect
(
e
)
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c10173053
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
g
=
eg
:
Filter
(
Card
.
IsControler
,
nil
,
tp
)
if
g
:
GetCount
()
==
0
then
return
false
end
local
chkf
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
PLAYER_NONE
or
tp
local
res
=
Duel
.
IsExistingMatchingCard
(
c10173053
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
g
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c10173053
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
g
,
mf
,
chkf
)
end
end
return
res
end
local
g
=
eg
:
Filter
(
Card
.
IsControler
,
nil
,
tp
)
Duel
.
SetTargetCard
(
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c10173053
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
eg
:
Filter
(
c10173053
.
cfilter
,
nil
,
tp
,
e
)
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsImmuneToEffect
(
e
)
or
g
:
GetCount
()
<=
0
then
return
end
local
chkf
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
PLAYER_NONE
or
tp
local
sg1
=
Duel
.
GetMatchingGroup
(
c10173053
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
g
,
nil
,
chkf
)
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c10173053
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
g
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
ec
=
g
:
FilterSelect
(
tp
,
c10173053
.
spfilter2
,
1
,
1
,
nil
,
tc
,
chkf
,
c
):
GetFirst
()
local
mat1
=
Group
.
FromCards
(
c
,
ec
)
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
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
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat1
)
end
tc
:
CompleteProcedure
()
end
end
\ No newline at end of file
expansions/script/c10173054.lua
0 → 100644
View file @
7c31031c
--食腐骨犬
function
c10173054
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcCodeFun
(
c
,
10113017
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionAttribute
,
ATTRIBUTE_DARK
),
1
,
true
,
true
)
--Remove
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
10173054
,
0
))
e1
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_ATKCHANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x11e0
)
e1
:
SetTarget
(
c10173054
.
rmtg
)
e1
:
SetOperation
(
c10173054
.
rmop
)
c
:
RegisterEffect
(
e1
)
--SpecialSummon spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
10173054
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
,
10173054
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetCost
(
c10173054
.
spcost
)
e2
:
SetTarget
(
c10173054
.
sptg
)
e2
:
SetOperation
(
c10173054
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c10173054
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToRemoveAsCost
()
end
if
Duel
.
Remove
(
c
,
POS_FACEUP
,
REASON_COST
+
REASON_TEMPORARY
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetLabelObject
(
c
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
c10173054
.
retop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c10173054
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ReturnToField
(
e
:
GetLabelObject
())
end
function
c10173054
.
filter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
10113017
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c10173054
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c10173054
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c10173054
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c10173054
.
filter
),
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
10173054
,
2
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
g
:
GetFirst
():
RegisterEffect
(
e1
)
end
end
function
c10173054
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsChainAttackable
()
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
function
c10173054
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChainAttack
()
end
function
c10173054
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsAbleToRemove
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
c10173054
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
,
c
=
Duel
.
GetFirstTarget
(),
e
:
GetHandler
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
2000
)
c
:
RegisterEffect
(
e1
)
end
end
\ No newline at end of file
expansions/script/c13254076.lua
View file @
7c31031c
...
...
@@ -22,6 +22,10 @@ function c13254076.initial_effect(c)
local
e3
=
e2
:
Clone
()
e3
:
SetCondition
(
c13254076
.
drcon1
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e2
:
Clone
()
e4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e4
:
SetCondition
(
c13254076
.
drcon2
)
c
:
RegisterEffect
(
e4
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
...
...
@@ -38,6 +42,9 @@ end
function
c13254076
.
drcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
==
REASON_FUSION
end
function
c13254076
.
drcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
true
end
function
c13254076
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
...
...
expansions/script/c13254088.lua
View file @
7c31031c
...
...
@@ -43,6 +43,14 @@ function c13254088.initial_effect(c)
e10
:
SetRange
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
e10
:
SetValue
(
1
)
c
:
RegisterEffect
(
e10
)
local
e16
=
Effect
.
CreateEffect
(
c
)
e16
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e16
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e16
:
SetRange
(
LOCATION_MZONE
)
e16
:
SetCode
(
EVENT_ADJUST
)
e16
:
SetCondition
(
c13254088
.
anticon
)
e16
:
SetOperation
(
c13254088
.
anticopy
)
c
:
RegisterEffect
(
e16
)
end
function
c13254088
.
ffilter1
(
c
)
...
...
@@ -93,3 +101,23 @@ function c13254088.sprop(e,tp,eg,ep,ev,re,r,rp,c)
end
Duel
.
Release
(
sg
,
REASON_COST
)
end
function
c13254088
.
anticon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetControler
()
~=
c
:
GetOwner
()
end
function
c13254088
.
anticopy
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
p
=
c
:
GetControler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
c13254088
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
p
)
Duel
.
SendtoGrave
(
c
,
REASON_RULE
)
end
function
c13254088
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
expansions/script/c13254093.lua
View file @
7c31031c
...
...
@@ -48,6 +48,14 @@ function c13254093.initial_effect(c)
e10
:
SetRange
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
e10
:
SetValue
(
1
)
c
:
RegisterEffect
(
e10
)
local
e16
=
Effect
.
CreateEffect
(
c
)
e16
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e16
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e16
:
SetRange
(
LOCATION_MZONE
)
e16
:
SetCode
(
EVENT_ADJUST
)
e16
:
SetCondition
(
c13254093
.
anticon
)
e16
:
SetOperation
(
c13254093
.
anticopy
)
c
:
RegisterEffect
(
e16
)
end
function
c13254093
.
ffilter1
(
c
)
...
...
@@ -98,3 +106,23 @@ function c13254093.sprop(e,tp,eg,ep,ev,re,r,rp,c)
end
Duel
.
Release
(
sg
,
REASON_COST
)
end
function
c13254093
.
anticon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetControler
()
~=
c
:
GetOwner
()
end
function
c13254093
.
anticopy
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
p
=
c
:
GetControler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
c13254093
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
p
)
Duel
.
SendtoGrave
(
c
,
REASON_RULE
)
end
function
c13254093
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
expansions/script/c13254096.lua
View file @
7c31031c
...
...
@@ -44,6 +44,14 @@ function c13254096.initial_effect(c)
local
e15
=
e13
:
Clone
()
e15
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
c
:
RegisterEffect
(
e15
)
local
e16
=
Effect
.
CreateEffect
(
c
)
e16
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e16
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e16
:
SetRange
(
LOCATION_MZONE
)
e16
:
SetCode
(
EVENT_ADJUST
)
e16
:
SetCondition
(
c13254096
.
anticon
)
e16
:
SetOperation
(
c13254096
.
anticopy
)
c
:
RegisterEffect
(
e16
)
end
function
c13254096
.
ffilter1
(
c
)
...
...
@@ -94,3 +102,23 @@ function c13254096.sprop(e,tp,eg,ep,ev,re,r,rp,c)
end
Duel
.
Release
(
sg
,
REASON_COST
)
end
function
c13254096
.
anticon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetControler
()
~=
c
:
GetOwner
()
end
function
c13254096
.
anticopy
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
p
=
c
:
GetControler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
c13254096
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
p
)
Duel
.
SendtoGrave
(
c
,
REASON_RULE
)
end
function
c13254096
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
expansions/script/c13254098.lua
View file @
7c31031c
...
...
@@ -46,6 +46,14 @@ function c13254098.initial_effect(c)
local
e15
=
e13
:
Clone
()
e15
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
c
:
RegisterEffect
(
e15
)
local
e16
=
Effect
.
CreateEffect
(
c
)
e16
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e16
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e16
:
SetRange
(
LOCATION_MZONE
)
e16
:
SetCode
(
EVENT_ADJUST
)
e16
:
SetCondition
(
c13254098
.
anticon
)
e16
:
SetOperation
(
c13254098
.
anticopy
)
c
:
RegisterEffect
(
e16
)
end
function
c13254098
.
ffilter1
(
c
)
...
...
@@ -107,3 +115,23 @@ function c13254098.activate(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
function
c13254098
.
anticon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetControler
()
~=
c
:
GetOwner
()
end
function
c13254098
.
anticopy
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
p
=
c
:
GetControler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
c13254098
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
p
)
Duel
.
SendtoGrave
(
c
,
REASON_RULE
)
end
function
c13254098
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
expansions/script/c13254102.lua
View file @
7c31031c
...
...
@@ -47,6 +47,14 @@ function c13254102.initial_effect(c)
local
e15
=
e13
:
Clone
()
e15
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
c
:
RegisterEffect
(
e15
)
local
e16
=
Effect
.
CreateEffect
(
c
)
e16
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e16
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e16
:
SetRange
(
LOCATION_MZONE
)
e16
:
SetCode
(
EVENT_ADJUST
)
e16
:
SetCondition
(
c13254102
.
anticon
)
e16
:
SetOperation
(
c13254102
.
anticopy
)
c
:
RegisterEffect
(
e16
)
end
function
c13254102
.
ffilter1
(
c
)
...
...
@@ -130,3 +138,23 @@ function c13254102.operation(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e3
)
end
end
function
c13254102
.
anticon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetControler
()
~=
c
:
GetOwner
()
end
function
c13254102
.
anticopy
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
p
=
c
:
GetControler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
c13254102
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
p
)
Duel
.
SendtoGrave
(
c
,
REASON_RULE
)
end
function
c13254102
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
expansions/script/c13254103.lua
View file @
7c31031c
...
...
@@ -44,6 +44,14 @@ function c13254103.initial_effect(c)
local
e15
=
e13
:
Clone
()
e15
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
c
:
RegisterEffect
(
e15
)
local
e16
=
Effect
.
CreateEffect
(
c
)
e16
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e16
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e16
:
SetRange
(
LOCATION_MZONE
)
e16
:
SetCode
(
EVENT_ADJUST
)
e16
:
SetCondition
(
c13254103
.
anticon
)
e16
:
SetOperation
(
c13254103
.
anticopy
)
c
:
RegisterEffect
(
e16
)
end
function
c13254103
.
ffilter1
(
c
)
...
...
@@ -97,3 +105,23 @@ end
function
c13254103
.
chainop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
function
c13254103
.
anticon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetControler
()
~=
c
:
GetOwner
()
end
function
c13254103
.
anticopy
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
p
=
c
:
GetControler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
c13254103
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
p
)
Duel
.
SendtoGrave
(
c
,
REASON_RULE
)
end
function
c13254103
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
expansions/script/c13254104.lua
View file @
7c31031c
...
...
@@ -48,6 +48,14 @@ function c13254104.initial_effect(c)
local
e15
=
e13
:
Clone
()
e15
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
c
:
RegisterEffect
(
e15
)
local
e16
=
Effect
.
CreateEffect
(
c
)
e16
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e16
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e16
:
SetRange
(
LOCATION_MZONE
)
e16
:
SetCode
(
EVENT_ADJUST
)
e16
:
SetCondition
(
c13254104
.
anticon
)
e16
:
SetOperation
(
c13254104
.
anticopy
)
c
:
RegisterEffect
(
e16
)
end
function
c13254104
.
ffilter1
(
c
)
...
...
@@ -98,3 +106,23 @@ function c13254104.sprop(e,tp,eg,ep,ev,re,r,rp,c)
end
Duel
.
Release
(
sg
,
REASON_COST
)
end
function
c13254104
.
anticon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetControler
()
~=
c
:
GetOwner
()
end
function
c13254104
.
anticopy
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
p
=
c
:
GetControler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
c13254104
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
p
)
Duel
.
SendtoGrave
(
c
,
REASON_RULE
)
end
function
c13254104
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
expansions/script/c13254105.lua
View file @
7c31031c
...
...
@@ -46,6 +46,14 @@ function c13254105.initial_effect(c)
local
e15
=
e13
:
Clone
()
e15
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
c
:
RegisterEffect
(
e15
)
local
e16
=
Effect
.
CreateEffect
(
c
)
e16
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e16
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e16
:
SetRange
(
LOCATION_MZONE
)
e16
:
SetCode
(
EVENT_ADJUST
)
e16
:
SetCondition
(
c13254105
.
anticon
)
e16
:
SetOperation
(
c13254105
.
anticopy
)
c
:
RegisterEffect
(
e16
)
end
function
c13254105
.
ffilter1
(
c
)
...
...
@@ -112,3 +120,23 @@ function c13254105.spop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SpecialSummon
(
tc
,
0
,
p
,
p
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
end
end
function
c13254105
.
anticon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetControler
()
~=
c
:
GetOwner
()
end
function
c13254105
.
anticopy
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
p
=
c
:
GetControler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
c13254105
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
p
)
Duel
.
SendtoGrave
(
c
,
REASON_RULE
)
end
function
c13254105
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
expansions/script/c13257330.lua
View file @
7c31031c
...
...
@@ -24,10 +24,12 @@ function c13257330.initial_effect(c)
e2
:
SetValue
(
500
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
132573
29
,
0
))
e3
:
SetDescription
(
aux
.
Stringid
(
132573
30
,
0
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_
IGNITION
)
e3
:
SetType
(
EFFECT_TYPE_
QUICK_O
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetHintTiming
(
0
,
TIMING_EQUIP
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c13257330
.
econ
)
e3
:
SetTarget
(
c13257330
.
destg
)
...
...
@@ -39,7 +41,7 @@ function c13257330.eqlimit(e,c)
return
not
c
:
GetEquipGroup
():
IsExists
(
Card
.
IsSetCard
,
1
,
e
:
GetHandler
(),
0x6352
)
end
function
c13257330
.
econ
(
e
)
return
e
:
GetHandler
():
GetEquipTarget
()
return
e
:
GetHandler
():
GetEquipTarget
()
and
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
end
function
c13257330
.
efilter
(
e
,
re
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetOwnerPlayer
()
...
...
expansions/script/c13257331.lua
0 → 100644
View file @
7c31031c
--超时空武装 装甲-任意盾
function
c13257331
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--equip limit
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e11
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e11
:
SetValue
(
c13257331
.
eqlimit
)
c
:
RegisterEffect
(
e11
)
--immune
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetType
(
EFFECT_TYPE_SINGLE
)
e12
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e12
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e12
:
SetRange
(
LOCATION_SZONE
)
e12
:
SetCondition
(
c13257331
.
econ
)
e12
:
SetValue
(
c13257331
.
efilter
)
c
:
RegisterEffect
(
e12
)
--def up
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
500
)
c
:
RegisterEffect
(
e2
)
--destroy sub
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetCode
(
EFFECT_DESTROY_SUBSTITUTE
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
--immune
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e4
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e4
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e4
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e4
)
end
function
c13257331
.
eqlimit
(
e
,
c
)
return
not
c
:
GetEquipGroup
():
IsExists
(
Card
.
IsSetCard
,
1
,
e
:
GetHandler
(),
0x5352
)
end
function
c13257331
.
econ
(
e
)
return
e
:
GetHandler
():
GetEquipTarget
()
end
function
c13257331
.
efilter
(
e
,
re
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
function
c13257331
.
efilter1
(
e
,
te
)
return
te
:
GetOwnerPlayer
()
~=
e
:
GetHandlerPlayer
()
and
not
te
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
end
expansions/script/c2170701.lua
View file @
7c31031c
...
...
@@ -9,9 +9,6 @@ function c2170701.initial_effect(c)
e2
:
SetTarget
(
c2170701
.
shtg
)
e2
:
SetOperation
(
c2170701
.
shop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
2170701
,
1
))
...
...
@@ -43,12 +40,12 @@ function c2170701.cfilter(c)
return
c
:
IsSetCard
(
0x211
)
and
c
:
IsDiscardable
()
end
function
c2170701
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_
MZONE
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_
ONFIELD
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c2170701
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
DiscardHand
(
tp
,
c2170701
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_
MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_
ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g2
,
1
,
0
,
0
)
end
function
c2170701
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
expansions/script/c2170703.lua
View file @
7c31031c
...
...
@@ -2,55 +2,62 @@
function
c2170703
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_
SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_
TOHAND
+
CATEGORY_RECOVER
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
2170703
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c2170703
.
target
)
e1
:
SetCondition
(
c2170703
.
sdcon
)
e1
:
SetTarget
(
c2170703
.
rectg
)
e1
:
SetOperation
(
c2170703
.
activate
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
2170703
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCost
(
c2170703
.
thcost
)
e2
:
SetTarget
(
c2170703
.
thtg
)
e2
:
SetOperation
(
c2170703
.
thop
)
c
:
RegisterEffect
(
e2
)
--
local e2=Effect.CreateEffect(c)
--
e2:SetDescription(aux.Stringid(2170703,1))
--
e2:SetCategory(CATEGORY_TOHAND)
--
e2:SetType(EFFECT_TYPE_IGNITION)
--
e2:SetRange(LOCATION_GRAVE)
--
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
--
e2:SetCost(c2170703.thcost)
--
e2:SetTarget(c2170703.thtg)
--
e2:SetOperation(c2170703.thop)
--
c:RegisterEffect(e2)
end
function
c2170703
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
2170798
,
0x211
,
0x4011
,
1600
,
1000
,
4
,
RACE_SPELLCASTER
,
ATTRIBUTE_WATER
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
function
c2170703
.
filter
(
c
)
return
c
:
IsSetCard
(
0x211
)
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_SPELL
)
end
function
c2170703
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
2170798
,
0
,
0x4011
,
1600
,
1000
,
4
,
RACE_SPELLCASTER
,
ATTRIBUTE_WATER
)
end
local
token
=
Duel
.
CreateToken
(
tp
,
2170798
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
function
c2170703
.
sdcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c2170704
.
sdfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_SZONE
,
0
,
1
,
e
:
GetHandler
())
end
function
c2170703
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
function
c2170703
.
rectg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
q
=
Duel
.
GetMatchingGroupCount
(
c2170703
.
filter
,
e
:
GetHandler
():
GetControler
(),
LOCATION_SZONE
,
0
,
nil
)
*
500
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
q
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
q
)
end
function
c2170703
.
filter
(
c
)
return
c
:
IsSetCard
(
0x211
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
end
function
c2170703
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_REMOVED
)
and
c2170703
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c2170703
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c2170703
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
function
c2170703
.
activate
(
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
)
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
function
c2170703
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
\ No newline at end of file
--function c2170703.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
--if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
--Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
--end
--function c2170703.filter(c)
--return c:IsSetCard(0x211) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
--end
--function c2170703.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
--if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c2170703.filter(chkc) end
--if chk==0 then return Duel.IsExistingTarget(c2170703.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
--Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
--local g=Duel.SelectTarget(tp,c2170703.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
--Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
--end
--function c2170703.thop(e,tp,eg,ep,ev,re,r,rp)
--local tc=Duel.GetFirstTarget()
--if tc:IsRelateToEffect(e) then
--Duel.SendtoHand(tc,nil,REASON_EFFECT)
--end
--end
\ No newline at end of file
expansions/script/c2170704.lua
View file @
7c31031c
...
...
@@ -6,6 +6,7 @@ function c2170704.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
2170704
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c2170704
.
cost
)
e1
:
SetTarget
(
c2170704
.
target
)
e1
:
SetOperation
(
c2170704
.
activate
)
c
:
RegisterEffect
(
e1
)
...
...
@@ -22,6 +23,13 @@ function c2170704.initial_effect(c)
e2
:
SetOperation
(
c2170704
.
activate1
)
c
:
RegisterEffect
(
e2
)
end
function
c2170704
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c2170704
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c2170704
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
end
function
c2170704
.
filter
(
c
)
return
c
:
IsSetCard
(
0x211
)
and
c
:
IsAbleToHand
()
and
c
:
IsType
(
TYPE_SPELL
)
end
...
...
expansions/script/c2170706.lua
View file @
7c31031c
...
...
@@ -7,16 +7,15 @@ function c2170706.initial_effect(c)
e1
:
SetCountLimit
(
1
,
2170706
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetOperation
(
c2170706
.
activate
)
c
:
RegisterEffect
(
e1
)
--cannot remove
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_REMOVE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c2170706
.
sdcon
)
e2
:
SetTarget
(
c2170706
.
rmtarget
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
1
,
1
)
c
:
RegisterEffect
(
e2
)
--atk down
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e3
:
SetCondition
(
c2170706
.
sdcon
)
e3
:
SetValue
(
-
300
)
c
:
RegisterEffect
(
e3
)
end
function
c2170706
.
filter
(
c
)
return
c
:
IsCode
(
2170701
)
and
c
:
IsAbleToHand
()
...
...
expansions/script/c2170709.lua
View file @
7c31031c
...
...
@@ -17,6 +17,13 @@ function c2170709.initial_effect(c)
e3
:
SetTarget
(
c2170709
.
target
)
e3
:
SetOperation
(
c2170709
.
operation
)
c
:
RegisterEffect
(
e3
)
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
FALSE
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
2170709
,
1
))
...
...
expansions/script/c2170710.lua
View file @
7c31031c
...
...
@@ -11,13 +11,18 @@ function c2170710.initial_effect(c)
e1
:
SetDescription
(
aux
.
Stringid
(
2170710
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_
QUICK_O
)
e1
:
SetType
(
EFFECT_TYPE_
IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
21707121
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x1e0
)
e1
:
SetTarget
(
c2170710
.
destg
)
e1
:
SetOperation
(
c2170710
.
desop
)
e1
:
SetCountLimit
(
1
,
21707101
)
e1
:
SetTarget
(
c2170710
.
thtg
)
e1
:
SetOperation
(
c2170710
.
thop
)
c
:
RegisterEffect
(
e1
)
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
FALSE
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -72,25 +77,37 @@ function c2170710.penop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c2170710
.
filter
(
c
)
return
c
:
IsSetCard
(
0x211
)
and
c
:
Is
Type
(
TYPE_SPELL
)
and
c
:
Is
AbleToHand
()
return
c
:
IsSetCard
(
0x211
)
and
c
:
IsAbleToHand
()
end
function
c2170710
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c2170710
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c2170710
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
function
c2170710
.
thfilter
(
c
)
return
c
:
IsAbleToHand
()
end
function
c2170710
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
(
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
c2170710
.
thfilter
(
chkc
))
or
(
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c2170710
.
filter
(
chkc
))
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c2170710
.
thfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsExistingTarget
(
c2170710
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
local
b1
=
Duel
.
IsExistingTarget
(
c2170710
.
thfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
local
b2
=
Duel
.
IsExistingTarget
(
c2170710
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
local
op
=
0
if
b1
and
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
2170710
,
2
),
aux
.
Stringid
(
2170710
,
1
))
elseif
b1
and
not
b2
then
op
=
0
elseif
b2
and
not
b1
then
op
=
1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
g1
:
Merge
(
g2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g1
,
2
,
0
,
0
)
local
g
=
nil
if
op
==
0
then
g
=
Duel
.
SelectTarget
(
tp
,
c2170710
.
thfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
elseif
op
==
1
then
g
=
Duel
.
SelectTarget
(
tp
,
c2170710
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c2170710
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
tg
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
function
c2170710
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
BreakEffect
()
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
...
...
expansions/script/c2170711.lua
View file @
7c31031c
...
...
@@ -16,6 +16,13 @@ function c2170711.initial_effect(c)
e3
:
SetTarget
(
c2170711
.
target
)
e3
:
SetOperation
(
c2170711
.
operation
)
c
:
RegisterEffect
(
e3
)
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
FALSE
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
2170711
,
1
))
...
...
expansions/script/c2170712.lua
View file @
7c31031c
...
...
@@ -17,6 +17,13 @@ function c2170712.initial_effect(c)
e3
:
SetTarget
(
c2170712
.
target
)
e3
:
SetOperation
(
c2170712
.
operation
)
c
:
RegisterEffect
(
e3
)
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
FALSE
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
2170712
,
1
))
...
...
@@ -77,16 +84,38 @@ end
function
c2170712
.
filter
(
c
)
return
c
:
IsSetCard
(
0x211
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsDiscardable
()
end
function
c2170712
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
function
c2170712
.
tgfilter
(
c
,
e
)
return
c
:
IsCanBeEffectTarget
(
e
)
end
function
c2170712
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
if
chkc
then
return
chkc
:
IsOnField
()
end
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
local
rg
=
Duel
.
GetReleaseGroup
(
tp
)
local
dg
=
Duel
.
GetMatchingGroup
(
c2170712
.
tgfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
e
:
GetHandler
(),
e
)
local
res
=
rg
:
IsExists
(
c2170712
.
costfilter
,
1
,
e
:
GetHandler
(),
e
,
dg
)
return
res
else
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
2
,
e
:
GetHandler
())
end
end
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
local
rg
=
Duel
.
GetReleaseGroup
(
tp
)
local
dg
=
Duel
.
GetMatchingGroup
(
c2170712
.
tgfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
e
:
GetHandler
(),
e
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
sg
=
rg
:
FilterSelect
(
tp
,
c2170712
.
costfilter
,
1
,
1
,
e
:
GetHandler
(),
e
,
dg
)
Duel
.
Release
(
sg
,
REASON_COST
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
2
,
2
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c2170712
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
D
raw
(
p
,
d
,
REASON_EFFECT
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
D
estroy
(
sg
,
REASON_EFFECT
)
Duel
.
BreakEffect
()
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c2170713.lua
View file @
7c31031c
...
...
@@ -18,6 +18,13 @@ function c2170713.initial_effect(c)
e1
:
SetTarget
(
c2170713
.
target
)
e1
:
SetOperation
(
c2170713
.
operation
)
c
:
RegisterEffect
(
e1
)
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
FALSE
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
2170713
,
1
))
...
...
expansions/script/c2170714.lua
0 → 100644
View file @
7c31031c
--七曜-日水符『氢化日珥』
function
c2170714
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
,
false
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x211
),
1
)
c
:
EnableReviveLimit
()
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
2170714
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
21707141
)
e1
:
SetTarget
(
c2170714
.
target
)
e1
:
SetOperation
(
c2170714
.
operation
)
c
:
RegisterEffect
(
e1
)
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
FALSE
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
2170714
,
1
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_EXTRA
)
e2
:
SetCountLimit
(
1
,
2170714
)
e2
:
SetCondition
(
c2170714
.
condition
)
e2
:
SetTarget
(
c2170714
.
pentg
)
e2
:
SetOperation
(
c2170714
.
penop
)
c
:
RegisterEffect
(
e2
)
if
not
c2170714
.
global_check
then
c2170714
.
global_check
=
true
c2170714
[
0
]
=
0
c2170714
[
1
]
=
0
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_CHAINING
)
ge1
:
SetOperation
(
c2170714
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge2
:
SetOperation
(
c2170714
.
clear
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
function
c2170714
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
if
tc
:
IsCode
(
2170703
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
c2170714
[
tc
:
GetControler
()]
=
c2170714
[
tc
:
GetControler
()]
+
1
end
if
tc
:
IsCode
(
2170704
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
c2170714
[
tc
:
GetControler
()]
=
c2170714
[
tc
:
GetControler
()]
+
1
end
end
function
c2170714
.
clear
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c2170714
[
0
]
=
0
c2170714
[
1
]
=
0
end
function
c2170714
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c2170714
[
e
:
GetHandler
():
GetControler
()]
>=
2
end
function
c2170714
.
pentg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
end
end
function
c2170714
.
penop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
and
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
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
function
c2170714
.
filter
(
c
)
return
c
:
IsFaceup
()
end
function
c2170714
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
2170798
,
0
,
0x4011
,
1600
,
1000
,
4
,
RACE_SPELLCASTER
,
ATTRIBUTE_WATER
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c2170714
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
2170798
,
0
,
0x4011
,
1600
,
1000
,
4
,
RACE_SPELLCASTER
,
ATTRIBUTE_WATER
)
end
local
token
=
Duel
.
CreateToken
(
tp
,
2170798
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
BreakEffect
()
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
\ No newline at end of file
expansions/strings.conf
View file @
7c31031c
...
...
@@ -52,6 +52,8 @@
!
setname
0
xc330
秋语
!
setname
0
x9330
圣谕
!
setname
0
x5338
自由斗士
!
setname
0
xa332
喜剧小丑
!
setname
0
xa338
暴怒兽
#樱幕 111
...
...
lflist.conf
View file @
7c31031c
...
...
@@ -25,7 +25,7 @@
02100008
1
--银屑照魂 梨涅莎
02100003
1
--圣辉的银屑 阿卡蒂亚
02177800
0
--融水圣灵
02170710
0
--
七曜-土水符『诺亚的大洪水』
#
七曜-土水符『诺亚的大洪水』
02170709
0
--七曜-『贤者之石』
#52
05200010
0
--圣精灵 格奥基乌斯
...
...
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