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
ae0a427e
Commit
ae0a427e
authored
Oct 07, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push by Appveyor
parent
ce1bb7ff
Changes
97
Show whitespace changes
Inline
Side-by-side
Showing
97 changed files
with
9017 additions
and
336 deletions
+9017
-336
cards.cdb
cards.cdb
+0
-0
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c1000600.lua
expansions/script/c1000600.lua
+116
-0
expansions/script/c1000601.lua
expansions/script/c1000601.lua
+159
-0
expansions/script/c1000602.lua
expansions/script/c1000602.lua
+105
-0
expansions/script/c1000603.lua
expansions/script/c1000603.lua
+145
-0
expansions/script/c1000604.lua
expansions/script/c1000604.lua
+98
-0
expansions/script/c1000605.lua
expansions/script/c1000605.lua
+132
-0
expansions/script/c1000606.lua
expansions/script/c1000606.lua
+109
-0
expansions/script/c1000607.lua
expansions/script/c1000607.lua
+138
-0
expansions/script/c1000608.lua
expansions/script/c1000608.lua
+68
-0
expansions/script/c1000609.lua
expansions/script/c1000609.lua
+92
-0
expansions/script/c1000610.lua
expansions/script/c1000610.lua
+126
-0
expansions/script/c1000611.lua
expansions/script/c1000611.lua
+121
-0
expansions/script/c1000612.lua
expansions/script/c1000612.lua
+110
-0
expansions/script/c1000613.lua
expansions/script/c1000613.lua
+123
-0
expansions/script/c1000614.lua
expansions/script/c1000614.lua
+131
-0
expansions/script/c1000615.lua
expansions/script/c1000615.lua
+74
-0
expansions/script/c1000617.lua
expansions/script/c1000617.lua
+289
-0
expansions/script/c1000618.lua
expansions/script/c1000618.lua
+187
-0
expansions/script/c1000619.lua
expansions/script/c1000619.lua
+157
-0
expansions/script/c1000620.lua
expansions/script/c1000620.lua
+72
-0
expansions/script/c1000621.lua
expansions/script/c1000621.lua
+57
-0
expansions/script/c1000622.lua
expansions/script/c1000622.lua
+77
-0
expansions/script/c1000623.lua
expansions/script/c1000623.lua
+102
-0
expansions/script/c1000624.lua
expansions/script/c1000624.lua
+85
-0
expansions/script/c1000625.lua
expansions/script/c1000625.lua
+60
-0
expansions/script/c1000626.lua
expansions/script/c1000626.lua
+156
-0
expansions/script/c12001000.lua
expansions/script/c12001000.lua
+68
-0
expansions/script/c12001001.lua
expansions/script/c12001001.lua
+81
-0
expansions/script/c12001002.lua
expansions/script/c12001002.lua
+77
-0
expansions/script/c12001003.lua
expansions/script/c12001003.lua
+74
-0
expansions/script/c12001004.lua
expansions/script/c12001004.lua
+65
-0
expansions/script/c12001005.lua
expansions/script/c12001005.lua
+78
-0
expansions/script/c12001006.lua
expansions/script/c12001006.lua
+69
-0
expansions/script/c12001007.lua
expansions/script/c12001007.lua
+62
-0
expansions/script/c12001008.lua
expansions/script/c12001008.lua
+80
-0
expansions/script/c12001009.lua
expansions/script/c12001009.lua
+58
-0
expansions/script/c12001010.lua
expansions/script/c12001010.lua
+74
-0
expansions/script/c12001011.lua
expansions/script/c12001011.lua
+59
-0
expansions/script/c12001012.lua
expansions/script/c12001012.lua
+58
-0
expansions/script/c12001013.lua
expansions/script/c12001013.lua
+67
-0
expansions/script/c12001015.lua
expansions/script/c12001015.lua
+112
-0
expansions/script/c12001016.lua
expansions/script/c12001016.lua
+4
-0
expansions/script/c12001021.lua
expansions/script/c12001021.lua
+56
-0
expansions/script/c12001022.lua
expansions/script/c12001022.lua
+103
-0
expansions/script/c12001023.lua
expansions/script/c12001023.lua
+198
-0
expansions/script/c12001024.lua
expansions/script/c12001024.lua
+88
-0
expansions/script/c12001025.lua
expansions/script/c12001025.lua
+58
-0
expansions/script/c13257215.lua
expansions/script/c13257215.lua
+1
-1
expansions/script/c13257219.lua
expansions/script/c13257219.lua
+5
-1
expansions/script/c13257225.lua
expansions/script/c13257225.lua
+124
-0
expansions/script/c13257226.lua
expansions/script/c13257226.lua
+164
-0
expansions/script/c13257308.lua
expansions/script/c13257308.lua
+2
-0
expansions/script/c13257332.lua
expansions/script/c13257332.lua
+168
-0
expansions/script/c13257333.lua
expansions/script/c13257333.lua
+142
-0
expansions/script/c17060907.lua
expansions/script/c17060907.lua
+36
-0
expansions/script/c17060908.lua
expansions/script/c17060908.lua
+74
-0
expansions/script/c22240123.lua
expansions/script/c22240123.lua
+179
-0
expansions/script/c46564050.lua
expansions/script/c46564050.lua
+73
-0
expansions/script/c46564051.lua
expansions/script/c46564051.lua
+82
-0
expansions/script/c46564052.lua
expansions/script/c46564052.lua
+83
-0
expansions/script/c46564053.lua
expansions/script/c46564053.lua
+95
-0
expansions/script/c46564056.lua
expansions/script/c46564056.lua
+64
-0
expansions/script/c46564057.lua
expansions/script/c46564057.lua
+90
-0
expansions/script/c46564059.lua
expansions/script/c46564059.lua
+116
-0
expansions/script/c46564060.lua
expansions/script/c46564060.lua
+92
-0
expansions/script/c46564061.lua
expansions/script/c46564061.lua
+97
-0
expansions/script/c50000054.lua
expansions/script/c50000054.lua
+93
-93
expansions/script/c50000056.lua
expansions/script/c50000056.lua
+41
-41
expansions/script/c50000057.lua
expansions/script/c50000057.lua
+102
-30
expansions/script/c50000066.lua
expansions/script/c50000066.lua
+90
-60
expansions/script/c50000069.lua
expansions/script/c50000069.lua
+105
-61
expansions/script/c50000073.lua
expansions/script/c50000073.lua
+113
-0
expansions/script/c50000074.lua
expansions/script/c50000074.lua
+90
-0
expansions/script/c50000210.lua
expansions/script/c50000210.lua
+82
-0
expansions/script/c50000504.lua
expansions/script/c50000504.lua
+64
-44
expansions/script/c50000505.lua
expansions/script/c50000505.lua
+3
-3
expansions/script/c50000511.lua
expansions/script/c50000511.lua
+33
-1
expansions/script/c50008880.lua
expansions/script/c50008880.lua
+103
-0
expansions/script/c50008881.lua
expansions/script/c50008881.lua
+70
-0
expansions/script/c50008882.lua
expansions/script/c50008882.lua
+114
-0
expansions/script/c50008883.lua
expansions/script/c50008883.lua
+94
-0
expansions/script/c50008884.lua
expansions/script/c50008884.lua
+126
-0
expansions/script/c50008885.lua
expansions/script/c50008885.lua
+107
-0
expansions/script/c50008886.lua
expansions/script/c50008886.lua
+110
-0
expansions/script/c50008887.lua
expansions/script/c50008887.lua
+62
-0
expansions/script/c50008888.lua
expansions/script/c50008888.lua
+86
-0
expansions/script/c50008889.lua
expansions/script/c50008889.lua
+84
-0
expansions/script/c50008890.lua
expansions/script/c50008890.lua
+146
-0
expansions/script/c50008891.lua
expansions/script/c50008891.lua
+132
-0
expansions/script/c50008892.lua
expansions/script/c50008892.lua
+141
-0
expansions/script/c50008893.lua
expansions/script/c50008893.lua
+103
-0
expansions/script/c50008894.lua
expansions/script/c50008894.lua
+93
-0
expansions/script/c50008895.lua
expansions/script/c50008895.lua
+121
-0
expansions/script/c50008896.lua
expansions/script/c50008896.lua
+140
-0
expansions/strings.conf
expansions/strings.conf
+4
-1
No files found.
cards.cdb
View file @
ae0a427e
No preview for this file type
expansions/222DIY.cdb
View file @
ae0a427e
No preview for this file type
expansions/script/c1000600.lua
0 → 100644
View file @
ae0a427e
--圆环的使徒 晓美焰
function
c1000600
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000600
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
1000600
)
e1
:
SetTarget
(
c1000600
.
sptg2
)
e1
:
SetOperation
(
c1000600
.
spop2
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--atk/lv up
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000600
,
1
))
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
10006000
)
e2
:
SetCondition
(
c1000600
.
con2
)
e2
:
SetOperation
(
c1000600
.
operation
)
c
:
RegisterEffect
(
e2
)
--direct atk
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e6
:
SetCondition
(
c1000600
.
con3
)
c
:
RegisterEffect
(
e6
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000600
,
2
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
10006000
)
e2
:
SetCondition
(
c1000600
.
con
)
e2
:
SetCost
(
c1000600
.
thcost
)
e2
:
SetTarget
(
c1000600
.
thtg
)
e2
:
SetOperation
(
c1000600
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c1000600
.
filter
(
c
,
e
,
tp
)
return
((
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsSetCard
(
0xc204
))
or
c
:
IsSetCard
(
0x5b23
))
and
not
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1000600
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1000600
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c1000600
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1000600
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c1000600
.
filter9
(
c
,
e
,
tp
)
return
(
c
:
IsSetCard
(
0xc204
)
or
c
:
IsSetCard
(
0x5b23
))
and
c
:
IsControler
(
tp
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000600
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000600
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
6
end
function
c1000600
.
thcost
(
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
c1000600
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x5b23
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
c1000600
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000600
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c1000600
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1000600
.
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
c1000600
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000600
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
3
end
function
c1000600
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
e1
:
SetValue
(
800
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e2
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
e2
:
SetValue
(
2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c1000600
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000600
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
9
end
\ No newline at end of file
expansions/script/c1000601.lua
0 → 100644
View file @
ae0a427e
--苏生的福音 鹿目圆香
function
c1000601
.
initial_effect
(
c
)
--special summon1
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c1000601
.
spcon
)
c
:
RegisterEffect
(
e1
)
--summon success
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000601
,
2
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
1000601
)
e1
:
SetCondition
(
c1000601
.
con
)
e1
:
SetTarget
(
c1000601
.
sptg
)
e1
:
SetOperation
(
c1000601
.
spop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000601
,
3
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
1000601
)
e1
:
SetCondition
(
c1000601
.
con2
)
e1
:
SetCost
(
c1000601
.
spcost
)
e1
:
SetTarget
(
c1000601
.
sptg1
)
e1
:
SetOperation
(
c1000601
.
spop1
)
c
:
RegisterEffect
(
e1
)
--atk/lv up
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000609
,
1
))
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c1000601
.
con3
)
e2
:
SetOperation
(
c1000601
.
operation
)
c
:
RegisterEffect
(
e2
)
end
function
c1000601
.
filter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_TUNER
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000601
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1000601
.
filter1
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c1000601
.
filter9
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000601
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000601
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
6
end
function
c1000601
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000601
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c1000601
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c1000601
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1000601
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c1000601
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c1000601
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000601
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
3
end
function
c1000601
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
e1
:
SetValue
(
700
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e2
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
end
end
function
c1000601
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000601
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
9
end
function
c1000601
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c1000601
.
filter2
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000601
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1000601
.
filter2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
2
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c1000601
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
2
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c1000601
.
filter2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>=
2
then
local
fid
=
e
:
GetHandler
():
GetFieldID
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
2
,
2
,
nil
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
tc
=
sg
:
GetFirst
()
tc
:
RegisterFlagEffect
(
1000601
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
,
fid
)
tc
=
sg
:
GetNext
()
tc
:
RegisterFlagEffect
(
1000601
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
,
fid
)
sg
:
KeepAlive
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetLabel
(
fid
)
e1
:
SetLabelObject
(
sg
)
e1
:
SetCondition
(
c1000601
.
descon
)
e1
:
SetOperation
(
c1000601
.
desop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c1000601
.
desfilter
(
c
,
fid
)
return
c
:
GetFlagEffectLabel
(
1000601
)
==
fid
end
function
c1000601
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
e
:
GetLabelObject
()
if
not
g
:
IsExists
(
c1000601
.
desfilter
,
1
,
nil
,
e
:
GetLabel
())
then
g
:
DeleteGroup
()
e
:
Reset
()
return
false
else
return
true
end
end
function
c1000601
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
e
:
GetLabelObject
()
local
tg
=
g
:
Filter
(
c1000601
.
desfilter
,
nil
,
e
:
GetLabel
())
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
end
expansions/script/c1000602.lua
0 → 100644
View file @
ae0a427e
--平凡的学生 鹿目圆香
function
c1000602
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000602
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
,
1000621
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c1000602
.
spcost
)
e1
:
SetTarget
(
c1000602
.
sptg
)
e1
:
SetOperation
(
c1000602
.
spop
)
c
:
RegisterEffect
(
e1
)
Duel
.
AddCustomActivityCounter
(
1000602
,
ACTIVITY_SPSUMMON
,
c1000602
.
counterfilter
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
1000602
)
e2
:
SetCondition
(
c1000602
.
con
)
e2
:
SetCost
(
c1000602
.
cost
)
e2
:
SetTarget
(
c1000602
.
tg
)
e2
:
SetOperation
(
c1000602
.
op
)
c
:
RegisterEffect
(
e2
)
if
not
NitoriGlobal
then
NitoriGlobal
=
{}
NitoriGlobal
[
"Effects"
]
=
{}
end
NitoriGlobal
[
"Effects"
][
"c1000602"
]
=
e2
Duel
.
AddCustomActivityCounter
(
1000602
,
ACTIVITY_SPSUMMON
,
c1000602
.
counterfilter
)
end
function
c1000602
.
counterfilter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000602
.
costfilter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsDiscardable
()
end
function
c1000602
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000602
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
GetCustomActivityCount
(
1000602
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
Duel
.
DiscardHand
(
tp
,
c1000602
.
costfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c1000602
.
splimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c1000602
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
not
c
:
IsSetCard
(
0xc204
)
end
function
c1000602
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
not
(
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsType
(
TYPE_PENDULUM
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1000602
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1000602
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c1000602
.
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
,
c1000602
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c1000602
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
1000602
)
==
0
and
e
:
GetHandler
():
GetTurnID
()
~=
Duel
.
GetTurnCount
()
end
function
c1000602
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
1000602
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c1000602
.
splimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c1000602
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
not
(
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsType
(
TYPE_PENDULUM
))
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
c1000602
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000602
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
e
:
GetHandler
():
RegisterFlagEffect
(
1000602
,
RESET_EVENT
+
0x1680000
,
EFFECT_FLAG_COPY_INHERIT
,
1
)
end
function
c1000602
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1000602
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
expansions/script/c1000603.lua
0 → 100644
View file @
ae0a427e
--梦中的倩影 鹿目圆香
function
c1000603
.
initial_effect
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000603
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
1000603
)
e1
:
SetCondition
(
c1000603
.
con
)
e1
:
SetCost
(
c1000603
.
cost
)
e1
:
SetTarget
(
c1000603
.
setg
)
e1
:
SetOperation
(
c1000603
.
seop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000603
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
10006030
)
e2
:
SetCondition
(
c1000603
.
con2
)
e2
:
SetCost
(
c1000603
.
cost
)
e2
:
SetTarget
(
c1000603
.
sptg
)
e2
:
SetOperation
(
c1000603
.
spop
)
c
:
RegisterEffect
(
e2
)
--atk up
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_SET_ATTACK
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
c1000603
.
con3
)
e3
:
SetValue
(
3000
)
c
:
RegisterEffect
(
e3
)
--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
:
SetCondition
(
c1000603
.
con3
)
e5
:
SetValue
(
c1000603
.
efilter
)
c
:
RegisterEffect
(
e5
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000603
,
3
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
c1000603
.
spcon1
)
e2
:
SetTarget
(
c1000603
.
sptg1
)
e2
:
SetOperation
(
c1000603
.
spop1
)
c
:
RegisterEffect
(
e2
)
end
function
c1000603
.
filter9
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsControler
(
tp
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000603
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000603
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
3
end
function
c1000603
.
costfilter
(
c
)
return
c
:
IsDiscardable
()
and
c
:
IsSetCard
(
0xc204
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000603
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000603
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c1000603
.
costfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c1000603
.
sefilter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsAbleToHand
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000603
.
setg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000603
.
sefilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c1000603
.
seop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1000603
.
sefilter
,
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
c1000603
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000603
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
6
end
function
c1000603
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_TUNER
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1000603
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
==
0
then
return
false
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c1000603
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1000603
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c1000603
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g
=
Duel
.
GetFirstTarget
()
if
g
and
g
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c1000603
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000603
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
9
end
function
c1000603
.
efilter
(
e
,
re
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetOwnerPlayer
()
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
function
c1000603
.
cfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
GetPreviousControler
()
==
tp
end
function
c1000603
.
spcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
eg
:
IsContains
(
e
:
GetHandler
())
and
eg
:
IsExists
(
c1000603
.
cfilter
,
1
,
nil
,
tp
)
end
function
c1000603
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c1000603
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x47e0000
)
e1
:
SetValue
(
LOCATION_REMOVED
)
c
:
RegisterEffect
(
e1
,
true
)
end
end
\ No newline at end of file
expansions/script/c1000604.lua
0 → 100644
View file @
ae0a427e
--废怯的女孩 鹿目圆香
function
c1000604
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
1000604
)
e1
:
SetCondition
(
c1000604
.
spcon
)
e1
:
SetTarget
(
c1000604
.
sptg
)
e1
:
SetOperation
(
c1000604
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--atk up
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_SET_ATTACK
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
c1000604
.
con3
)
e4
:
SetValue
(
2800
)
c
:
RegisterEffect
(
e4
)
--negate
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetDescription
(
aux
.
Stringid
(
1000604
,
1
))
e7
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e7
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e7
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCountLimit
(
1
,
1000604
)
e7
:
SetCode
(
EVENT_CHAINING
)
e7
:
SetCondition
(
c1000604
.
discon
)
e7
:
SetTarget
(
c1000604
.
distg
)
e7
:
SetOperation
(
c1000604
.
disop
)
c
:
RegisterEffect
(
e7
)
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetCondition
(
c1000604
.
con1
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
end
function
c1000604
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
not
(
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsType
(
TYPE_PENDULUM
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1000604
.
cfilter
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
end
function
c1000604
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c1000604
.
cfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
function
c1000604
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000604
.
filter1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c1000604
.
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
,
c1000604
.
filter1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c1000604
.
filter9
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsControler
(
tp
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000604
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000604
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
6
end
function
c1000604
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000604
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
3
end
function
c1000604
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000604
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
ct
>=
9
and
ep
~=
tp
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c1000604
.
distg
(
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
end
function
c1000604
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateActivation
(
ev
)
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c1000605.lua
0 → 100644
View file @
ae0a427e
--绘本的涂鸦 鹿目圆香
function
c1000605
.
initial_effect
(
c
)
--DEFENSE attack
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DEFENSE_ATTACK
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000605
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
1000605
)
e2
:
SetCondition
(
c1000605
.
con
)
e2
:
SetCost
(
c1000605
.
cost
)
e2
:
SetTarget
(
c1000605
.
destg
)
e2
:
SetOperation
(
c1000605
.
desop
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
1000605
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
1000605
)
e3
:
SetCondition
(
c1000605
.
con2
)
e3
:
SetCost
(
c1000605
.
defcost
)
e3
:
SetTarget
(
c1000605
.
sptg
)
e3
:
SetOperation
(
c1000605
.
spop
)
c
:
RegisterEffect
(
e3
)
--def up
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_SET_DEFENSE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
c1000605
.
con3
)
e4
:
SetValue
(
3500
)
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
:
SetCondition
(
c1000605
.
con3
)
e5
:
SetValue
(
c1000605
.
efilter
)
c
:
RegisterEffect
(
e5
)
end
function
c1000605
.
filter9
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsControler
(
tp
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000605
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000605
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
3
end
function
c1000605
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c1000605
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000605
.
cfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1000605
.
cfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c1000605
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
chkc
:
IsDestructable
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c1000605
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c1000605
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000605
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
6
end
function
c1000605
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_TUNER
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1000605
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1000605
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c1000605
.
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
,
c1000605
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
g
:
GetFirst
():
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetOperation
(
c1000605
.
des
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
g
:
GetFirst
():
RegisterEffect
(
e2
)
end
end
function
c1000605
.
des
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
function
c1000605
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000605
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
9
end
function
c1000605
.
defcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c1000605
.
efilter
(
e
,
re
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetOwnerPlayer
()
and
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
\ No newline at end of file
expansions/script/c1000606.lua
0 → 100644
View file @
ae0a427e
--最终的决心 鹿目圆香
function
c1000606
.
initial_effect
(
c
)
--fusion
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_REMOVE
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000606
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
,
1000624
+
EFFECT_COUNT_CODE_DUEL
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c1000606
.
condition
)
e1
:
SetCost
(
c1000606
.
cost
)
e1
:
SetTarget
(
c1000606
.
sptg
)
e1
:
SetOperation
(
c1000606
.
spop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCountLimit
(
1
,
1000606
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetCost
(
c1000606
.
syncost
)
e2
:
SetTarget
(
c1000606
.
tg
)
e2
:
SetOperation
(
c1000606
.
op
)
c
:
RegisterEffect
(
e2
)
--special summon1
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
10006060
)
e1
:
SetCondition
(
c1000606
.
spcon
)
c
:
RegisterEffect
(
e1
)
end
function
c1000606
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct1
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
,
0
)
local
ct2
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_ONFIELD
)
local
ct3
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
return
not
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
and
ct3
==
0
and
ct2
>
ct1
end
function
c1000606
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLP
(
tp
)
>
1
and
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
PayLPCost
(
tp
,
Duel
.
GetLP
(
tp
)
-
1
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
function
c1000606
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_FUSION
+
TYPE_SYNCHRO
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
end
function
c1000606
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1000606
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetChainLimit
(
c1000606
.
chlimit
)
end
function
c1000606
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c1000606
.
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
,
c1000606
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
end
end
function
c1000606
.
filter
(
c
,
e
,
tp
)
local
lv
=
c
:
GetLevel
()
return
lv
>
0
and
c
:
IsSetCard
(
0xc204
)
and
not
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsAbleToRemoveAsCost
()
and
Duel
.
IsExistingMatchingCard
(
c1000606
.
exfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
lv
+
3
,
e
,
tp
)
end
function
c1000606
.
exfilter
(
c
,
lv
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
GetLevel
()
==
lv
and
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_SYNCHRO
,
tp
,
false
,
false
)
end
function
c1000606
.
syncost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000606
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
and
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1000606
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
(),
e
,
tp
)
e
:
SetLabel
(
g
:
GetFirst
():
GetLevel
())
g
:
AddCard
(
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c1000606
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c1000606
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
lv
=
e
:
GetLabel
()
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c1000606
.
exfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
lv
+
3
,
e
,
tp
)
local
sc
=
sg
:
GetFirst
()
if
sc
then
Duel
.
SpecialSummon
(
sg
,
SUMMON_TYPE_SYNCHRO
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
function
c1000606
.
filter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xc204
)
and
c
:
GetCode
()
~=
1000606
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000606
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1000606
.
filter1
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
\ No newline at end of file
expansions/script/c1000607.lua
0 → 100644
View file @
ae0a427e
--虚空的泡沫 鹿目圆香
function
c1000607
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
1
,
1000607
)
c
:
SetUniqueOnField
(
1
,
1
,
1000614
)
c
:
SetUniqueOnField
(
1
,
1
,
1000613
)
--fusion summon
aux
.
AddFusionProcFun2
(
c
,
c1000607
.
ffilter
,
c1000607
.
ffilter2
,
true
)
c
:
EnableReviveLimit
()
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000607
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DAMAGE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c1000607
.
con
)
e1
:
SetCost
(
c1000607
.
cost
)
e1
:
SetTarget
(
c1000607
.
destg
)
e1
:
SetOperation
(
c1000607
.
desop
)
c
:
RegisterEffect
(
e1
)
--atk up
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000607
,
1
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c1000607
.
con2
)
e2
:
SetCost
(
c1000607
.
cost
)
e2
:
SetOperation
(
c1000607
.
atkop
)
c
:
RegisterEffect
(
e2
)
--buff
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
1000607
,
2
))
e3
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c1000607
.
con3
)
e3
:
SetCost
(
c1000607
.
cost
)
e3
:
SetTarget
(
c1000607
.
bftg
)
e3
:
SetOperation
(
c1000607
.
bfop
)
c
:
RegisterEffect
(
e3
)
end
function
c1000607
.
ffilter
(
c
)
return
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsSetCard
(
0xc204
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000607
.
ffilter2
(
c
)
return
not
(
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsType
(
TYPE_PENDULUM
))
and
c
:
IsSetCard
(
0xc204
)
end
function
c1000607
.
filter9
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsControler
(
tp
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000607
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000607
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
3
end
function
c1000607
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c1000607
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
chkc
:
IsDestructable
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
if
g
:
GetFirst
():
IsType
(
TYPE_MONSTER
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
1000
)
end
end
function
c1000607
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
>
0
and
tc
:
IsType
(
TYPE_MONSTER
)
then
Duel
.
Damage
(
1
-
tp
,
1000
,
REASON_EFFECT
)
end
end
function
c1000607
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000607
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
6
end
function
c1000607
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
1000
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_STANDBY
+
RESET_SELF_TURN
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetValue
(
c1000607
.
effval
)
c
:
RegisterEffect
(
e3
)
end
end
function
c1000607
.
effval
(
e
,
te
,
tp
)
return
tp
~=
e
:
GetHandlerPlayer
()
end
function
c1000607
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000607
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
9
end
function
c1000607
.
bftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ATKCHANGE
,
g
,
g
:
GetCount
(),
tp
,
1000
)
end
function
c1000607
.
bfop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
e
:
GetHandler
())
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
(
1000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_PIERCE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
end
\ No newline at end of file
expansions/script/c1000608.lua
0 → 100644
View file @
ae0a427e
--圆香的守望者 晓美焰
function
c1000608
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
1000608
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetOperation
(
c1000608
.
activate
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetCost
(
c1000608
.
cost
)
e2
:
SetOperation
(
c1000608
.
op
)
c
:
RegisterEffect
(
e2
)
end
function
c1000608
.
tdfilter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
end
function
c1000608
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToGrave
()
end
function
c1000608
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1000608
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
g1
=
Duel
.
GetMatchingGroup
(
c1000608
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
c1000608
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
g3
=
Duel
.
GetMatchingGroup
(
c1000608
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
tp
)
if
g1
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1000608
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg1
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg1
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg1
)
elseif
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1000608
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg2
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg2
,
REASON_EFFECT
)
elseif
g3
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1000608
,
2
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg3
=
g3
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SpecialSummon
(
sg3
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c1000608
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c1000608
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
c1000608
.
rdval
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c1000608
.
rdval
(
e
,
re
,
dam
,
r
,
rp
,
rc
)
if
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
then
return
dam
/
2
else
return
dam
end
end
\ No newline at end of file
expansions/script/c1000609.lua
0 → 100644
View file @
ae0a427e
--轮回的溯回者 晓美焰
function
c1000609
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000609
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
1000609
)
e1
:
SetCost
(
c1000609
.
cost
)
e1
:
SetTarget
(
c1000609
.
setg
)
e1
:
SetOperation
(
c1000609
.
seop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000609
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e2
:
SetCountLimit
(
1
,
1000609
)
e2
:
SetCost
(
c1000609
.
cost
)
e2
:
SetTarget
(
c1000609
.
sptg
)
e2
:
SetOperation
(
c1000609
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c1000609
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c1000609
.
sefilter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000609
.
setg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000609
.
sefilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c1000609
.
seop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1000609
.
sefilter
,
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
c1000609
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000609
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000609
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c1000609
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1000609
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetValue
(
1000
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetOperation
(
c1000609
.
desop
)
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e4
)
Duel
.
SpecialSummonComplete
()
end
end
function
c1000609
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
expansions/script/c1000610.lua
0 → 100644
View file @
ae0a427e
--魔法的少女 鹿目圆香
function
c1000610
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xc204
),
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c1000610
.
recon
)
e1
:
SetOperation
(
c1000610
.
regop
)
c
:
RegisterEffect
(
e1
)
--remove
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BATTLE_START
)
e2
:
SetCondition
(
c1000610
.
con
)
e2
:
SetCondition
(
c1000610
.
remcon
)
e2
:
SetTarget
(
c1000610
.
remtg
)
e2
:
SetOperation
(
c1000610
.
remop
)
c
:
RegisterEffect
(
e2
)
--disable
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e3
:
SetCondition
(
c1000610
.
con2
)
e3
:
SetOperation
(
c1000610
.
disop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
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
:
SetCondition
(
c1000610
.
con3
)
e5
:
SetValue
(
c1000610
.
efilter
)
c
:
RegisterEffect
(
e5
)
end
function
c1000610
.
recon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
end
function
c1000610
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetTarget
(
c1000610
.
tg
)
e1
:
SetOperation
(
c1000610
.
op
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ee0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
function
c1000610
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000610
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000610
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
+
CATEGORY_SEARCH
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c1000610
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1000610
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c1000610
.
filter9
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsControler
(
tp
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000610
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000610
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
3
end
function
c1000610
.
remcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bit
.
band
(
bc
:
GetSummonType
(),
SUMMON_TYPE_SPECIAL
)
==
SUMMON_TYPE_SPECIAL
end
function
c1000610
.
remtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
e
:
GetHandler
():
GetBattleTarget
(),
1
,
0
,
0
)
end
function
c1000610
.
remop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
bc
=
e
:
GetHandler
():
GetBattleTarget
()
if
bc
:
IsRelateToBattle
()
then
Duel
.
Remove
(
bc
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
c1000610
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000610
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
6
end
function
c1000610
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsFaceup
()
then
return
end
local
bc
=
c
:
GetBattleTarget
()
if
bc
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
bc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
bc
:
RegisterEffect
(
e2
)
end
end
function
c1000610
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000610
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
9
end
function
c1000610
.
efilter
(
e
,
re
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetOwnerPlayer
()
and
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
\ No newline at end of file
expansions/script/c1000611.lua
0 → 100644
View file @
ae0a427e
--救济的少女 鹿目圆香
function
c1000611
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0xc204
),
1
)
c
:
EnableReviveLimit
()
--draw
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000611
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c1000611
.
con
)
e1
:
SetTarget
(
c1000611
.
drtg
)
e1
:
SetOperation
(
c1000611
.
drop
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000611
,
3
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetCondition
(
c1000611
.
con2
)
e2
:
SetTarget
(
c1000611
.
thtg
)
e2
:
SetOperation
(
c1000611
.
thop
)
c
:
RegisterEffect
(
e2
)
--atk
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
1000611
,
2
))
e3
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DISABLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCondition
(
c1000611
.
con3
)
e3
:
SetOperation
(
c1000611
.
atkop
)
c
:
RegisterEffect
(
e3
)
end
function
c1000611
.
filter9
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000611
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000611
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
and
ct
>=
3
end
function
c1000611
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c1000611
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
>
0
then
local
tc
=
Duel
.
GetOperatedGroup
():
GetFirst
()
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
if
tc
:
IsSetCard
(
0xc204
)
and
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1000611
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
Duel
.
ShuffleHand
(
tp
)
end
end
end
function
c1000611
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000611
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
and
ct
>=
6
end
function
c1000611
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsAbleToHand
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToHand
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToHand
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c1000611
.
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
function
c1000611
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000611
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
and
ct
>=
9
end
function
c1000611
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
nil
,
1
,
0
,
0
)
end
function
c1000611
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
+
EFFECT_FLAG_IGNORE_RANGE
)
e4
:
SetCode
(
EFFECT_TO_GRAVE_REDIRECT
)
e4
:
SetValue
(
LOCATION_REMOVED
)
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
end
\ No newline at end of file
expansions/script/c1000612.lua
0 → 100644
View file @
ae0a427e
--少女的祈愿 鹿目圆香
function
c1000612
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xc204
),
aux
.
NonTuner
(
Card
.
IsSetCard
,
0xc204
),
1
)
c
:
EnableReviveLimit
()
--todeck
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000612
,
0
))
e1
:
SetCategory
(
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c1000612
.
con1
)
e1
:
SetTarget
(
c1000612
.
tg
)
e1
:
SetOperation
(
c1000612
.
op
)
c
:
RegisterEffect
(
e1
)
--buff
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c1000612
.
con2
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetValue
(
c1000612
.
val
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e3
)
--lock
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e4
:
SetTargetRange
(
0
,
LOCATION_EXTRA
)
e4
:
SetCondition
(
c1000612
.
con3
)
e4
:
SetTarget
(
c1000612
.
filter
)
c
:
RegisterEffect
(
e4
)
--special summon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_GRAVE
)
e5
:
SetCountLimit
(
1
,
1000612
+
EFFECT_COUNT_CODE_DUEL
)
e5
:
SetCost
(
c1000612
.
spcost
)
e5
:
SetTarget
(
c1000612
.
sptg
)
e5
:
SetOperation
(
c1000612
.
spop
)
c
:
RegisterEffect
(
e5
)
end
function
c1000612
.
filter9
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsControler
(
tp
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000612
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000612
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
6
end
function
c1000612
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
0
,
0
)
end
function
c1000612
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
1
,
2
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
function
c1000612
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000612
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
3
end
function
c1000612
.
val
(
e
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000612
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
*
100
end
function
c1000612
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000612
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
9
end
function
c1000612
.
filter
(
e
,
c
)
return
c
:
IsLevelAbove
(
4
)
or
c
:
IsRankAbove
(
4
)
end
function
c1000612
.
refilter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsAbleToRemoveAsCost
()
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000612
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000612
.
refilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
and
ct
>=
4
end
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c1000612
.
refilter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
3
,
e
:
GetHandler
())
tg
:
AddCard
(
e
:
GetHandler
())
Duel
.
Remove
(
tg
,
POS_FACEUP
,
REASON_COST
)
end
function
c1000612
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
1000623
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
end
function
c1000612
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1000612
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c1000612
.
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
,
c1000612
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
end
end
expansions/script/c1000613.lua
0 → 100644
View file @
ae0a427e
--圆环之理 鹿目圆香
function
c1000613
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
1
,
1000607
)
c
:
SetUniqueOnField
(
1
,
1
,
1000614
)
c
:
SetUniqueOnField
(
1
,
1
,
1000613
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcCodeFun
(
c
,
1000611
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xc204
),
4
,
true
,
true
)
--immune
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetCondition
(
c1000613
.
con
)
e1
:
SetValue
(
c1000613
.
efilter
)
c
:
RegisterEffect
(
e1
)
--atk/def down
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e2
:
SetValue
(
c1000613
.
val
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e3
)
--atk/def up
local
e4
=
e2
:
Clone
()
e4
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e4
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0xc204
))
e4
:
SetValue
(
c1000613
.
val2
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e2
:
Clone
()
e5
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e5
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e5
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0xc204
))
e5
:
SetValue
(
c1000613
.
val2
)
c
:
RegisterEffect
(
e5
)
--level/rank down
local
e6
=
e2
:
Clone
()
e6
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e6
:
SetValue
(
c1000613
.
val3
)
c
:
RegisterEffect
(
e6
)
local
e7
=
e2
:
Clone
()
e7
:
SetCode
(
EFFECT_UPDATE_RANK
)
e7
:
SetValue
(
c1000613
.
val3
)
c
:
RegisterEffect
(
e7
)
--spsummon condition
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_SINGLE
)
e9
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e9
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e9
:
SetValue
(
c1000613
.
splimit
)
c
:
RegisterEffect
(
e9
)
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000613
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c1000613
.
condition
)
e1
:
SetTarget
(
c1000613
.
target
)
e1
:
SetOperation
(
c1000613
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
end
function
c1000613
.
splimit
(
e
,
se
,
sp
,
st
)
if
e
:
GetHandler
():
IsLocation
(
LOCATION_EXTRA
)
then
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
end
return
true
end
function
c1000613
.
con
(
e
)
return
Duel
.
GetTurnPlayer
()
==
e
:
GetHandlerPlayer
()
end
function
c1000613
.
efilter
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
function
c1000613
.
filter9
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsControler
(
tp
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000613
.
val
(
e
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000613
.
filter9
,
LOCATION_REMOVED
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
*-
300
end
function
c1000613
.
val2
(
e
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000613
.
filter9
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
*
300
end
function
c1000613
.
val3
(
e
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000613
.
filter9
,
LOCATION_REMOVED
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
-
ct
end
function
c1000613
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
(
c
:
GetAttack
()
==
0
or
c
:
GetDefense
()
==
0
)
end
function
c1000613
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c1000613
.
cfilter
,
1
,
nil
)
and
not
eg
:
IsContains
(
e
:
GetHandler
())
end
function
c1000613
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
g
=
eg
:
Filter
(
c1000613
.
cfilter
,
nil
)
Duel
.
SetTargetCard
(
eg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c1000613
.
filter
(
c
,
e
)
return
c
:
IsFaceup
()
and
(
c
:
GetAttack
()
==
0
or
c
:
GetDefense
()
==
0
)
and
c
:
IsRelateToEffect
(
e
)
end
function
c1000613
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
g
=
eg
:
Filter
(
c1000613
.
filter
,
nil
,
e
)
if
g
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c1000614.lua
0 → 100644
View file @
ae0a427e
--救赎的圣母 鹿目圆香
function
c1000614
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
1
,
1000607
)
c
:
SetUniqueOnField
(
1
,
1
,
1000614
)
c
:
SetUniqueOnField
(
1
,
1
,
1000613
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFun2
(
c
,
c1000614
.
ffilter
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xc204
),
true
)
--immune
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetCondition
(
c1000614
.
con
)
e1
:
SetValue
(
c1000614
.
efilter
)
c
:
RegisterEffect
(
e1
)
--disable
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_BATTLED
)
e2
:
SetOperation
(
c1000614
.
disop1
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
1000614
,
0
))
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DAMAGE
+
CATEGORY_RECOVER
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetCountLimit
(
1
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetTarget
(
c1000614
.
destg
)
e4
:
SetOperation
(
c1000614
.
desop
)
c
:
RegisterEffect
(
e4
)
--spsummon condition
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e5
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e5
:
SetValue
(
c1000614
.
splimit
)
c
:
RegisterEffect
(
e5
)
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
c1000614
.
reptg
)
e2
:
SetValue
(
c1000614
.
repval
)
c
:
RegisterEffect
(
e2
)
local
g
=
Group
.
CreateGroup
()
g
:
KeepAlive
()
e2
:
SetLabelObject
(
g
)
end
function
c1000614
.
splimit
(
e
,
se
,
sp
,
st
)
if
e
:
GetHandler
():
IsLocation
(
LOCATION_EXTRA
)
then
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
end
return
true
end
function
c1000614
.
ffilter
(
c
)
return
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsSetCard
(
0xc204
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000614
.
con
(
e
)
return
Duel
.
GetTurnPlayer
()
==
e
:
GetHandlerPlayer
()
end
function
c1000614
.
efilter
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
function
c1000614
.
disop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
d
=
Duel
.
GetAttackTarget
()
if
d
==
c
then
d
=
Duel
.
GetAttacker
()
end
if
not
d
or
not
not
d
:
IsLocation
(
LOCATION_GRAVE
)
or
not
d
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x17a0000
)
d
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x17a0000
)
d
:
RegisterEffect
(
e2
)
end
function
c1000614
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
==
0
then
return
chkc
:
IsDestructable
()
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
1000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
1000
)
end
function
c1000614
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
>
0
then
Duel
.
Recover
(
tp
,
1000
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
1000
,
REASON_EFFECT
)
if
tc
:
IsLocation
(
LOCATION_GRAVE
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x17a0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x17a0000
)
tc
:
RegisterEffect
(
e2
)
end
end
end
function
c1000614
.
repfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsOnField
()
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
GetFlagEffect
(
1000614
)
==
0
end
function
c1000614
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
eg
:
IsExists
(
c1000614
.
repfilter
,
1
,
nil
,
tp
)
end
local
g
=
eg
:
Filter
(
c1000614
.
repfilter
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
while
tc
do
tc
:
RegisterFlagEffect
(
1000614
,
RESET_EVENT
+
0x1fc0000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
1000614
,
2
))
tc
=
g
:
GetNext
()
end
e
:
GetLabelObject
():
Clear
()
e
:
GetLabelObject
():
Merge
(
g
)
return
true
end
function
c1000614
.
repval
(
e
,
c
)
local
g
=
e
:
GetLabelObject
()
return
g
:
IsContains
(
c
)
end
\ No newline at end of file
expansions/script/c1000615.lua
0 → 100644
View file @
ae0a427e
--奇迹的少女 鹿目圆香
function
c1000615
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xc204
),
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--damage
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetDescription
(
aux
.
Stringid
(
1000615
,
0
))
e7
:
SetCategory
(
CATEGORY_DAMAGE
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e7
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e7
:
SetCondition
(
c1000615
.
con2
)
e7
:
SetTarget
(
c1000615
.
damtg
)
e7
:
SetOperation
(
c1000615
.
damop
)
c
:
RegisterEffect
(
e7
)
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
--atkup
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetCondition
(
c1000615
.
con
)
e3
:
SetValue
(
c1000615
.
atkup
)
c
:
RegisterEffect
(
e3
)
local
e2
=
e3
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e2
)
--pierce
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_PIERCE
)
e1
:
SetCondition
(
c1000615
.
con3
)
c
:
RegisterEffect
(
e1
)
end
function
c1000615
.
filter9
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsControler
(
tp
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000615
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000615
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
6
end
function
c1000615
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
tc
=
e
:
GetHandler
():
GetBattleTarget
()
local
atk
=
tc
:
GetBaseAttack
()
if
atk
<
0
then
atk
=
0
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
atk
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
atk
)
end
function
c1000615
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
end
function
c1000615
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000615
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
3
end
function
c1000615
.
atkup
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
c1000615
.
filter9
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
*
300
end
function
c1000615
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000615
.
filter9
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
9
end
\ No newline at end of file
expansions/script/c1000617.lua
0 → 100644
View file @
ae0a427e
--圆环圣母 鹿目圆香
function
c1000617
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
1000617
)
--synchro summon
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
c1000617
.
syncon
)
e1
:
SetOperation
(
c1000617
.
synop
)
e1
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
c
:
RegisterEffect
(
e1
)
--act limit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000617
,
1
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCondition
(
c1000617
.
limcon
)
e2
:
SetTarget
(
c1000617
.
limtg
)
e2
:
SetOperation
(
c1000617
.
limop
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CANNOT_DISABLE_SPSUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
c
:
RegisterEffect
(
e2
)
--immune
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetValue
(
c1000617
.
efilter
)
c
:
RegisterEffect
(
e3
)
--cannot release
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_UNRELEASABLE_SUM
)
e1
:
SetCondition
(
c1000617
.
con
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UNRELEASABLE_NONSUM
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e3
:
Clone
()
e5
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
c
:
RegisterEffect
(
e5
)
--control
local
e99
=
Effect
.
CreateEffect
(
c
)
e99
:
SetType
(
EFFECT_TYPE_SINGLE
)
e99
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e99
:
SetRange
(
LOCATION_MZONE
)
e99
:
SetCode
(
EFFECT_CANNOT_CHANGE_CONTROL
)
c
:
RegisterEffect
(
e99
)
--act limit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
c1000617
.
aclimit
)
e1
:
SetCondition
(
c1000617
.
con1
)
c
:
RegisterEffect
(
e1
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_TO_HAND
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
0
,
LOCATION_DECK
+
LOCATION_GRAVE
)
e3
:
SetCondition
(
c1000617
.
con2
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EFFECT_CANNOT_DRAW
)
e4
:
SetCondition
(
c1000617
.
con2
)
e4
:
SetTargetRange
(
0
,
1
)
c
:
RegisterEffect
(
e4
)
--immune
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetCondition
(
c1000617
.
con3
)
e3
:
SetValue
(
c1000617
.
efilter2
)
c
:
RegisterEffect
(
e3
)
end
function
c1000617
.
matfilter1
(
c
,
syncard
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_TUNER
)
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
and
c
:
IsCanBeSynchroMaterial
(
syncard
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000617
.
matfilter2
(
c
,
syncard
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsCanBeSynchroMaterial
(
syncard
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000617
.
synfilter1
(
c
,
syncard
,
lv
,
g1
,
g2
,
g3
)
local
tlv
=
c
:
GetSynchroLevel
(
syncard
)
if
lv
-
tlv
<=
0
then
return
false
end
local
f1
=
c
.
tuner_filter
if
c
:
IsHasEffect
(
EFFECT_HAND_SYNCHRO
)
then
return
g3
:
IsExists
(
c1000617
.
synfilter2
,
1
,
c
,
syncard
,
lv
-
tlv
,
g2
,
f1
,
c
)
else
return
g1
:
IsExists
(
c1000617
.
synfilter2
,
1
,
c
,
syncard
,
lv
-
tlv
,
g2
,
f1
,
c
)
end
end
function
c1000617
.
synfilter2
(
c
,
syncard
,
lv
,
g2
,
f1
,
tuner1
)
local
tlv
=
c
:
GetSynchroLevel
(
syncard
)
if
lv
-
tlv
<=
0
then
return
false
end
local
f2
=
c
.
tuner_filter
if
f1
and
not
f1
(
c
)
then
return
false
end
if
f2
and
not
f2
(
tuner1
)
then
return
false
end
return
g2
:
IsExists
(
c1000617
.
synfilter3
,
1
,
nil
,
syncard
,
lv
-
tlv
,
f1
,
f2
)
end
function
c1000617
.
synfilter3
(
c
,
syncard
,
lv
,
f1
,
f2
)
local
mlv
=
c
:
GetSynchroLevel
(
syncard
)
local
lv1
=
bit
.
band
(
mlv
,
0xffff
)
local
lv2
=
bit
.
rshift
(
mlv
,
16
)
return
(
lv1
==
lv
or
lv2
==
lv
)
and
(
not
f1
or
f1
(
c
))
and
(
not
f2
or
f2
(
c
))
end
function
c1000617
.
syncon
(
e
,
c
,
tuner
,
mg
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<-
2
then
return
false
end
local
g1
=
nil
local
g2
=
nil
local
g3
=
nil
if
mg
then
g1
=
mg
:
Filter
(
c1000617
.
matfilter1
,
nil
,
c
)
g2
=
mg
:
Filter
(
c1000617
.
matfilter2
,
nil
,
c
)
g3
=
mg
:
Filter
(
c1000617
.
matfilter1
,
nil
,
c
)
else
g1
=
Duel
.
GetMatchingGroup
(
c1000617
.
matfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
)
g2
=
Duel
.
GetMatchingGroup
(
c1000617
.
matfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
)
g3
=
Duel
.
GetMatchingGroup
(
c1000617
.
matfilter1
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
LOCATION_MZONE
,
nil
,
c
)
end
local
pe
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_SMATERIAL
)
local
lv
=
c
:
GetLevel
()
if
tuner
then
local
tlv
=
tuner
:
GetSynchroLevel
(
c
)
if
lv
-
tlv
<=
0
then
return
false
end
local
f1
=
tuner
.
tuner_filter
if
not
pe
then
return
g1
:
IsExists
(
c1000617
.
synfilter2
,
1
,
tuner
,
c
,
lv
-
tlv
,
g2
,
f1
,
tuner
)
else
return
c1000617
.
synfilter2
(
pe
:
GetOwner
(),
c
,
lv
-
tlv
,
g2
,
f1
,
tuner
)
end
end
if
not
pe
then
return
g1
:
IsExists
(
c1000617
.
synfilter1
,
1
,
nil
,
c
,
lv
,
g1
,
g2
,
g3
)
else
return
c1000617
.
synfilter1
(
pe
:
GetOwner
(),
c
,
lv
,
g1
,
g2
)
end
end
function
c1000617
.
synop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
tuner
,
mg
)
local
g
=
Group
.
CreateGroup
()
local
g1
=
nil
local
g2
=
nil
local
g3
=
nil
if
mg
then
g1
=
mg
:
Filter
(
c1000617
.
matfilter1
,
nil
,
c
)
g2
=
mg
:
Filter
(
c1000617
.
matfilter2
,
nil
,
c
)
g3
=
mg
:
Filter
(
c1000617
.
matfilter1
,
nil
,
c
)
else
g1
=
Duel
.
GetMatchingGroup
(
c1000617
.
matfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
)
g2
=
Duel
.
GetMatchingGroup
(
c1000617
.
matfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
)
g3
=
Duel
.
GetMatchingGroup
(
c1000617
.
matfilter1
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
LOCATION_MZONE
,
nil
,
c
)
end
local
pe
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_SMATERIAL
)
local
lv
=
c
:
GetLevel
()
if
tuner
then
g
:
AddCard
(
tuner
)
local
lv1
=
tuner
:
GetSynchroLevel
(
c
)
local
f1
=
tuner
.
tuner_filter
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
tuner2
=
nil
if
not
pe
then
local
t2
=
g1
:
FilterSelect
(
tp
,
c1000617
.
synfilter2
,
1
,
1
,
tuner
,
c
,
lv
-
lv1
,
g2
,
f1
,
tuner
)
tuner2
=
t2
:
GetFirst
()
else
tuner2
=
pe
:
GetOwner
()
Group
.
FromCards
(
tuner2
):
Select
(
tp
,
1
,
1
,
nil
)
end
g
:
AddCard
(
tuner2
)
local
lv2
=
tuner2
:
GetSynchroLevel
(
c
)
local
f2
=
tuner2
.
tuner_filter
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
m3
=
g2
:
FilterSelect
(
tp
,
c1000617
.
synfilter3
,
1
,
1
,
nil
,
c
,
lv
-
lv1
-
lv2
,
f1
,
f2
)
g
:
Merge
(
m3
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
tuner1
=
nil
if
not
pe
then
local
t1
=
g1
:
FilterSelect
(
tp
,
c1000617
.
synfilter1
,
1
,
1
,
nil
,
c
,
lv
,
g1
,
g2
,
g3
)
tuner1
=
t1
:
GetFirst
()
else
tuner1
=
pe
:
GetOwner
()
Group
.
FromCards
(
tuner1
):
Select
(
tp
,
1
,
1
,
nil
)
end
g
:
AddCard
(
tuner1
)
local
lv1
=
tuner1
:
GetSynchroLevel
(
c
)
local
f1
=
tuner1
.
tuner_filter
local
t2
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
if
tuner1
:
IsHasEffect
(
EFFECT_HAND_SYNCHRO
)
then
t2
=
g3
:
FilterSelect
(
tp
,
c1000617
.
synfilter2
,
1
,
1
,
tuner1
,
c
,
lv
-
lv1
,
g2
,
f1
,
tuner1
)
else
t2
=
g1
:
FilterSelect
(
tp
,
c1000617
.
synfilter2
,
1
,
1
,
tuner1
,
c
,
lv
-
lv1
,
g2
,
f1
,
tuner1
)
end
local
tuner2
=
t2
:
GetFirst
()
g
:
AddCard
(
tuner2
)
local
lv2
=
tuner2
:
GetSynchroLevel
(
c
)
local
f2
=
tuner2
.
tuner_filter
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
m3
=
g2
:
FilterSelect
(
tp
,
c1000617
.
synfilter3
,
1
,
1
,
nil
,
c
,
lv
-
lv1
-
lv2
,
f1
,
f2
)
g
:
Merge
(
m3
)
end
c
:
SetMaterial
(
g
)
Duel
.
SendtoGrave
(
g
,
REASON_MATERIAL
+
REASON_SYNCHRO
)
end
function
c1000617
.
limcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
end
function
c1000617
.
limtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetChainLimit
(
c1000617
.
chainlm
)
end
function
c1000617
.
chainlm
(
e
,
rp
,
tp
)
return
tp
==
rp
end
function
c1000617
.
limop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
c1000617
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c1000617
.
aclimit
(
e
,
re
,
tp
)
return
re
:
GetHandler
():
IsOnField
()
end
function
c1000617
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
function
c1000617
.
filter9
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsControler
(
tp
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000617
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000617
.
filter9
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
1
end
function
c1000617
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000617
.
filter9
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
3
end
function
c1000617
.
aclimit
(
e
,
re
,
tp
)
return
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_NORMAL
)
end
function
c1000617
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000617
.
filter9
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
6
end
function
c1000617
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000617
.
filter9
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
>=
9
end
function
c1000617
.
efilter2
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
\ No newline at end of file
expansions/script/c1000618.lua
0 → 100644
View file @
ae0a427e
--圆环真理
function
c1000618
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000618
,
3
))
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetLabel
(
4
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetCondition
(
c1000618
.
effcon
)
e2
:
SetTarget
(
c1000618
.
tg
)
e2
:
SetOperation
(
c1000618
.
op
)
c
:
RegisterEffect
(
e2
)
--Atk up
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetCondition
(
c1000618
.
effcon
)
e3
:
SetValue
(
c1000618
.
atkval
)
e3
:
SetTarget
(
c1000618
.
tg2
)
e3
:
SetLabel
(
5
)
c
:
RegisterEffect
(
e3
)
--remove
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
1000618
,
0
))
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e4
:
SetLabel
(
6
)
e4
:
SetCondition
(
c1000618
.
effcon
)
e4
:
SetCost
(
c1000618
.
cost
)
e4
:
SetTarget
(
c1000618
.
target2
)
e4
:
SetOperation
(
c1000618
.
operation
)
c
:
RegisterEffect
(
e4
)
--reflect damage
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetCode
(
EFFECT_REFLECT_DAMAGE
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e5
:
SetTargetRange
(
1
,
0
)
e5
:
SetLabel
(
7
)
e5
:
SetCondition
(
c1000618
.
effcon
)
e5
:
SetValue
(
c1000618
.
ref
)
c
:
RegisterEffect
(
e5
)
--draw
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
1000618
,
2
))
e6
:
SetCategory
(
CATEGORY_DRAW
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e6
:
SetRange
(
LOCATION_SZONE
)
e6
:
SetCode
(
EVENT_DAMAGE
)
e6
:
SetLabel
(
8
)
e6
:
SetCondition
(
c1000618
.
drcon
)
e6
:
SetCost
(
c1000618
.
cost2
)
e6
:
SetTarget
(
c1000618
.
drtg
)
e6
:
SetOperation
(
c1000618
.
drop
)
c
:
RegisterEffect
(
e6
)
--spsummon
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e7
:
SetCode
(
EVENT_DESTROYED
)
e7
:
SetLabel
(
9
)
e7
:
SetCondition
(
c1000618
.
effcon
)
e7
:
SetTarget
(
c1000618
.
sptg
)
e7
:
SetOperation
(
c1000618
.
spop
)
c
:
RegisterEffect
(
e7
)
end
function
c1000618
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xc204
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000618
.
effcon
(
e
)
return
Duel
.
GetMatchingGroup
(
c1000618
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
):
GetClassCount
(
Card
.
GetCode
)
>=
e
:
GetLabel
()
end
function
c1000618
.
tdfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
cIsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
and
c
:
GetReasonPlayer
()
==
1
-
tp
and
c
:
IsAbleToDeck
()
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000618
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
eg
:
IsExists
(
c1000618
.
tdfilter
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
eg
,
eg
:
GetCount
(),
0
,
0
)
end
function
c1000618
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
eg
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
eg
,
nil
,
2
,
REASON_EFFECT
)
end
end
function
c1000618
.
tg2
(
e
,
c
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsFaceup
()
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000618
.
atkval
(
e
,
c
)
return
Duel
.
GetMatchingGroup
(
c1000618
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
):
GetClassCount
(
Card
.
GetCode
)
*
100
end
function
c1000618
.
reval
(
e
,
re
,
rp
)
return
rp
~=
e
:
GetHandlerPlayer
()
end
function
c1000618
.
ref
(
e
,
re
,
val
,
r
,
rp
,
rc
)
return
(
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
or
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
)
and
val
<=
1200
end
function
c1000618
.
refilter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
IsExistingTarget
(
Card
.
IsAbleToRemove
,
0
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
function
c1000618
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
c1000618
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
end
if
chk
==
0
then
return
true
end
if
c1000618
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
c1000618
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
,
chkc
)
and
Duel
.
GetMatchingGroup
(
c1000618
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
):
GetClassCount
(
Card
.
GetCode
)
>=
e
:
GetLabel
()
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1000618
,
1
))
then
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e
:
SetOperation
(
c1000618
.
operation
)
c1000618
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
c1000618
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
,
chkc
)
else
e
:
SetProperty
(
0
)
e
:
SetOperation
(
nil
)
end
end
function
c1000618
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000618
.
refilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
e
:
GetHandler
():
GetFlagEffect
(
1000618
)
==
0
end
local
cg
=
Duel
.
SelectMatchingCard
(
tp
,
c1000618
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
cg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
e
:
GetHandler
():
RegisterFlagEffect
(
1000618
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c1000618
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c
:
IsControler
(
1
-
tp
)
and
chkc
:
IsAbleToRemove
()
end
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
c1000618
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Remove
(
tc
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
function
c1000618
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
==
tp
and
ev
>=
1300
and
Duel
.
GetMatchingGroup
(
c1000618
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
nil
):
GetClassCount
(
Card
.
GetCode
)
>=
e
:
GetLabel
()
end
function
c1000618
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c1000618
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c1000618
.
drop
(
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
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
function
c1000618
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c1000618
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
LOCATION_EXTRA
)
end
function
c1000618
.
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
,
c1000618
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c1000619.lua
0 → 100644
View file @
ae0a427e
--超越命运之影
function
c1000619
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000619
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
1000619
)
e1
:
SetCost
(
c1000619
.
cost
)
e1
:
SetTarget
(
c1000619
.
target
)
e1
:
SetOperation
(
c1000619
.
activate
)
c
:
RegisterEffect
(
e1
)
--remove
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000619
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
,
1000619
)
e2
:
SetCost
(
c1000619
.
cost
)
e2
:
SetTarget
(
c1000619
.
tg
)
e2
:
SetOperation
(
c1000619
.
op
)
c
:
RegisterEffect
(
e2
)
end
function
c1000619
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c1000619
.
filter1
(
c
,
e
)
return
c
:
IsCanBeFusionMaterial
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c1000619
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0xc204
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c1000619
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
PLAYER_NONE
or
tp
local
mg1
=
Duel
.
GetMatchingGroup
(
Card
.
IsCanBeFusionMaterial
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c1000619
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c1000619
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c1000619
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
PLAYER_NONE
or
tp
local
mg1
=
Duel
.
GetMatchingGroup
(
c1000619
.
filter1
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c1000619
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c1000619
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
else
local
cg1
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
local
cg2
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_EXTRA
,
0
)
if
cg1
:
GetCount
()
>
1
and
cg2
:
IsExists
(
Card
.
IsFacedown
,
1
,
nil
)
and
Duel
.
IsPlayerCanSpecialSummon
(
tp
)
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
27581098
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
cg1
)
Duel
.
ConfirmCards
(
1
-
tp
,
cg2
)
Duel
.
ShuffleHand
(
tp
)
end
end
end
function
c1000619
.
filter3
(
c
)
return
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
end
function
c1000619
.
filter4
(
c
,
e
)
return
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c1000619
.
filter5
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0xc204
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c1000619
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
PLAYER_NONE
or
tp
local
mg1
=
Duel
.
GetMatchingGroup
(
c1000619
.
filter3
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c1000619
.
filter5
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c1000619
.
filter5
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c1000619
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
PLAYER_NONE
or
tp
local
mg1
=
Duel
.
GetMatchingGroup
(
c1000619
.
filter4
,
tp
,
LOCATION_GRAVE
+
LOCATION_MZONE
,
0
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c1000619
.
filter5
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c1000619
.
filter5
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
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
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
expansions/script/c1000620.lua
0 → 100644
View file @
ae0a427e
--纯洁的牲祭·鹿目圆香
function
c1000620
.
initial_effect
(
c
)
--level
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000620
,
0
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCountLimit
(
1
,
1000620
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCost
(
c1000620
.
lvcost
)
e2
:
SetOperation
(
c1000620
.
lvop
)
c
:
RegisterEffect
(
e2
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000620
,
1
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_NO_TURN_RESET
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
10006200
)
e1
:
SetTarget
(
c1000620
.
target
)
e1
:
SetOperation
(
c1000620
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c1000620
.
costfilter
(
c
,
lv
)
local
clv
=
c
:
GetLevel
()
return
clv
>
0
and
clv
~=
lv
and
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c1000620
.
lvcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
lv
=
e
:
GetHandler
():
GetLevel
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000620
.
costfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
lv
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1000620
.
costfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
lv
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
e
:
SetLabel
(
g
:
GetFirst
():
GetLevel
())
end
function
c1000620
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
lv
=
e
:
GetLabel
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e1
:
SetValue
(
lv
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
end
end
function
c1000620
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xc204
)
end
function
c1000620
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c1000620
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1000620
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c1000620
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c1000620
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetValue
(
c1000620
.
valcon
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c1000620
.
valcon
(
e
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_BATTLE
+
REASON_EFFECT
)
~=
0
end
\ No newline at end of file
expansions/script/c1000621.lua
0 → 100644
View file @
ae0a427e
--愿望的诅咒·鹿目圆香
function
c1000621
.
initial_effect
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000621
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_HANDES
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
,
1000621
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
c1000621
.
target
)
e1
:
SetOperation
(
c1000621
.
operation
)
c
:
RegisterEffect
(
e1
)
--negate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000621
,
1
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_NO_TURN_RESET
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
10006210
)
e1
:
SetCondition
(
c1000621
.
negcon
)
e1
:
SetTarget
(
c1000621
.
negtg
)
e1
:
SetOperation
(
c1000621
.
negop
)
c
:
RegisterEffect
(
e1
)
end
function
c1000621
.
filter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
end
function
c1000621
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000621
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_HANDES
,
nil
,
1
,
tp
,
1
)
end
function
c1000621
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1000621
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
==
0
then
return
end
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
end
function
c1000621
.
tfilter
(
c
,
tp
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xc204
)
end
function
c1000621
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
g
and
g
:
IsExists
(
c1000621
.
tfilter
,
1
,
nil
,
tp
)
and
Duel
.
IsChainDisablable
(
ev
)
end
function
c1000621
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
eg
,
1
,
0
,
0
)
end
function
c1000621
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateEffect
(
ev
)
end
expansions/script/c1000622.lua
0 → 100644
View file @
ae0a427e
--圆环的少女·鹿目圆香
function
c1000622
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000622
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetTarget
(
c1000622
.
sptg
)
e1
:
SetOperation
(
c1000622
.
spop
)
c
:
RegisterEffect
(
e1
)
--flip
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000622
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_FLIP
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCost
(
c1000622
.
cost
)
e1
:
SetTarget
(
c1000622
.
sptg
)
e1
:
SetOperation
(
c1000622
.
spop
)
c
:
RegisterEffect
(
e1
)
--atkup
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000622
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_NO_TURN_RESET
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_STEP
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
1000622
)
e1
:
SetCondition
(
c1000622
.
atkcon
)
e1
:
SetOperation
(
c1000622
.
atkop
)
c
:
RegisterEffect
(
e1
)
end
function
c1000622
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c1000622
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1000622
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
)
end
function
c1000622
.
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
,
c1000622
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
not
g
:
GetFirst
():
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
function
c1000622
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsType
(
TYPE_PENDULUM
+
TYPE_TUNER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1000622
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
phase
=
Duel
.
GetCurrentPhase
()
if
phase
~=
PHASE_DAMAGE
or
Duel
.
IsDamageCalculated
()
then
return
false
end
local
c
=
Duel
.
GetAttackTarget
()
if
not
c
then
return
false
end
if
c
:
IsControler
(
1
-
tp
)
then
c
=
Duel
.
GetAttacker
()
end
return
c
and
c
:
IsSetCard
(
0xc204
)
and
c
:
IsRelateToBattle
()
end
function
c1000622
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
if
not
a
:
IsRelateToBattle
()
or
a
:
IsFacedown
()
or
not
d
:
IsRelateToBattle
()
or
d
:
IsFacedown
()
then
return
end
if
a
:
GetControler
()
~=
tp
then
a
,
d
=
d
,
a
end
if
a
:
IsImmuneToEffect
(
e
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetOwnerPlayer
(
tp
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_DAMAGE_CAL
)
e1
:
SetValue
(
d
:
GetAttack
())
a
:
RegisterEffect
(
e1
)
end
\ No newline at end of file
expansions/script/c1000623.lua
0 → 100644
View file @
ae0a427e
--Archer·鹿目圆香
function
c1000623
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xc204
),
aux
.
NonTuner
(
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
),
1
)
c
:
EnableReviveLimit
()
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCountLimit
(
1
,
1000623
)
e2
:
SetCondition
(
c1000623
.
recon
)
e2
:
SetTarget
(
c1000623
.
regtg
)
e2
:
SetOperation
(
c1000623
.
regop
)
c
:
RegisterEffect
(
e2
)
--atkup
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetValue
(
c1000623
.
value
)
c
:
RegisterEffect
(
e3
)
--pierce
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_PIERCE
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DAMAGE
+
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
c1000623
.
descon
)
e3
:
SetTarget
(
c1000623
.
destg
)
e3
:
SetOperation
(
c1000623
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c1000623
.
recon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
end
function
c1000623
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
end
function
c1000623
.
regtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSetCard
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
0xc204
)
end
end
function
c1000623
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c1000623
.
thcon
)
e1
:
SetOperation
(
c1000623
.
thop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c1000623
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c1000623
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
c1000623
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
1000623
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1000623
.
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
c1000623
.
atkfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0xc204
)
end
function
c1000623
.
value
(
e
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000623
.
atkfilter
,
c
:
GetControler
(),
LOCATION_GRAVE
,
0
,
nil
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
*
300
end
function
c1000623
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c1000623
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
d
=
g
:
GetFirst
()
local
atk
=
0
if
d
:
IsFaceup
()
then
atk
=
d
:
GetAttack
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
atk
)
end
function
c1000623
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
atk
=
0
if
tc
:
IsFaceup
()
then
atk
=
tc
:
GetAttack
()
end
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
==
0
then
return
end
Duel
.
Damage
(
1
-
tp
,
atk
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c1000624.lua
0 → 100644
View file @
ae0a427e
--Caster·鹿目圆香
function
c1000624
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xc204
),
aux
.
NonTuner
(
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
),
1
)
c
:
EnableReviveLimit
()
--cannot be target
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
c1000624
.
sfilter
)
e1
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e1
)
--copy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000624
,
0
))
e2
:
SetCategory
(
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
c1000624
.
target
)
e2
:
SetOperation
(
c1000624
.
operation
)
c
:
RegisterEffect
(
e2
)
--negate attack
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000624
,
1
))
e1
:
SetCategory
(
CATEGORY_DAMAGE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_NO_TURN_RESET
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
1000624
)
e1
:
SetCondition
(
c1000624
.
nacon
)
e1
:
SetTarget
(
c1000624
.
natg
)
e1
:
SetOperation
(
c1000624
.
naop
)
c
:
RegisterEffect
(
e1
)
end
function
c1000624
.
sfilter
(
c
)
return
c
:
IsFaceup
()
and
(
c
:
IsSetCard
(
0x3204
)
or
c
:
IsSetCard
(
0xa204
)
or
c
:
IsSetCard
(
0x5b23
)
or
c
:
IsSetCard
(
0x6b25
)
or
c
:
IsSetCard
(
0xc204
)
or
c
:
IsSetCard
(
0x3205
))
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1000624
.
cpfilter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemove
()
end
function
c1000624
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_GRAVE
and
c1000624
.
cpfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1000624
.
cpfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1000624
.
cpfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
c1000624
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
1
then
return
end
local
code
=
tc
:
GetOriginalCode
()
local
reset_flag
=
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
c
:
CopyEffect
(
code
,
reset_flag
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
reset_flag
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetValue
(
code
)
c
:
RegisterEffect
(
e1
)
end
end
function
c1000624
.
nacon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
at
=
Duel
.
GetAttackTarget
()
return
at
:
IsControler
(
tp
)
and
at
:
IsFaceup
()
and
at
:
IsSetCard
(
0xc204
)
end
function
c1000624
.
natg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetAttacker
():
IsOnField
()
end
local
dam
=
Duel
.
GetAttacker
():
GetAttack
()
/
2
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
dam
)
end
function
c1000624
.
naop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
if
Duel
.
NegateAttack
()
then
Duel
.
Damage
(
1
-
tp
,
a
:
GetAttack
()
/
2
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c1000625.lua
0 → 100644
View file @
ae0a427e
--Saver·鹿目圆香
function
c1000625
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsType
,
TYPE_SYNCHRO
),
aux
.
NonTuner
(
Card
.
IsType
,
TYPE_SYNCHRO
),
1
)
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1000625
,
0
))
e1
:
SetCategory
(
CATEGORY_CONTROL
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c1000625
.
ctcon
)
e1
:
SetOperation
(
c1000625
.
ctop
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000625
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetCondition
(
c1000625
.
descon
)
e2
:
SetTarget
(
c1000625
.
destg
)
e2
:
SetOperation
(
c1000625
.
desop
)
c
:
RegisterEffect
(
e2
)
--control
local
e99
=
Effect
.
CreateEffect
(
c
)
e99
:
SetType
(
EFFECT_TYPE_SINGLE
)
e99
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e99
:
SetRange
(
LOCATION_MZONE
)
e99
:
SetCode
(
EFFECT_CANNOT_CHANGE_CONTROL
)
c
:
RegisterEffect
(
e99
)
end
function
c1000625
.
ctcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
end
function
c1000625
.
filter
(
c
)
return
c
:
IsFaceup
()
end
function
c1000625
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1000625
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
==
0
then
return
end
local
sg
=
g
:
GetMaxGroup
(
Card
.
GetAttack
)
if
sg
:
GetCount
()
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONTROL
)
sg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
end
local
tc
=
sg
:
GetFirst
()
Duel
.
GetControl
(
tc
,
tp
)
end
function
c1000625
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
and
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c1000625
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c1000625
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c1000626.lua
0 → 100644
View file @
ae0a427e
--期望的未来·鹿目圆香
function
c1000626
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xc204
),
aux
.
NonTuner
(
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
),
1
)
c
:
EnableReviveLimit
()
--lv
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000626
,
0
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c1000626
.
tgcost
)
e2
:
SetTarget
(
c1000626
.
tgtg
)
e2
:
SetOperation
(
c1000626
.
tgop
)
c
:
RegisterEffect
(
e2
)
--synchro effect
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1000626
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetHintTiming
(
0
,
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c1000626
.
sccon
)
e2
:
SetTarget
(
c1000626
.
sctg
)
e2
:
SetOperation
(
c1000626
.
scop
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
1000626
)
e1
:
SetTarget
(
c1000626
.
target
)
e1
:
SetOperation
(
c1000626
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c1000626
.
filter
(
c
)
return
c
:
GetLevel
()
>
0
and
c
:
IsSetCard
(
0xc204
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c1000626
.
tgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1000626
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1000626
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
e
:
SetLabelObject
(
g
:
GetFirst
())
end
function
c1000626
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
opt
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
1000626
,
2
),
aux
.
Stringid
(
1000626
,
3
))
e
:
SetLabel
(
opt
)
end
function
c1000626
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
lv
=
e
:
GetLabelObject
():
GetLevel
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
if
e
:
GetLabel
()
==
0
then
e1
:
SetValue
(
lv
)
else
e1
:
SetValue
(
-
lv
)
end
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
end
end
function
c1000626
.
mfilter
(
c
)
return
c
:
IsSetCard
(
0xc204
)
end
function
c1000626
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
and
Duel
.
GetTurnPlayer
()
~=
tp
and
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
)
end
function
c1000626
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetMatchingGroup
(
c1000626
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
nil
,
mg
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c1000626
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetMatchingGroup
(
c1000626
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
nil
,
mg
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
nil
,
mg
)
end
end
function
c1000626
.
filter0
(
c
)
return
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
end
function
c1000626
.
filter1
(
c
,
e
)
return
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c1000626
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
gc
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0xc204
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
gc
)
end
function
c1000626
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
local
mg1
=
Duel
.
GetMatchingGroup
(
c1000626
.
filter0
,
tp
,
LOCATION_GRAVE
,
0
,
c
)
local
res
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1000626
.
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
(
c1000626
.
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
c1000626
.
operation
(
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
(
c1000626
.
filter1
,
tp
,
LOCATION_GRAVE
,
0
,
c
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c1000626
.
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
(
c1000626
.
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
\ No newline at end of file
expansions/script/c12001000.lua
0 → 100644
View file @
ae0a427e
--LA SY 先負的菲斯特菲
function
c12001000
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12001000
,
0
))
e1
:
SetCategory
(
CATEGORY_DECKDES
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
12001000
)
e1
:
SetTarget
(
c12001000
.
target
)
e1
:
SetOperation
(
c12001000
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12001000
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
12001100
)
e3
:
SetCondition
(
c12001000
.
spcon
)
e3
:
SetTarget
(
c12001000
.
sptg
)
e3
:
SetOperation
(
c12001000
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c12001000
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
end
end
function
c12001000
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsSetCard
(
0xfb0
)
then
Duel
.
DisableShuffleCheck
()
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
else
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
0
,
REASON_EFFECT
)
end
end
function
c12001000
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_DECK
)
and
c
:
IsReason
(
REASON_REVEAL
)
end
function
c12001000
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsLevelBelow
(
4
)
end
function
c12001000
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c12001000
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c12001000
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12001000
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c12001000
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c12001001.lua
0 → 100644
View file @
ae0a427e
--六曜 大安的卡莲特尔
function
c12001001
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12001001
,
0
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
,
12001001
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetTarget
(
c12001001
.
target
)
e1
:
SetOperation
(
c12001001
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12001001
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
12001101
)
e3
:
SetCondition
(
c12001001
.
dscon
)
e3
:
SetTarget
(
c12001001
.
dstg
)
e3
:
SetOperation
(
c12001001
.
dsop
)
c
:
RegisterEffect
(
e3
)
end
function
c12001001
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
end
end
function
c12001001
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsSetCard
(
0xfb0
)
then
Duel
.
DisableShuffleCheck
()
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
0
,
REASON_EFFECT
)
end
end
function
c12001001
.
dscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_DECK
)
and
c
:
IsReason
(
REASON_REVEAL
)
end
function
c12001001
.
filter
(
c
)
return
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
end
function
c12001001
.
dstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12001001
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c12001001
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
tg
=
g
:
GetMaxGroup
(
Card
.
GetAttack
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tg
,
1
,
0
,
0
)
end
function
c12001001
.
dsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c12001001
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tg
=
g
:
GetMaxGroup
(
Card
.
GetAttack
)
if
tg
:
GetCount
()
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
sg
=
tg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
sg
)
local
tc
=
sg
:
GetFirst
()
local
atk
=
tc
:
IsFaceup
()
and
tc
:
GetAttack
()
or
0
if
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
==
1
and
atk
~=
0
then
Duel
.
Recover
(
tp
,
atk
,
REASON_EFFECT
)
Duel
.
Recover
(
1
-
tp
,
atk
,
REASON_EFFECT
)
end
else
local
tc
=
tg
:
GetFirst
()
local
atk
=
tc
:
IsFaceup
()
and
tc
:
GetAttack
()
or
0
if
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
==
1
and
atk
~=
0
then
Duel
.
Recover
(
tp
,
atk
,
REASON_EFFECT
)
Duel
.
Recover
(
1
-
tp
,
atk
,
REASON_EFFECT
)
end
end
end
end
expansions/script/c12001002.lua
0 → 100644
View file @
ae0a427e
--六曜 友引的夕碧姬
function
c12001002
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12001002
,
0
))
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_DECKDES
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
12001002
)
e1
:
SetTarget
(
c12001002
.
target
)
e1
:
SetTarget
(
c12001002
.
target1
)
e1
:
SetOperation
(
c12001002
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12001002
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
12001102
)
e2
:
SetCondition
(
c12001002
.
spcon
)
e2
:
SetTarget
(
c12001002
.
sptg
)
e2
:
SetOperation
(
c12001002
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c12001002
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
end
end
function
c12001002
.
filter
(
c
)
return
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsAbleToHand
()
and
c
:
IsType
(
TYPE_TRAP
)
end
function
c12001002
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12001002
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12001002
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsSetCard
(
0xfb0
)
then
Duel
.
DisableShuffleCheck
()
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12001002
.
filter
,
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
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
0
,
REASON_EFFECT
)
end
end
function
c12001002
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_DECK
)
and
c
:
IsReason
(
REASON_REVEAL
)
end
function
c12001002
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c12001002
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12001002
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12001002
.
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
,
c12001002
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c12001003.lua
0 → 100644
View file @
ae0a427e
--六曜 佛灭的波达蝶斯
function
c12001003
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12001003
,
0
))
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_DECKDES
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
12001003
)
e1
:
SetTarget
(
c12001003
.
target
)
e1
:
SetOperation
(
c12001003
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12001003
,
1
))
e3
:
SetCategory
(
CATEGORY_TOGRAVE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
12001103
)
e3
:
SetCondition
(
c12001003
.
dscon
)
e3
:
SetTarget
(
c12001003
.
dstg
)
e3
:
SetOperation
(
c12001003
.
dsop
)
c
:
RegisterEffect
(
e3
)
end
function
c12001003
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
end
end
function
c12001003
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsSetCard
(
0xfb0
)
then
Duel
.
DisableShuffleCheck
()
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
Duel
.
ConfirmDecktop
(
tp
,
3
)
else
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
0
,
REASON_EFFECT
)
end
end
function
c12001003
.
dscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_DECK
)
and
c
:
IsReason
(
REASON_REVEAL
)
end
function
c12001003
.
dstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c12001003
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12001003
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c12001003
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c12001003
.
dsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
e3
:
SetValue
(
tc
:
GetBaseAttack
()
/
2
)
tc
:
RegisterEffect
(
e3
)
end
end
\ No newline at end of file
expansions/script/c12001004.lua
0 → 100644
View file @
ae0a427e
--六曜 赤口的斯卡雷特
function
c12001004
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
+
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
12001004
)
e1
:
SetCost
(
c12001004
.
cost
)
e1
:
SetTarget
(
c12001004
.
target
)
e1
:
SetOperation
(
c12001004
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12001004
,
1
))
e3
:
SetCategory
(
CATEGORY_TOGRAVE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
12001104
)
e3
:
SetCondition
(
c12001004
.
dscon
)
e3
:
SetTarget
(
c12001004
.
dstg
)
e3
:
SetOperation
(
c12001004
.
dsop
)
c
:
RegisterEffect
(
e3
)
end
function
c12001004
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c12001004
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
end
end
function
c12001004
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsSetCard
(
0xfb0
)
then
Duel
.
DisableShuffleCheck
()
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
else
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
0
,
REASON_EFFECT
)
end
end
function
c12001004
.
dscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_DECK
)
and
c
:
IsReason
(
REASON_REVEAL
)
end
function
c12001004
.
dstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
1
-
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
c12001004
.
dsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_RULE
)
end
end
\ No newline at end of file
expansions/script/c12001005.lua
0 → 100644
View file @
ae0a427e
--六曜 先胜的菲斯特文
function
c12001005
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12001005
,
0
))
e1
:
SetCategory
(
CATEGORY_DECKDES
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
12001005
)
e1
:
SetTarget
(
c12001005
.
target
)
e1
:
SetTarget
(
c12001005
.
target1
)
e1
:
SetOperation
(
c12001005
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12001005
,
2
))
e2
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_DECKDES
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
12001105
)
e2
:
SetCondition
(
c12001005
.
drcon
)
e2
:
SetTarget
(
c12001005
.
drtg
)
e2
:
SetOperation
(
c12001005
.
drop
)
c
:
RegisterEffect
(
e2
)
end
function
c12001005
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
end
end
function
c12001005
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsCode
(
12001000
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c12001005
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12001005
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12001005
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsSetCard
(
0xfb0
)
then
Duel
.
DisableShuffleCheck
()
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12001005
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
else
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
0
,
REASON_EFFECT
)
end
end
function
c12001005
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_DECK
)
and
c
:
IsReason
(
REASON_REVEAL
)
end
function
c12001005
.
drtg
(
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
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_HANDES
,
nil
,
0
,
tp
,
1
)
end
function
c12001005
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
if
Duel
.
Draw
(
p
,
2
,
REASON_EFFECT
)
==
2
then
Duel
.
ShuffleHand
(
tp
)
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
p
,
aux
.
TRUE
,
p
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c12001006.lua
0 → 100644
View file @
ae0a427e
--六曜的卜时
function
c12001006
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--announce
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12001006
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DECKDES
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c12001006
.
target
)
e2
:
SetOperation
(
c12001006
.
operation
)
c
:
RegisterEffect
(
e2
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_LEAVE_GRAVE
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetRange
(
LOCATION_GRAVE
)
e4
:
SetCost
(
aux
.
bfgcost
)
e4
:
SetTarget
(
c12001006
.
actg
)
e4
:
SetOperation
(
c12001006
.
acop
)
c
:
RegisterEffect
(
e4
)
end
function
c12001006
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
end
end
function
c12001006
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsSetCard
(
0xfb0
)
then
Duel
.
DisableShuffleCheck
()
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
else
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
tp
)
end
local
tg
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
p
,
LOCATION_HAND
,
0
,
nil
)
if
tg
:
GetCount
()
>
1
and
tg
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0xfb0
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg1
=
tg
:
Select
(
tp
,
Card
.
IsSetCard
,
1
,
1
,
nil
,
0xfb0
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg1
)
Duel
.
SendtoDeck
(
sg1
,
nil
,
1
,
REASON_EFFECT
)
else
local
hg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
Duel
.
ConfirmCards
(
1
-
tp
,
hg
)
local
ct
=
Duel
.
SendtoDeck
(
hg
,
nil
,
0
,
REASON_EFFECT
)
Duel
.
SortDecktop
(
tp
,
tp
,
ct
)
end
end
function
c12001006
.
acfilter
(
c
)
return
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsAbleToDeck
()
end
function
c12001006
.
actg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c12001006
.
acfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12001006
.
filter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
Duel
.
SelectTarget
(
tp
,
c12001006
.
acfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
end
function
c12001006
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
SendtoDeck
(
sg
,
nil
,
0
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c12001007.lua
0 → 100644
View file @
ae0a427e
--六曜的读时
function
c12001007
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCondition
(
c12001007
.
condition
)
e1
:
SetTarget
(
c12001007
.
target
)
e1
:
SetOperation
(
c12001007
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCondition
(
c12001007
.
damcon
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetOperation
(
c12001007
.
damop
)
c
:
RegisterEffect
(
e2
)
end
function
c12001007
.
indtg
(
e
,
c
)
return
c
:
IsSetCard
(
0xfb0
)
end
function
c12001007
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c12001007
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c12001007
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
function
c12001007
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
Draw
(
1
-
tp
,
1
,
REASON_EFFECT
)
end
function
c12001007
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xfb0
)
end
function
c12001007
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c12001007
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c12001007
.
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
end
function
c12001007
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Draw
(
1
-
tp
,
1
,
REASON_EFFECT
)
end
end
expansions/script/c12001008.lua
0 → 100644
View file @
ae0a427e
--六曜的梦回
function
c12001008
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c12001008
.
condition
)
e1
:
SetTarget
(
c12001008
.
target
)
e1
:
SetOperation
(
c12001008
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12001008
,
1
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
c12001008
.
setcon
)
e2
:
SetTarget
(
c12001008
.
settg
)
e2
:
SetOperation
(
c12001008
.
setop
)
c
:
RegisterEffect
(
e2
)
end
function
c12001008
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
end
function
c12001008
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
and
chkc
:
IsSetCard
(
0xfb0
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c12001008
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
100
)
tc
:
RegisterEffect
(
e1
)
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
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetValue
(
c12001008
.
efilter
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c12001008
.
efilter
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
function
c12001008
.
cfilter
(
c
,
tp
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
c
:
GetPreviousControler
()
==
1
-
tp
end
function
c12001008
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c12001008
.
cfilter
,
1
,
nil
,
tp
)
end
function
c12001008
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsSSetable
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c12001008
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsSSetable
()
then
Duel
.
SSet
(
tp
,
c
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x47e0000
)
e1
:
SetValue
(
LOCATION_REMOVED
)
c
:
RegisterEffect
(
e1
)
end
end
\ No newline at end of file
expansions/script/c12001009.lua
0 → 100644
View file @
ae0a427e
--六曜的先负
function
c12001009
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c12001009
.
target
)
e1
:
SetOperation
(
c12001009
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12001009
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
12001100
)
e3
:
SetCondition
(
c12001009
.
spcon
)
e3
:
SetTarget
(
c12001009
.
sptg
)
e3
:
SetOperation
(
c12001009
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c12001009
.
filter
(
c
)
return
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c12001009
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12001009
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12001009
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12001009
.
filter
,
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
c12001009
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_DECK
)
and
c
:
IsReason
(
REASON_REVEAL
)
end
function
c12001009
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c12001009
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c12001009
.
filter1
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c12001009
.
filter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12001009
.
filter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c12001009
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c12001010.lua
0 → 100644
View file @
ae0a427e
--六曜的先胜
function
c12001010
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
12001010
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c12001010
.
target
)
e1
:
SetOperation
(
c12001010
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12001010
,
2
))
e2
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_DECKDES
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
12001105
)
e2
:
SetCondition
(
c12001010
.
drcon
)
e2
:
SetTarget
(
c12001010
.
drtg
)
e2
:
SetOperation
(
c12001010
.
drop
)
c
:
RegisterEffect
(
e2
)
end
function
c12001010
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
3
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
3
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
3
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
0
,
tp
,
2
)
end
function
c12001010
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
==
3
then
Duel
.
ShuffleHand
(
p
)
Duel
.
BreakEffect
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
p
,
LOCATION_HAND
,
0
,
nil
)
if
g
:
GetCount
()
>
1
and
g
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0xfb0
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
p
,
HINTMSG_TODECK
)
local
sg1
=
g
:
FilterSelect
(
p
,
Card
.
IsSetCard
,
1
,
1
,
nil
,
0xfb0
)
Duel
.
Hint
(
HINT_SELECTMSG
,
p
,
HINTMSG_TODECK
)
local
sg2
=
g
:
Select
(
p
,
1
,
1
,
sg1
:
GetFirst
())
sg1
:
Merge
(
sg2
)
Duel
.
ConfirmCards
(
1
-
p
,
sg1
)
Duel
.
SendtoDeck
(
sg1
,
nil
,
1
,
REASON_EFFECT
)
Duel
.
SortDecktop
(
p
,
p
,
2
)
else
local
hg
=
Duel
.
GetFieldGroup
(
p
,
LOCATION_HAND
,
0
)
Duel
.
ConfirmCards
(
1
-
p
,
hg
)
local
ct
=
Duel
.
SendtoDeck
(
hg
,
nil
,
0
,
REASON_EFFECT
)
Duel
.
SortDecktop
(
p
,
p
,
ct
)
end
end
end
function
c12001010
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_DECK
)
and
c
:
IsReason
(
REASON_REVEAL
)
end
function
c12001010
.
drtg
(
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
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_HANDES
,
nil
,
0
,
tp
,
1
)
end
function
c12001010
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
if
Duel
.
Draw
(
p
,
2
,
REASON_EFFECT
)
==
2
then
Duel
.
ShuffleHand
(
tp
)
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
p
,
aux
.
TRUE
,
p
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c12001011.lua
0 → 100644
View file @
ae0a427e
--六曜的友引
function
c12001011
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c12001011
.
target
)
e1
:
SetOperation
(
c12001011
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12001011
,
2
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
12001102
)
e2
:
SetCondition
(
c12001011
.
spcon
)
e2
:
SetTarget
(
c12001011
.
sptg
)
e2
:
SetOperation
(
c12001011
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c12001011
.
filter
(
c
)
return
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
end
function
c12001011
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
not
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12001011
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
HINTMSG_TOFIELD
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c12001011
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
and
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12001011
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
MoveToField
(
g
:
GetFirst
(),
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
function
c12001011
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_DECK
)
and
c
:
IsReason
(
REASON_REVEAL
)
end
function
c12001011
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c12001011
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12001011
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12001011
.
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
,
c12001011
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c12001012.lua
0 → 100644
View file @
ae0a427e
--六曜 流连的卡尔特
function
c12001012
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12001012
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c12001012
.
target
)
e1
:
SetOperation
(
c12001012
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12001012
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_DECKDES
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
12001112
)
e2
:
SetCondition
(
c12001012
.
drcon
)
e2
:
SetTarget
(
c12001012
.
drtg
)
e2
:
SetOperation
(
c12001012
.
drop
)
c
:
RegisterEffect
(
e2
)
end
function
c12001012
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
end
end
function
c12001012
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsSetCard
(
0xfb0
)
then
Duel
.
DisableShuffleCheck
()
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
else
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
0
,
REASON_EFFECT
)
end
end
function
c12001012
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_DECK
)
and
c
:
IsReason
(
REASON_REVEAL
)
end
function
c12001012
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c12001012
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
Duel
.
Draw
(
p
,
1
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c12001013.lua
0 → 100644
View file @
ae0a427e
--六曜 虚亡的克尔米
function
c12001013
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12001013
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
12001013
)
e1
:
SetTarget
(
c12001013
.
thtg
)
e1
:
SetOperation
(
c12001013
.
thop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12001013
,
2
))
e2
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_DECKDES
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
12001113
)
e2
:
SetCondition
(
c12001013
.
necon
)
e2
:
SetOperation
(
c12001013
.
neop
)
c
:
RegisterEffect
(
e2
)
end
function
c12001013
.
thfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
end
function
c12001013
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12001013
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c12001013
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12001013
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c12001013
.
necon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_DECK
)
and
c
:
IsReason
(
REASON_REVEAL
)
end
function
c12001013
.
filter
(
c
)
return
c
:
IsFaceup
()
and
(
c
:
IsLocation
(
LOCATION_SZONE
)
or
c
:
IsType
(
TYPE_EFFECT
))
and
not
c
:
IsDisabled
()
end
function
c12001013
.
neop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
c12001013
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
c
)
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
end
\ No newline at end of file
expansions/script/c12001015.lua
0 → 100644
View file @
ae0a427e
--六曜 虚亡的克尔米
function
c12001015
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c12001015
.
sptg
)
e1
:
SetOperation
(
c12001015
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12001015
,
2
))
e2
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_DECKDES
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
12001015
)
e2
:
SetCondition
(
c12001015
.
necon
)
e2
:
SetTarget
(
c12001015
.
tptar
)
e2
:
SetOperation
(
c12001015
.
tpop
)
c
:
RegisterEffect
(
e2
)
end
function
c12001015
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c12001015
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c12001015
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12001015
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12001015
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c12001015
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
local
fid
=
c
:
GetFieldID
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e3
)
tc
:
RegisterFlagEffect
(
12001015
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
,
fid
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetCountLimit
(
1
)
e4
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e4
:
SetLabel
(
fid
)
e4
:
SetLabelObject
(
tc
)
e4
:
SetCondition
(
c12001015
.
descon
)
e4
:
SetOperation
(
c12001015
.
desop
)
Duel
.
RegisterEffect
(
e4
,
tp
)
end
Duel
.
SpecialSummonComplete
()
end
function
c12001015
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
if
tc
:
GetFlagEffectLabel
(
12001015
)
==
e
:
GetLabel
()
then
return
true
else
e
:
Reset
()
return
false
end
end
function
c12001015
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
function
c12001015
.
necon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_DECK
)
and
c
:
IsReason
(
REASON_REVEAL
)
end
function
c12001015
.
tptar
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
not
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12001015
.
tpfilter
,
tp
,
LOCATION_EXTRA
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
end
end
function
c12001015
.
tpfilter
(
c
)
return
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
end
function
c12001015
.
tpop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
then
return
false
end
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
and
Duel
.
IsExistingMatchingCard
(
c12001015
.
tpfilter
,
tp
,
LOCATION_EXTRA
+
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12001015
.
tpfilter
,
tp
,
LOCATION_EXTRA
+
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
MoveToField
(
g
:
GetFirst
(),
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
if
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c12001015
.
tpfilter
,
tp
,
LOCATION_EXTRA
+
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12001015
.
tpfilter
,
tp
,
LOCATION_EXTRA
+
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
MoveToField
(
g
:
GetFirst
(),
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
\ No newline at end of file
expansions/script/c12001016.lua
0 → 100644
View file @
ae0a427e
--六曜的先导
function
c12001016
.
initial_effect
(
c
)
end
expansions/script/c12001021.lua
0 → 100644
View file @
ae0a427e
--六曜的卡莲思特
function
c12001021
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsType
,
TYPE_EFFECT
),
2
)
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12001021
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCondition
(
c12001021
.
descon
)
e1
:
SetTarget
(
c12001021
.
sptg
)
e1
:
SetValue
(
c12001021
.
repval
)
e1
:
SetOperation
(
c12001021
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e2
:
SetValue
(
c12001021
.
valcheck
)
e2
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e2
)
end
function
c12001021
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_LINK
and
e
:
GetLabel
()
==
1
end
function
c12001021
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
if
g
:
IsExists
(
Card
.
IsType
,
1
,
nil
,
TYPE_PENDULUM
)
then
e
:
GetLabelObject
():
SetLabel
(
1
)
else
e
:
GetLabelObject
():
SetLabel
(
0
)
end
end
function
c12001021
.
filter
(
c
,
e
,
tp
,
zone
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
zone
)
and
c
:
IsFaceup
()
end
function
c12001021
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_EXTRA
)
and
chkc
:
IsControler
(
tp
)
and
c12001021
.
filter
(
chkc
,
e
,
tp
,
zone
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
zone
~=
0
and
Duel
.
IsExistingTarget
(
c12001021
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12001021
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c12001021
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
zone
=
c
:
GetLinkedZone
()
if
zone
==
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
end
end
\ No newline at end of file
expansions/script/c12001022.lua
0 → 100644
View file @
ae0a427e
--六曜的虹光丘儿
function
c12001022
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
c12001022
.
matfilter
,
2
)
c
:
EnableReviveLimit
()
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12001022
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c12001022
.
target
)
e1
:
SetOperation
(
c12001022
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
c12001022
.
desreptg
)
e2
:
SetValue
(
c12001022
.
desrepval
)
e2
:
SetOperation
(
c12001022
.
desrepop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e3
:
SetValue
(
1
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e3
)
end
function
c12001022
.
repfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
end
function
c12001022
.
desfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsStatus
(
STATUS_DESTROY_CONFIRMED
+
STATUS_BATTLE_DESTROYED
)
end
function
c12001022
.
desreptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
g
=
c
:
GetLinkedGroup
()
if
chk
==
0
then
return
eg
:
IsExists
(
c12001022
.
repfilter
,
1
,
nil
,
tp
)
and
g
:
IsExists
(
c12001022
.
desfilter
,
1
,
nil
,
tp
)
end
if
Duel
.
SelectEffectYesNo
(
tp
,
c
,
96
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESREPLACE
)
local
sg
=
g
:
FilterSelect
(
tp
,
c12001022
.
desfilter
,
1
,
1
,
nil
,
tp
)
e
:
SetLabelObject
(
sg
:
GetFirst
())
Duel
.
HintSelection
(
sg
)
sg
:
GetFirst
():
SetStatus
(
STATUS_DESTROY_CONFIRMED
,
true
)
return
true
else
return
false
end
end
function
c12001022
.
desrepval
(
e
,
c
)
return
c12001022
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
function
c12001022
.
desrepop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
tc
:
SetStatus
(
STATUS_DESTROY_CONFIRMED
,
false
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
+
REASON_REPLACE
)
end
function
c12001022
.
matfilter
(
c
)
return
c
:
IsSetCard
(
0xfb0
)
end
function
c12001022
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
end
end
function
c12001022
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsSetCard
(
0xfb0
)
then
Duel
.
DisableShuffleCheck
()
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
local
p
=
c
:
GetControler
()
local
zone
=
bit
.
band
(
c
:
GetLinkedZone
(),
0x1f
)
if
Duel
.
GetLocationCount
(
p
,
LOCATION_MZONE
,
p
,
LOCATION_REASON_CONTROL
,
zone
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12001022
,
1
))
then
Duel
.
BreakEffect
()
local
s
=
0
if
c
:
IsControler
(
tp
)
then
local
flag
=
bit
.
bxor
(
zone
,
0xff
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
571
)
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
flag
)
else
local
flag
=
bit
.
bxor
(
zone
,
0xff
)
*
0x10000
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
571
)
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
0
,
LOCATION_MZONE
,
flag
)
/
0x10000
end
local
nseq
=
0
if
s
==
1
then
nseq
=
0
elseif
s
==
2
then
nseq
=
1
elseif
s
==
4
then
nseq
=
2
elseif
s
==
8
then
nseq
=
3
else
nseq
=
4
end
Duel
.
MoveSequence
(
c
,
nseq
)
end
else
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
nil
)
end
end
\ No newline at end of file
expansions/script/c12001023.lua
0 → 100644
View file @
ae0a427e
--六曜的霓虹丘儿
function
c12001023
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12001023
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
aux
.
SynCondition
(
nil
,
aux
.
NonTuner
(
c12001023
.
ntfilter
),
1
,
99
))
e1
:
SetTarget
(
aux
.
SynTarget
(
nil
,
aux
.
NonTuner
(
c12001023
.
ntfilter
),
1
,
99
))
e1
:
SetOperation
(
aux
.
SynOperation
(
nil
,
aux
.
NonTuner
(
c12001023
.
ntfilter
),
1
,
99
))
e1
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetDescription
(
aux
.
Stringid
(
12001023
,
1
))
e2
:
SetCondition
(
c12001023
.
syncon
)
e2
:
SetTarget
(
c12001023
.
syntg
)
e2
:
SetOperation
(
c12001023
.
synop
)
e2
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12001023
,
3
))
e3
:
SetCategory
(
CATEGORY_NEGATE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetCondition
(
c12001023
.
discon
)
e3
:
SetTarget
(
c12001023
.
distg
)
e3
:
SetOperation
(
c12001023
.
disop
)
c
:
RegisterEffect
(
e3
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
12001023
,
4
))
e5
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetTarget
(
c12001023
.
destg
)
e5
:
SetOperation
(
c12001023
.
desop
)
c
:
RegisterEffect
(
e5
)
end
function
c12001023
.
ntfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsCanBeSynchroMaterial
()
end
function
c12001023
.
matfilter1
(
c
,
syncard
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
GetSummonType
()
==
SUMMON_TYPE_PENDULUM
and
c
:
IsNotTuner
()
and
c
:
IsFaceup
()
and
c
:
IsCanBeSynchroMaterial
(
syncard
)
and
Duel
.
IsExistingMatchingCard
(
c12001023
.
matfilter2
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
,
syncard
)
end
function
c12001023
.
matfilter2
(
c
,
syncard
)
return
c
:
IsNotTuner
()
and
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsCanBeSynchroMaterial
(
syncard
)
end
function
c12001023
.
synfilter
(
c
,
syncard
,
lv
,
g2
,
minc
)
local
tlv
=
c
:
GetSynchroLevel
(
syncard
)
if
lv
-
tlv
<=
0
then
return
false
end
local
g
=
g2
:
Clone
()
g
:
RemoveCard
(
c
)
return
g
:
CheckWithSumEqual
(
Card
.
GetSynchroLevel
,
lv
-
tlv
,
minc
-
1
,
63
,
syncard
)
end
function
c12001023
.
syncon
(
e
,
c
,
tuner
,
mg
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
tp
=
c
:
GetControler
()
local
ct
=-
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
minc
=
2
if
minc
<
ct
then
minc
=
ct
end
local
g1
=
nil
local
g2
=
nil
if
mg
then
g1
=
mg
:
Filter
(
c12001023
.
matfilter1
,
nil
,
c
)
g2
=
mg
:
Filter
(
c12001023
.
matfilter2
,
nil
,
c
)
else
g1
=
Duel
.
GetMatchingGroup
(
c12001023
.
matfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
)
g2
=
Duel
.
GetMatchingGroup
(
c12001023
.
matfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
)
end
local
pe
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_SMATERIAL
)
local
lv
=
c
:
GetLevel
()
if
tuner
then
return
c12001023
.
synfilter
(
tuner
,
c
,
lv
,
g2
,
minc
)
end
if
not
pe
then
return
g1
:
IsExists
(
c12001023
.
synfilter
,
1
,
nil
,
c
,
lv
,
g2
,
minc
)
else
return
c12001023
.
synfilter
(
pe
:
GetOwner
(),
c
,
lv
,
g2
,
minc
)
end
end
function
c12001023
.
syntg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
tuner
,
mg
)
local
g
=
Group
.
CreateGroup
()
local
g1
=
nil
local
g2
=
nil
if
mg
then
g1
=
mg
:
Filter
(
c12001023
.
matfilter1
,
nil
,
c
)
g2
=
mg
:
Filter
(
c12001023
.
matfilter2
,
nil
,
c
)
else
g1
=
Duel
.
GetMatchingGroup
(
c12001023
.
matfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
)
g2
=
Duel
.
GetMatchingGroup
(
c12001023
.
matfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
)
end
local
ct
=-
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
minc
=
2
if
minc
<
ct
then
minc
=
ct
end
local
pe
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_SMATERIAL
)
local
lv
=
c
:
GetLevel
()
if
tuner
then
g
:
AddCard
(
tuner
)
g2
:
RemoveCard
(
tuner
)
local
lv1
=
tuner
:
GetSynchroLevel
(
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
m2
=
g2
:
SelectWithSumEqual
(
tp
,
Card
.
GetSynchroLevel
,
lv
-
lv1
,
minc
-
1
,
63
,
c
)
g
:
Merge
(
m2
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
tuner
=
nil
if
not
pe
then
local
t1
=
g1
:
FilterSelect
(
tp
,
c12001023
.
synfilter
,
1
,
1
,
nil
,
c
,
lv
,
g2
,
minc
)
tuner
=
t1
:
GetFirst
()
else
tuner
=
pe
:
GetOwner
()
Group
.
FromCards
(
tuner
):
Select
(
tp
,
1
,
1
,
nil
)
end
tuner
:
RegisterFlagEffect
(
12001023
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
g
:
AddCard
(
tuner
)
g2
:
RemoveCard
(
tuner
)
local
lv1
=
tuner
:
GetSynchroLevel
(
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
m2
=
g2
:
SelectWithSumEqual
(
tp
,
Card
.
GetSynchroLevel
,
lv
-
lv1
,
minc
-
1
,
63
,
c
)
g
:
Merge
(
m2
)
end
if
g
then
g
:
KeepAlive
()
e
:
SetLabelObject
(
g
)
return
true
else
return
false
end
end
function
c12001023
.
synop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
tuner
,
mg
)
local
g
=
e
:
GetLabelObject
()
c
:
SetMaterial
(
g
)
Duel
.
SendtoGrave
(
g
,
REASON_MATERIAL
+
REASON_SYNCHRO
)
g
:
DeleteGroup
()
end
function
c12001023
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsSetCard
(
0xfb0
)
and
not
re
:
GetHandler
():
IsCode
(
12001023
)
and
Duel
.
IsChainNegatable
(
ev
)
and
Duel
.
GetTurnPlayer
()
~=
tp
end
function
c12001023
.
distg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
end
end
function
c12001023
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
ng
=
Group
.
CreateGroup
()
for
i
=
1
,
ev
do
local
te
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
)
local
tc
=
te
:
GetHandler
()
ng
:
AddCard
(
tc
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
ng
,
ng
:
GetCount
(),
0
,
0
)
end
function
c12001023
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsSetCard
(
0xfb0
)
then
Duel
.
DisableShuffleCheck
()
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
for
i
=
1
,
ev
do
local
te
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
)
if
te
:
GetOwnerPlayer
()
~=
tp
then
Duel
.
NegateActivation
(
i
)
end
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
else
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
Duel
.
ShuffleDeck
(
nil
)
end
end
function
c12001023
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
c12001023
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
IsExistingMatchingCard
(
c12001023
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12001023
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
e
:
GetHandler
())
if
g
:
GetCount
()
>
0
and
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12001023
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
\ No newline at end of file
expansions/script/c12001024.lua
0 → 100644
View file @
ae0a427e
--六曜的牙月丘儿
function
c12001024
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFun2
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0xfba
),
c12001024
.
ffilter
,
true
)
--special summon rule
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
c12001024
.
spcon
)
e1
:
SetOperation
(
c12001024
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12001024
,
0
))
e2
:
SetCategory
(
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
12001024
)
e2
:
SetTarget
(
c12001024
.
settg
)
e2
:
SetOperation
(
c12001024
.
setop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12001024
,
1
))
e3
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetCountLimit
(
2
)
e3
:
SetCondition
(
c12001024
.
discon
)
e3
:
SetTarget
(
c12001024
.
distg
)
e3
:
SetOperation
(
c12001024
.
disop
)
c
:
RegisterEffect
(
e3
)
end
function
c12001024
.
matfilter
(
c
)
return
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsReleasable
()
and
c
:
IsFaceup
()
end
function
c12001024
.
cfilter1
(
c
,
tp
,
g
)
return
c
:
IsFaceup
()
end
function
c12001024
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
g
=
Duel
.
GetMatchingGroup
(
c12001024
.
matfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
g
:
IsExists
(
c12001024
.
cfilter1
,
2
,
nil
,
tp
,
g
)
end
function
c12001024
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c12001024
.
matfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g1
=
g
:
FilterSelect
(
tp
,
c12001024
.
cfilter1
,
2
,
2
,
nil
,
tp
,
g
)
Duel
.
Release
(
g1
,
POS_FACEUP
,
REASON_COST
)
end
function
c12001024
.
filter
(
c
)
return
c
:
IsSetCard
(
0xfb0
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
()
end
function
c12001024
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12001024
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
function
c12001024
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12001024
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c12001024
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c12001024
.
distg
(
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
end
function
c12001024
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsFaceup
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
end
end
expansions/script/c12001025.lua
0 → 100644
View file @
ae0a427e
--六曜的新源丘儿
function
c12001025
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xfb0
),
4
,
2
)
c
:
EnableReviveLimit
()
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12001025
,
0
))
e1
:
SetCategory
(
CATEGORY_NEGATE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCost
(
c12001025
.
cost
)
e1
:
SetTarget
(
c12001025
.
distg3
)
e1
:
SetOperation
(
c12001025
.
disop
)
c
:
RegisterEffect
(
e1
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e4
:
SetValue
(
1
)
c
:
RegisterEffect
(
e4
)
end
function
c12001025
.
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
c12001025
.
filter3
(
c
)
return
c
:
IsFaceup
()
and
not
c
:
IsSetCard
(
0xfb0
)
end
function
c12001025
.
distg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
eg
:
IsExists
(
c12001025
.
filter3
,
1
,
nil
)
end
local
g
=
eg
:
Filter
(
c12001025
.
filter3
,
nil
)
Duel
.
SetTargetCard
(
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c12001025
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsType
(
TYPE_EFFECT
)
then
c
:
SetCardTarget
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_OWNER_RELATE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetCondition
(
c12001025
.
rcon
)
tc
:
RegisterEffect
(
e1
,
true
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_CHANGE_POSITION
)
tc
:
RegisterEffect
(
e2
,
true
)
end
end
function
c12001025
.
rcon
(
e
)
return
e
:
GetOwner
():
IsHasCardTarget
(
e
:
GetHandler
())
end
\ No newline at end of file
expansions/script/c13257215.lua
View file @
ae0a427e
...
...
@@ -38,7 +38,7 @@ function c13257215.initial_effect(c)
c
:
RegisterEffect
(
e3
)
--remove
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
132572
03
,
1
))
e4
:
SetDescription
(
aux
.
Stringid
(
132572
15
,
2
))
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetRange
(
LOCATION_MZONE
)
...
...
expansions/script/c13257219.lua
View file @
ae0a427e
...
...
@@ -39,8 +39,12 @@ function c13257219.initial_effect(c)
local
e13
=
e12
:
Clone
()
e13
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e13
)
Duel
.
AddCustomActivityCounter
(
13257219
,
ACTIVITY_SPSUMMON
,
c13257219
.
counterfilter
)
end
function
c13257219
.
counterfilter
(
c
)
return
c
:
GetSummonLocation
()
~=
LOCATION_EXTRA
end
function
c13257219
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsDiscardable
()
end
...
...
@@ -91,7 +95,7 @@ function c13257219.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c13257219
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
Get
ActivityCount
(
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
Get
CustomActivityCount
(
13257219
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
...
...
expansions/script/c13257225.lua
0 → 100644
View file @
ae0a427e
--B.E.S 寄生核心
function
c13257225
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x1f
)
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetDescription
(
aux
.
Stringid
(
13257225
,
1
))
e11
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetCode
(
EFFECT_SUMMON_PROC
)
e11
:
SetCondition
(
c13257225
.
otcon
)
e11
:
SetOperation
(
c13257225
.
otop
)
e11
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e11
)
--Destroy replace
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
c13257225
.
desreptg
)
e1
:
SetOperation
(
c13257225
.
desrepop
)
c
:
RegisterEffect
(
e1
)
--counter
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_COUNTER
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetOperation
(
c13257225
.
ctop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
13257225
,
2
))
e4
:
SetCategory
(
CATEGORY_DISABLE
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetOperation
(
c13257225
.
negop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
13257225
,
3
))
e5
:
SetCategory
(
CATEGORY_TODECK
)
e5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_CHAINING
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCondition
(
c13257225
.
tdcon
)
e5
:
SetTarget
(
c13257225
.
tdtg
)
e5
:
SetOperation
(
c13257225
.
tdop
)
c
:
RegisterEffect
(
e5
)
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e12
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e12
:
SetOperation
(
c13257225
.
bgmop
)
c
:
RegisterEffect
(
e12
)
local
e13
=
e12
:
Clone
()
e13
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e13
)
end
function
c13257225
.
otfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsReleasable
()
end
function
c13257225
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
c13257225
.
otfilter
,
tp
,
LOCATION_HAND
,
0
,
c
)
return
mg
:
GetCount
()
>=
1
end
function
c13257225
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c13257225
.
otfilter
,
tp
,
LOCATION_HAND
,
0
,
c
)
local
sg
=
mg
:
Select
(
tp
,
1
,
1
,
nil
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
function
c13257225
.
desreptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
and
e
:
GetHandler
():
GetCounter
(
0x1f
)
>
0
end
return
true
end
function
c13257225
.
desrepop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RemoveCounter
(
ep
,
0x1f
,
1
,
REASON_EFFECT
)
end
function
c13257225
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
AddCounter
(
0x1f
,
3
)
end
function
c13257225
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
not
c
:
IsDisabled
()
end
function
c13257225
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
c13257225
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetCode
(
EFFECT_DISABLE
)
e6
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e7
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e7
)
tc
=
g
:
GetNext
()
end
end
function
c13257225
.
tdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
e
:
GetHandler
():
GetCounter
(
0x1f
)
==
0
end
function
c13257225
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
re
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
eg
,
1
,
0
,
0
)
end
function
c13257225
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SendtoDeck
(
eg
,
nil
,
2
,
REASON_EFFECT
)
end
end
function
c13257225
.
bgmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
11
,
0
,
aux
.
Stringid
(
13257225
,
4
))
end
expansions/script/c13257226.lua
0 → 100644
View file @
ae0a427e
--B.E.S 厄运战舰
function
c13257226
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x1f
)
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetDescription
(
aux
.
Stringid
(
13257226
,
1
))
e11
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetCode
(
EFFECT_SUMMON_PROC
)
e11
:
SetCondition
(
c13257226
.
otcon
)
e11
:
SetOperation
(
c13257226
.
otop
)
e11
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e11
)
--cannot special summon
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e12
:
SetType
(
EFFECT_TYPE_SINGLE
)
e12
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e12
:
SetValue
(
aux
.
FALSE
)
c
:
RegisterEffect
(
e12
)
--Destroy replace
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
c13257226
.
desreptg
)
e1
:
SetOperation
(
c13257226
.
desrepop
)
c
:
RegisterEffect
(
e1
)
--counter
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_COUNTER
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetOperation
(
c13257226
.
ctop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
13257226
,
2
))
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetHintTiming
(
0
,
0x1e0
)
e4
:
SetCondition
(
c13257226
.
descon
)
e4
:
SetCost
(
c13257226
.
descost
)
e4
:
SetOperation
(
c13257226
.
desop
)
c
:
RegisterEffect
(
e4
)
local
e13
=
Effect
.
CreateEffect
(
c
)
e13
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e13
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e13
:
SetOperation
(
c13257226
.
bgmop
)
c
:
RegisterEffect
(
e13
)
local
e14
=
e13
:
Clone
()
e14
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e14
)
end
function
c13257226
.
otfilter
(
c
,
tp
)
return
c
:
IsRace
(
RACE_MACHINE
)
and
(
c
:
IsControler
(
tp
)
or
c
:
IsFaceup
())
end
function
c13257226
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
c13257226
.
otfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
tp
)
return
c
:
GetLevel
()
>
6
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
end
function
c13257226
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c13257226
.
otfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
tp
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
1
,
1
,
mg
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
function
c13257226
.
desreptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
and
e
:
GetHandler
():
GetCounter
(
0x1f
)
>
0
end
return
true
end
function
c13257226
.
desrepop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RemoveCounter
(
ep
,
0x1f
,
1
,
REASON_EFFECT
)
end
function
c13257226
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
AddCounter
(
0x1f
,
3
)
end
function
c13257226
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
seq
=
e
:
GetHandler
():
GetSequence
()
if
seq
>
4
then
return
false
end
return
(
seq
>
0
and
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
seq
-
1
))
or
(
seq
<
4
and
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
seq
+
1
))
end
function
c13257226
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0x1f
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveCounter
(
tp
,
0x1f
,
1
,
REASON_COST
)
end
function
c13257226
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsControler
(
tp
)
then
local
seq
=
c
:
GetSequence
()
if
seq
<=
4
then
if
(
seq
>
0
and
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
seq
-
1
))
or
(
seq
<
4
and
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
seq
+
1
))
then
local
flag
=
0
if
seq
>
0
and
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
seq
-
1
)
then
flag
=
bit
.
replace
(
flag
,
0x1
,
seq
-
1
)
end
if
seq
<
4
and
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
seq
+
1
)
then
flag
=
bit
.
replace
(
flag
,
0x1
,
seq
+
1
)
end
flag
=
bit
.
bxor
(
flag
,
0xff
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
571
)
local
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
flag
)
local
nseq
=
0
if
s
==
1
then
nseq
=
0
elseif
s
==
2
then
nseq
=
1
elseif
s
==
4
then
nseq
=
2
elseif
s
==
8
then
nseq
=
3
else
nseq
=
4
end
Duel
.
MoveSequence
(
c
,
nseq
)
end
end
seq
=
c
:
GetSequence
()
local
g
=
Group
.
CreateGroup
()
if
seq
>
0
then
local
lseq
=
seq
-
1
local
tc
=
nil
if
lseq
==
1
then
tc
=
Duel
.
GetFieldCard
(
1
-
tp
,
LOCATION_MZONE
,
6
)
elseif
lseq
==
3
then
tc
=
Duel
.
GetFieldCard
(
1
-
tp
,
LOCATION_MZONE
,
5
)
end
if
tc
and
tc
:
IsControler
(
1
-
tp
)
then
g
:
AddCard
(
tc
)
else
tc
=
Duel
.
GetFieldCard
(
1
-
tp
,
LOCATION_MZONE
,
4
-
lseq
)
if
tc
then
g
:
AddCard
(
tc
)
else
tc
=
Duel
.
GetFieldCard
(
1
-
tp
,
LOCATION_SZONE
,
4
-
lseq
)
if
tc
then
g
:
AddCard
(
tc
)
end
end
end
end
if
seq
<
4
then
local
rseq
=
seq
+
1
local
tc
=
nil
if
rseq
==
1
then
tc
=
Duel
.
GetFieldCard
(
1
-
tp
,
LOCATION_MZONE
,
6
)
elseif
rseq
==
3
then
tc
=
Duel
.
GetFieldCard
(
1
-
tp
,
LOCATION_MZONE
,
5
)
end
if
tc
and
tc
:
IsControler
(
1
-
tp
)
then
g
:
AddCard
(
tc
)
else
tc
=
Duel
.
GetFieldCard
(
1
-
tp
,
LOCATION_MZONE
,
4
-
rseq
)
if
tc
then
g
:
AddCard
(
tc
)
else
tc
=
Duel
.
GetFieldCard
(
1
-
tp
,
LOCATION_SZONE
,
4
-
rseq
)
if
tc
then
g
:
AddCard
(
tc
)
end
end
end
end
if
g
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
end
function
c13257226
.
bgmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
11
,
0
,
aux
.
Stringid
(
13257226
,
4
))
end
expansions/script/c13257308.lua
View file @
ae0a427e
...
...
@@ -108,6 +108,8 @@ function c13257308.desop(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
)
Duel
.
AdjustInstantly
()
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
end
tc
=
g
:
GetNext
()
end
...
...
expansions/script/c13257332.lua
0 → 100644
View file @
ae0a427e
--里超时空战斗机-Star Soldier
function
c13257332
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
aux
.
LinkCondition
(
c13257332
.
matfilter
,
1
,
1
))
e1
:
SetOperation
(
c13257332
.
LinkOperation
(
c13257332
.
matfilter
,
1
,
1
))
e1
:
SetValue
(
SUMMON_TYPE_LINK
)
c
:
RegisterEffect
(
e1
)
--Power Capsule
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
13257332
,
0
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BATTLED
)
e2
:
SetTarget
(
c13257332
.
pctg
)
e2
:
SetOperation
(
c13257332
.
pcop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
c13257332
.
pccon
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
13257301
,
5
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
c13257332
.
spcon
)
e4
:
SetTarget
(
c13257332
.
sptg
)
e4
:
SetOperation
(
c13257332
.
spop
)
c
:
RegisterEffect
(
e4
)
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e11
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e11
:
SetOperation
(
c13257332
.
bgmop
)
c
:
RegisterEffect
(
e11
)
c13257332
[
c
]
=
e2
end
function
c13257332
.
LinkOperation
(
f
,
minc
,
maxc
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
aux
.
LConditionFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
f
,
c
)
local
sg
=
Group
.
CreateGroup
()
for
i
=
0
,
maxc
-
1
do
local
cg
=
mg
:
Filter
(
aux
.
LCheckRecursive
,
sg
,
tp
,
sg
,
mg
,
c
,
i
,
minc
,
maxc
)
if
cg
:
GetCount
()
==
0
then
break
end
local
minct
=
1
if
aux
.
LCheckGoal
(
tp
,
sg
,
c
,
minc
,
i
)
then
if
not
Duel
.
SelectYesNo
(
tp
,
210
)
then
break
end
minct
=
0
end
local
g
=
cg
:
Select
(
tp
,
minct
,
1
,
nil
)
if
g
:
GetCount
()
==
0
then
break
end
sg
:
Merge
(
g
)
end
c
:
SetMaterial
(
sg
)
local
tc
=
sg
:
GetFirst
()
local
eg
=
Group
.
CreateGroup
()
while
tc
do
eg
:
Merge
(
tc
:
GetEquipGroup
())
tc
=
sg
:
GetNext
()
end
eg
:
KeepAlive
()
Duel
.
SendtoGrave
(
sg
,
REASON_MATERIAL
+
REASON_LINK
)
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e12
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e12
:
SetLabelObject
(
eg
)
e12
:
SetCondition
(
c13257332
.
eqcon
)
e12
:
SetOperation
(
c13257332
.
eqop
)
e12
:
SetReset
(
RESET_EVENT
+
0xff0000
)
c
:
RegisterEffect
(
e12
)
end
end
function
c13257332
.
matfilter
(
c
)
return
c
:
IsSetCard
(
0x351
)
and
not
c
:
IsType
(
TYPE_LINK
)
end
function
c13257332
.
eqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
c13257332
.
eqfilter
(
c
,
ec
)
return
c
:
CheckEquipTarget
(
ec
)
end
function
c13257332
.
eqfilter1
(
c
,
ec
)
return
c
:
IsSetCard
(
0x352
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
CheckEquipTarget
(
ec
)
end
function
c13257332
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
eg
=
e
:
GetLabelObject
()
local
tc
=
eg
:
GetFirst
()
eg
=
eg
:
Filter
(
c13257332
.
eqfilter
,
nil
,
c
)
if
eg
:
GetCount
()
==
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<
eg
:
GetCount
()
then
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
eg
=
eg
:
Select
(
tp
,
ft
,
ft
,
nil
)
end
tc
=
eg
:
GetFirst
()
while
tc
do
Duel
.
Equip
(
tp
,
tc
,
c
,
true
,
true
)
tc
=
eg
:
GetNext
()
end
Duel
.
EquipComplete
()
end
function
c13257332
.
cfilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
:
IsReason
(
REASON_EFFECT
)
end
function
c13257332
.
pccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c13257332
.
cfilter
,
1
,
nil
,
1
-
tp
)
and
re
:
GetHandler
()
==
e
:
GetHandler
()
end
function
c13257332
.
pctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
t1
=
Duel
.
IsExistingMatchingCard
(
c13257332
.
eqfilter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
c
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
if
chk
==
0
then
return
t1
end
e
:
SetCategory
(
CATEGORY_EQUIP
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c13257332
.
pcop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c13257332
.
eqfilter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
c
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
Equip
(
tp
,
tc
,
c
)
end
end
function
c13257332
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetEquipCount
()
==
3
end
function
c13257332
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
13257333
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c13257332
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
ft
=
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
)
if
chk
==
0
then
return
ft
>-
1
and
c
:
IsReleasable
()
and
Duel
.
IsExistingMatchingCard
(
c13257332
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
local
sg
=
c
:
GetEquipGroup
()
sg
:
KeepAlive
()
e
:
SetLabelObject
(
sg
)
Duel
.
Release
(
c
,
REASON_COST
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
LOCATION_EXTRA
)
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
function
c13257332
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCountFromEx
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c13257332
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
0
then
return
end
local
sg
=
e
:
GetLabelObject
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
tc
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
Equip
(
tp
,
tc
:
GetFirst
(),
g
:
GetFirst
(),
true
,
true
)
Duel
.
EquipComplete
()
end
end
end
function
c13257332
.
bgmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
11
,
0
,
aux
.
Stringid
(
13257332
,
7
))
end
expansions/script/c13257333.lua
0 → 100644
View file @
ae0a427e
--里超时空战斗机-Star Soldier
function
c13257333
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
c13257333
.
matfilter
,
1
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
13257333
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c13257333
.
destg
)
e1
:
SetOperation
(
c13257333
.
desop
)
c
:
RegisterEffect
(
e1
)
--Power Capsule
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
13257333
,
1
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BATTLED
)
e2
:
SetTarget
(
c13257333
.
pctg
)
e2
:
SetOperation
(
c13257333
.
pcop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
c13257333
.
pccon
)
c
:
RegisterEffect
(
e3
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e5
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetTargetRange
(
1
,
0
)
e5
:
SetTarget
(
c13257333
.
sumlimit
)
c
:
RegisterEffect
(
e5
)
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e11
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e11
:
SetOperation
(
c13257333
.
bgmop
)
c
:
RegisterEffect
(
e11
)
c13257333
[
c
]
=
e2
end
function
c13257333
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
lg
=
e
:
GetHandler
():
GetLinkedGroup
()
if
chk
==
0
then
return
lg
:
GetCount
()
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
lg
,
lg
:
GetCount
(),
0
,
0
)
end
function
c13257333
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
lg
=
e
:
GetHandler
():
GetLinkedGroup
()
Duel
.
Destroy
(
lg
,
REASON_EFFECT
)
end
function
c13257333
.
eqfilter
(
c
,
ec
)
return
c
:
IsSetCard
(
0x352
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
CheckEquipTarget
(
ec
)
end
function
c13257333
.
cfilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
:
IsReason
(
REASON_EFFECT
)
end
function
c13257333
.
pccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c13257333
.
cfilter
,
1
,
nil
,
1
-
tp
)
and
re
:
GetHandler
()
==
e
:
GetHandler
()
end
function
c13257333
.
pctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
t1
=
Duel
.
IsExistingMatchingCard
(
c13257333
.
eqfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
c
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
local
t2
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
if
chk
==
0
then
return
t1
or
t2
end
local
op
=
0
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
13257333
,
1
))
if
t1
and
t2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
13257333
,
2
),
aux
.
Stringid
(
13257333
,
3
))
elseif
t1
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
13257333
,
2
))
elseif
t2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
13257333
,
3
))
+
1
end
e
:
SetLabel
(
op
)
if
op
==
0
then
e
:
SetCategory
(
CATEGORY_EQUIP
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
elseif
op
==
1
then
local
e4
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e4
:
SetValue
(
c13257333
.
efilter
)
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_CHAIN
)
e
:
GetHandler
():
RegisterEffect
(
e4
)
end
end
function
c13257333
.
efilter
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
function
c13257333
.
acfilter
(
c
)
return
c
:
IsFaceup
()
and
(
c
:
GetAttack
()
>
0
or
c
:
GetDefense
()
>
0
)
end
function
c13257333
.
desfilter
(
c
)
return
c
:
IsFaceup
()
and
(
c
:
GetAttack
()
==
0
or
(
c
:
GetDefense
()
==
0
and
not
c
:
IsType
(
TYPE_LINK
)))
end
function
c13257333
.
pcop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetLabel
()
==
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c13257333
.
eqfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
c
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
Equip
(
tp
,
tc
,
c
)
end
elseif
e
:
GetLabel
()
==
1
then
local
g
=
Duel
.
GetMatchingGroup
(
c13257333
.
acfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
then
local
sc
=
g
:
GetFirst
()
while
sc
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
-
1000
)
sc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
sc
:
RegisterEffect
(
e2
)
sc
=
g
:
GetNext
()
end
g
=
Duel
.
GetMatchingGroup
(
c13257333
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
end
end
function
c13257333
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
return
c
:
IsLocation
(
LOCATION_EXTRA
)
end
function
c13257333
.
bgmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
11
,
0
,
aux
.
Stringid
(
13257333
,
7
))
end
expansions/script/c17060907.lua
0 → 100644
View file @
ae0a427e
--逆行贝琳
function
c17060907
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
c17060907
.
matfilter
,
1
)
--extra summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
c17060907
.
sumtg
)
c
:
RegisterEffect
(
e1
)
--atk
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
c17060907
.
atkval
)
c
:
RegisterEffect
(
e2
)
end
function
c17060907
.
matfilter
(
c
)
return
c
:
GetLevel
()
==
1
and
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c17060907
.
sumtg
(
e
,
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c17060907
.
atkval
(
e
,
c
)
local
g
=
e
:
GetHandler
():
GetLinkedGroup
()
if
g
:
GetCount
()
==
0
then
return
0
else
local
tg
,
val
=
g
:
GetMaxGroup
(
Card
.
GetBaseAttack
)
return
val
/
2
end
end
\ No newline at end of file
expansions/script/c17060908.lua
0 → 100644
View file @
ae0a427e
--歌剧三妖精
function
c17060908
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
c17060908
.
linkfilter
,
3
,
3
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
17060908
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x1c0
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
17060908
)
e1
:
SetCost
(
c17060908
.
spcost
)
e1
:
SetTarget
(
c17060908
.
sptg
)
e1
:
SetOperation
(
c17060908
.
spop
)
c
:
RegisterEffect
(
e1
)
end
c17060908
.
is_named_with_Opera_type
=
1
function
c17060908
.
IsOpera_type
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_Opera_type
end
function
c17060908
.
linkfilter
(
c
)
return
c17060908
.
IsOpera_type
(
c
)
end
function
c17060908
.
cfilter
(
c
,
g
)
return
g
:
IsContains
(
c
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
end
function
c17060908
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
lg
=
e
:
GetHandler
():
GetLinkedGroup
()
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
c17060908
.
cfilter
,
1
,
nil
,
lg
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c17060908
.
cfilter
,
1
,
1
,
nil
,
lg
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c17060908
.
filter
(
c
,
e
,
tp
,
m
)
if
bit
.
band
(
c
:
GetOriginalType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
if
c
.
mat_filter
then
m
=
m
:
Filter
(
c
.
mat_filter
,
nil
)
end
return
m
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
end
function
c17060908
.
matfilter
(
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToGrave
()
end
function
c17060908
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
false
end
local
mg
=
Duel
.
GetMatchingGroup
(
c17060908
.
matfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c17060908
.
filter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
nil
,
e
,
tp
,
mg
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_PZONE
)
end
function
c17060908
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
mg
=
Duel
.
GetMatchingGroup
(
c17060908
.
matfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c17060908
.
filter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
if
tc
.
mat_filter
then
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
tc
:
SetMaterial
(
mat
)
Duel
.
SendtoGrave
(
mat
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_RITUAL
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
expansions/script/c22240123.lua
0 → 100644
View file @
ae0a427e
--Solid 一零零三
function
c22240123
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsType
,
0x81
),
4
,
2
)
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22240123
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
c22240123
.
xyzcon
)
e1
:
SetOperation
(
c22240123
.
xyzop
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22240123
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c22240123
.
condition
)
e1
:
SetTarget
(
c22240123
.
target
)
e1
:
SetOperation
(
c22240123
.
operation
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
22240123
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
22240123
)
e3
:
SetCost
(
c22240123
.
thcost
)
e3
:
SetTarget
(
c22240123
.
thtg
)
e3
:
SetOperation
(
c22240123
.
thop
)
c
:
RegisterEffect
(
e3
)
end
c22240123
.
named_with_Solid
=
1
function
c22240123
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22240123
.
xyzfilter
(
c
,
xyzc
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
bit
.
band
(
c
:
GetOriginalType
(),
0x81
)
==
0x81
end
function
c22240123
.
xyzcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
olg
=
Duel
.
GetMatchingGroup
(
c22240123
.
xyzfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
c
)
if
olg
:
GetCount
()
>=
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
olg
,
c
)
>
0
then
return
true
end
end
function
c22240123
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
olg
=
Duel
.
GetMatchingGroup
(
c22240123
.
xyzfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
c
)
if
olg
:
GetCount
()
>=
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
olg
,
c
)
>
0
then
local
g
=
olg
:
Select
(
tp
,
2
,
2
,
nil
)
c
:
SetMaterial
(
g
)
Duel
.
Overlay
(
c
,
g
)
end
end
function
c22240123
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
function
c22240123
.
ritual_filter
(
c
)
return
c
:
IsType
(
TYPE_RITUAL
)
and
c22240123
.
IsSolid
(
c
)
end
function
c22240123
.
filter
(
c
,
e
,
tp
,
m
,
ft
)
if
not
c22240123
.
ritual_filter
(
c
)
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
if
ft
>
0
then
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
else
return
mg
:
IsExists
(
c22240123
.
mfilterf
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
function
c22240123
.
mfilterf
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
0
,
99
,
rc
)
else
return
false
end
end
function
c22240123
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
ft
>-
1
and
e
:
GetHandler
():
GetOverlayGroup
():
FilterCount
(
c22240123
.
filter
,
nil
,
e
,
tp
,
mg
,
ft
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
0
)
end
function
c22240123
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
e
:
GetHandler
():
GetOverlayGroup
():
Filter
(
c22240123
.
filter
,
nil
,
e
,
tp
,
mg
,
ft
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
if
tc
:
IsCode
(
21105106
)
then
tc
:
ritual_custom_operation
(
mg
)
local
mat
=
tc
:
GetMaterial
()
Duel
.
ReleaseRitualMaterial
(
mat
)
else
local
mat
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
c22240123
.
mfilterf
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
mat
:
Merge
(
mat2
)
end
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
end
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
function
c22240123
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
c
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_TEMPORARY
)
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
(
c22240123
.
reop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c22240123
.
reop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ReturnToField
(
e
:
GetLabelObject
())
end
function
c22240123
.
sfilter
(
c
,
e
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c
:
IsCanBeEffectTarget
(
e
)
and
c
:
GetLevel
()
==
4
end
function
c22240123
.
xfilter
(
c
,
e
,
tp
)
return
c22240123
.
IsSolid
(
c
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
end
function
c22240123
.
mfilter1
(
c
,
mg
,
exg
)
return
mg
:
IsExists
(
c22240123
.
mfilter2
,
1
,
c
,
c
,
exg
)
end
function
c22240123
.
mfilter2
(
c
,
mc
,
exg
)
return
exg
:
IsExists
(
Card
.
IsXyzSummonable
,
1
,
nil
,
Group
.
FromCards
(
c
,
mc
))
end
function
c22240123
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
local
mg
=
Duel
.
GetMatchingGroup
(
c22240123
.
sfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
)
local
exg
=
Duel
.
GetMatchingGroup
(
c22240123
.
xfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
)
if
chk
==
0
then
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
e
:
GetHandler
())
>
0
and
mg
:
GetCount
()
>
1
and
exg
:
GetCount
()
>
0
end
local
sg1
=
mg
:
FilterSelect
(
tp
,
c22240123
.
mfilter1
,
1
,
1
,
nil
,
mg
,
exg
)
local
tc1
=
sg1
:
GetFirst
()
local
sg2
=
mg
:
FilterSelect
(
tp
,
c22240123
.
mfilter2
,
1
,
1
,
tc1
,
tc1
,
exg
)
sg1
:
Merge
(
sg2
)
Duel
.
SetTargetCard
(
sg1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
0
,
1
,
0
,
0
)
end
function
c22240123
.
filter2
(
c
,
e
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c
:
IsRelateToEffect
(
e
)
end
function
c22240123
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
)
<
1
then
return
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
c22240123
.
filter2
,
nil
,
e
)
if
g
:
GetCount
()
<
2
then
return
end
local
xyzg
=
Duel
.
GetMatchingGroup
(
c22240123
.
xfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
)
if
xyzg
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
xyz
=
xyzg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
XyzSummon
(
tp
,
xyz
,
g
)
end
end
\ No newline at end of file
expansions/script/c46564050.lua
0 → 100644
View file @
ae0a427e
--WL·紫 毒 精 灵
local
m
=
46564050
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--destroy
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e5
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DECKDES
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetTarget
(
cm
.
destg
)
e5
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e5
)
--spsummom or to grave
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOGRAVE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetCountLimit
(
1
,
m
)
e3
:
SetCondition
(
cm
.
con
)
e3
:
SetTarget
(
cm
.
tg
)
e3
:
SetOperation
(
cm
.
op
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
)
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
>
0
and
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsSetCard
(
0x65c
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
IsAbleToHand
()
then
Duel
.
DisableShuffleCheck
()
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ShuffleHand
(
tp
)
else
Duel
.
DisableShuffleCheck
()
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
+
REASON_REVEAL
)
end
end
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_EFFECT
+
REASON_BATTLE
)
~=
0
end
function
cm
.
cfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
or
c
:
IsAbleToGrave
())
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
3
))
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
if
tc
and
tc
:
IsAbleToGrave
()
and
(
not
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
or
ft
<
1
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
4
)))
then
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
else
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
expansions/script/c46564051.lua
0 → 100644
View file @
ae0a427e
--WL·粉 刺 妖 精
local
m
=
46564051
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--set
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_SINGLE
)
e1
:
SetTarget
(
cm
.
target1
)
e1
:
SetOperation
(
cm
.
activate1
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetCost
(
cm
.
cost
)
e2
:
SetTarget
(
cm
.
target3
)
e2
:
SetOperation
(
cm
.
activate3
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
filter
(
c
,
e
,
tp
)
if
c
:
IsSetCard
(
0x65c
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
(
ignore
)
and
c
:
IsFaceup
()
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
then
return
true
end
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsFaceup
()
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
function
cm
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
end
function
cm
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsType
(
TYPE_MONSTER
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
else
Duel
.
SSet
(
tp
,
tc
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
function
cm
.
filter3
(
c
)
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsReleasable
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter3
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter3
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Release
(
g
,
REASON_COST
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
target3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
4
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
0
,
tp
,
LOCATION_DECK
)
end
function
cm
.
activate3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
==
0
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
5
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
5
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
return
end
Duel
.
DisableShuffleCheck
()
if
g
:
IsExists
(
cm
.
spfilter
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
3
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
ct
=
math.min
(
2
,
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
))
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ct
=
1
end
local
sg
=
g
:
FilterSelect
(
tp
,
cm
.
spfilter
,
1
,
ct
,
nil
,
e
,
tp
)
local
tc
=
sg
:
GetFirst
()
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Group
.
RemoveCard
(
g
,
tc
)
g
:
Sub
(
sg
)
end
end
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
end
expansions/script/c46564052.lua
0 → 100644
View file @
ae0a427e
--WL·默 礼 人 鱼
local
m
=
46564052
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetCost
(
cm
.
cost
)
e2
:
SetTarget
(
cm
.
target
)
e2
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToHandAsCost
()
end
Duel
.
SendtoHand
(
c
,
nil
,
REASON_COST
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
POS_FACEUP
,
tp
,
false
,
false
)
and
not
c
:
IsCode
(
m
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_HAND
)
and
cm
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
sg
=
g
:
GetFirst
()
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
rthfilter
(
c
)
if
c
:
IsRace
(
RACE_SEASERPENT
)
and
c
:
IsAbleToHand
()
and
c
:
IsFaceup
()
then
return
true
end
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsAbleToHand
()
and
c
:
IsFaceup
()
end
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x46
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsAbleToHand
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
rthfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
rthfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
g
:
GetCount
()
>
0
then
local
sg
=
g
:
GetFirst
()
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
end
end
expansions/script/c46564053.lua
0 → 100644
View file @
ae0a427e
--WL·月 观 云 雀
local
m
=
46564053
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
cm
.
settg
)
e2
:
SetOperation
(
cm
.
setop
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
setfilter
(
c
)
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
()
end
function
cm
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
function
cm
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SSet
(
tp
,
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
function
cm
.
mfilter
(
c
,
e
,
tp
,
exg
,
ec
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
exg
:
IsExists
(
cm
.
chkfilter
,
1
,
nil
,
c
,
ec
,
tp
)
end
function
cm
.
filter
(
c
,
e
,
tp
,
tc
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
IsSetCard
(
0x65c
)
end
function
cm
.
chkfilter
(
c
,
tc
,
ec
,
tp
)
local
mg
=
Group
.
FromCards
(
tc
,
ec
)
return
cm
.
CheckFusionMaterialExact
(
c
,
mg
,
tp
)
end
function
cm
.
CheckFusionMaterialExact
(
c
,
g
,
chkf
)
aux
.
FCheckAdditional
=
cm
.
HoldGroup
(
g
)
local
res
=
c
:
CheckFusionMaterial
(
g
,
nil
,
chkf
)
aux
.
FCheckAdditional
=
nil
return
res
end
function
cm
.
HoldGroup
(
mg
)
return
function
(
tp
,
g
,
fc
)
return
not
(
g
:
IsExists
(
cm
.
HoldGroupFilter
,
1
,
nil
,
mg
)
or
mg
:
IsExists
(
cm
.
HoldGroupFilter
,
1
,
nil
,
g
))
end
end
function
cm
.
HoldGroupFilter
(
c
,
mg
)
return
not
mg
:
IsContains
(
c
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanSpecialSummonCount
(
tp
,
2
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingTarget
(
cm
.
mfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
,
e
,
tp
,
exg
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
mfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
1
,
nil
,
e
,
tp
,
exg
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
(
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
)
then
return
end
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsImmuneToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
not
tc
:
IsRelateToEffect
(
e
)
or
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
==
0
then
return
end
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
):
Filter
(
cm
.
chkfilter
,
nil
,
tc
,
c
,
tp
)
if
exg
:
GetCount
()
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sc
=
exg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
mg
=
Group
.
FromCards
(
c
,
tc
)
sc
:
SetMaterial
(
mg
)
local
rg
=
mg
:
Filter
(
Card
.
IsAbleToRemove
,
nil
)
mg
:
Sub
(
rg
)
Duel
.
Remove
(
rg
,
POS_FACEUP
,
REASON_FUSION
+
REASON_MATERIAL
+
REASON_EFFECT
+
REASON_RULE
)
Duel
.
SendtoGrave
(
mg
,
POS_FACEUP
,
REASON_FUSION
+
REASON_MATERIAL
+
REASON_EFFECT
+
REASON_RULE
)
Duel
.
SpecialSummon
(
sc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
sc
:
CompleteProcedure
()
end
expansions/script/c46564056.lua
0 → 100644
View file @
ae0a427e
--流 转 在 仙 境 的 灵 魂
local
m
=
46564056
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
cm
.
drtg
)
e1
:
SetOperation
(
cm
.
drop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
,
465640561
)
e2
:
SetCost
(
cm
.
spcost
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsDiscardable
()
end
function
cm
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
1
-
tp
,
1000
)
end
function
cm
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
>
0
then
Duel
.
BreakEffect
()
Duel
.
DiscardHand
(
tp
,
cm
.
filter
,
1
,
1
,
REASON_EFFECT
,
nil
)
end
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
spcost
(
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
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
sg
=
g
:
GetFirst
()
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c46564057.lua
0 → 100644
View file @
ae0a427e
--时 停 在 仙 境 的 邂 逅
local
m
=
46564057
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e6
)
--summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
cm
.
smcon
)
e1
:
SetTarget
(
cm
.
smtg
)
e1
:
SetOperation
(
cm
.
smop
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
465640571
)
e2
:
SetCost
(
cm
.
thcost
)
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e2
)
--actlimit
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetTargetRange
(
0
,
1
)
e4
:
SetValue
(
cm
.
aclimit
)
e4
:
SetCondition
(
cm
.
actcon
)
c
:
RegisterEffect
(
e4
)
end
function
cm
.
smcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
eg
:
GetFirst
()
return
c
:
IsSetCard
(
0x65c
)
and
ep
==
tp
end
function
cm
.
smfilter
(
c
)
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsSummonable
(
true
,
nil
)
end
function
cm
.
smtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
smfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
cm
.
smop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
smfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Summon
(
tp
,
g
:
GetFirst
(),
true
,
nil
)
end
end
function
cm
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
cm
.
cfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsControler
(
tp
)
end
function
cm
.
actcon
(
e
)
local
tp
=
e
:
GetHandlerPlayer
()
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
return
(
a
and
cm
.
cfilter
(
a
,
tp
))
or
(
d
and
cm
.
cfilter
(
d
,
tp
))
end
function
cm
.
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
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c46564059.lua
0 → 100644
View file @
ae0a427e
--仙 境 的 古 圣 树 之 森
local
m
=
46564059
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e6
)
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetCost
(
cm
.
thcost
)
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e2
)
--DE-fusion
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetCountLimit
(
1
,
m
-
1000
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
--to grave
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOGRAVE
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
m
-
2000
)
e3
:
SetCost
(
cm
.
tgcost
)
e3
:
SetTarget
(
cm
.
tgtg
)
e3
:
SetOperation
(
cm
.
tgop
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
dfilter
(
c
)
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsAbleToGraveAsCost
()
end
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
dfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
cm
.
dfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsAbleToExtra
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
end
function
cm
.
mgfilter
(
c
,
e
,
tp
,
fusc
,
mg
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
bit
.
band
(
c
:
GetReason
(),
0x40008
)
==
0x40008
and
c
:
GetReasonCard
()
==
fusc
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
fusc
:
CheckFusionMaterial
(
mg
,
c
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
not
(
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
())
then
return
end
local
mg
=
tc
:
GetMaterial
()
local
ct
=
mg
:
GetCount
()
local
sumtype
=
tc
:
GetSummonType
()
if
Duel
.
SendtoDeck
(
tc
,
nil
,
0
,
REASON_EFFECT
)
~=
0
and
bit
.
band
(
sumtype
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
and
ct
>
0
and
ct
<=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
and
mg
:
FilterCount
(
aux
.
NecroValleyFilter
(
cm
.
mgfilter
),
nil
,
e
,
tp
,
tc
,
mg
)
==
ct
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
mg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
cm
.
tgcost
(
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
cm
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsAbleToGrave
()
end
function
cm
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
expansions/script/c46564060.lua
0 → 100644
View file @
ae0a427e
--WL·蕴 毒 魂 死 蝶
local
m
=
46564060
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--fusion material
aux
.
AddFusionProcCodeFun
(
c
,
46564050
,
aux
.
FilterBoolFunction
(
cm
.
ffilter
),
1
,
true
,
true
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
cm
.
thcon
)
e2
:
SetTarget
(
cm
.
destg
)
e2
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e2
)
--Special Summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCondition
(
cm
.
condition1
)
e1
:
SetTarget
(
cm
.
target1
)
e1
:
SetOperation
(
cm
.
operation1
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetCondition
(
cm
.
condition2
)
e3
:
SetTarget
(
cm
.
target2
)
e3
:
SetOperation
(
cm
.
operation2
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
ffilter
(
c
)
return
not
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
end
function
cm
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
if
g
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
Duel
.
ChainAttack
()
end
end
function
cm
.
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
0x41
)
==
0x41
end
function
cm
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
operation1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
c
=
e
:
GetHandler
()
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
not
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
-
1
)
e1
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_BATTLE
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
46564050
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
cm
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c46564061.lua
0 → 100644
View file @
ae0a427e
--WL·含 香 鸢 粉 薇
local
m
=
46564061
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--fusion material
aux
.
AddFusionProcCodeFun
(
c
,
46564051
,
aux
.
FilterBoolFunction
(
cm
.
ffilter
),
1
,
true
,
true
)
--to grave
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
cm
.
tgcon
)
e1
:
SetTarget
(
cm
.
tgtg
)
e1
:
SetOperation
(
cm
.
tgop
)
c
:
RegisterEffect
(
e1
)
--Special Summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCondition
(
cm
.
condition1
)
e2
:
SetTarget
(
cm
.
target1
)
e2
:
SetOperation
(
cm
.
operation1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetCondition
(
cm
.
condition2
)
e3
:
SetTarget
(
cm
.
target2
)
e3
:
SetOperation
(
cm
.
operation2
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
ffilter
(
c
)
return
not
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
end
function
cm
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
end
function
cm
.
tgfilter
(
c
)
if
c
:
IsRace
(
RACE_PLANT
)
and
c
:
IsAbleToGrave
()
then
return
true
end
return
c
:
IsSetCard
(
0x65c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
cm
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
function
cm
.
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
0x41
)
==
0x41
end
function
cm
.
rfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToRemove
()
end
function
cm
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
rfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
rfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
operation1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
rfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
cm
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_BATTLE
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
46564051
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
cm
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c50000054.lua
View file @
ae0a427e
expansions/script/c50000056.lua
View file @
ae0a427e
...
...
@@ -21,7 +21,7 @@ function c50000056.initial_effect(c)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_ADD_ATTRIBUTE
)
e2
:
SetValue
(
ATTRIBUTE_LIGHT
)
e2
:
SetValue
(
ATTRIBUTE_DARK
)
c
:
RegisterEffect
(
e2
)
--atk
local
e3
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c50000057.lua
View file @
ae0a427e
--吸血鬼 奇犽
function
c50000057
.
initial_effect
(
c
)
--添加二重属性
aux
.
EnableDualAttribute
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
c50000057
.
linkfilter
,
2
)
c
:
EnableReviveLimit
()
--indes
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_ADD_TYPE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
aux
.
IsDualState
)
e1
:
SetValue
(
TYPE_TUNER
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetCondition
(
c50000057
.
indescon
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--synchro level
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_SYNCHRO_LEVEL
)
e2
:
SetCondition
(
aux
.
IsDualState
)
e2
:
SetValue
(
c50000057
.
slevel
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
c
:
RegisterEffect
(
e2
)
--attribute
--cannot be target
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCondition
(
aux
.
IsDualState
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_ADD_ATTRIBUTE
)
e3
:
SetValue
(
ATTRIBUTE_LIGHT
)
e3
:
SetCondition
(
c50000057
.
indescon
)
e3
:
SetValue
(
c50000057
.
tgval
)
c
:
RegisterEffect
(
e3
)
--attack up
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_CONTROL
)
e4
:
SetDescription
(
aux
.
Stringid
(
50000057
,
0
))
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetCountLimit
(
1
,
50000057
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetHintTiming
(
0
,
0x1c0
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCost
(
c50000057
.
cost
)
e4
:
SetTarget
(
c50000057
.
controltg
)
e4
:
SetOperation
(
c50000057
.
controlop
)
c
:
RegisterEffect
(
e4
)
--to grave
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCode
(
EVENT_TO_GRAVE
)
e5
:
SetOperation
(
c50000057
.
regop
)
c
:
RegisterEffect
(
e5
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
50000057
,
0
))
e6
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e6
:
SetCountLimit
(
1
)
e6
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e6
:
SetRange
(
LOCATION_GRAVE
)
e6
:
SetCondition
(
c50000057
.
spcon
)
e6
:
SetTarget
(
c50000057
.
sptg
)
e6
:
SetOperation
(
c50000057
.
spop
)
c
:
RegisterEffect
(
e6
)
end
function
c50000057
.
slevel
(
e
,
c
)
local
lv
=
e
:
GetHandler
():
GetLevel
()
return
4
*
65536
+
lv
---
function
c50000057
.
tgval
(
e
,
re
,
rp
)
return
rp
~=
e
:
GetHandlerPlayer
()
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
c50000057
.
indescon
(
e
)
return
e
:
GetHandler
():
GetLinkedGroup
():
FilterCount
(
c50000057
.
linkfilter
,
nil
)
>
0
end
function
c50000057
.
linkfilter
(
c
)
return
c
:
IsSetCard
(
0x50c
)
end
---
function
c50000057
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c50000057
.
controltg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_MZONE
and
chkc
:
GetControler
()
~=
tp
and
chkc
:
IsControlerCanBeChanged
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsControlerCanBeChanged
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONTROL
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsControlerCanBeChanged
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_CONTROL
,
g
,
1
,
0
,
0
)
end
function
c50000057
.
controlop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
GetControl
(
tc
,
tp
)
end
end
---
function
c50000057
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
50000057
)
~=
0
end
function
c50000057
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RegisterFlagEffect
(
50000057
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c50000057
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c50000057
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummonStep
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
Duel
.
SpecialSummonComplete
()
end
end
\ No newline at end of file
expansions/script/c50000066.lua
View file @
ae0a427e
--暗之海贼 奇犽
function
c50000066
.
initial_effect
(
c
)
--xyz
summon
aux
.
AddXyzProcedure
(
c
,
c50000066
.
mfilter
,
4
,
2
)
--link
summon
aux
.
AddLinkProcedure
(
c
,
c50000066
.
linkfilter
,
2
)
c
:
EnableReviveLimit
()
--indestructabl
e
--mov
e
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetCondition
(
c50000066
.
incon
)
e1
:
SetValue
(
1
)
e1
:
SetDescription
(
aux
.
Stringid
(
50000066
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
50000066
)
e1
:
SetCondition
(
c50000066
.
seqcon
)
e1
:
SetTarget
(
c50000066
.
seqtg
)
e1
:
SetOperation
(
c50000066
.
seqop
)
c
:
RegisterEffect
(
e1
)
--actlimit
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -22,51 +24,79 @@ function c50000066.initial_effect(c)
e2
:
SetValue
(
c50000066
.
aclimit
)
e2
:
SetCondition
(
c50000066
.
actcon
)
c
:
RegisterEffect
(
e2
)
--Destroy
--deck check
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
50000066
,
0
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetDescription
(
aux
.
Stringid
(
50000066
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCost
(
c50000066
.
descost
)
e3
:
SetTarget
(
c50000066
.
des
tg
)
e3
:
SetOperation
(
c50000066
.
des
op
)
e3
:
SetCondition
(
c50000066
.
checkcon
)
e3
:
SetTarget
(
c50000066
.
check
tg
)
e3
:
SetOperation
(
c50000066
.
check
op
)
c
:
RegisterEffect
(
e3
)
end
function
c50000066
.
m
filter
(
c
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
function
c50000066
.
link
filter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
end
function
c50000066
.
incon
(
e
)
return
e
:
GetHandler
():
GetOverlayCount
()
>
0
----
function
c50000066
.
seqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_LINK
end
function
c50000066
.
seqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
scount
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
scount
==
0
then
return
end
return
true
end
function
c50000066
.
seqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsControler
(
1
-
tp
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
571
)
local
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
nil
)
local
nseq
=
0
if
s
==
1
then
nseq
=
0
elseif
s
==
2
then
nseq
=
1
elseif
s
==
4
then
nseq
=
2
elseif
s
==
8
then
nseq
=
3
else
nseq
=
4
end
Duel
.
MoveSequence
(
c
,
nseq
)
end
----
function
c50000066
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
c50000066
.
actcon
(
e
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
end
function
c50000066
.
descost
(
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
c50000066
.
checkcon
(
e
)
return
e
:
GetHandler
():
GetLinkedGroupCount
()
>
0
end
function
c50000066
.
checktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ccount
=
Duel
.
GetCounter
(
0
,
1
,
0
,
0x150c
)
-
1
if
ccount
<
1
then
ccount
=
0
end
if
ccount
==
0
then
return
end
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
ccount
end
end
function
c50000066
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
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
)
function
c50000066
.
checkfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x50c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
)
end
function
c50000066
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
tg
:
GetCount
()
>
0
then
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
function
c50000066
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ccount
=
Duel
.
GetCounter
(
0
,
1
,
0
,
0x150c
)
-
1
if
ccount
<
1
then
ccount
=
0
end
if
ccount
==
0
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
<
ccount
then
return
end
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
ccount
)
Duel
.
ConfirmCards
(
tp
,
g
)
if
g
:
IsExists
(
c50000066
.
checkfilter
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
0
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
50000066
,
2
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
FilterSelect
(
tp
,
c50000066
.
checkfilter
,
1
,
1
,
nil
,
e
,
tp
)
if
sg
:
GetCount
()
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
0
)
>
0
then
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
end
Duel
.
ShuffleDeck
(
tp
)
else
Duel
.
SortDecktop
(
tp
,
tp
,
ccount
)
end
end
\ No newline at end of file
expansions/script/c50000069.lua
View file @
ae0a427e
...
...
@@ -2,15 +2,28 @@
function
c50000069
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50000069
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_DECKDES
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c50000069
.
target
)
e1
:
SetOperation
(
c50000069
.
activate
)
c
:
RegisterEffect
(
e1
)
--salvage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetDescription
(
aux
.
Stringid
(
50000069
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
c50000069
.
thcon
)
e2
:
SetTarget
(
c50000069
.
thtg
)
e2
:
SetOperation
(
c50000069
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c50000069
.
filter0
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGrave
()
end
function
c50000069
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
end
...
...
@@ -18,18 +31,25 @@ function c50000069.filter2(c,e,tp,m,f,chkf)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x50c
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c50000069
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x50c
)
and
c
:
IsType
(
TYPE_LINK
)
end
function
c50000069
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
if
Duel
.
IsExistingMatchingCard
(
c50000069
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
local
mg2
=
Duel
.
GetMatchingGroup
(
c50000069
.
filter0
,
tp
,
LOCATION_DECK
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
end
local
res
=
Duel
.
IsExistingMatchingCard
(
c50000069
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c50000069
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
res
=
Duel
.
IsExistingMatchingCard
(
c50000069
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
return
res
...
...
@@ -39,15 +59,19 @@ end
function
c50000069
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c50000069
.
filter1
,
nil
,
e
)
if
Duel
.
IsExistingMatchingCard
(
c50000069
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
local
mg2
=
Duel
.
GetMatchingGroup
(
c50000069
.
filter0
,
tp
,
LOCATION_DECK
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
end
local
sg1
=
Duel
.
GetMatchingGroup
(
c50000069
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
mg3
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c50000069
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
sg2
=
Duel
.
GetMatchingGroup
(
c50000069
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
...
...
@@ -62,10 +86,30 @@ function c50000069.activate(e,tp,eg,ep,ev,re,r,rp)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
----
function
c50000069
.
thfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x50c
)
and
c
:
IsType
(
TYPE_LINK
)
and
c
:
IsControler
(
tp
)
end
function
c50000069
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c50000069
.
thfilter
,
1
,
nil
,
tp
)
end
function
c50000069
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c50000069
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
end
end
expansions/script/c50000073.lua
0 → 100644
View file @
ae0a427e
--超越·S 奇犽
local
m
=
50000073
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x50c
),
2
)
c
:
EnableReviveLimit
()
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50000073
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
50000073
)
e1
:
SetCondition
(
c50000073
.
spcon
)
e1
:
SetTarget
(
c50000073
.
sptg
)
e1
:
SetOperation
(
c50000073
.
spop
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
50000073
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c50000073
.
target
)
e2
:
SetOperation
(
c50000073
.
activate
)
c
:
RegisterEffect
(
e2
)
end
function
c50000073
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Debug
.
Message
(
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_LINK
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_LINK
end
function
c50000073
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x50c
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c50000073
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
return
zone
~=
0
and
Duel
.
IsExistingMatchingCard
(
c50000073
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c50000073
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
if
zone
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50000073
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
end
end
---
function
c50000073
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
end
function
c50000073
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x50c
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c50000073
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c50000073
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c50000073
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c50000073
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c50000073
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c50000073
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c50000073
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
expansions/script/c50000074.lua
0 → 100644
View file @
ae0a427e
--绝对条件 奇犽
local
m
=
50000074
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
c50000074
.
spfilter
,
2
)
c
:
EnableReviveLimit
()
--draw
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50000074
,
0
))
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
50000074
)
e1
:
SetCondition
(
c50000074
.
drcon
)
e1
:
SetTarget
(
c50000074
.
drtg
)
e1
:
SetOperation
(
c50000074
.
drop
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
50000073
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetCountLimit
(
1
,
500000741
)
e2
:
SetTarget
(
c50000074
.
sptg
)
e2
:
SetOperation
(
c50000074
.
spop
)
c
:
RegisterEffect
(
e2
)
--atk&def
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e5
:
SetValue
(
500
)
e5
:
SetTarget
(
c50000074
.
ad
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e5
:
Clone
()
e6
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e6
)
end
---
function
c50000074
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x50c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c50000074
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c50000074
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c50000074
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
local
ct
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ct
>
2
then
ct
=
2
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ct
=
1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c50000074
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
ct
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c50000074
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
sg
:
GetCount
()
==
0
or
ft
<
sg
:
GetCount
()
or
(
sg
:
GetCount
()
>
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
))
then
return
end
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
---
function
c50000074
.
ad
(
e
,
c
)
return
e
:
GetHandler
():
GetLinkedGroup
():
IsContains
(
c
)
and
c
:
IsSetCard
(
0x50c
)
end
---
function
c50000074
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x50c
)
and
not
c
:
IsType
(
TYPE_XYZ
)
end
function
c50000074
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
c50000074
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
gc
=
e
:
GetHandler
():
GetMutualLinkedGroupCount
()
if
chk
==
0
then
return
gc
>
0
and
Duel
.
IsPlayerCanDraw
(
tp
,
gc
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
gc
)
end
function
c50000074
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
gc
=
e
:
GetHandler
():
GetMutualLinkedGroupCount
()
if
gc
>
0
then
Duel
.
Draw
(
p
,
gc
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c50000210.lua
0 → 100644
View file @
ae0a427e
--圣灵依少女
local
m
=
50000210
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
c50000210
.
ffilter
,
2
,
false
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50000210
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCost
(
c50000210
.
spcost
)
e1
:
SetTarget
(
c50000210
.
sptg
)
e1
:
SetOperation
(
c50000210
.
spop
)
c
:
RegisterEffect
(
e1
)
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
50000210
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
50000210
)
e2
:
SetTarget
(
c50000210
.
thtg
)
e2
:
SetOperation
(
c50000210
.
thop
)
c
:
RegisterEffect
(
e2
)
end
c50000210
.
is_named_with_Rely
=
1
function
c50000210
.
IsRely
(
c
)
local
code
=
c
:
GetCode
()
local
mt
=
_G
[
"c"
..
code
]
if
not
mt
then
_G
[
"c"
..
code
]
=
{}
if
pcall
(
function
()
dofile
(
"expansions/script/c"
..
code
..
".lua"
)
end
)
or
pcall
(
function
()
dofile
(
"script/c"
..
code
..
".lua"
)
end
)
then
mt
=
_G
[
"c"
..
code
]
_G
[
"c"
..
code
]
=
nil
else
_G
[
"c"
..
code
]
=
nil
return
false
end
end
return
mt
and
mt
.
is_named_with_Rely
end
function
c50000210
.
ffilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
end
function
c50000210
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroupEx
(
tp
,
c50000210
.
ffilter
,
2
,
nil
)
end
local
g
=
Duel
.
SelectReleaseGroupEx
(
tp
,
c50000210
.
ffilter
,
2
,
2
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c50000210
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c50000210
.
spop
(
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
local
sp
=
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
c
:
CompleteProcedure
()
end
end
function
c50000210
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
end
function
c50000210
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50000210
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c50000210
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50000210
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
\ No newline at end of file
expansions/script/c50000504.lua
View file @
ae0a427e
--被侵蚀的星之援军
function
c50000504
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsType
,
TYPE_NORMAL
),
3
)
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
c50000504
.
linkfilter
),
2
)
c
:
EnableReviveLimit
()
--
IMMUNE
--
move
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
Set
Type
(
EFFECT_TYPE_FIELD
)
e1
:
Set
Code
(
EFFECT_IMMUNE_EFFECT
)
e1
:
Set
Description
(
aux
.
Stringid
(
50000504
,
0
))
e1
:
Set
Type
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e1
:
SetValue
(
c50000504
.
efilter
)
e1
:
SetTarget
(
c50000504
.
tgtg
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c50000504
.
movecost
)
e1
:
SetTarget
(
c50000504
.
seqtg
)
e1
:
SetOperation
(
c50000504
.
seqop
)
c
:
RegisterEffect
(
e1
)
--
destroy replace
--
special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
c50000504
.
desreptg
)
e2
:
SetOperation
(
c50000504
.
desrepop
)
e2
:
SetDescription
(
aux
.
Stringid
(
50000504
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_DESTROYED
)
e2
:
SetCountLimit
(
1
,
50000504
)
e2
:
SetCondition
(
c50000504
.
thcon
)
e2
:
SetTarget
(
c50000504
.
thtg
)
e2
:
SetOperation
(
c50000504
.
thop
)
c
:
RegisterEffect
(
e2
)
--todeck
local
e3
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -27,48 +31,64 @@ function c50000504.initial_effect(c)
e3
:
SetCategory
(
CATEGORY_TODECK
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCountLimit
(
1
,
50000504
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
c50000504
.
tdcon
)
e3
:
SetTarget
(
c50000504
.
tdtg
)
e3
:
SetOperation
(
c50000504
.
tdop
)
c
:
RegisterEffect
(
e3
)
end
--
function
c50000504
.
tgtg
(
e
,
c
)
return
e
:
GetHandler
():
GetLinkedGroup
():
IsContains
(
c
)
function
c50000504
.
cfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c50000504
.
efilter
(
e
,
te
)
return
not
te
:
IsActiveType
(
TYPE_LINK
)
function
c50000504
.
movecost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50000504
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50000504
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
--
function
c50000504
.
repfilter
(
c
,
e
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsDestructable
(
e
)
and
not
c
:
IsStatus
(
STATUS_DESTROY_CONFIRMED
)
function
c50000504
.
seqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
scount
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
scount
==
0
then
return
end
return
true
end
function
c50000504
.
desreptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c50000504
.
seqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
local
g
=
c
:
GetLinkedGroup
()
return
not
c
:
IsReason
(
REASON_REPLACE
)
and
g
:
IsExists
(
c50000504
.
repfilter
,
1
,
nil
,
e
,
tp
)
end
if
Duel
.
SelectEffectYesNo
(
tp
,
c
,
96
)
then
local
g
=
c
:
GetLinkedGroup
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESREPLACE
)
local
sg
=
g
:
FilterSelect
(
tp
,
c50000504
.
repfilter
,
1
,
1
,
nil
,
e
,
tp
)
e
:
SetLabelObject
(
sg
:
GetFirst
())
sg
:
GetFirst
():
SetStatus
(
STATUS_DESTROY_CONFIRMED
,
true
)
return
true
else
return
false
end
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsControler
(
1
-
tp
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
571
)
local
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
nil
)
local
nseq
=
0
if
s
==
1
then
nseq
=
0
elseif
s
==
2
then
nseq
=
1
elseif
s
==
4
then
nseq
=
2
elseif
s
==
8
then
nseq
=
3
else
nseq
=
4
end
Duel
.
MoveSequence
(
c
,
nseq
)
end
function
c50000504
.
desrepop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
tc
:
SetStatus
(
STATUS_DESTROY_CONFIRMED
,
false
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
+
REASON_REPLACE
)
--
function
c50000504
.
linkfilter
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x50e
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
---
function
c50000504
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x50e
)
and
c
:
IsAbleToHand
()
end
function
c50000504
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50000504
.
thfilter
,
tp
,
LOCATION_REMOVED
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_REMOVED
+
LOCATION_GRAVE
)
end
function
c50000504
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50000504
.
thfilter
,
tp
,
LOCATION_REMOVED
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
---
function
c50000504
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_EFFECT
+
REASON_BATTLE
)
~=
0
end
function
c50000504
.
tdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
...
...
expansions/script/c50000505.lua
View file @
ae0a427e
...
...
@@ -65,11 +65,11 @@ function c50000505.ad(e,c)
end
---
function
c50000505
.
linkfilter1
(
c
,
lc
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsCanBeLinkMaterial
(
lc
)
and
Duel
.
IsExistingMatchingCard
(
c50000505
.
linkfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
lc
,
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
not
c
:
IsType
(
TYPE_TOKEN
)
and
c
:
IsCanBeLinkMaterial
(
lc
)
and
Duel
.
IsExistingMatchingCard
(
c50000505
.
linkfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
lc
,
c
,
tp
)
end
function
c50000505
.
linkfilter2
(
c
,
lc
,
mc
,
tp
)
local
mg
=
Group
.
FromCards
(
c
,
mc
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_
NORMAL
)
and
c
:
IsCanBeLinkMaterial
(
lc
)
and
not
c
:
IsAttribute
(
mc
:
GetAttribute
())
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
mg
,
lc
)
>
0
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_
EFFECT
)
and
not
c
:
IsType
(
TYPE_TOKEN
)
and
c
:
IsCanBeLinkMaterial
(
lc
)
and
not
c
:
IsRace
(
mc
:
GetRace
())
and
not
c
:
IsAttribute
(
mc
:
GetAttribute
())
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
mg
,
lc
)
>
0
end
function
c50000505
.
linkcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
...
...
@@ -86,7 +86,7 @@ function c50000505.linkop(e,tp,eg,ep,ev,re,r,rp,c)
end
---
function
c50000505
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_LINK
end
function
c50000505
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x50e
)
and
c
:
IsAbleToHand
()
...
...
expansions/script/c50000511.lua
View file @
ae0a427e
--灵装之星宿骑士
local
m
=
50000511
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
function
cm
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
nil
,
2
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e0
:
SetRange
(
LOCATION_EXTRA
)
e0
:
SetCondition
(
c50000511
.
linkcon
)
e0
:
SetOperation
(
c50000511
.
linkop
)
e0
:
SetValue
(
SUMMON_TYPE_LINK
)
c
:
RegisterEffect
(
e0
)
c
:
EnableReviveLimit
()
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -37,6 +46,29 @@ function cm.initial_effect(c)
e3
:
SetValue
(
c50000511
.
atkval
)
c
:
RegisterEffect
(
e3
)
end
function
c50000511
.
linkfilter
(
c
,
lc
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeLinkMaterial
(
lc
)
end
function
c50000511
.
linkcheck
(
g
,
tp
,
lc
)
return
aux
.
LCheckGoal
(
tp
,
g
,
lc
,
2
,
g
:
GetCount
())
and
g
:
IsExists
(
function
(
c
)
return
c
:
IsSetCard
(
0x50e
)
and
not
g
:
IsExists
(
Card
.
IsType
,
1
,
c
,
TYPE_TOKEN
)
end
,
1
,
nil
)
end
function
c50000511
.
linkcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
tp
=
c
:
GetControler
()
local
g
=
Duel
.
GetMatchingGroup
(
c50000511
.
linkfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
return
Senya
.
CheckGroup
(
g
,
c50000511
.
linkcheck
,
nil
,
2
,
4
,
tp
,
c
)
end
function
c50000511
.
linkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c50000511
.
linkfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
local
g1
=
Senya
.
SelectGroup
(
tp
,
0
,
g
,
c50000511
.
linkcheck
,
nil
,
2
,
4
,
tp
,
c
)
c
:
SetMaterial
(
g1
)
Duel
.
SendtoGrave
(
g1
,
REASON_MATERIAL
+
REASON_LINK
)
end
---
function
c50000511
.
spfilter
(
c
,
e
,
tp
,
zone
)
return
c
:
IsSetCard
(
0x50e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
zone
)
end
...
...
expansions/script/c50008880.lua
0 → 100644
View file @
ae0a427e
--Stars 昴流
local
m
=
50008880
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--remove atk
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50008880
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
50008880
)
e1
:
SetCost
(
c50008880
.
cost
)
e1
:
SetOperation
(
c50008880
.
atkop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetOperation
(
c50008880
.
spreg
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
50008880
,
1
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetRange
(
LOCATION_REMOVED
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetCondition
(
c50008880
.
spcon
)
e4
:
SetTarget
(
c50008880
.
sptg
)
e4
:
SetOperation
(
c50008880
.
spop
)
e4
:
SetLabelObject
(
e3
)
c
:
RegisterEffect
(
e4
)
--draw
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
50008880
,
2
))
e5
:
SetCategory
(
CATEGORY_DRAW
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e5
:
SetCode
(
EVENT_RELEASE
)
e5
:
SetCountLimit
(
1
,
500088801
)
e5
:
SetTarget
(
c50008880
.
drtg1
)
e5
:
SetOperation
(
c50008880
.
drop1
)
c
:
RegisterEffect
(
e5
)
end
function
c50008880
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
2
)
if
chk
==
0
then
return
g
:
FilterCount
(
Card
.
IsAbleToRemoveAsCost
,
nil
)
==
2
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
2
end
Duel
.
DisableShuffleCheck
()
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008880
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
500
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
end
end
---
function
c50008880
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
and
rc
:
IsSetCard
(
0x50b
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
())
c
:
RegisterFlagEffect
(
50008880
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c50008880
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
50008880
)
>
0
end
function
c50008880
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
50008880
)
end
function
c50008880
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
---
function
c50008880
.
drtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c50008880
.
drop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c50008881.lua
0 → 100644
View file @
ae0a427e
--Stars 整装待发·T
local
m
=
50008881
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetDescription
(
aux
.
Stringid
(
50008881
,
0
))
e1
:
SetCountLimit
(
1
,
50008881
)
e1
:
SetCost
(
c50008881
.
drcost
)
e1
:
SetTarget
(
c50008881
.
drtg
)
e1
:
SetOperation
(
c50008881
.
drop
)
c
:
RegisterEffect
(
e1
)
--salvage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetDescription
(
aux
.
Stringid
(
50008881
,
1
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
50008881
)
e2
:
SetCost
(
c50008881
.
thcost
)
e2
:
SetTarget
(
c50008881
.
thtg
)
e2
:
SetOperation
(
c50008881
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c50008881
.
filter
(
c
)
return
(((
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_HAND
))
and
c
:
IsSetCard
(
0x50b
))
or
(
c
:
IsFaceup
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsSetCard
(
0x50b
)))
and
not
c
:
IsCode
(
50008881
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c50008881
.
drcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008881
.
filter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008881
.
filter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008881
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c50008881
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
---
function
c50008881
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c50008881
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008881
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008881
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008881
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c50008881
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
end
end
expansions/script/c50008882.lua
0 → 100644
View file @
ae0a427e
--Stars 北斗·T
local
m
=
50008882
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetDescription
(
aux
.
Stringid
(
50008880
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
50008882
)
e1
:
SetCost
(
c50008882
.
cost
)
e1
:
SetTarget
(
c50008882
.
destg
)
e1
:
SetOperation
(
c50008882
.
desop
)
c
:
RegisterEffect
(
e1
)
--rm
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
50008880
,
1
))
e2
:
SetCategory
(
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_RELEASE
)
e2
:
SetCountLimit
(
1
,
500088821
)
e2
:
SetTarget
(
c50008882
.
rmtg
)
e2
:
SetOperation
(
c50008882
.
rmop
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetOperation
(
c50008882
.
spreg
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
50008882
,
2
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetRange
(
LOCATION_REMOVED
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetCondition
(
c50008882
.
spcon
)
e4
:
SetTarget
(
c50008882
.
sptg
)
e4
:
SetOperation
(
c50008882
.
spop
)
e4
:
SetLabelObject
(
e3
)
c
:
RegisterEffect
(
e4
)
end
function
c50008882
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x50b
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c50008882
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008882
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008882
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008882
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c50008882
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c50008882
.
filter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c50008882
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c50008882
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c50008882
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
---
function
c50008882
.
rmfilter
(
c
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToRemove
()
end
function
c50008882
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008882
.
rmfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c50008882
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008882
.
rmfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
---
function
c50008882
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
and
rc
:
IsSetCard
(
0x50b
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
())
c
:
RegisterFlagEffect
(
50008882
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c50008882
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
50008882
)
>
0
end
function
c50008882
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
50008882
)
end
function
c50008882
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c50008883.lua
0 → 100644
View file @
ae0a427e
--Stars 盛演·T
local
m
=
50008883
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c50008883
.
target
)
e1
:
SetOperation
(
c50008883
.
activate
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
50008883
)
e2
:
SetCondition
(
c50008883
.
thcon
)
e2
:
SetTarget
(
c50008883
.
tdtg
)
e2
:
SetOperation
(
c50008883
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
function
c50008883
.
filter
(
c
,
e
,
tp
,
m
,
ft
)
if
not
c
:
IsSetCard
(
0x50b
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
if
ft
>
0
then
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
c
)
else
return
mg
:
IsExists
(
c50008883
.
filterF
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
function
c50008883
.
filterF
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
rc
)
else
return
false
end
end
function
c50008883
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
c50008883
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c50008883
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c50008883
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
local
mat
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
c50008883
.
filterF
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
tc
)
mat
:
Merge
(
mat2
)
end
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
---
function
c50008883
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
and
re
:
GetHandler
():
IsSetCard
(
0x50b
)
end
function
c50008883
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
GetCode
()
~=
50008883
and
c
:
IsAbleToHand
()
end
function
c50008883
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008883
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c50008883
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008883
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
\ No newline at end of file
expansions/script/c50008884.lua
0 → 100644
View file @
ae0a427e
--Stars 真夏·T
local
m
=
50008884
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--remove
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50008884
,
0
))
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
50008884
)
e1
:
SetCost
(
c50008884
.
cost
)
e1
:
SetCondition
(
c50008884
.
remcon
)
e1
:
SetTarget
(
c50008884
.
remtg
)
e1
:
SetOperation
(
c50008884
.
remop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
50008884
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c50008884
.
spcost
)
e2
:
SetTarget
(
c50008884
.
sptg1
)
e2
:
SetOperation
(
c50008884
.
spop1
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetOperation
(
c50008884
.
spreg
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
50008884
,
1
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetRange
(
LOCATION_REMOVED
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetCondition
(
c50008884
.
spcon
)
e4
:
SetTarget
(
c50008884
.
sptg
)
e4
:
SetOperation
(
c50008884
.
spop
)
e4
:
SetLabelObject
(
e3
)
c
:
RegisterEffect
(
e4
)
end
function
c50008884
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x50b
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c50008884
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008884
.
costfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008884
.
costfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008884
.
remcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_RITUAL
)
end
function
c50008884
.
remtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
0
,
0x1e
)
end
function
c50008884
.
remop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g1
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
sg
=
Group
.
CreateGroup
()
if
g1
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
sg1
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
sg1
)
sg
:
Merge
(
sg1
)
end
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_EFFECT
)
end
---
function
c50008884
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008884
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008884
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008884
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x50b
)
and
not
c
:
IsCode
(
50008884
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c50008884
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c50008884
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c50008884
.
spfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c50008884
.
spfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c50008884
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
---
function
c50008884
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
())
c
:
RegisterFlagEffect
(
50008884
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c50008884
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
50008884
)
>
0
end
function
c50008884
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
50008884
)
end
function
c50008884
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c50008885.lua
0 → 100644
View file @
ae0a427e
--Stars 游木·T
local
m
=
50008885
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetDescription
(
aux
.
Stringid
(
50008885
,
0
))
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
50008885
)
e1
:
SetCost
(
c50008885
.
cost
)
e1
:
SetTarget
(
c50008885
.
sptg1
)
e1
:
SetOperation
(
c50008885
.
spop1
)
c
:
RegisterEffect
(
e1
)
--rm
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
50008885
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_RELEASE
)
e2
:
SetCountLimit
(
1
,
500088851
)
e2
:
SetTarget
(
c50008885
.
sptg2
)
e2
:
SetOperation
(
c50008885
.
spop2
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetOperation
(
c50008885
.
spreg
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
50008885
,
0
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetRange
(
LOCATION_REMOVED
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetCondition
(
c50008885
.
spcon
)
e4
:
SetTarget
(
c50008885
.
sptg
)
e4
:
SetOperation
(
c50008885
.
spop
)
e4
:
SetLabelObject
(
e3
)
c
:
RegisterEffect
(
e4
)
end
function
c50008885
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x50b
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c50008885
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008885
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008885
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008885
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c50008885
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
---
function
c50008885
.
spfilter2
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
c50008885
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c50008885
.
spfilter2
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c50008885
.
spfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c50008885
.
spfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
(),
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c50008885
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
---
function
c50008885
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
and
rc
:
IsSetCard
(
0x50b
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
())
c
:
RegisterFlagEffect
(
50008885
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c50008885
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
50008885
)
>
0
end
function
c50008885
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
50008885
)
end
function
c50008885
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c50008886.lua
0 → 100644
View file @
ae0a427e
--Stars 真绪·T
local
m
=
50008886
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50008886
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
50008886
)
e1
:
SetCost
(
c50008886
.
cost
)
e1
:
SetTarget
(
c50008886
.
thtg
)
e1
:
SetOperation
(
c50008886
.
thop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--tohand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
50008886
,
2
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_RELEASE
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
500088861
)
e3
:
SetTarget
(
c50008886
.
thtg1
)
e3
:
SetOperation
(
c50008886
.
thop1
)
c
:
RegisterEffect
(
e3
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetOperation
(
c50008886
.
spreg
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
50008886
,
1
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetRange
(
LOCATION_REMOVED
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetCondition
(
c50008886
.
spcon
)
e4
:
SetTarget
(
c50008886
.
sptg
)
e4
:
SetOperation
(
c50008886
.
spop
)
e4
:
SetLabelObject
(
e3
)
c
:
RegisterEffect
(
e4
)
end
function
c50008886
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
2
)
if
chk
==
0
then
return
g
:
FilterCount
(
Card
.
IsAbleToRemoveAsCost
,
nil
)
==
2
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
2
end
Duel
.
DisableShuffleCheck
()
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008886
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
c50008886
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008886
.
thfilter
,
tp
,
LOCATION_REMOVED
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_REMOVED
+
LOCATION_GRAVE
)
end
function
c50008886
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008886
.
thfilter
,
tp
,
LOCATION_REMOVED
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
---
function
c50008886
.
thtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsAbleToHand
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c50008886
.
thop1
(
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
---
function
c50008886
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
and
rc
:
IsSetCard
(
0x50b
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
())
c
:
RegisterFlagEffect
(
50008886
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c50008886
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
50008886
)
>
0
end
function
c50008886
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
50008886
)
end
function
c50008886
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c50008887.lua
0 → 100644
View file @
ae0a427e
--Stars的赠礼
local
m
=
50008887
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
50008887
)
e1
:
SetTarget
(
c50008887
.
target
)
e1
:
SetOperation
(
c50008887
.
activate
)
c
:
RegisterEffect
(
e1
)
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
c50008887
.
indcon
)
e2
:
SetOperation
(
c50008887
.
indop
)
c
:
RegisterEffect
(
e2
)
end
function
c50008887
.
thfilter
(
c
,
e
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x50b
)
and
c
:
IsAbleToHand
()
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c50008887
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
c50008887
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
)
if
chk
==
0
then
return
g
:
GetClassCount
(
Card
.
GetCode
)
>=
2
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g1
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
g
:
Remove
(
Card
.
IsCode
,
nil
,
g1
:
GetFirst
():
GetCode
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g2
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
g1
:
Merge
(
g2
)
Duel
.
SetTargetCard
(
g1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g1
,
2
,
0
,
0
)
end
function
c50008887
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
sg
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
end
end
---
function
c50008887
.
indcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
and
re
:
GetHandler
():
IsSetCard
(
0x50b
)
end
function
c50008887
.
indop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x50b
))
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
\ No newline at end of file
expansions/script/c50008888.lua
0 → 100644
View file @
ae0a427e
--梦之咲·学院
local
m
=
50008888
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
50008888
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetOperation
(
c50008888
.
rmop
)
c
:
RegisterEffect
(
e1
)
--remove
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c50008888
.
thcost
)
e2
:
SetTarget
(
c50008888
.
thtg
)
e2
:
SetOperation
(
c50008888
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c50008888
.
rmfilter
(
c
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsAbleToRemove
()
end
function
c50008888
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c50008888
.
rmfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
50008888
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008888
.
rmfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tg
=
g
:
GetFirst
()
if
tg
==
nil
then
return
end
Duel
.
Remove
(
tg
,
POS_FACEUP
,
REASON_EFFECT
)
if
not
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetRange
(
LOCATION_REMOVED
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetCountLimit
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_STANDBY
+
RESET_SELF_TURN
,
1
)
e1
:
SetCondition
(
c50008888
.
thcon1
)
e1
:
SetOperation
(
c50008888
.
thop1
)
e1
:
SetLabel
(
0
)
tg
:
RegisterEffect
(
e1
)
end
end
function
c50008888
.
thcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c50008888
.
thop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
e
:
GetLabel
()
e
:
GetHandler
():
SetTurnCounter
(
ct
)
if
ct
==
0
then
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
else
e
:
SetLabel
(
0
)
end
end
---
function
c50008888
.
costfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsSetCard
(
0x50b
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c50008888
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008888
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008888
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008888
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c50008888
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008888
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c50008888
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008888
.
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
expansions/script/c50008889.lua
0 → 100644
View file @
ae0a427e
--梦之咲·幻之泉
local
m
=
50008889
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--atk
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetDescription
(
aux
.
Stringid
(
50008889
,
0
))
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c50008889
.
cost
)
e2
:
SetTarget
(
c50008889
.
tg
)
e2
:
SetOperation
(
c50008889
.
op
)
c
:
RegisterEffect
(
e2
)
--sp
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
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
,
50008889
)
e3
:
SetCondition
(
c50008889
.
spcon
)
e3
:
SetTarget
(
c50008889
.
sptg
)
e3
:
SetOperation
(
c50008889
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c50008889
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x50b
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c50008889
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008889
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008889
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008889
.
filter
(
c
)
return
c
:
IsFaceup
()
end
function
c50008889
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c50008889
.
filter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c50008889
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c50008889
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ATKCHANGE
,
g
,
1
,
0
,
500
)
end
function
c50008889
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
0
)
tc
:
RegisterEffect
(
e1
)
end
end
---
function
c50008889
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
and
re
:
GetHandler
():
IsSetCard
(
0x50b
)
end
function
c50008889
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c50008889
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c50008889
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c50008889
.
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
,
c50008889
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c50008890.lua
0 → 100644
View file @
ae0a427e
--Stars 北斗·开幕
local
m
=
50008890
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--draw
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50008890
,
0
))
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
50008890
)
e1
:
SetCost
(
c50008890
.
cost
)
e1
:
SetCondition
(
c50008890
.
drcon
)
e1
:
SetTarget
(
c50008890
.
drtg
)
e1
:
SetOperation
(
c50008890
.
drop
)
c
:
RegisterEffect
(
e1
)
--Activate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c50008890
.
rmdrcost
)
e2
:
SetTarget
(
c50008890
.
rmdrtg
)
e2
:
SetOperation
(
c50008890
.
rmdrop
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetOperation
(
c50008890
.
spreg
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
50008890
,
2
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetRange
(
LOCATION_REMOVED
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetCondition
(
c50008890
.
spcon
)
e4
:
SetTarget
(
c50008890
.
sptg
)
e4
:
SetOperation
(
c50008890
.
spop
)
e4
:
SetLabelObject
(
e3
)
c
:
RegisterEffect
(
e4
)
end
function
c50008890
.
rmdrcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008890
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008890
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008890
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToDeck
()
end
function
c50008890
.
sfilter
(
c
,
tp
)
return
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsControler
(
tp
)
end
function
c50008890
.
rmdrtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
c50008890
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingTarget
(
c50008890
.
filter
,
tp
,
LOCATION_REMOVED
,
LOCATION_REMOVED
,
3
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c50008890
.
filter
,
tp
,
LOCATION_REMOVED
,
LOCATION_REMOVED
,
3
,
3
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c50008890
.
rmdrop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
if
not
tg
or
tg
:
FilterCount
(
Card
.
IsRelateToEffect
,
nil
,
e
)
~=
3
then
return
end
Duel
.
SendtoDeck
(
tg
,
nil
,
0
,
REASON_EFFECT
)
local
g
=
Duel
.
GetOperatedGroup
()
if
g
:
IsExists
(
c50008890
.
sfilter
,
1
,
nil
,
tp
)
then
Duel
.
ShuffleDeck
(
tp
)
end
if
g
:
IsExists
(
c50008890
.
sfilter
,
1
,
nil
,
1
-
tp
)
then
Duel
.
ShuffleDeck
(
1
-
tp
)
end
local
ct
=
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
if
ct
==
3
then
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
---
function
c50008890
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x50b
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c50008890
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008890
.
costfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008890
.
costfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008890
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_RITUAL
)
end
function
c50008890
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
and
Duel
.
IsPlayerCanDraw
(
1
-
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
PLAYER_ALL
,
1
)
end
function
c50008890
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
d1
=
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
local
d2
=
Duel
.
Draw
(
1
-
tp
,
1
,
REASON_EFFECT
)
if
d1
==
0
or
d2
==
0
then
return
end
end
---
function
c50008890
.
handcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsRelateToBattle
()
and
c
:
GetBattleTarget
():
IsType
(
TYPE_MONSTER
)
end
function
c50008890
.
handtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
e
:
GetHandler
():
IsFaceup
()
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_HAND
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c50008890
.
handop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_HAND
,
nil
)
if
g
:
GetCount
()
>
0
then
local
sg
=
g
:
RandomSelect
(
tp
,
1
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
---
function
c50008890
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
())
c
:
RegisterFlagEffect
(
50008890
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c50008890
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
50008890
)
>
0
end
function
c50008890
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
50008890
)
end
function
c50008890
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c50008891.lua
0 → 100644
View file @
ae0a427e
--Stars 游木·开幕
local
m
=
50008891
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--sp
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50008891
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
50008891
)
e1
:
SetCost
(
c50008891
.
cost
)
e1
:
SetCondition
(
c50008891
.
spcon1
)
e1
:
SetTarget
(
c50008891
.
sptg1
)
e1
:
SetOperation
(
c50008891
.
spop1
)
c
:
RegisterEffect
(
e1
)
--deck check
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
50008891
,
2
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c50008891
.
checkcost
)
e2
:
SetTarget
(
c50008891
.
checktg
)
e2
:
SetOperation
(
c50008891
.
checkop
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetOperation
(
c50008891
.
spreg
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
50008891
,
3
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetRange
(
LOCATION_REMOVED
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetCondition
(
c50008891
.
spcon
)
e4
:
SetTarget
(
c50008891
.
sptg
)
e4
:
SetOperation
(
c50008891
.
spop
)
e4
:
SetLabelObject
(
e3
)
c
:
RegisterEffect
(
e4
)
end
function
c50008891
.
checkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008891
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008891
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008891
.
checktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ccount
=
3
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
ccount
end
end
function
c50008891
.
checkfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
)
end
function
c50008891
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ccount
=
3
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
<
ccount
then
return
end
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
ccount
)
Duel
.
ConfirmCards
(
tp
,
g
)
if
g
:
IsExists
(
c50008891
.
checkfilter
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
0
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
50008891
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
FilterSelect
(
tp
,
c50008891
.
checkfilter
,
1
,
1
,
nil
,
e
,
tp
)
if
sg
:
GetCount
()
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
0
)
>
0
then
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
end
Duel
.
ShuffleDeck
(
tp
)
else
Duel
.
SortDecktop
(
tp
,
tp
,
ccount
)
end
end
---
function
c50008891
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x50b
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c50008891
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008891
.
costfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008891
.
costfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008891
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c50008891
.
spcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_RITUAL
)
end
function
c50008891
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c50008891
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
function
c50008891
.
spop1
(
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
(
c50008891
.
spfilter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
---
function
c50008891
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
())
c
:
RegisterFlagEffect
(
50008891
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c50008891
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
50008891
)
>
0
end
function
c50008891
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
50008891
)
end
function
c50008891
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c50008892.lua
0 → 100644
View file @
ae0a427e
--Stars 真绪·开幕
local
m
=
50008892
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--rm
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50008892
,
0
))
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
50008892
)
e1
:
SetCost
(
c50008892
.
cost
)
e1
:
SetCondition
(
c50008892
.
rmcon
)
e1
:
SetTarget
(
c50008892
.
rmtg
)
e1
:
SetOperation
(
c50008892
.
rmop
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
50008892
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c50008892
.
thcost
)
e2
:
SetTarget
(
c50008892
.
thtg
)
e2
:
SetOperation
(
c50008892
.
thop
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetOperation
(
c50008892
.
spreg
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
50008892
,
2
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetRange
(
LOCATION_REMOVED
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetCondition
(
c50008892
.
spcon
)
e4
:
SetTarget
(
c50008892
.
sptg
)
e4
:
SetOperation
(
c50008892
.
spop
)
e4
:
SetLabelObject
(
e3
)
c
:
RegisterEffect
(
e4
)
end
function
c50008892
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x50b
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c50008892
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008892
.
costfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008892
.
costfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008892
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_RITUAL
)
end
function
c50008892
.
filter
(
c
)
return
c
:
IsAbleToRemove
()
end
function
c50008892
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c50008892
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c50008892
.
filter
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c50008892
.
filter
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
3
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c50008892
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_EFFECT
)
end
---
function
c50008892
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008892
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008892
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008892
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsAbleToHand
()
end
function
c50008892
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
dg
=
Duel
.
GetMatchingGroup
(
c50008892
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
return
dg
:
GetClassCount
(
Card
.
GetCode
)
>=
3
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c50008892
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c50008892
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g
:
GetClassCount
(
Card
.
GetCode
)
>=
3
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
sg1
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
g
:
Remove
(
Card
.
IsCode
,
nil
,
sg1
:
GetFirst
():
GetCode
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
sg2
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
g
:
Remove
(
Card
.
IsCode
,
nil
,
sg2
:
GetFirst
():
GetCode
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
sg3
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
sg1
:
Merge
(
sg2
)
sg1
:
Merge
(
sg3
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg1
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_ATOHAND
)
local
cg
=
sg1
:
Select
(
1
-
tp
,
1
,
1
,
nil
)
local
tc
=
cg
:
GetFirst
()
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
sg1
:
RemoveCard
(
tc
)
Duel
.
Remove
(
sg1
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
---
function
c50008892
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
())
c
:
RegisterFlagEffect
(
50008892
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c50008892
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
50008892
)
>
0
end
function
c50008892
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
50008892
)
end
function
c50008892
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c50008893.lua
0 → 100644
View file @
ae0a427e
--New·New Stars
local
m
=
50008893
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c50008893
.
target
)
e1
:
SetOperation
(
c50008893
.
activate
)
c
:
RegisterEffect
(
e1
)
--dr
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_REMOVE
+
CATEGORY_TODECK
)
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
,
50008893
)
e3
:
SetCondition
(
c50008893
.
drcon
)
e3
:
SetTarget
(
c50008893
.
drtg
)
e3
:
SetOperation
(
c50008893
.
drop
)
c
:
RegisterEffect
(
e3
)
end
function
c50008893
.
filter
(
c
,
e
,
tp
,
m
,
ft
)
if
not
c
:
IsSetCard
(
0x50b
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
if
ft
>
0
then
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
c
)
else
return
mg
:
IsExists
(
c50008893
.
filterF
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
function
c50008893
.
filterF
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
rc
)
else
return
false
end
end
function
c50008893
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
c50008893
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
end
function
c50008893
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c50008893
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
=
mg
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
local
mat
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
c50008893
.
filterF
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
tc
)
mat
:
Merge
(
mat2
)
end
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
---
function
c50008893
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
and
re
:
GetHandler
():
IsSetCard
(
0x50b
)
end
function
c50008893
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
30459350
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
end
function
c50008893
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
Duel
.
ShuffleHand
(
p
)
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
p
,
Card
.
IsSetCard
,
p
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
0x50b
)
local
tg
=
g
:
GetFirst
()
if
tg
then
if
Duel
.
Remove
(
tg
,
POS_FACEUP
,
REASON_EFFECT
)
==
0
then
Duel
.
ConfirmCards
(
1
-
p
,
tg
)
Duel
.
ShuffleHand
(
p
)
end
else
local
sg
=
Duel
.
GetFieldGroup
(
p
,
LOCATION_HAND
,
0
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c50008894.lua
0 → 100644
View file @
ae0a427e
--Stars的集结
local
m
=
50008894
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--atk & def
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x50b
))
e2
:
SetValue
(
400
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e3
)
--search
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_TOGRAVE
)
e4
:
SetDescription
(
aux
.
Stringid
(
50008894
,
0
))
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetCountLimit
(
1
,
50008894
)
e4
:
SetCost
(
c50008894
.
tgcost
)
e4
:
SetTarget
(
c50008894
.
tgtg
)
e4
:
SetOperation
(
c50008894
.
tgop
)
c
:
RegisterEffect
(
e4
)
--remove
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_REMOVE
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_REMOVE
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e5
:
SetCountLimit
(
1
,
500088941
)
e5
:
SetCondition
(
c50008894
.
rmcon
)
e5
:
SetTarget
(
c50008894
.
rmtg
)
e5
:
SetOperation
(
c50008894
.
rmop
)
c
:
RegisterEffect
(
e5
)
end
function
c50008894
.
costfilter
(
c
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c50008894
.
tgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008894
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008894
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008894
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
c50008894
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008894
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c50008894
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008894
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
---
function
c50008894
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
and
re
:
GetHandler
():
IsSetCard
(
0x50b
)
end
function
c50008894
.
rmfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x50b
)
end
function
c50008894
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c50008894
.
rmfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c50008894
.
rmfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
g1
:
Merge
(
g2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g1
,
2
,
0
,
0
)
end
function
c50008894
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
tg
:
GetCount
()
>
0
then
Duel
.
Remove
(
tg
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c50008895.lua
0 → 100644
View file @
ae0a427e
--Show·Stars 游木
local
m
=
50008895
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsType
,
TYPE_RITUAL
),
6
,
2
)
c
:
EnableReviveLimit
()
--handes
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50008895
,
0
))
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
50008895
)
e1
:
SetCost
(
c50008895
.
hdcost
)
e1
:
SetTarget
(
c50008895
.
hdtg
)
e1
:
SetOperation
(
c50008895
.
hdop
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
50008895
,
1
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c50008895
.
descost
)
e2
:
SetTarget
(
c50008895
.
destg
)
e2
:
SetOperation
(
c50008895
.
desop
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetOperation
(
c50008895
.
spreg
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
50008895
,
2
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetRange
(
LOCATION_REMOVED
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetCondition
(
c50008895
.
spcon
)
e4
:
SetTarget
(
c50008895
.
sptg
)
e4
:
SetOperation
(
c50008895
.
spop
)
e4
:
SetLabelObject
(
e3
)
c
:
RegisterEffect
(
e4
)
end
function
c50008895
.
hdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
3
)
if
chk
==
0
then
return
g
:
FilterCount
(
Card
.
IsAbleToRemoveAsCost
,
nil
)
==
3
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
2
end
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
Duel
.
DisableShuffleCheck
()
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008895
.
hdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
1
-
tp
,
LOCATION_HAND
,
0
)
~=
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
1
-
tp
,
LOCATION_HAND
)
end
function
c50008895
.
hdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
1
-
tp
,
LOCATION_HAND
,
0
)
if
g
:
GetCount
()
==
0
then
return
end
local
sg
=
g
:
RandomSelect
(
1
-
tp
,
1
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_EFFECT
)
end
----
function
c50008895
.
costfilter
(
c
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c50008895
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008895
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008895
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008895
.
desfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAttackAbove
(
0
)
end
function
c50008895
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008895
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c50008895
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
dg
=
g
:
GetMaxGroup
(
Card
.
GetAttack
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
dg
,
dg
:
GetCount
(),
0
,
0
)
end
function
c50008895
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c50008895
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
then
local
dg
=
g
:
GetMaxGroup
(
Card
.
GetAttack
)
Duel
.
Destroy
(
dg
,
REASON_EFFECT
)
end
end
---
function
c50008895
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
())
c
:
RegisterFlagEffect
(
50008895
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c50008895
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
50008895
)
>
0
end
function
c50008895
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
50008895
)
end
function
c50008895
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c50008896.lua
0 → 100644
View file @
ae0a427e
--Show·Stars 昴流
local
m
=
50008896
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x50b
),
6
,
3
)
c
:
EnableReviveLimit
()
--negate activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50008896
,
0
))
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_REMOVE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCountLimit
(
1
,
50008896
)
e1
:
SetCondition
(
c50008896
.
necon
)
e1
:
SetCost
(
c50008896
.
necost
)
e1
:
SetTarget
(
c50008896
.
netg
)
e1
:
SetOperation
(
c50008896
.
neop
)
c
:
RegisterEffect
(
e1
)
--Activate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DISABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c50008896
.
cost
)
e2
:
SetTarget
(
c50008896
.
tg
)
e2
:
SetOperation
(
c50008896
.
op
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetOperation
(
c50008896
.
spreg
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
50008896
,
2
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetRange
(
LOCATION_REMOVED
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetCondition
(
c50008896
.
spcon
)
e4
:
SetTarget
(
c50008896
.
sptg
)
e4
:
SetOperation
(
c50008896
.
spop
)
e4
:
SetLabelObject
(
e3
)
c
:
RegisterEffect
(
e4
)
end
function
c50008896
.
necon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c50008896
.
necost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
3
)
if
chk
==
0
then
return
g
:
FilterCount
(
Card
.
IsAbleToRemoveAsCost
,
nil
)
==
3
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
2
end
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
Duel
.
DisableShuffleCheck
()
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008896
.
netg
(
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
end
function
c50008896
.
neop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Remove
(
eg
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
---
function
c50008896
.
costfilter
(
c
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c50008896
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008896
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50008896
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008896
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
not
c
:
IsDisabled
()
end
function
c50008896
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
chkc
:
IsControler
(
1
-
tp
)
and
c50008896
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c50008896
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c50008896
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
end
function
c50008896
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
()
and
tc
:
IsControler
(
1
-
tp
)
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
)
end
end
---
function
c50008896
.
spreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
end
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsReason
(
REASON_COST
)
then
e
:
SetLabel
(
Duel
.
GetTurnCount
())
c
:
RegisterFlagEffect
(
50008896
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
function
c50008896
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
50008896
)
>
0
end
function
c50008896
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
e
:
GetHandler
():
ResetFlagEffect
(
50008896
)
end
function
c50008896
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/strings.conf
View file @
ae0a427e
...
...
@@ -7,6 +7,9 @@
#is_named_with_cyberaqua 电子水蓝
#is_named_with_Relic 圣遗物
#娜娜 10 0x200-0x20f
!
setname
0
xc204
Madoka
#布偶 11
#named_with_ELF ELF
#named_with_Ld 灵都
...
...
@@ -14,7 +17,6 @@
#Mizuhashi Parsee 12 0xfb0-0xfbf
!
setname
0
xfb0
六曜
!
setname
0
xfba
LA
!
setname
0
xfbc
静仪式
!
setname
0
xfbe
奇迹糕点
...
...
@@ -146,6 +148,7 @@
#奇犽 500 0x500-0x50f
!
setname
0
x50a
Warpko
!
setname
0
x50b
Stars
!
setname
0
x50c
奇犽
#is_named_with_Kensei 幻星
#is_named_with_Rely 灵依
...
...
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