Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
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
Nemo Ma
no81cards
Commits
50c30893
Commit
50c30893
authored
Apr 11, 2025
by
POLYMER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
eac5d6dc
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
32 additions
and
1396 deletions
+32
-1396
expansions/lflist.conf
expansions/lflist.conf
+0
-5
expansions/no42.cdb
expansions/no42.cdb
+0
-0
expansions/pics/53796193.jpg
expansions/pics/53796193.jpg
+0
-0
expansions/pics/53796194.jpg
expansions/pics/53796194.jpg
+0
-0
expansions/pics/53796195.jpg
expansions/pics/53796195.jpg
+0
-0
expansions/pics/53796196.jpg
expansions/pics/53796196.jpg
+0
-0
expansions/pics/53796197.jpg
expansions/pics/53796197.jpg
+0
-0
expansions/script/c53750010.lua
expansions/script/c53750010.lua
+2
-2
expansions/script/c53796193.lua
expansions/script/c53796193.lua
+0
-261
expansions/script/c53796194.lua
expansions/script/c53796194.lua
+0
-224
expansions/script/c53796195.lua
expansions/script/c53796195.lua
+0
-545
expansions/script/c53796196.lua
expansions/script/c53796196.lua
+0
-170
expansions/script/c53796197.lua
expansions/script/c53796197.lua
+0
-160
expansions/script/c65123333.lua
expansions/script/c65123333.lua
+30
-29
No files found.
expansions/lflist.conf
View file @
50c30893
...
...
@@ -767,11 +767,6 @@
53796188
0
53796189
0
53796190
0
53796193
0
53796194
0
53796195
0
53796196
0
53796197
0
58510970
0
60000002
0
60000003
0
...
...
expansions/no42.cdb
View file @
50c30893
No preview for this file type
expansions/pics/53796193.jpg
deleted
100644 → 0
View file @
eac5d6dc
218 KB
expansions/pics/53796194.jpg
deleted
100644 → 0
View file @
eac5d6dc
258 KB
expansions/pics/53796195.jpg
deleted
100644 → 0
View file @
eac5d6dc
232 KB
expansions/pics/53796196.jpg
deleted
100644 → 0
View file @
eac5d6dc
231 KB
expansions/pics/53796197.jpg
deleted
100644 → 0
View file @
eac5d6dc
259 KB
expansions/script/c53750010.lua
View file @
50c30893
...
...
@@ -12,14 +12,14 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_
REMOVE
)
e2
:
SetCategory
(
CATEGORY_
DESTROY
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetTarget
(
cm
.
target2
)
e2
:
SetOperation
(
cm
.
activate2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e3
:
SetCategory
(
CATEGORY_
TOHAND
)
e3
:
SetCategory
(
CATEGORY_
REMOVE
)
e3
:
SetTarget
(
cm
.
target3
)
e3
:
SetOperation
(
cm
.
activate3
)
c
:
RegisterEffect
(
e3
)
...
...
expansions/script/c53796193.lua
deleted
100644 → 0
View file @
eac5d6dc
if
not
require
and
dofile
then
function
require
(
str
)
return
dofile
(
str
..
".lua"
)
end
end
if
not
pcall
(
function
()
require
(
"expansions/script/c53702500"
)
end
)
then
require
(
"script/c53702500"
)
end
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
53796195
)
c
:
EnableReviveLimit
()
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e0
:
SetValue
(
function
(
e
,
se
,
sp
,
st
)
return
se
==
e
:
GetLabelObject
()
and
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
id
)
==
0
end
)
c
:
RegisterEffect
(
e0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
12
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_DRAW_PHASE
+
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetCost
(
s
.
spcost
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
e0
:
SetLabelObject
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SUMMON_COST
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
0xff
,
0xff
)
e2
:
SetLabel
(
0
)
e2
:
SetCondition
(
s
.
costcon
)
e2
:
SetOperation
(
s
.
costop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_SPSUMMON_COST
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
id
,
13
))
e4
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_TOGRAVE
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
SetCode
(
EVENT_CUSTOM
+
id
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetLabel
(
0
)
e4
:
SetCondition
(
s
.
tgcon
)
e4
:
SetTarget
(
s
.
tgtg
)
c
:
RegisterEffect
(
e4
)
e2
:
SetLabelObject
(
e4
)
e3
:
SetLabelObject
(
e4
)
local
g
=
Group
.
CreateGroup
()
g
:
KeepAlive
()
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetOperation
(
s
.
MergedDelayEventCheck1
(
g
,
e2
,
e3
,
e4
))
c
:
RegisterEffect
(
e5
)
local
e6
=
e5
:
Clone
()
e6
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e6
)
local
e7
=
e5
:
Clone
()
e7
:
SetCode
(
EVENT_CHAIN_END
)
e7
:
SetOperation
(
s
.
MergedDelayEventCheck2
(
g
,
e2
,
e3
,
e4
))
c
:
RegisterEffect
(
e7
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_FIELD
)
e8
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
)
e8
:
SetCode
(
id
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetTargetRange
(
1
,
1
)
c
:
RegisterEffect
(
e8
)
if
not
s
.
global_check
then
s
.
global_check
=
true
if
c53796195
and
not
c53796195
[
0
]
then
c53796195
[
0
]
=
{}
c53796195
[
1
]
=
{}
end
local
f1
=
aux
.
PendOperation
aux
.
PendOperation
=
function
()
local
func1
=
f1
()
local
func2
=
func1
func2
=
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
sg
,
og
)
local
res
=
func1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
sg
,
og
)
if
Duel
.
IsPlayerAffectedByEffect
(
0
,
id
)
then
s
.
pendcount
=#
sg
end
return
res
end
return
func2
end
local
f2
=
Duel
.
SpecialSummon
Duel
.
SpecialSummon
=
function
(
tg
,
...
)
if
Duel
.
IsPlayerAffectedByEffect
(
0
,
id
)
then
if
aux
.
GetValueType
(
tg
)
==
"Card"
then
s
.
pendcount
=
1
else
s
.
pendcount
=#
tg
end
end
local
ct
=
f2
(
tg
,
...
)
s
.
pendcount
=
0
s
.
pendcheck
=
0
return
ct
end
end
end
s
.
pendcount
=
0
s
.
pendcheck
=
0
function
s
.
MergedDelayEventCheck1
(
g
,
e2
,
e3
,
e4
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
g
:
Merge
(
eg
)
if
Duel
.
GetCurrentChain
()
==
0
and
not
Duel
.
CheckEvent
(
EVENT_CHAIN_END
)
then
local
_eg
=
g
:
Clone
()
local
t
=
SNNM
.
Remove
(
SNNM
.
Merged
({
e2
:
GetLabel
()},{
e3
:
GetLabel
()}),
0
)
if
#
t
>
0
then
e4
:
SetLabel
(
table.unpack
(
t
))
Duel
.
RaiseEvent
(
Group
.
__add
(
_eg
,
e
:
GetHandler
()),
EVENT_CUSTOM
+
id
,
re
,
r
,
rp
,
ep
,
ev
)
end
e2
:
SetLabel
(
0
)
e3
:
SetLabel
(
0
)
g
:
Clear
()
end
end
end
function
s
.
MergedDelayEventCheck2
(
g
,
e2
,
e3
,
e4
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
#
g
>
0
then
local
_eg
=
g
:
Clone
()
local
t
=
SNNM
.
Remove
(
SNNM
.
Merged
({
e2
:
GetLabel
()},{
e3
:
GetLabel
()}),
0
)
if
#
t
>
0
then
e4
:
SetLabel
(
table.unpack
(
t
))
Duel
.
RaiseEvent
(
Group
.
__add
(
_eg
,
e
:
GetHandler
()),
EVENT_CUSTOM
+
id
,
re
,
r
,
rp
,
ep
,
ev
)
end
e2
:
SetLabel
(
0
)
e3
:
SetLabel
(
0
)
g
:
Clear
()
end
end
end
function
s
.
cfilter
(
c
)
return
c
:
IsCode
(
53796195
)
and
c
:
IsFaceup
()
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
function
s
.
spcfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToExtraAsCost
()
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
,
e
:
GetHandler
())
and
(
aux
.
IsCodeListed
(
c
,
53796195
)
or
c
:
IsType
(
0x40
))
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
spcfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spcfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_COST
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
0
then
return
end
c
:
CompleteProcedure
()
Duel
.
RegisterFlagEffect
(
tp
,
id
,
RESET_PHASE
+
SNNM
.
GetCurrentPhase
(),
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e1
:
SetValue
(
s
.
efilter
)
e1
:
SetReset
(
RESET_CHAIN
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
s
.
efilter
(
e
,
te
,
c
)
if
te
:
GetHandlerPlayer
()
==
e
:
GetHandlerPlayer
()
or
not
te
:
IsActivated
()
then
return
false
end
if
not
te
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
true
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
return
not
g
or
not
g
:
IsContains
(
c
)
end
function
s
.
costcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFacedown
,
e
:
GetHandlerPlayer
(),
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
function
s
.
costop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
e
:
GetHandlerPlayer
()
local
e1
=
e
:
GetLabelObject
()
local
check
=
true
if
e
:
GetHandler
():
IsHasEffect
(
EFFECT_CANNOT_TRIGGER
)
then
check
=
false
end
local
p
=
e
:
GetHandlerPlayer
()
local
le1
=
{
Duel
.
IsPlayerAffectedByEffect
(
p
,
EFFECT_CANNOT_ACTIVATE
)}
for
_
,
v
in
pairs
(
le1
)
do
local
val
=
v
:
GetValue
()
if
aux
.
GetValueType
(
val
)
==
"number"
or
val
(
v
,
e1
,
p
)
then
check
=
false
end
end
local
le2
=
{
Duel
.
IsPlayerAffectedByEffect
(
p
,
EFFECT_ACTIVATE_COST
)}
for
_
,
v
in
pairs
(
le2
)
do
local
cost
=
v
:
GetCost
()
if
cost
and
not
cost
(
v
,
e1
,
p
)
then
local
tg
=
v
:
GetTarget
()
if
not
tg
or
tg
(
v
,
e1
,
p
)
then
check
=
false
end
end
end
if
tp
==
p
or
not
check
then
s
.
pendcount
=
0
s
.
pendcheck
=
0
return
end
if
s
.
pendcheck
==
0
then
s
.
pendcount
=
(
s
.
pendcount
>
0
and
s
.
pendcount
)
or
1
end
if
s
.
pendcount
>
0
and
s
.
pendcheck
==
0
then
s
.
pendcheck
=
s
.
pendcount
-
1
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
AND
(
Card
.
IsFacedown
,
Card
.
IsAbleToDeck
),
p
,
LOCATION_REMOVED
,
0
,
nil
)
if
g
:
GetClassCount
(
Card
.
GetCode
)
>=
s
.
pendcount
and
Duel
.
SelectEffectYesNo
(
p
,
e
:
GetHandler
(),
aux
.
Stringid
(
id
,
s
.
pendcount
-
1
))
then
local
ag
=
Group
.
CreateGroup
()
local
codes
=
{}
for
c
in
aux
.
Next
(
g
)
do
local
code
=
c
:
GetCode
()
if
not
ag
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
code
)
then
ag
:
AddCard
(
c
)
table.insert
(
codes
,
code
)
end
end
table.sort
(
codes
)
local
ct
=#
codes
local
nt
=
{
codes
[
1
],
OPCODE_ISCODE
}
if
ct
>
1
then
for
i
=
2
,
ct
do
table.insert
(
nt
,
codes
[
i
])
table.insert
(
nt
,
OPCODE_ISCODE
)
table.insert
(
nt
,
OPCODE_OR
)
end
end
local
t
=
{}
Duel
.
Hint
(
HINT_SELECTMSG
,
p
,
HINTMSG_CODE
)
while
s
.
pendcount
>
0
and
ct
>
0
do
local
ac
=
Duel
.
AnnounceCard
(
p
,
table.unpack
(
nt
))
table.insert
(
t
,
ac
)
table.insert
(
nt
,
ac
)
table.insert
(
nt
,
OPCODE_ISCODE
)
table.insert
(
nt
,
OPCODE_NOT
)
table.insert
(
nt
,
OPCODE_AND
)
ct
=
ct
-
1
s
.
pendcount
=
s
.
pendcount
-
1
end
if
e
:
GetLabel
()
==
0
then
e
:
SetLabel
(
table.unpack
(
t
))
else
e
:
SetLabel
(
table.unpack
(
SNNM
.
Merged
({
e
:
GetLabel
()},
t
)))
end
end
s
.
pendcount
=
0
end
end
function
s
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsSummonPlayer
,
1
,
nil
,
1
-
tp
)
and
eg
:
IsContains
(
e
:
GetHandler
())
end
function
s
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
t
=
{
e
:
GetLabel
()}
local
table
=
t
if
chk
==
0
then
return
true
end
e
:
SetOperation
(
s
.
tgop
(
table
))
local
g
=
eg
:
Filter
(
Card
.
IsSummonPlayer
,
nil
,
1
-
tp
)
Duel
.
SetTargetCard
(
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
s
.
tdfilter
(
c
,
t
,
g
)
return
c
:
IsFacedown
()
and
c
:
IsCode
(
table.unpack
(
t
))
and
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
c
:
GetCode
())
and
c
:
IsAbleToDeck
()
end
function
s
.
tgop
(
t
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetTargetsRelateToChain
():
Filter
(
Card
.
IsFaceup
,
nil
)
local
tdg
=
Duel
.
GetMatchingGroup
(
s
.
tdfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
,
t
,
g
)
if
#
tdg
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
tdg
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
1
,
#
g
)
if
sg
then
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
local
tg
=
g
:
Filter
(
function
(
c
,
sg
)
return
sg
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
c
:
GetCode
())
end
,
nil
,
sg
)
if
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
~=
0
and
sg
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
then
Duel
.
SendtoGrave
(
tg
,
REASON_RULE
)
end
end
end
if
c53796195
and
not
SNNM
.
AllExist
(
c53796195
[
tp
],
t
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
14
))
then
SNNM
.
Merge
(
c53796195
[
tp
],
t
)
end
e
:
SetOperation
(
nil
)
end
end
expansions/script/c53796194.lua
deleted
100644 → 0
View file @
eac5d6dc
if
not
require
and
dofile
then
function
require
(
str
)
return
dofile
(
str
..
".lua"
)
end
end
if
not
pcall
(
function
()
require
(
"expansions/script/c53702500"
)
end
)
then
require
(
"script/c53702500"
)
end
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
53796195
)
c
:
EnableReviveLimit
()
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e0
:
SetValue
(
function
(
e
,
se
,
sp
,
st
)
return
se
==
e
:
GetLabelObject
()
and
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
id
)
==
0
end
)
c
:
RegisterEffect
(
e0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
12
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_DRAW_PHASE
+
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetCost
(
s
.
spcost
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
e0
:
SetLabelObject
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_SEND_REPLACE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
s
.
reptg
)
e2
:
SetValue
(
s
.
repval
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
13
))
e3
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_REMOVE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_CUSTOM
+
id
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetLabel
(
0
)
e3
:
SetCondition
(
s
.
rmcon
)
e3
:
SetTarget
(
s
.
rmtg
)
c
:
RegisterEffect
(
e3
)
e2
:
SetLabelObject
(
e3
)
local
g
=
Group
.
CreateGroup
()
g
:
KeepAlive
()
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_TO_GRAVE
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetOperation
(
s
.
MergedDelayEventCheck1
(
g
,
e2
,
e3
))
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EVENT_CHAIN_END
)
e5
:
SetOperation
(
s
.
MergedDelayEventCheck2
(
g
,
e2
,
e3
))
c
:
RegisterEffect
(
e5
)
if
not
s
.
global_check
then
s
.
global_check
=
true
if
c53796195
and
not
c53796195
[
0
]
then
c53796195
[
0
]
=
{}
c53796195
[
1
]
=
{}
end
end
end
function
s
.
MergedDelayEventCheck1
(
g
,
e2
,
e3
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
g
:
Merge
(
eg
)
if
Duel
.
GetCurrentChain
()
==
0
and
not
Duel
.
CheckEvent
(
EVENT_CHAIN_END
)
then
local
_eg
=
g
:
Clone
()
local
t
=
SNNM
.
Remove
({
e2
:
GetLabel
()},
0
)
if
#
t
>
0
then
e3
:
SetLabel
(
table.unpack
(
t
))
Duel
.
RaiseEvent
(
Group
.
__add
(
_eg
,
e
:
GetHandler
()),
EVENT_CUSTOM
+
id
,
re
,
r
,
rp
,
ep
,
ev
)
end
e2
:
SetLabel
(
0
)
g
:
Clear
()
end
end
end
function
s
.
MergedDelayEventCheck2
(
g
,
e2
,
e3
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
#
g
>
0
then
local
_eg
=
g
:
Clone
()
local
t
=
SNNM
.
Remove
({
e2
:
GetLabel
()},
0
)
if
#
t
>
0
then
e3
:
SetLabel
(
table.unpack
(
t
))
Duel
.
RaiseEvent
(
Group
.
__add
(
_eg
,
e
:
GetHandler
()),
EVENT_CUSTOM
+
id
,
re
,
r
,
rp
,
ep
,
ev
)
end
e2
:
SetLabel
(
0
)
e3
:
SetLabel
(
0
)
g
:
Clear
()
end
end
end
function
s
.
cfilter
(
c
)
return
c
:
IsCode
(
53796195
)
and
c
:
IsFaceup
()
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
function
s
.
spcfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToExtraAsCost
()
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
,
e
:
GetHandler
())
>
0
and
(
aux
.
IsCodeListed
(
c
,
53796195
)
or
c
:
IsType
(
TYPE_LINK
))
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
spcfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spcfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_COST
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
0
then
return
end
c
:
CompleteProcedure
()
Duel
.
RegisterFlagEffect
(
tp
,
id
,
RESET_PHASE
+
SNNM
.
GetCurrentPhase
(),
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetTargetRange
(
LOCATION_REMOVED
,
0
)
e1
:
SetValue
(
s
.
efilter
)
e1
:
SetReset
(
RESET_PHASE
+
SNNM
.
GetCurrentPhase
())
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
s
.
efilter
(
e
,
te
,
c
)
return
te
:
GetHandlerPlayer
()
~=
e
:
GetHandlerPlayer
()
end
function
s
.
repfilter
(
c
,
tp
)
return
c
:
IsControler
(
1
-
tp
)
and
c
:
GetDestination
()
==
LOCATION_GRAVE
and
c
:
IsAbleToRemove
(
tp
,
POS_FACEDOWN
)
end
function
s
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
repg
=
eg
:
Filter
(
s
.
repfilter
,
nil
,
tp
)
local
gct
=#
repg
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
AND
(
Card
.
IsFacedown
,
Card
.
IsAbleToDeck
),
e
:
GetHandlerPlayer
(),
LOCATION_REMOVED
,
0
,
nil
)
local
e1
=
e
:
GetLabelObject
()
local
check
=
true
if
e
:
GetHandler
():
IsHasEffect
(
EFFECT_CANNOT_TRIGGER
)
then
check
=
false
end
local
p
=
e
:
GetHandlerPlayer
()
local
le1
=
{
Duel
.
IsPlayerAffectedByEffect
(
p
,
EFFECT_CANNOT_ACTIVATE
)}
for
_
,
v
in
pairs
(
le1
)
do
local
val
=
v
:
GetValue
()
if
aux
.
GetValueType
(
val
)
==
"number"
or
val
(
v
,
e1
,
p
)
then
check
=
false
end
end
local
le2
=
{
Duel
.
IsPlayerAffectedByEffect
(
p
,
EFFECT_ACTIVATE_COST
)}
for
_
,
v
in
pairs
(
le2
)
do
local
cost
=
v
:
GetCost
()
if
cost
and
not
cost
(
v
,
e1
,
p
)
then
local
tg
=
v
:
GetTarget
()
if
not
tg
or
tg
(
v
,
e1
,
p
)
then
check
=
false
end
end
end
if
chk
==
0
then
return
gct
>
0
and
g
:
GetClassCount
(
Card
.
GetCode
)
>=
gct
and
check
end
local
sel
=
gct
-
1
if
sel
>
10
then
sel
=
10
end
if
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
aux
.
Stringid
(
id
,
sel
))
then
local
ag
=
Group
.
CreateGroup
()
local
codes
=
{}
for
c
in
aux
.
Next
(
g
)
do
local
code
=
c
:
GetCode
()
if
not
ag
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
code
)
then
ag
:
AddCard
(
c
)
table.insert
(
codes
,
code
)
end
end
table.sort
(
codes
)
local
ct
=#
codes
local
nt
=
{
codes
[
1
],
OPCODE_ISCODE
}
if
ct
>
1
then
for
i
=
2
,
ct
do
table.insert
(
nt
,
codes
[
i
])
table.insert
(
nt
,
OPCODE_ISCODE
)
table.insert
(
nt
,
OPCODE_OR
)
end
end
local
t
=
{}
Duel
.
Hint
(
HINT_SELECTMSG
,
p
,
HINTMSG_CODE
)
while
gct
>
0
and
ct
>
0
do
local
ac
=
Duel
.
AnnounceCard
(
p
,
table.unpack
(
nt
))
table.insert
(
t
,
ac
)
table.insert
(
nt
,
ac
)
table.insert
(
nt
,
OPCODE_ISCODE
)
table.insert
(
nt
,
OPCODE_NOT
)
table.insert
(
nt
,
OPCODE_AND
)
ct
=
ct
-
1
gct
=
gct
-
1
end
if
e
:
GetLabel
()
==
0
then
e
:
SetLabel
(
table.unpack
(
t
))
else
e
:
SetLabel
(
table.unpack
(
SNNM
.
Merged
({
e
:
GetLabel
()},
t
)))
end
end
return
false
end
function
s
.
repval
(
e
,
c
)
return
false
end
function
s
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsPreviousControler
,
1
,
nil
,
1
-
tp
)
and
eg
:
IsContains
(
e
:
GetHandler
())
end
function
s
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
t
=
{
e
:
GetLabel
()}
local
table
=
t
if
chk
==
0
then
return
true
end
e
:
SetOperation
(
s
.
rmop
(
table
))
local
g
=
eg
:
Filter
(
Card
.
IsPreviousControler
,
nil
,
1
-
tp
)
Duel
.
SetTargetCard
(
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
s
.
tdfilter
(
c
,
t
,
g
)
return
c
:
IsFacedown
()
and
c
:
IsCode
(
table.unpack
(
t
))
and
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
c
:
GetCode
())
and
c
:
IsAbleToDeck
()
end
function
s
.
rmop
(
t
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetTargetsRelateToChain
():
Filter
(
Card
.
IsAbleToRemove
,
nil
,
tp
,
POS_FACEDOWN
)
local
tdg
=
Duel
.
GetMatchingGroup
(
s
.
tdfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
,
t
,
g
)
if
#
tdg
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
tdg
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
1
,
#
g
)
if
sg
then
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
local
tg
=
g
:
Filter
(
function
(
c
,
sg
)
return
sg
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
c
:
GetCode
())
end
,
nil
,
sg
)
if
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
~=
0
and
sg
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
then
Duel
.
Remove
(
tg
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
end
if
c53796195
and
SNNM
.
Intersection
(
t
,
c53796195
[
tp
])
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
14
))
then
SNNM
.
Merge
(
c53796195
[
tp
],
t
)
end
e
:
SetOperation
(
nil
)
end
end
expansions/script/c53796195.lua
deleted
100644 → 0
View file @
eac5d6dc
This diff is collapsed.
Click to expand it.
expansions/script/c53796196.lua
deleted
100644 → 0
View file @
eac5d6dc
if
not
require
and
dofile
then
function
require
(
str
)
return
dofile
(
str
..
".lua"
)
end
end
if
not
pcall
(
function
()
require
(
"expansions/script/c53702500"
)
end
)
then
require
(
"script/c53702500"
)
end
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
53796195
)
c
:
EnableReviveLimit
()
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e0
:
SetValue
(
function
(
e
,
se
,
sp
,
st
)
return
se
==
e
:
GetLabelObject
()
and
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
id
)
==
0
end
)
c
:
RegisterEffect
(
e0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
12
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_DRAW_PHASE
+
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetCost
(
s
.
spcost
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
e0
:
SetLabelObject
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_ACTIVATE_COST
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetTargetRange
(
0
,
1
)
e2
:
SetCondition
(
s
.
costcon
)
e2
:
SetCost
(
s
.
costchk
)
e2
:
SetOperation
(
s
.
costop
)
c
:
RegisterEffect
(
e2
)
if
not
s
.
global_check
then
s
.
global_check
=
true
if
c53796195
and
not
c53796195
[
0
]
then
c53796195
[
0
]
=
{}
c53796195
[
1
]
=
{}
end
end
end
function
s
.
cfilter
(
c
)
return
c
:
IsCode
(
53796195
)
and
c
:
IsFaceup
()
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
function
s
.
spcfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToExtraAsCost
()
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
,
e
:
GetHandler
())
and
(
aux
.
IsCodeListed
(
c
,
53796195
)
or
c
:
IsType
(
TYPE_SYNCHRO
))
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
spcfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spcfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_COST
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
0
then
return
end
c
:
CompleteProcedure
()
Duel
.
RegisterFlagEffect
(
tp
,
id
,
RESET_PHASE
+
SNNM
.
GetCurrentPhase
(),
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetValue
(
s
.
efilter
)
e1
:
SetReset
(
RESET_CHAIN
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
s
.
efilter
(
e
,
te
,
c
)
return
te
:
GetHandlerPlayer
()
~=
e
:
GetHandlerPlayer
()
end
function
s
.
costcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFacedown
,
e
:
GetHandlerPlayer
(),
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
function
s
.
costchk
(
e
,
te
,
tp
)
e
:
SetLabelObject
(
te
)
return
true
end
function
s
.
costop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
13
))
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_NEGATE
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_F
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
s
.
negcon
)
e1
:
SetTarget
(
s
.
negtg
)
e1
:
SetOperation
(
s
.
negop
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_CHAIN
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
local
check
=
true
if
e
:
GetHandler
():
IsHasEffect
(
EFFECT_CANNOT_TRIGGER
)
then
check
=
false
end
local
p
=
e
:
GetHandlerPlayer
()
local
le1
=
{
Duel
.
IsPlayerAffectedByEffect
(
p
,
EFFECT_CANNOT_ACTIVATE
)}
for
_
,
v
in
pairs
(
le1
)
do
local
val
=
v
:
GetValue
()
if
aux
.
GetValueType
(
val
)
==
"number"
or
val
(
v
,
e1
,
p
)
then
check
=
false
end
end
local
le2
=
{
Duel
.
IsPlayerAffectedByEffect
(
p
,
EFFECT_ACTIVATE_COST
)}
for
_
,
v
in
pairs
(
le2
)
do
local
cost
=
v
:
GetCost
()
if
cost
and
not
cost
(
v
,
e1
,
p
)
then
local
tg
=
v
:
GetTarget
()
if
not
tg
or
tg
(
v
,
e1
,
p
)
then
check
=
false
end
end
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
AND
(
Card
.
IsFacedown
,
Card
.
IsAbleToDeck
),
e
:
GetHandlerPlayer
(),
LOCATION_REMOVED
,
0
,
nil
)
if
check
and
#
g
>
0
and
Duel
.
SelectEffectYesNo
(
p
,
e
:
GetHandler
(),
aux
.
Stringid
(
id
,
0
))
then
local
ag
=
Group
.
CreateGroup
()
local
codes
=
{}
for
c
in
aux
.
Next
(
g
)
do
local
code
=
c
:
GetCode
()
if
not
ag
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
code
)
then
ag
:
AddCard
(
c
)
table.insert
(
codes
,
code
)
end
end
table.sort
(
codes
)
local
ct
=#
codes
local
nt
=
{
codes
[
1
],
OPCODE_ISCODE
}
if
ct
>
1
then
for
i
=
2
,
ct
do
table.insert
(
nt
,
codes
[
i
])
table.insert
(
nt
,
OPCODE_ISCODE
)
table.insert
(
nt
,
OPCODE_OR
)
end
end
local
ac
=
Duel
.
AnnounceCard
(
p
,
table.unpack
(
nt
))
e1
:
SetLabel
(
ac
)
e1
:
SetLabelObject
(
e
:
GetLabelObject
())
else
e1
:
Reset
()
end
end
function
s
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
~=
tp
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
end
function
s
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
e
:
GetLabel
()
~=
0
and
e
:
GetLabelObject
()
==
re
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
1
-
tp
,
LOCATION_ONFIELD
)
end
function
s
.
tdfilter
(
c
,
code
,
code2
)
return
c
:
IsFacedown
()
and
c
:
IsCode
(
code
)
and
c
:
IsCode
(
code2
)
and
c
:
IsAbleToDeck
()
end
function
s
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sc
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
tdfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
:
GetLabel
(),
re
:
GetHandler
():
GetCode
()):
GetFirst
()
if
sc
then
Duel
.
ConfirmCards
(
1
-
tp
,
sc
)
if
Duel
.
SendtoDeck
(
sc
,
nil
,
2
,
REASON_EFFECT
)
~=
0
and
sc
:
IsLocation
(
LOCATION_DECK
+
LOCATION_EXTRA
)
and
Duel
.
NegateActivation
(
ev
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToGrave
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
end
if
c53796195
and
not
SNNM
.
IsInTable
(
e
:
GetLabel
(),
c53796195
[
tp
])
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
14
))
then
table.insert
(
c53796195
[
tp
],
e
:
GetLabel
())
end
end
expansions/script/c53796197.lua
deleted
100644 → 0
View file @
eac5d6dc
if
not
require
and
dofile
then
function
require
(
str
)
return
dofile
(
str
..
".lua"
)
end
end
if
not
pcall
(
function
()
require
(
"expansions/script/c53702500"
)
end
)
then
require
(
"script/c53702500"
)
end
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
53796195
)
c
:
EnableReviveLimit
()
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e0
:
SetValue
(
function
(
e
,
se
,
sp
,
st
)
return
se
==
e
:
GetLabelObject
()
and
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
id
)
==
0
end
)
c
:
RegisterEffect
(
e0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_DRAW_PHASE
+
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
e0
:
SetLabelObject
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetHintTiming
(
0
,
TIMING_DRAW_PHASE
+
TIMING_STANDBY_PHASE
+
TIMINGS_CHECK_MONSTER
+
TIMING_MSET
+
TIMING_SSET
+
TIMING_MAIN_END
+
TIMING_END_PHASE
)
e2
:
SetTarget
(
s
.
tg
)
e2
:
SetOperation
(
s
.
op
)
c
:
RegisterEffect
(
e2
)
local
g
=
Group
.
CreateGroup
()
g
:
KeepAlive
()
e2
:
SetLabelObject
(
g
)
if
not
s
.
global_check
then
s
.
global_check
=
true
if
c53796195
and
not
c53796195
[
0
]
then
c53796195
[
0
]
=
{}
c53796195
[
1
]
=
{}
end
end
end
function
s
.
cfilter
(
c
)
return
c
:
IsCode
(
53796195
)
and
c
:
IsFaceup
()
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
function
s
.
spfilter
(
c
,
e
,
tp
,
tc
)
return
c
:
IsFaceup
()
and
(
aux
.
IsCodeListed
(
c
,
53796195
)
or
c
:
IsType
(
TYPE_XYZ
))
and
c
:
IsCanBeXyzMaterial
(
tc
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
,
tc
)
>
0
and
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
s
.
spfilter2
(
c
,
e
,
tp
,
tc
)
return
s
.
spfilter
(
c
,
e
,
tp
,
tc
)
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
c
):
GetFirst
()
if
not
tc
then
return
end
local
mg
=
tc
:
GetOverlayGroup
()
if
mg
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
c
,
mg
)
end
Duel
.
Overlay
(
c
,
Group
.
FromCards
(
tc
))
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
0
then
return
end
c
:
CompleteProcedure
()
Duel
.
RegisterFlagEffect
(
tp
,
id
,
RESET_PHASE
+
SNNM
.
GetCurrentPhase
(),
0
,
1
)
end
function
s
.
xyzfilter
(
c
,
tc
)
return
c
:
IsCanOverlay
()
and
not
c
:
IsRelateToCard
(
tc
)
end
function
s
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
and
s
.
xyzfilter
(
chkc
,
c
)
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
AND
(
Card
.
IsFacedown
,
Card
.
IsAbleToDeck
),
tp
,
LOCATION_REMOVED
,
0
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
xyzfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
,
c
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsFacedown
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_ONFIELD
+
LOCATION_EXTRA
+
LOCATION_REMOVED
,
5
,
nil
)
and
Duel
.
GetOverlayGroup
(
tp
,
1
,
0
):
IsExists
(
Card
.
IsAbleToDeck
,
1
,
nil
)
and
#
g
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
tg
=
Duel
.
SelectTarget
(
tp
,
s
.
xyzfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
c
)
e
:
GetLabelObject
():
Merge
(
tg
)
tg
:
GetFirst
():
CreateRelation
(
c
,
RESET_EVENT
+
0x1fc0000
)
if
Duel
.
GetFlagEffect
(
tp
,
id
+
500
)
==
0
then
Duel
.
RegisterFlagEffect
(
tp
,
id
+
500
,
RESET_PHASE
+
SNNM
.
GetCurrentPhase
(),
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_ADJUST
)
e1
:
SetLabelObject
(
e
)
e1
:
SetOperation
(
s
.
reset
)
Duel
.
RegisterEffect
(
e1
,
tp
)
c
:
CreateEffectRelation
(
e1
)
end
local
ag
=
Group
.
CreateGroup
()
local
codes
=
{}
for
c
in
aux
.
Next
(
g
)
do
local
code
=
c
:
GetCode
()
if
not
ag
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
code
)
then
ag
:
AddCard
(
c
)
table.insert
(
codes
,
code
)
end
end
table.sort
(
codes
)
local
ct
=#
codes
local
nt
=
{
codes
[
1
],
OPCODE_ISCODE
}
if
ct
>
1
then
for
i
=
2
,
ct
do
table.insert
(
nt
,
codes
[
i
])
table.insert
(
nt
,
OPCODE_ISCODE
)
table.insert
(
nt
,
OPCODE_OR
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CODE
)
local
ac
=
Duel
.
AnnounceCard
(
tp
,
table.unpack
(
nt
))
Duel
.
SetTargetParam
(
ac
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ANNOUNCE
,
nil
,
0
,
tp
,
0
)
end
function
s
.
reset
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetOwner
()
local
g
=
e
:
GetLabelObject
():
GetLabelObject
()
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
GetFlagEffect
(
tp
,
id
+
500
)
==
0
then
g
:
ForEach
(
Card
.
ReleaseRelation
,
c
)
g
:
Clear
()
e
:
Reset
()
end
end
function
s
.
tdfilter
(
c
,
ac
,
g
)
return
c
:
IsFacedown
()
and
c
:
IsCode
(
ac
)
and
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
c
:
GetCode
())
and
c
:
IsAbleToDeck
()
end
function
s
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ac
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PARAM
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFacedown
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_ONFIELD
+
LOCATION_EXTRA
+
LOCATION_REMOVED
,
nil
)
if
#
g
>
4
then
local
sg
=
g
:
RandomSelect
(
tp
,
5
)
Duel
.
ConfirmCards
(
tp
,
sg
)
local
ovg
=
Duel
.
GetOverlayGroup
(
tp
,
1
,
0
):
Filter
(
Card
.
IsAbleToDeck
,
nil
)
local
tdg
=
Duel
.
GetMatchingGroup
(
s
.
tdfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
,
ac
,
sg
)
if
#
tdg
>
0
and
#
ovg
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
tg1
=
tdg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tg2
=
ovg
:
Select
(
tp
,
1
,
1
,
nil
)
tg1
:
Merge
(
tg2
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
SendtoDeck
(
tg1
,
nil
,
2
,
REASON_EFFECT
)
~=
0
and
tg1
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
and
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
then
local
og
=
tc
:
GetOverlayGroup
()
if
og
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
og
,
REASON_RULE
)
end
Duel
.
Overlay
(
c
,
Group
.
FromCards
(
tc
))
end
end
if
sg
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_HAND
)
then
Duel
.
ShuffleHand
(
1
-
tp
)
end
if
sg
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
)
then
Duel
.
ShuffleDeck
(
1
-
tp
)
end
end
if
c53796195
and
not
SNNM
.
IsInTable
(
ac
,
c53796195
[
tp
])
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
2
))
then
table.insert
(
c53796195
[
tp
],
ac
)
end
end
expansions/script/c65123333.lua
View file @
50c30893
...
...
@@ -14,6 +14,7 @@ local _Effect=tableclone(Effect)
local
_Group
=
tableclone
(
Group
)
local
_Debug
=
tableclone
(
Debug
)
local
_Auxiliary
=
tableclone
(
Auxiliary
)
local
_pcall
=
pcall
function
s
.
initial_effect
(
c
)
local
control_player
=
0
if
_Duel
.
GetFieldGroupCount
(
1
,
LOCATION_DECK
,
0
)
>
0
then
control_player
=
1
end
...
...
@@ -25,7 +26,8 @@ function s.initial_effect(c)
_Debug
.
SetPlayerInfo
(
1
-
control_player
,
8000
,
0
,
0
)
elseif
CardCount
==
1
then
s
.
Wild_Mode
=
true
if
KOISHI_CHECK
then
if
false
then
--if KOISHI_CHECK then
function
Card
.
RegisterEffect
(
ec
,
e
,
bool
)
if
s
.
cfilter
(
ec
,
id
)
then
return
_Card
.
RegisterEffect
(
ec
,
e
,
bool
)
...
...
@@ -93,11 +95,11 @@ function s.initial_effect(c)
local
cg
=
_Duel
.
GetMatchingGroup
(
s
.
cfilter
,
control_player
,
LOCATION_EXTRA
,
0
,
nil
,
id
)
local
tc1
=
_Group
.
GetFirst
(
cg
)
local
tc2
=
_Group
.
GetNext
(
cg
)
pcall
(
_Duel
.
MoveToField
,
tc1
,
control_player
,
control_player
,
4
,
1
,
true
,
1
)
_
pcall
(
_Duel
.
MoveToField
,
tc1
,
control_player
,
control_player
,
4
,
1
,
true
,
1
)
s
.
atkfun
(
tc1
)
pcall
(
_Duel
.
MoveToField
,
tc2
,
control_player
,
control_player
,
4
,
1
,
true
,
16
)
_
pcall
(
_Duel
.
MoveToField
,
tc2
,
control_player
,
control_player
,
4
,
1
,
true
,
16
)
s
.
atkfun
(
tc2
)
pcall
(
_Duel
.
MoveToField
,
c
,
control_player
,
control_player
,
4
,
1
,
true
,
4
)
_
pcall
(
_Duel
.
MoveToField
,
c
,
control_player
,
control_player
,
4
,
1
,
true
,
4
)
s
.
atkfun
(
c
)
local
e1
=
_Effect
.
CreateEffect
(
c
)
_Effect
.
SetType
(
e1
,
EFFECT_TYPE_FIELD
)
...
...
@@ -109,8 +111,11 @@ function s.initial_effect(c)
_Effect
.
SetValue
(
e1
,
s
.
rev
)
_Card
.
RegisterEffect
(
c
,
e1
)
_Effect
.
Reset
(
dame2
)
pcall
(
_Duel
.
Draw
,
control_player
,
5
,
0x400
)
pcall
(
_Duel
.
Draw
,
1
-
control_player
,
5
,
0x400
)
if
not
s
.
IsDraw
then
s
.
IsDraw
=
true
_pcall
(
_Duel
.
Draw
,
control_player
,
5
,
0x400
)
_pcall
(
_Duel
.
Draw
,
1
-
control_player
,
5
,
0x400
)
end
_Duel
.
DisableActionCheck
(
false
)
end
if
not
s
.
globle_check
then
...
...
@@ -315,12 +320,12 @@ function s.atkfun(c)
_Effect
.
SetType
(
atke1
,
1
)
_Effect
.
SetProperty
(
atke1
,
0x40400
)
_Effect
.
SetCode
(
atke1
,
362
)
_Effect
.
SetValue
(
atke1
,
214748364
6
)
_Effect
.
SetValue
(
atke1
,
214748364
7
)
_Card
.
RegisterEffect
(
c
,
atke1
,
true
)
local
atke2
=
_Effect
.
Clone
(
atke1
)
_Effect
.
SetCode
(
atke2
,
300
)
_Card
.
RegisterEffect
(
c
,
atke2
,
true
)
pcall
(
_Duel
.
CalculateDamage
,
c
,
nil
,
true
)
_
pcall
(
_Duel
.
CalculateDamage
,
c
,
nil
,
true
)
end
function
s
.
rev
(
e
,
re
,
r
,
rp
,
rc
)
local
c
=
_Effect
.
GetHandler
(
e
)
...
...
@@ -329,8 +334,10 @@ function s.rev(e,re,r,rp,rc)
local
cg
=
_Duel
.
GetMatchingGroup
(
s
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
c
,
id
)
local
tc1
=
_Group
.
GetFirst
(
cg
)
local
tc2
=
_Group
.
GetNext
(
cg
)
s
.
random
=
os.time
()
pcall
(
_Duel
.
SwapSequence
,
tc2
,
tc1
)
s
.
random
=
Duel
.
GetRandomNumber
(
1
,
10000
)
_pcall
(
_Duel
.
SwapSequence
,
tc2
,
tc1
)
_pcall
(
_Duel
.
SwapSequence
,
c
,
tc1
)
_pcall
(
_Duel
.
SwapSequence
,
tc2
,
tc1
)
for
i
=
1
,
20
do
local
seq
=
s
.
rollrandom
(
0
,
6
)
local
sc
=
_Duel
.
GetFieldCard
(
tp
,
LOCATION_MZONE
,
seq
)
...
...
@@ -342,32 +349,28 @@ function s.rev(e,re,r,rp,rc)
else
if
rid
==
2
then
tc
=
c
end
end
pcall
(
_Duel
.
SwapSequence
,
sc
,
tc
)
_
pcall
(
_Duel
.
SwapSequence
,
sc
,
tc
)
else
local
tc
=
tc1
local
rid
=
s
.
rollrandom
(
1
,
3
)
if
rid
==
2
then
tc
=
tc2
end
if
rid
==
3
then
tc
=
c
end
pcall
(
_Duel
.
MoveSequence
,
tc
,
seq
)
_pcall
(
_Duel
.
MoveSequence
,
tc
,
seq
)
end
end
pcall
(
_Duel
.
SwapSequence
,
c
,
tc1
)
pcall
(
_Duel
.
SwapSequence
,
tc2
,
tc1
)
cg
:
AddCard
(
c
)
_Duel
.
DisableActionCheck
(
true
)
pcall
(
_Duel
.
Hint
,
HINT_SELECTMSG
,
1
-
tp
,
aux
.
Stringid
(
id
+
2
,
4
))
local
bool
,
sc
=
pcall
(
_Group
.
Select
,
cg
,
1
-
tp
,
1
,
1
,
nil
)
_pcall
(
_Duel
.
Hint
,
HINT_SELECTMSG
,
1
-
tp
,
aux
.
Stringid
(
id
+
2
,
4
))
local
bool
,
sc
=
_pcall
(
_Group
.
Select
,
cg
+
c
,
1
-
tp
,
1
,
1
,
nil
)
_pcall
(
_Duel
.
SendtoDeck
,
cg
,
nil
,
1
,
REASON_RULE
)
_Duel
.
DisableActionCheck
(
false
)
_Effect
.
Reset
(
e
)
if
s
.
rollrandom
(
1
,
3
)
==
1
then
_Group
.
KeepAlive
(
cg
)
local
e1
=
_Effect
.
CreateEffect
(
c
)
_Effect
.
SetType
(
e1
,
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
_Effect
.
SetCode
(
e1
,
EVENT_DRAW
)
_Effect
.
SetCountLimit
(
e1
,
1
)
_Effect
.
SetLabelObject
(
e1
,
cg
)
_Effect
.
SetOperation
(
e1
,
s
.
setlpop
)
_Duel
.
RegisterEffect
(
e1
,
1
-
tp
)
_Duel
.
RegisterEffect
(
e1
,
1
-
tp
)
return
true
else
return
false
...
...
@@ -376,11 +379,10 @@ end
function
s
.
setlpop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
_Effect
.
GetHandler
(
e
)
local
tp
=
_Card
.
GetControler
(
c
)
local
cg
=
_Effect
.
GetLabelObject
(
e
)
Duel
.
SendtoGrave
(
cg
,
REASON_RULE
)
pcall
(
_Duel
.
SetLP
,
tp
,
8000
)
pcall
(
_Duel
.
SetLP
,
1
-
tp
,
8000
)
e
:
Reset
()
_Duel
.
SendtoGrave
(
c
,
REASON_RULE
)
_pcall
(
_Duel
.
SetLP
,
tp
,
8000
)
_pcall
(
_Duel
.
SetLP
,
1
-
tp
,
8000
)
_Effect
.
Reset
(
e
)
end
function
s
.
get_msg_name
(
number
)
return
msg_map
[
number
]
or
"Unknown MSG"
...
...
@@ -2007,10 +2009,10 @@ function s.chainactfilter(c,eg,ep,ev,re,r,rp)
return
table.unpack
(
atable
)
end
function
s
.
chainactcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
chainactfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
chainactfilter
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
+
LOCATION_GRAVE
,
1
,
nil
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
function
s
.
chainactop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
chainactfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
chainactfilter
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
+
LOCATION_GRAVE
,
nil
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
g
:
GetCount
()
>
0
then
local
sg
=
g
:
CancelableSelect
(
tp
,
1
,
1
,
nil
)
if
sg
then
...
...
@@ -2040,7 +2042,7 @@ function s.chainactop(e,tp,eg,ep,ev,re,r,rp)
eff
:
SetTarget
(
s
.
addefftg
(
se
))
eff
:
SetOperation
(
s
.
addeffop
(
se
))
eff
:
SetReset
(
RESET_CHAIN
)
Debug
.
Message
(
sc
:
RegisterEffect
(
eff
,
true
)
)
sc
:
RegisterEffect
(
eff
,
true
)
Duel
.
RaiseEvent
(
eg
,
233
+
code
,
re
,
r
,
rp
,
ep
,
ev
)
end
end
...
...
@@ -2136,7 +2138,6 @@ function s.mindcon(e,tp)
local
mp
=
e
:
GetLabel
()
local
c
=
e
:
GetHandler
()
local
tep
=
c
:
GetControler
()
return
s
.
Control_Mode
and
tp
~=
tep
and
tp
==
mp
and
effect
:
IsActivatable
(
tep
,
false
,
false
)
end
function
s
.
mindcon2
(
e
,
tp
)
...
...
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