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
7813431a
Commit
7813431a
authored
Jun 08, 2019
by
2924713558
Committed by
GitHub
Jun 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
8382e30a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
467 additions
and
464 deletions
+467
-464
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
No files found.
expansions/script/c1110112.lua
View file @
7813431a
--灵都·葬魂幽蝶
--灵都·葬魂幽蝶
local
m
=
1110112
local
m
=
1110112
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c1110198"
)
end
,
function
()
require
(
"script/c1110198"
)
end
)
xpcall
(
function
()
require
(
"expansions/script/c1110198"
)
end
,
function
()
require
(
"script/c1110198"
)
end
)
cm
.
named_with_Urban
=
true
cm
.
named_with_Urban
=
true
--
--
function
c1110112
.
initial_effect
(
c
)
function
c1110112
.
initial_effect
(
c
)
--
--
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddFusionProcCodeFun
(
c
,
1110004
,
c1110112
.
filter
,
1
,
true
,
true
)
aux
.
AddFusionProcCodeFun
(
c
,
1110004
,
c1110112
.
filter
,
1
,
true
,
true
)
--
--
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1110112
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
1110112
,
0
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
1110112
)
e1
:
SetCountLimit
(
1
,
1110112
)
e1
:
SetCondition
(
c1110112
.
con1
)
e1
:
SetCondition
(
c1110112
.
con1
)
e1
:
SetTarget
(
c1110112
.
tg1
)
e1
:
SetTarget
(
c1110112
.
tg1
)
e1
:
SetOperation
(
c1110112
.
op1
)
e1
:
SetOperation
(
c1110112
.
op1
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
--
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1110112
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
1110112
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1c0
+
TIMING_MAIN_END
)
e2
:
SetHintTiming
(
0
,
0x1c0
+
TIMING_MAIN_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
1110112
)
e2
:
SetCountLimit
(
1
,
1110112
)
e2
:
SetCondition
(
c1110112
.
con2
)
e2
:
SetCondition
(
c1110112
.
con2
)
e2
:
SetTarget
(
c1110112
.
tg2
)
e2
:
SetTarget
(
c1110112
.
tg2
)
e2
:
SetOperation
(
c1110112
.
op1
)
e2
:
SetOperation
(
c1110112
.
op1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
--
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetTarget
(
c1110112
.
tg3
)
e3
:
SetTarget
(
c1110112
.
tg3
)
e3
:
SetOperation
(
c1110112
.
op3
)
e3
:
SetOperation
(
c1110112
.
op3
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--
--
end
end
--
--
function
c1110112
.
filter
(
c
)
function
c1110112
.
filter
(
c
)
return
c
:
IsCode
(
1110002
)
or
c
:
IsCode
(
1110122
)
return
c
:
IsCode
(
1110002
)
or
c
:
IsCode
(
1110122
)
end
end
--
--
function
c1110112
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1110112
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
bit
.
band
(
c
:
GetSummonType
(),
SUMMON_TYPE_FUSION
)
~=
0
and
c
:
GetMaterialCount
()
>
0
return
bit
.
band
(
c
:
GetSummonType
(),
SUMMON_TYPE_FUSION
)
~=
0
and
c
:
GetMaterialCount
()
>
0
end
end
--
--
function
c1110112
.
tfilter1_1
(
c
,
e
,
tp
)
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
)
return
muxu
.
check_set_Urban
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
end
function
c1110112
.
tfilter1_2
(
c
)
function
c1110112
.
tfilter1_2
(
c
)
return
c
:
IsAbleToDeck
()
and
bit
.
band
(
c
:
GetSummonType
(),
TYPE_SPSUMMON
)
~=
0
and
not
c
:
IsPreviousLocation
(
LOCATION_EXTRA
)
return
c
:
IsAbleToDeck
()
and
c
:
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
and
not
c
:
IsPreviousLocation
(
LOCATION_EXTRA
)
end
end
function
c1110112
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
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
)
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
if
chk
==
0
then
return
(
b1
or
b2
)
and
Duel
.
GetFlagEffect
(
tp
,
1110004
)
<
1
end
local
off
=
1
local
off
=
1
local
ops
=
{}
local
ops
=
{}
local
opval
=
{}
local
opval
=
{}
if
b1
then
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
0
)
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
0
)
opval
[
off
-
1
]
=
1
opval
[
off
-
1
]
=
1
off
=
off
+
1
off
=
off
+
1
end
end
if
b2
then
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
1
)
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
1
)
opval
[
off
-
1
]
=
2
opval
[
off
-
1
]
=
2
off
=
off
+
1
off
=
off
+
1
end
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
sel
=
opval
[
op
]
local
sel
=
opval
[
op
]
e
:
SetLabel
(
sel
)
e
:
SetLabel
(
sel
)
if
sel
==
1
then
if
sel
==
1
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
else
else
e
:
SetCategory
(
CATEGORY_TODECK
)
e
:
SetCategory
(
CATEGORY_TODECK
)
e
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_MZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_MZONE
)
end
end
end
end
--
--
function
c1110112
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1110112
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
sel
=
e
:
GetLabel
()
local
sel
=
e
:
GetLabel
()
if
sel
==
1
then
if
sel
==
1
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110112
.
tfilter1_1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110112
.
tfilter1_1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
<
1
then
return
end
if
g
:
GetCount
()
<
1
then
return
end
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1_3
=
Effect
.
CreateEffect
(
c
)
local
e1_3
=
Effect
.
CreateEffect
(
c
)
e1_3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_3
:
SetCode
(
EFFECT_ADD_TYPE
)
e1_3
:
SetCode
(
EFFECT_ADD_TYPE
)
e1_3
:
SetValue
(
TYPE_SPIRIT
)
e1_3
:
SetValue
(
TYPE_SPIRIT
)
e1_3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1_3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_3
,
true
)
tc
:
RegisterEffect
(
e1_3
,
true
)
tc
:
RegisterFlagEffect
(
1110112
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
1110112
,
6
))
tc
:
RegisterFlagEffect
(
1110112
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
1110112
,
6
))
Duel
.
SpecialSummonComplete
()
else
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110112
.
tfilter1_2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110112
.
tfilter1_2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
<
1
then
return
end
if
g
:
GetCount
()
<
1
then
return
end
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
--
--
function
c1110112
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1110112
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
end
end
--
--
function
c1110112
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
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
)
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
if
chk
==
0
then
return
(
b1
or
b2
)
and
Duel
.
GetFlagEffect
(
tp
,
1110004
)
>
0
end
local
off
=
1
local
off
=
1
local
ops
=
{}
local
ops
=
{}
local
opval
=
{}
local
opval
=
{}
if
b1
then
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
0
)
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
0
)
opval
[
off
-
1
]
=
1
opval
[
off
-
1
]
=
1
off
=
off
+
1
off
=
off
+
1
end
end
if
b2
then
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
1
)
ops
[
off
]
=
aux
.
Stringid
(
1110112
,
1
)
opval
[
off
-
1
]
=
2
opval
[
off
-
1
]
=
2
off
=
off
+
1
off
=
off
+
1
end
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
sel
=
opval
[
op
]
local
sel
=
opval
[
op
]
e
:
SetLabel
(
sel
)
e
:
SetLabel
(
sel
)
if
sel
==
1
then
if
sel
==
1
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
else
else
e
:
SetCategory
(
CATEGORY_TODECK
)
e
:
SetCategory
(
CATEGORY_TODECK
)
e
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_MZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_MZONE
)
end
end
end
end
--
--
function
c1110112
.
tfilter3
(
c
)
function
c1110112
.
tfilter3
(
c
)
return
c
:
IsCode
(
1110142
)
and
c
:
IsAbleToHand
()
return
c
:
IsCode
(
1110142
)
and
c
:
IsAbleToHand
()
end
end
function
c1110112
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
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
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
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
--
--
function
c1110112
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1110112
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110112
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110112
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
<
1
then
return
end
if
g
:
GetCount
()
<
1
then
return
end
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
--
--
expansions/script/c1110114.lua
View file @
7813431a
--命运之书
--命运之书
local
m
=
1110114
local
m
=
1110114
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c1110198"
)
end
,
function
()
require
(
"script/c1110198"
)
end
)
xpcall
(
function
()
require
(
"expansions/script/c1110198"
)
end
,
function
()
require
(
"script/c1110198"
)
end
)
cm
.
named_with_Urban
=
true
cm
.
named_with_Urban
=
true
--
--
function
c1110114
.
initial_effect
(
c
)
function
c1110114
.
initial_effect
(
c
)
--
--
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddFusionProcMix
(
c
,
true
,
true
,
c1110114
.
FusFilter1
,
c1110114
.
FusFilter2
)
aux
.
AddFusionProcMix
(
c
,
true
,
true
,
c1110114
.
FusFilter1
,
c1110114
.
FusFilter2
)
--
--
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_ADJUST
)
e1
:
SetCode
(
EVENT_ADJUST
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c1110114
.
con1
)
e1
:
SetCondition
(
c1110114
.
con1
)
e1
:
SetOperation
(
c1110114
.
op1
)
e1
:
SetOperation
(
c1110114
.
op1
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
--
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
c1110114
.
op2
)
e2
:
SetOperation
(
c1110114
.
op2
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetOperation
(
c1110114
.
op3
)
e3
:
SetOperation
(
c1110114
.
op3
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--
--
end
end
--
--
function
c1110114
.
FusFilter1
(
c
)
function
c1110114
.
FusFilter1
(
c
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
end
--
--
function
c1110114
.
FusFilter2
(
c
)
function
c1110114
.
FusFilter2
(
c
)
return
muxu
.
check_fusion_set_Urban
(
c
)
return
muxu
.
check_fusion_set_Urban
(
c
)
end
end
--
--
function
c1110114
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1110114
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
1110114
)
<
1
return
e
:
GetHandler
():
GetFlagEffect
(
1110114
)
<
1
end
end
--
--
function
c1110114
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1110114
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
c
:
RegisterFlagEffect
(
1110114
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
c
:
RegisterFlagEffect
(
1110114
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
fg
=
c
:
GetMaterial
()
local
fg
=
c
:
GetMaterial
()
if
fg
:
GetCount
()
<
1
then
return
end
if
fg
:
GetCount
()
<
1
then
return
end
local
fc
=
fg
:
GetFirst
()
local
fc
=
fg
:
GetFirst
()
while
fc
do
while
fc
do
if
bit
.
band
(
fc
:
GetOriginalType
(),
TYPE_MONSTER
)
~=
0
then
if
bit
.
band
(
fc
:
GetOriginalType
(),
TYPE_MONSTER
)
~=
0
and
bit
.
band
(
fc
:
GetOriginalType
(),
TYPE_EFFECT
)
~=
0
then
local
code
=
fc
:
GetOriginalCode
()
local
code
=
fc
:
GetOriginalCode
()
c
:
CopyEffect
(
code
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
c
:
CopyEffect
(
code
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
end
end
fc
=
fg
:
GetNext
()
fc
=
fg
:
GetNext
()
end
end
end
end
--
--
function
c1110114
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1110114
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
not
rc
:
IsControler
(
tp
)
then
return
end
if
not
rc
:
IsControler
(
tp
)
then
return
end
if
not
rc
:
IsRelateToEffect
(
re
)
then
return
end
if
not
rc
:
IsRelateToEffect
(
re
)
then
return
end
if
not
muxu
.
check_set_Legend
(
rc
)
then
return
end
if
not
muxu
.
check_set_Legend
(
rc
)
then
return
end
rc
:
RegisterFlagEffect
(
1110114
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
rc
:
RegisterFlagEffect
(
1110114
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
end
end
--
--
function
c1110114
.
ofilter3_1
(
c
,
tp
)
function
c1110114
.
ofilter3_1
(
c
,
tp
)
return
c
:
GetFlagEffect
(
1110114
)
>
0
return
c
:
GetFlagEffect
(
1110114
)
>
0
and
c
:
IsStatus
(
STATUS_LEAVE_CONFIRMED
)
and
c
:
IsStatus
(
STATUS_LEAVE_CONFIRMED
)
end
end
function
c1110114
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1110114
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
local
sg
=
Duel
.
GetMatchingGroup
(
c1110114
.
ofilter3_1
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
tp
)
local
sg
=
Duel
.
GetMatchingGroup
(
c1110114
.
ofilter3_1
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
tp
)
if
sg
:
GetCount
()
<
1
then
return
end
if
sg
:
GetCount
()
<
1
then
return
end
local
ng
=
Group
.
CreateGroup
()
local
ng
=
Group
.
CreateGroup
()
local
lc
=
sg
:
GetFirst
()
local
lc
=
sg
:
GetFirst
()
while
lc
do
while
lc
do
Duel
.
ResetFlagEffect
(
lc
,
1110114
)
Duel
.
ResetFlagEffect
(
lc
,
1110114
)
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
lc
:
GetCode
(),
nil
,
0x221
,
0
,
0
,
3
,
RACE_PSYCHO
,
ATTRIBUTE_LIGHT
,
POS_FACEUP
)
then
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
lc
:
GetCode
(),
nil
,
0x221
,
0
,
0
,
3
,
RACE_PSYCHO
,
ATTRIBUTE_LIGHT
,
POS_FACEUP
)
then
ng
:
AddCard
(
lc
)
ng
:
AddCard
(
lc
)
end
end
lc
=
sg
:
GetNext
()
lc
=
sg
:
GetNext
()
end
end
local
num
=
ng
:
GetCount
()
local
num
=
ng
:
GetCount
()
if
num
<
1
then
return
end
if
num
<
1
then
return
end
if
ft
<
num
then
num
=
ft
end
if
ft
<
num
then
num
=
ft
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1110114
,
0
))
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1110114
,
0
))
then
if
num
>
1
then
if
num
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
ng
:
Select
(
tp
,
1
,
num
,
nil
)
local
tg
=
ng
:
Select
(
tp
,
1
,
num
,
nil
)
local
tc
=
tg
:
GetFirst
()
local
tc
=
tg
:
GetFirst
()
while
tc
do
while
tc
do
tc
:
AddMonsterAttribute
(
TYPE_EFFECT
+
TYPE_SPIRIT
,
ATTRIBUTE_LIGHT
,
RACE_PSYCHO
,
3
,
0
,
0
)
tc
:
AddMonsterAttribute
(
TYPE_EFFECT
+
TYPE_SPIRIT
,
ATTRIBUTE_LIGHT
,
RACE_PSYCHO
,
3
,
0
,
0
)
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
tc
:
AddMonsterAttributeComplete
()
tc
:
AddMonsterAttributeComplete
()
local
e3_2
=
Effect
.
CreateEffect
(
c
)
local
e3_2
=
Effect
.
CreateEffect
(
c
)
e3_2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3_2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3_2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3_2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3_2
:
SetOperation
(
c1110114
.
op3_2
)
e3_2
:
SetOperation
(
c1110114
.
op3_2
)
tc
:
RegisterEffect
(
e3_2
,
true
)
tc
:
RegisterEffect
(
e3_2
,
true
)
tc
=
tg
:
GetNext
()
tc
=
tg
:
GetNext
()
end
end
Duel
.
SpecialSummonComplete
()
Duel
.
SpecialSummonComplete
()
else
else
local
nc
=
ng
:
GetFirst
()
local
nc
=
ng
:
GetFirst
()
nc
:
AddMonsterAttribute
(
TYPE_EFFECT
+
TYPE_SPIRIT
,
ATTRIBUTE_LIGHT
,
RACE_PSYCHO
,
3
,
0
,
0
)
nc
:
AddMonsterAttribute
(
TYPE_EFFECT
+
TYPE_SPIRIT
,
ATTRIBUTE_LIGHT
,
RACE_PSYCHO
,
3
,
0
,
0
)
Duel
.
SpecialSummonStep
(
nc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummonStep
(
nc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
nc
:
AddMonsterAttributeComplete
()
nc
:
AddMonsterAttributeComplete
()
local
e3_2
=
Effect
.
CreateEffect
(
c
)
local
e3_2
=
Effect
.
CreateEffect
(
c
)
e3_2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3_2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3_2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3_2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3_2
:
SetOperation
(
c1110114
.
op3_2
)
e3_2
:
SetOperation
(
c1110114
.
op3_2
)
nc
:
RegisterEffect
(
e3_2
,
true
)
nc
:
RegisterEffect
(
e3_2
,
true
)
Duel
.
SpecialSummonComplete
()
Duel
.
SpecialSummonComplete
()
end
end
end
end
end
end
--
--
function
c1110114
.
op3_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1110114
.
op3_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
e3_3
=
Effect
.
CreateEffect
(
c
)
local
e3_3
=
Effect
.
CreateEffect
(
c
)
e3_3
:
SetDescription
(
1104
)
e3_3
:
SetDescription
(
1104
)
e3_3
:
SetCategory
(
CATEGORY_TOHAND
)
e3_3
:
SetCategory
(
CATEGORY_TOHAND
)
e3_3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3_3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3_3
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e3_3
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e3_3
:
SetRange
(
LOCATION_MZONE
)
e3_3
:
SetRange
(
LOCATION_MZONE
)
e3_3
:
SetCountLimit
(
1
)
e3_3
:
SetCountLimit
(
1
)
e3_3
:
SetReset
(
RESET_EVENT
+
0x1ee0000
+
RESET_PHASE
+
PHASE_END
)
e3_3
:
SetReset
(
RESET_EVENT
+
0x1ee0000
+
RESET_PHASE
+
PHASE_END
)
e3_3
:
SetCondition
(
aux
.
SpiritReturnCondition
)
e3_3
:
SetCondition
(
aux
.
SpiritReturnCondition
)
e3_3
:
SetTarget
(
c1110114
.
tg3_3
)
e3_3
:
SetTarget
(
c1110114
.
tg3_3
)
e3_3
:
SetOperation
(
c1110114
.
op3_3
)
e3_3
:
SetOperation
(
c1110114
.
op3_3
)
c
:
RegisterEffect
(
e3_3
)
c
:
RegisterEffect
(
e3_3
)
local
e3_4
=
e3_3
:
Clone
()
local
e3_4
=
e3_3
:
Clone
()
e3_4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3_4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
c
:
RegisterEffect
(
e3_4
)
c
:
RegisterEffect
(
e3_4
)
end
end
--
--
function
c1110114
.
tg3_3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c1110114
.
tg3_3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_TRIGGER_F
)
then
return
true
if
e
:
IsHasType
(
EFFECT_TYPE_TRIGGER_F
)
then
return
true
else
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
else
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
end
--
--
function
c1110114
.
op3_3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1110114
.
op3_3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsFaceup
()
then
return
end
if
not
c
:
IsFaceup
()
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
end
--
--
expansions/script/c1111223.lua
View file @
7813431a
--灵曲·年华静谧之月
--灵曲·年华静谧之月
local
m
=
1111223
local
m
=
1111223
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c1110198"
)
end
,
function
()
require
(
"script/c1110198"
)
end
)
xpcall
(
function
()
require
(
"expansions/script/c1110198"
)
end
,
function
()
require
(
"script/c1110198"
)
end
)
cm
.
named_with_Soul
=
true
cm
.
named_with_Soul
=
true
--
--
function
c1111223
.
initial_effect
(
c
)
function
c1111223
.
initial_effect
(
c
)
--
--
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e1
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetTarget
(
c1111223
.
tg1
)
e1
:
SetTarget
(
c1111223
.
tg1
)
c
:
RegisterEffect
(
e1
)
e1
:
SetValue
(
c1111223
.
val1
)
--
e1
:
SetOperation
(
c1111223
.
op1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
c
:
RegisterEffect
(
e1
)
e2
:
SetDescription
(
aux
.
Stringid
(
1111223
,
0
))
--
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetDescription
(
aux
.
Stringid
(
1111223
,
0
))
e2
:
SetCountLimit
(
1
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCost
(
c1111223
.
cost2
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetOperation
(
c1111223
.
op2
)
e2
:
SetCountLimit
(
1
)
c
:
RegisterEffect
(
e2
)
e2
:
SetCost
(
c1111223
.
cost2
)
--
e2
:
SetOperation
(
c1111223
.
op2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
c
:
RegisterEffect
(
e2
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
--
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetOperation
(
c1111223
.
op3
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
e3
:
SetRange
(
LOCATION_SZONE
)
--
e3
:
SetOperation
(
c1111223
.
op3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
c
:
RegisterEffect
(
e3
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
--
e4
:
SetCode
(
EVENT_CHAINING
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetOperation
(
c1111223
.
op4
)
e4
:
SetCode
(
EVENT_CHAINING
)
c
:
RegisterEffect
(
e4
)
e4
:
SetRange
(
LOCATION_SZONE
)
--
e4
:
SetOperation
(
c1111223
.
op4
)
if
not
c1111223
.
global_check
then
c
:
RegisterEffect
(
e4
)
c1111223
.
global_check
=
true
--
local
e5
=
Effect
.
GlobalEffect
()
if
not
c1111223
.
global_check
then
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
c1111223
.
global_check
=
true
e5
:
SetCode
(
EVENT_CHAINING
)
local
e5
=
Effect
.
GlobalEffect
()
e5
:
SetCondition
(
c1111223
.
con5
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetOperation
(
c1111223
.
op5
)
e5
:
SetCode
(
EVENT_CHAINING
)
Duel
.
RegisterEffect
(
e5
,
0
)
e5
:
SetCondition
(
c1111223
.
con5
)
end
e5
:
SetOperation
(
c1111223
.
op5
)
--
Duel
.
RegisterEffect
(
e5
,
0
)
local
e6
=
Effect
.
CreateEffect
(
c
)
end
e6
:
SetType
(
EFFECT_TYPE_FIELD
)
--
e6
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetRange
(
LOCATION_SZONE
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
)
e6
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e6
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
e6
:
SetTarget
(
c1111223
.
tg6
)
e6
:
SetRange
(
LOCATION_SZONE
)
c
:
RegisterEffect
(
e6
)
e6
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
--
e6
:
SetTarget
(
c1111223
.
tg6
)
end
c
:
RegisterEffect
(
e6
)
--
--
function
c1111223
.
tfilter1
(
c
,
tp
)
end
return
c
:
IsReason
(
REASON_EFFECT
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
--
end
function
c1111223
.
tfilter1
(
c
,
e
,
tp
)
function
c1111223
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsReason
(
REASON_EFFECT
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
and
c
~=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
end
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
function
c1111223
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
Duel
.
SelectEffectYesNo
(
tp
,
c
,
96
)
then
local
c
=
e
:
GetHandler
()
return
true
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
else
return
false
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
end
--
--
function
c1111223
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1111223
.
val1
(
e
,
c
)
Duel
.
RemoveCounter
(
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
0x1111
,
1
,
REASON_EFFECT
)
return
c1111223
.
tfilter1
(
c
,
e
,
e
:
GetHandlerPlayer
())
end
end
--
--
function
c1111223
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c1111223
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
RemoveCounter
(
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
0x1111
,
1
,
REASON_EFFECT
)
local
num
=
Duel
.
GetMatchingGroupCount
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
end
if
chk
==
0
then
return
num
>
0
and
c
:
IsCanAddCounter
(
0x1111
,
num
)
end
--
c
:
AddCounter
(
0x1111
,
num
)
function
c1111223
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
local
c
=
e
:
GetHandler
()
--
local
num
=
Duel
.
GetMatchingGroupCount
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
function
c1111223
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
num
>
0
and
c
:
IsCanAddCounter
(
0x1111
,
num
)
end
local
c
=
e
:
GetHandler
()
c
:
AddCounter
(
0x1111
,
num
)
local
b1
=
true
end
local
b2
=
true
--
local
off
=
1
function
c1111223
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ops
=
{}
local
c
=
e
:
GetHandler
()
local
opval
=
{}
local
b1
=
true
if
b1
then
local
b2
=
true
ops
[
off
]
=
aux
.
Stringid
(
1111223
,
1
)
local
off
=
1
opval
[
off
-
1
]
=
1
local
ops
=
{}
off
=
off
+
1
local
opval
=
{}
end
if
b1
then
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
1111223
,
1
)
ops
[
off
]
=
aux
.
Stringid
(
1111223
,
2
)
opval
[
off
-
1
]
=
1
opval
[
off
-
1
]
=
2
off
=
off
+
1
off
=
off
+
1
end
end
if
b2
then
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
ops
[
off
]
=
aux
.
Stringid
(
1111223
,
2
)
local
sel
=
opval
[
op
]
opval
[
off
-
1
]
=
2
if
sel
==
1
then
off
=
off
+
1
c
:
ResetFlagEffect
(
1111223
)
end
c
:
ResetFlagEffect
(
1111224
)
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
c
:
RegisterFlagEffect
(
1111223
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
0
,
0
,
aux
.
Stringid
(
1111223
,
1
))
local
sel
=
opval
[
op
]
else
if
sel
==
1
then
c
:
ResetFlagEffect
(
1111223
)
c
:
ResetFlagEffect
(
1111223
)
c
:
ResetFlagEffect
(
1111224
)
c
:
ResetFlagEffect
(
1111224
)
c
:
RegisterFlagEffect
(
1111224
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
0
,
0
,
aux
.
Stringid
(
1111223
,
2
))
c
:
RegisterFlagEffect
(
1111223
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
0
,
0
,
aux
.
Stringid
(
1111223
,
1
))
c
:
RegisterFlagEffect
(
1111224
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
0
,
0
,
aux
.
Stringid
(
1111223
,
3
))
else
end
c
:
ResetFlagEffect
(
1111223
)
end
c
:
ResetFlagEffect
(
1111224
)
--
c
:
RegisterFlagEffect
(
1111224
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
0
,
0
,
aux
.
Stringid
(
1111223
,
2
))
function
c1111223
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c
:
RegisterFlagEffect
(
1111224
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
0
,
0
,
aux
.
Stringid
(
1111223
,
3
))
local
c
=
e
:
GetHandler
()
end
if
c
:
GetFlagEffect
(
1111223
)
<
1
then
return
false
end
end
Duel
.
SetChainLimitTillChainEnd
(
aux
.
FALSE
)
--
end
function
c1111223
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--
local
c
=
e
:
GetHandler
()
function
c1111223
.
op4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
c
:
GetFlagEffect
(
1111223
)
<
1
then
return
end
local
c
=
e
:
GetHandler
()
Duel
.
SetChainLimitTillChainEnd
(
aux
.
FALSE
)
if
c
:
GetFlagEffect
(
1111224
)
<
1
then
return
false
end
end
Duel
.
SetChainLimit
(
aux
.
FALSE
)
--
end
function
c1111223
.
op4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--
local
c
=
e
:
GetHandler
()
function
c1111223
.
con5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
c
:
GetFlagEffect
(
1111224
)
<
1
then
return
end
return
re
:
IsActiveType
(
TYPE_MONSTER
)
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
end
--
--
function
c1111223
.
op5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1111223
.
con5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
re
:
GetHandler
()
return
re
:
IsActiveType
(
TYPE_MONSTER
)
if
not
c
:
IsLocation
(
LOCATION_MZONE
)
then
return
end
end
c
:
RegisterFlagEffect
(
1111225
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
--
end
function
c1111223
.
op5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--
local
c
=
re
:
GetHandler
()
function
c1111223
.
tg6
(
e
,
c
)
if
not
c
:
IsLocation
(
LOCATION_MZONE
)
then
return
end
return
c
:
GetFlagEffect
(
1111225
)
>
0
c
:
RegisterFlagEffect
(
1111225
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
end
end
--
--
function
c1111223
.
tg6
(
e
,
c
)
return
c
:
GetFlagEffect
(
1111225
)
>
0
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