Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alstroemeria-silentlove
ygopro-222DIY-cards
Commits
3bab20f8
Commit
3bab20f8
authored
Jun 08, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:purerosefallen/ygopro-222DIY-cards
parents
40c6c3b9
7813431a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
492 additions
and
481 deletions
+492
-481
expansions/script/1.cdb
expansions/script/1.cdb
+0
-0
expansions/script/c1110112.lua
expansions/script/c1110112.lua
+168
-169
expansions/script/c1110114.lua
expansions/script/c1110114.lua
+158
-158
expansions/script/c1111223.lua
expansions/script/c1111223.lua
+141
-137
expansions/script/c81006014.lua
expansions/script/c81006014.lua
+2
-2
expansions/script/c960009.lua
expansions/script/c960009.lua
+22
-14
expansions/script/c9980445.lua
expansions/script/c9980445.lua
+1
-1
No files found.
expansions/script/1.cdb
deleted
100644 → 0
View file @
40c6c3b9
File deleted
expansions/script/c1110112.lua
View file @
3bab20f8
--灵都·葬魂幽蝶
local
m
=
1110112
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c1110198"
)
end
,
function
()
require
(
"script/c1110198"
)
end
)
cm
.
named_with_Urban
=
true
--
function
c1110112
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
aux
.
AddFusionProcCodeFun
(
c
,
1110004
,
c1110112
.
filter
,
1
,
true
,
true
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1110112
,
0
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
1110112
)
e1
:
SetCondition
(
c1110112
.
con1
)
e1
:
SetTarget
(
c1110112
.
tg1
)
e1
:
SetOperation
(
c1110112
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1110112
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1c0
+
TIMING_MAIN_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
1110112
)
e2
:
SetCondition
(
c1110112
.
con2
)
e2
:
SetTarget
(
c1110112
.
tg2
)
e2
:
SetOperation
(
c1110112
.
op1
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetTarget
(
c1110112
.
tg3
)
e3
:
SetOperation
(
c1110112
.
op3
)
c
:
RegisterEffect
(
e3
)
--
end
--
function
c1110112
.
filter
(
c
)
return
c
:
IsCode
(
1110002
)
or
c
:
IsCode
(
1110122
)
end
--
function
c1110112
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
bit
.
band
(
c
:
GetSummonType
(),
SUMMON_TYPE_FUSION
)
~=
0
and
c
:
GetMaterialCount
()
>
0
end
--
function
c1110112
.
tfilter1_1
(
c
,
e
,
tp
)
return
muxu
.
check_set_Urban
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1110112
.
tfilter1_2
(
c
)
return
c
:
IsAbleToDeck
()
and
bit
.
band
(
c
:
GetSummonType
(),
TYPE_SPSUMMON
)
~=
0
and
not
c
:
IsPreviousLocation
(
LOCATION_EXTRA
)
end
function
c1110112
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
c1110112
.
tfilter1_1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
local
b2
=
Duel
.
IsExistingMatchingCard
(
c1110112
.
tfilter1_2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
if
chk
==
0
then
return
(
b1
or
b2
)
and
Duel
.
GetFlagEffect
(
tp
,
1110004
)
<
1
end
local
off
=
1
local
ops
=
{}
local
opval
=
{}
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
0
)
opval
[
off
-
1
]
=
1
off
=
off
+
1
end
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
1
)
opval
[
off
-
1
]
=
2
off
=
off
+
1
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
sel
=
opval
[
op
]
e
:
SetLabel
(
sel
)
if
sel
==
1
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
else
e
:
SetCategory
(
CATEGORY_TODECK
)
e
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_MZONE
)
end
end
--
function
c1110112
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
sel
=
e
:
GetLabel
()
if
sel
==
1
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110112
.
tfilter1_1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
<
1
then
return
end
local
tc
=
g
:
GetFirst
()
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1_3
=
Effect
.
CreateEffect
(
c
)
e1_3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_3
:
SetCode
(
EFFECT_ADD_TYPE
)
e1_3
:
SetValue
(
TYPE_SPIRIT
)
e1_3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_3
,
true
)
tc
:
RegisterFlagEffect
(
1110112
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
1110112
,
6
))
Duel
.
SpecialSummonComplete
()
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110112
.
tfilter1_2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
<
1
then
return
end
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
--
function
c1110112
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
end
--
function
c1110112
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
c1110112
.
tfilter1_1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
local
b2
=
Duel
.
IsExistingMatchingCard
(
c1110112
.
tfilter1_2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
if
chk
==
0
then
return
(
b1
or
b2
)
and
Duel
.
GetFlagEffect
(
tp
,
1110004
)
>
0
end
local
off
=
1
local
ops
=
{}
local
opval
=
{}
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
0
)
opval
[
off
-
1
]
=
1
off
=
off
+
1
end
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
1
)
opval
[
off
-
1
]
=
2
off
=
off
+
1
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
sel
=
opval
[
op
]
e
:
SetLabel
(
sel
)
if
sel
==
1
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
else
e
:
SetCategory
(
CATEGORY_TODECK
)
e
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_MZONE
)
end
end
--
function
c1110112
.
tfilter3
(
c
)
return
c
:
IsCode
(
1110142
)
and
c
:
IsAbleToHand
()
end
function
c1110112
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1110112
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
--
function
c1110112
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110112
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
<
1
then
return
end
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
--
--灵都·葬魂幽蝶
local
m
=
1110112
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c1110198"
)
end
,
function
()
require
(
"script/c1110198"
)
end
)
cm
.
named_with_Urban
=
true
--
function
c1110112
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
aux
.
AddFusionProcCodeFun
(
c
,
1110004
,
c1110112
.
filter
,
1
,
true
,
true
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1110112
,
0
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
1110112
)
e1
:
SetCondition
(
c1110112
.
con1
)
e1
:
SetTarget
(
c1110112
.
tg1
)
e1
:
SetOperation
(
c1110112
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1110112
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1c0
+
TIMING_MAIN_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
1110112
)
e2
:
SetCondition
(
c1110112
.
con2
)
e2
:
SetTarget
(
c1110112
.
tg2
)
e2
:
SetOperation
(
c1110112
.
op1
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetTarget
(
c1110112
.
tg3
)
e3
:
SetOperation
(
c1110112
.
op3
)
c
:
RegisterEffect
(
e3
)
--
end
--
function
c1110112
.
filter
(
c
)
return
c
:
IsCode
(
1110002
)
or
c
:
IsCode
(
1110122
)
end
--
function
c1110112
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
bit
.
band
(
c
:
GetSummonType
(),
SUMMON_TYPE_FUSION
)
~=
0
and
c
:
GetMaterialCount
()
>
0
end
--
function
c1110112
.
tfilter1_1
(
c
,
e
,
tp
)
return
muxu
.
check_set_Urban
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1110112
.
tfilter1_2
(
c
)
return
c
:
IsAbleToDeck
()
and
c
:
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
and
not
c
:
IsPreviousLocation
(
LOCATION_EXTRA
)
end
function
c1110112
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
c1110112
.
tfilter1_1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
local
b2
=
Duel
.
IsExistingMatchingCard
(
c1110112
.
tfilter1_2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
if
chk
==
0
then
return
(
b1
or
b2
)
and
Duel
.
GetFlagEffect
(
tp
,
1110004
)
<
1
end
local
off
=
1
local
ops
=
{}
local
opval
=
{}
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
0
)
opval
[
off
-
1
]
=
1
off
=
off
+
1
end
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
1
)
opval
[
off
-
1
]
=
2
off
=
off
+
1
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
sel
=
opval
[
op
]
e
:
SetLabel
(
sel
)
if
sel
==
1
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
else
e
:
SetCategory
(
CATEGORY_TODECK
)
e
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_MZONE
)
end
end
--
function
c1110112
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
sel
=
e
:
GetLabel
()
if
sel
==
1
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110112
.
tfilter1_1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
<
1
then
return
end
local
tc
=
g
:
GetFirst
()
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1_3
=
Effect
.
CreateEffect
(
c
)
e1_3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_3
:
SetCode
(
EFFECT_ADD_TYPE
)
e1_3
:
SetValue
(
TYPE_SPIRIT
)
e1_3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_3
,
true
)
tc
:
RegisterFlagEffect
(
1110112
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
1110112
,
6
))
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110112
.
tfilter1_2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
<
1
then
return
end
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
--
function
c1110112
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
end
--
function
c1110112
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
c1110112
.
tfilter1_1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
local
b2
=
Duel
.
IsExistingMatchingCard
(
c1110112
.
tfilter1_2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
if
chk
==
0
then
return
(
b1
or
b2
)
and
Duel
.
GetFlagEffect
(
tp
,
1110004
)
>
0
end
local
off
=
1
local
ops
=
{}
local
opval
=
{}
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
0
)
opval
[
off
-
1
]
=
1
off
=
off
+
1
end
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
1
)
opval
[
off
-
1
]
=
2
off
=
off
+
1
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
sel
=
opval
[
op
]
e
:
SetLabel
(
sel
)
if
sel
==
1
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
else
e
:
SetCategory
(
CATEGORY_TODECK
)
e
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_MZONE
)
end
end
--
function
c1110112
.
tfilter3
(
c
)
return
c
:
IsCode
(
1110142
)
and
c
:
IsAbleToHand
()
end
function
c1110112
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1110112
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
--
function
c1110112
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110112
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
<
1
then
return
end
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
--
expansions/script/c1110114.lua
View file @
3bab20f8
--命运之书
local
m
=
1110114
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c1110198"
)
end
,
function
()
require
(
"script/c1110198"
)
end
)
cm
.
named_with_Urban
=
true
--
function
c1110114
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
aux
.
AddFusionProcMix
(
c
,
true
,
true
,
c1110114
.
FusFilter1
,
c1110114
.
FusFilter2
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_ADJUST
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c1110114
.
con1
)
e1
:
SetOperation
(
c1110114
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
c1110114
.
op2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetOperation
(
c1110114
.
op3
)
c
:
RegisterEffect
(
e3
)
--
end
--
function
c1110114
.
FusFilter1
(
c
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
--
function
c1110114
.
FusFilter2
(
c
)
return
muxu
.
check_fusion_set_Urban
(
c
)
end
--
function
c1110114
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
1110114
)
<
1
end
--
function
c1110114
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
c
:
RegisterFlagEffect
(
1110114
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
fg
=
c
:
GetMaterial
()
if
fg
:
GetCount
()
<
1
then
return
end
local
fc
=
fg
:
GetFirst
()
while
fc
do
if
bit
.
band
(
fc
:
GetOriginalType
(),
TYPE_MONSTER
)
~=
0
then
local
code
=
fc
:
GetOriginalCode
()
c
:
CopyEffect
(
code
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
end
fc
=
fg
:
GetNext
()
end
end
--
function
c1110114
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
if
not
rc
:
IsControler
(
tp
)
then
return
end
if
not
rc
:
IsRelateToEffect
(
re
)
then
return
end
if
not
muxu
.
check_set_Legend
(
rc
)
then
return
end
rc
:
RegisterFlagEffect
(
1110114
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
end
--
function
c1110114
.
ofilter3_1
(
c
,
tp
)
return
c
:
GetFlagEffect
(
1110114
)
>
0
and
c
:
IsStatus
(
STATUS_LEAVE_CONFIRMED
)
end
function
c1110114
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
local
sg
=
Duel
.
GetMatchingGroup
(
c1110114
.
ofilter3_1
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
tp
)
if
sg
:
GetCount
()
<
1
then
return
end
local
ng
=
Group
.
CreateGroup
()
local
lc
=
sg
:
GetFirst
()
while
lc
do
Duel
.
ResetFlagEffect
(
lc
,
1110114
)
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
lc
:
GetCode
(),
nil
,
0x221
,
0
,
0
,
3
,
RACE_PSYCHO
,
ATTRIBUTE_LIGHT
,
POS_FACEUP
)
then
ng
:
AddCard
(
lc
)
end
lc
=
sg
:
GetNext
()
end
local
num
=
ng
:
GetCount
()
if
num
<
1
then
return
end
if
ft
<
num
then
num
=
ft
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1110114
,
0
))
then
if
num
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
ng
:
Select
(
tp
,
1
,
num
,
nil
)
local
tc
=
tg
:
GetFirst
()
while
tc
do
tc
:
AddMonsterAttribute
(
TYPE_EFFECT
+
TYPE_SPIRIT
,
ATTRIBUTE_LIGHT
,
RACE_PSYCHO
,
3
,
0
,
0
)
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
tc
:
AddMonsterAttributeComplete
()
local
e3_2
=
Effect
.
CreateEffect
(
c
)
e3_2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3_2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3_2
:
SetOperation
(
c1110114
.
op3_2
)
tc
:
RegisterEffect
(
e3_2
,
true
)
tc
=
tg
:
GetNext
()
end
Duel
.
SpecialSummonComplete
()
else
local
nc
=
ng
:
GetFirst
()
nc
:
AddMonsterAttribute
(
TYPE_EFFECT
+
TYPE_SPIRIT
,
ATTRIBUTE_LIGHT
,
RACE_PSYCHO
,
3
,
0
,
0
)
Duel
.
SpecialSummonStep
(
nc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
nc
:
AddMonsterAttributeComplete
()
local
e3_2
=
Effect
.
CreateEffect
(
c
)
e3_2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3_2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3_2
:
SetOperation
(
c1110114
.
op3_2
)
nc
:
RegisterEffect
(
e3_2
,
true
)
Duel
.
SpecialSummonComplete
()
end
end
end
--
function
c1110114
.
op3_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e3_3
=
Effect
.
CreateEffect
(
c
)
e3_3
:
SetDescription
(
1104
)
e3_3
:
SetCategory
(
CATEGORY_TOHAND
)
e3_3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3_3
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e3_3
:
SetRange
(
LOCATION_MZONE
)
e3_3
:
SetCountLimit
(
1
)
e3_3
:
SetReset
(
RESET_EVENT
+
0x1ee0000
+
RESET_PHASE
+
PHASE_END
)
e3_3
:
SetCondition
(
aux
.
SpiritReturnCondition
)
e3_3
:
SetTarget
(
c1110114
.
tg3_3
)
e3_3
:
SetOperation
(
c1110114
.
op3_3
)
c
:
RegisterEffect
(
e3_3
)
local
e3_4
=
e3_3
:
Clone
()
e3_4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
c
:
RegisterEffect
(
e3_4
)
end
--
function
c1110114
.
tg3_3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_TRIGGER_F
)
then
return
true
else
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
--
function
c1110114
.
op3_3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsFaceup
()
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
--
--命运之书
local
m
=
1110114
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c1110198"
)
end
,
function
()
require
(
"script/c1110198"
)
end
)
cm
.
named_with_Urban
=
true
--
function
c1110114
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
aux
.
AddFusionProcMix
(
c
,
true
,
true
,
c1110114
.
FusFilter1
,
c1110114
.
FusFilter2
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_ADJUST
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c1110114
.
con1
)
e1
:
SetOperation
(
c1110114
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
c1110114
.
op2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetOperation
(
c1110114
.
op3
)
c
:
RegisterEffect
(
e3
)
--
end
--
function
c1110114
.
FusFilter1
(
c
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
--
function
c1110114
.
FusFilter2
(
c
)
return
muxu
.
check_fusion_set_Urban
(
c
)
end
--
function
c1110114
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
1110114
)
<
1
end
--
function
c1110114
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
c
:
RegisterFlagEffect
(
1110114
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
fg
=
c
:
GetMaterial
()
if
fg
:
GetCount
()
<
1
then
return
end
local
fc
=
fg
:
GetFirst
()
while
fc
do
if
bit
.
band
(
fc
:
GetOriginalType
(),
TYPE_MONSTER
)
~=
0
and
bit
.
band
(
fc
:
GetOriginalType
(),
TYPE_EFFECT
)
~=
0
then
local
code
=
fc
:
GetOriginalCode
()
c
:
CopyEffect
(
code
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
end
fc
=
fg
:
GetNext
()
end
end
--
function
c1110114
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
if
not
rc
:
IsControler
(
tp
)
then
return
end
if
not
rc
:
IsRelateToEffect
(
re
)
then
return
end
if
not
muxu
.
check_set_Legend
(
rc
)
then
return
end
rc
:
RegisterFlagEffect
(
1110114
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
end
--
function
c1110114
.
ofilter3_1
(
c
,
tp
)
return
c
:
GetFlagEffect
(
1110114
)
>
0
and
c
:
IsStatus
(
STATUS_LEAVE_CONFIRMED
)
end
function
c1110114
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
local
sg
=
Duel
.
GetMatchingGroup
(
c1110114
.
ofilter3_1
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
tp
)
if
sg
:
GetCount
()
<
1
then
return
end
local
ng
=
Group
.
CreateGroup
()
local
lc
=
sg
:
GetFirst
()
while
lc
do
Duel
.
ResetFlagEffect
(
lc
,
1110114
)
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
lc
:
GetCode
(),
nil
,
0x221
,
0
,
0
,
3
,
RACE_PSYCHO
,
ATTRIBUTE_LIGHT
,
POS_FACEUP
)
then
ng
:
AddCard
(
lc
)
end
lc
=
sg
:
GetNext
()
end
local
num
=
ng
:
GetCount
()
if
num
<
1
then
return
end
if
ft
<
num
then
num
=
ft
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1110114
,
0
))
then
if
num
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
ng
:
Select
(
tp
,
1
,
num
,
nil
)
local
tc
=
tg
:
GetFirst
()
while
tc
do
tc
:
AddMonsterAttribute
(
TYPE_EFFECT
+
TYPE_SPIRIT
,
ATTRIBUTE_LIGHT
,
RACE_PSYCHO
,
3
,
0
,
0
)
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
tc
:
AddMonsterAttributeComplete
()
local
e3_2
=
Effect
.
CreateEffect
(
c
)
e3_2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3_2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3_2
:
SetOperation
(
c1110114
.
op3_2
)
tc
:
RegisterEffect
(
e3_2
,
true
)
tc
=
tg
:
GetNext
()
end
Duel
.
SpecialSummonComplete
()
else
local
nc
=
ng
:
GetFirst
()
nc
:
AddMonsterAttribute
(
TYPE_EFFECT
+
TYPE_SPIRIT
,
ATTRIBUTE_LIGHT
,
RACE_PSYCHO
,
3
,
0
,
0
)
Duel
.
SpecialSummonStep
(
nc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
nc
:
AddMonsterAttributeComplete
()
local
e3_2
=
Effect
.
CreateEffect
(
c
)
e3_2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3_2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3_2
:
SetOperation
(
c1110114
.
op3_2
)
nc
:
RegisterEffect
(
e3_2
,
true
)
Duel
.
SpecialSummonComplete
()
end
end
end
--
function
c1110114
.
op3_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e3_3
=
Effect
.
CreateEffect
(
c
)
e3_3
:
SetDescription
(
1104
)
e3_3
:
SetCategory
(
CATEGORY_TOHAND
)
e3_3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3_3
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e3_3
:
SetRange
(
LOCATION_MZONE
)
e3_3
:
SetCountLimit
(
1
)
e3_3
:
SetReset
(
RESET_EVENT
+
0x1ee0000
+
RESET_PHASE
+
PHASE_END
)
e3_3
:
SetCondition
(
aux
.
SpiritReturnCondition
)
e3_3
:
SetTarget
(
c1110114
.
tg3_3
)
e3_3
:
SetOperation
(
c1110114
.
op3_3
)
c
:
RegisterEffect
(
e3_3
)
local
e3_4
=
e3_3
:
Clone
()
e3_4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
c
:
RegisterEffect
(
e3_4
)
end
--
function
c1110114
.
tg3_3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_TRIGGER_F
)
then
return
true
else
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
--
function
c1110114
.
op3_3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsFaceup
()
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
--
expansions/script/c1111223.lua
View file @
3bab20f8
--灵曲·年华静谧之月
local
m
=
1111223
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c1110198"
)
end
,
function
()
require
(
"script/c1110198"
)
end
)
cm
.
named_with_Soul
=
true
--
function
c1111223
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetTarget
(
c1111223
.
tg1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1111223
,
0
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c1111223
.
cost2
)
e2
:
SetOperation
(
c1111223
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetOperation
(
c1111223
.
op3
)
c
:
RegisterEffect
(
e3
)
--
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_CHAINING
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetOperation
(
c1111223
.
op4
)
c
:
RegisterEffect
(
e4
)
--
if
not
c1111223
.
global_check
then
c1111223
.
global_check
=
true
local
e5
=
Effect
.
GlobalEffect
()
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCode
(
EVENT_CHAINING
)
e5
:
SetCondition
(
c1111223
.
con5
)
e5
:
SetOperation
(
c1111223
.
op5
)
Duel
.
RegisterEffect
(
e5
,
0
)
end
--
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
)
e6
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
e6
:
SetRange
(
LOCATION_SZONE
)
e6
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e6
:
SetTarget
(
c1111223
.
tg6
)
c
:
RegisterEffect
(
e6
)
--
end
--
function
c1111223
.
tfilter1
(
c
,
tp
)
return
c
:
IsReason
(
REASON_EFFECT
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
end
function
c1111223
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
0x1111
,
1
,
REASON_EFFECT
)
and
eg
:
IsExists
(
c1111223
.
tfilter1
,
1
,
c
,
tp
)
end
if
Duel
.
SelectEffectYesNo
(
tp
,
c
,
96
)
then
return
true
else
return
false
end
end
--
function
c1111223
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RemoveCounter
(
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
0x1111
,
1
,
REASON_EFFECT
)
end
--
function
c1111223
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
num
=
Duel
.
GetMatchingGroupCount
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
if
chk
==
0
then
return
num
>
0
and
c
:
IsCanAddCounter
(
0x1111
,
num
)
end
c
:
AddCounter
(
0x1111
,
num
)
end
--
function
c1111223
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
b1
=
true
local
b2
=
true
local
off
=
1
local
ops
=
{}
local
opval
=
{}
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
1111223
,
1
)
opval
[
off
-
1
]
=
1
off
=
off
+
1
end
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
1111223
,
2
)
opval
[
off
-
1
]
=
2
off
=
off
+
1
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
sel
=
opval
[
op
]
if
sel
==
1
then
c
:
ResetFlagEffect
(
1111223
)
c
:
ResetFlagEffect
(
1111224
)
c
:
RegisterFlagEffect
(
1111223
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
0
,
0
,
aux
.
Stringid
(
1111223
,
1
))
else
c
:
ResetFlagEffect
(
1111223
)
c
:
ResetFlagEffect
(
1111224
)
c
:
RegisterFlagEffect
(
1111224
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
0
,
0
,
aux
.
Stringid
(
1111223
,
2
))
c
:
RegisterFlagEffect
(
1111224
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
0
,
0
,
aux
.
Stringid
(
1111223
,
3
))
end
end
--
function
c1111223
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
GetFlagEffect
(
1111223
)
<
1
then
return
false
end
Duel
.
SetChainLimitTillChainEnd
(
aux
.
FALSE
)
end
--
function
c1111223
.
op4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
GetFlagEffect
(
1111224
)
<
1
then
return
false
end
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
--
function
c1111223
.
con5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
end
--
function
c1111223
.
op5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
re
:
GetHandler
()
if
not
c
:
IsLocation
(
LOCATION_MZONE
)
then
return
end
c
:
RegisterFlagEffect
(
1111225
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
end
--
function
c1111223
.
tg6
(
e
,
c
)
return
c
:
GetFlagEffect
(
1111225
)
>
0
end
--
--灵曲·年华静谧之月
local
m
=
1111223
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c1110198"
)
end
,
function
()
require
(
"script/c1110198"
)
end
)
cm
.
named_with_Soul
=
true
--
function
c1111223
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetTarget
(
c1111223
.
tg1
)
e1
:
SetValue
(
c1111223
.
val1
)
e1
:
SetOperation
(
c1111223
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1111223
,
0
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c1111223
.
cost2
)
e2
:
SetOperation
(
c1111223
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetOperation
(
c1111223
.
op3
)
c
:
RegisterEffect
(
e3
)
--
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_CHAINING
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetOperation
(
c1111223
.
op4
)
c
:
RegisterEffect
(
e4
)
--
if
not
c1111223
.
global_check
then
c1111223
.
global_check
=
true
local
e5
=
Effect
.
GlobalEffect
()
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCode
(
EVENT_CHAINING
)
e5
:
SetCondition
(
c1111223
.
con5
)
e5
:
SetOperation
(
c1111223
.
op5
)
Duel
.
RegisterEffect
(
e5
,
0
)
end
--
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
)
e6
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
e6
:
SetRange
(
LOCATION_SZONE
)
e6
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e6
:
SetTarget
(
c1111223
.
tg6
)
c
:
RegisterEffect
(
e6
)
--
end
--
function
c1111223
.
tfilter1
(
c
,
e
,
tp
)
return
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsReason
(
REASON_EFFECT
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
and
c
~=
e
:
GetHandler
()
end
function
c1111223
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
0x1111
,
1
,
REASON_EFFECT
)
and
eg
:
IsExists
(
c1111223
.
tfilter1
,
1
,
c
,
e
,
tp
)
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
--
function
c1111223
.
val1
(
e
,
c
)
return
c1111223
.
tfilter1
(
c
,
e
,
e
:
GetHandlerPlayer
())
end
--
function
c1111223
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RemoveCounter
(
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
0x1111
,
1
,
REASON_EFFECT
)
end
--
function
c1111223
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
num
=
Duel
.
GetMatchingGroupCount
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
if
chk
==
0
then
return
num
>
0
and
c
:
IsCanAddCounter
(
0x1111
,
num
)
end
c
:
AddCounter
(
0x1111
,
num
)
end
--
function
c1111223
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
b1
=
true
local
b2
=
true
local
off
=
1
local
ops
=
{}
local
opval
=
{}
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
1111223
,
1
)
opval
[
off
-
1
]
=
1
off
=
off
+
1
end
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
1111223
,
2
)
opval
[
off
-
1
]
=
2
off
=
off
+
1
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
sel
=
opval
[
op
]
if
sel
==
1
then
c
:
ResetFlagEffect
(
1111223
)
c
:
ResetFlagEffect
(
1111224
)
c
:
RegisterFlagEffect
(
1111223
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
0
,
0
,
aux
.
Stringid
(
1111223
,
1
))
else
c
:
ResetFlagEffect
(
1111223
)
c
:
ResetFlagEffect
(
1111224
)
c
:
RegisterFlagEffect
(
1111224
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
0
,
0
,
aux
.
Stringid
(
1111223
,
2
))
c
:
RegisterFlagEffect
(
1111224
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
0
,
0
,
aux
.
Stringid
(
1111223
,
3
))
end
end
--
function
c1111223
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
GetFlagEffect
(
1111223
)
<
1
then
return
end
Duel
.
SetChainLimitTillChainEnd
(
aux
.
FALSE
)
end
--
function
c1111223
.
op4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
GetFlagEffect
(
1111224
)
<
1
then
return
end
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
--
function
c1111223
.
con5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
end
--
function
c1111223
.
op5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
re
:
GetHandler
()
if
not
c
:
IsLocation
(
LOCATION_MZONE
)
then
return
end
c
:
RegisterFlagEffect
(
1111225
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
end
--
function
c1111223
.
tg6
(
e
,
c
)
return
c
:
GetFlagEffect
(
1111225
)
>
0
end
--
expansions/script/c81006014.lua
View file @
3bab20f8
...
...
@@ -15,7 +15,7 @@ function c81006014.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetHintTiming
(
0
,
TIMING_MAIN_END
)
e1
:
SetHintTiming
(
0
,
TIMING_MAIN_END
+
TIMINGS_CHECK_MONSTER
)
e1
:
SetCondition
(
c81006014
.
spcon
)
e1
:
SetCost
(
c81006014
.
spcost
)
e1
:
SetTarget
(
c81006014
.
sptg
)
...
...
@@ -23,7 +23,7 @@ function c81006014.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c81006014
.
rellimit
(
e
,
c
,
tp
,
sumtp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
c
:
GetOwner
()
==
e
:
GetHandler
():
GetOwner
(
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c81006014
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
...
...
expansions/script/c960009.lua
View file @
3bab20f8
...
...
@@ -4,7 +4,7 @@ function c960009.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_
END_PHASE
)
e1
:
SetHintTiming
(
0
,
TIMING_
ATTACK
+
TIMING_BATTLE_START
+
TIMINGS_CHECK_MONSTER
)
e1
:
SetCountLimit
(
1
,
960009
)
e1
:
SetCost
(
c960009
.
cost
)
e1
:
SetOperation
(
c960009
.
activate
)
...
...
@@ -26,23 +26,27 @@ function c960009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
PayLPCost
(
tp
,
500
)
end
function
c960009
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
--
local c=e:GetHandler()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
()
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTargetRange
(
1
,
1
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
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
(
c960009
.
efilter
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
Duel
.
RegisterEffect
(
e3
,
tp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e1
:
SetTarget
(
c960009
.
etarget
)
e1
:
SetValue
(
c960009
.
efilter
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
960009
,
0
))
end
function
c960009
.
thfilter
(
c
)
...
...
@@ -61,5 +65,9 @@ function c960009.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c960009
.
efilter
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
\ No newline at end of file
return
te
:
GetHandler
()
~=
e
:
GetHandler
()
end
function
c960009
.
etarget
(
e
,
c
)
return
true
end
expansions/script/c9980445.lua
View file @
3bab20f8
...
...
@@ -93,7 +93,7 @@ function c9980445.spcon(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
IsExistingMatchingCard
(
c9980445
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c9980445
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x
1bca
)
and
c
:
IsLevelBelow
(
2
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x
2bcb
)
and
c
:
IsLevelBelow
(
2
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c9980445
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c9980445
.
spfilter
(
chkc
,
e
,
tp
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment