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
fac425cd
Commit
fac425cd
authored
May 19, 2025
by
POLYMER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
2cbe37fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
345 additions
and
301 deletions
+345
-301
expansions/script/c114303426.lua
expansions/script/c114303426.lua
+122
-101
expansions/script/c118776531.lua
expansions/script/c118776531.lua
+27
-16
expansions/script/c121082832.lua
expansions/script/c121082832.lua
+196
-184
No files found.
expansions/script/c114303426.lua
View file @
fac425cd
function
c114303426
.
initial_effect
(
c
)
function
c114303426
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
+
CATEGORY_RECOVER
)
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
+
CATEGORY_RECOVER
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_DESTROYED
)
e1
:
SetCode
(
EVENT_DESTROYED
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
114303426
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
114303426
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c114303426
.
condition
)
e1
:
SetCondition
(
c114303426
.
condition
)
e1
:
SetTarget
(
c114303426
.
target
)
e1
:
SetTarget
(
c114303426
.
target
)
e1
:
SetOperation
(
c114303426
.
operation
)
e1
:
SetOperation
(
c114303426
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCondition
(
c114303426
.
sumcon
)
e2
:
SetCondition
(
c114303426
.
sumcon
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c114303426
.
target2
)
e2
:
SetTarget
(
c114303426
.
target2
)
e2
:
SetOperation
(
c114303426
.
activate
)
e2
:
SetOperation
(
c114303426
.
activate
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
local
e3
=
e1
:
Clone
()
e3
:
SetRange
(
LOCATION_DECK
)
e3
:
SetRange
(
LOCATION_DECK
)
e3
:
SetCondition
(
c114303426
.
condition2
)
e3
:
SetCondition
(
c114303426
.
condition2
)
e3
:
SetOperation
(
c114303426
.
operation2
)
e3
:
SetOperation
(
c114303426
.
operation2
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_ACTIVATE_COST
)
e4
:
SetCode
(
EFFECT_ACTIVATE_COST
)
e4
:
SetRange
(
LOCATION_DECK
)
e4
:
SetRange
(
LOCATION_DECK
)
e4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetTargetRange
(
1
,
0
)
e4
:
SetTargetRange
(
1
,
0
)
e4
:
SetTarget
(
c114303426
.
actarget
)
e4
:
SetTarget
(
c114303426
.
actarget
)
e4
:
SetOperation
(
c114303426
.
costop
)
e4
:
SetOperation
(
c114303426
.
costop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
if
not
c114303426
.
initcheck
then
c114303426
.
initcheck
=
true
local
st
=
Effect
.
SetTargetRange
Effect
.
SetTargetRange
=
function
(
e
,
s
,
o
)
if
e
:
GetOwner
():
IsOriginalCodeRule
(
51194046
)
and
e
:
GetCode
()
==
EFFECT_MATERIAL_CHECK
then
return
st
(
e
,
LOCATION_HAND
+
LOCATION_DECK
,
LOCATION_HAND
+
LOCATION_DECK
)
else
return
st
(
e
,
s
,
o
)
end
end
local
rg
=
Duel
.
GetMatchingGroup
(
Card
.
IsOriginalCodeRule
,
tp
,
0xff
,
0xff
,
nil
,
51194046
)
for
tc
in
aux
.
Next
(
rg
)
do
if
tc
.
initial_effect
then
local
tinit
=
c114303426
.
initial_effect
c114303426
.
initial_effect
=
function
()
end
tc
:
ReplaceEffect
(
114303426
,
0
)
c114303426
.
initial_effect
=
tinit
tc
.
initial_effect
(
tc
)
end
end
end
end
end
function
c114303426
.
cfilter
(
c
,
tp
)
function
c114303426
.
cfilter
(
c
,
tp
)
return
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsSetCard
(
0xaa
)
return
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsSetCard
(
0xaa
)
end
end
function
c114303426
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c114303426
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c114303426
.
cfilter
,
1
,
nil
,
tp
)
return
eg
:
IsExists
(
c114303426
.
cfilter
,
1
,
nil
,
tp
)
end
end
function
c114303426
.
thfilter
(
c
)
function
c114303426
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xaa
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0xaa
)
and
c
:
IsAbleToHand
()
end
end
function
c114303426
.
refilter
(
c
)
function
c114303426
.
refilter
(
c
)
return
c
:
IsSetCard
(
0xaa
)
and
c
:
IsFaceup
()
return
c
:
IsSetCard
(
0xaa
)
and
c
:
IsFaceup
()
end
end
function
c114303426
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c114303426
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c114303426
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c114303426
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
local
ct
=
Duel
.
GetMatchingGroupCount
(
c114303426
.
refilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
c114303426
.
refilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
ct
*
800
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
ct
*
800
)
end
end
function
c114303426
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c114303426
.
operation
(
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
,
c114303426
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c114303426
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
c114303426
.
refilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
c114303426
.
refilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
if
ct
>
0
then
if
ct
>
0
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
Recover
(
tp
,
ct
*
800
,
REASON_EFFECT
)
Duel
.
Recover
(
tp
,
ct
*
800
,
REASON_EFFECT
)
end
end
end
end
end
end
function
c114303426
.
sumcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c114303426
.
sumcon
(
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
c114303426
.
sumfilter
(
c
)
function
c114303426
.
sumfilter
(
c
)
local
a
=
c
:
GetTributeRequirement
()
local
a
=
c
:
GetTributeRequirement
()
if
a
==
0
then
a
=
1
end
if
a
==
0
then
a
=
1
end
if
c
:
IsCode
(
27279764
,
40061558
)
then
a
=
3
end
if
c
:
IsCode
(
27279764
,
40061558
)
then
a
=
3
end
return
c
:
IsSetCard
(
0xaa
)
and
c
:
IsSummonable
(
true
,
nil
,
1
)
and
Duel
.
CheckTribute
(
c
,
a
)
return
c
:
IsSetCard
(
0xaa
)
and
c
:
IsSummonable
(
true
,
nil
,
1
)
and
Duel
.
CheckTribute
(
c
,
a
)
end
end
function
c114303426
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c114303426
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c114303426
.
sumfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c114303426
.
sumfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
end
end
function
c114303426
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c114303426
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c114303426
.
sumfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c114303426
.
sumfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
then
if
tc
then
Duel
.
Summon
(
tp
,
tc
,
true
,
nil
,
1
)
Duel
.
Summon
(
tp
,
tc
,
true
,
nil
,
1
)
end
end
end
end
function
c114303426
.
actarget
(
e
,
te
,
tp
)
function
c114303426
.
actarget
(
e
,
te
,
tp
)
e
:
SetLabelObject
(
te
)
e
:
SetLabelObject
(
te
)
return
te
:
GetHandler
()
==
e
:
GetHandler
()
return
te
:
GetHandler
()
==
e
:
GetHandler
()
end
end
function
c114303426
.
costop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c114303426
.
costop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
te
=
e
:
GetLabelObject
()
local
te
=
e
:
GetLabelObject
()
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
false
)
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
false
)
c
:
CreateEffectRelation
(
te
)
c
:
CreateEffectRelation
(
te
)
local
ev0
=
Duel
.
GetCurrentChain
()
+
1
local
ev0
=
Duel
.
GetCurrentChain
()
+
1
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
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e1
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ev
==
ev0
end
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ev
==
ev0
end
)
e1
:
SetOperation
(
c114303426
.
rsop
)
e1
:
SetOperation
(
c114303426
.
rsop
)
e1
:
SetReset
(
RESET_CHAIN
)
e1
:
SetReset
(
RESET_CHAIN
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_CHAIN_NEGATED
)
e2
:
SetCode
(
EVENT_CHAIN_NEGATED
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
function
c114303426
.
rsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c114303426
.
rsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
e
:
GetCode
()
==
EVENT_CHAIN_SOLVED
and
rc
:
IsRelateToEffect
(
re
)
then
if
e
:
GetCode
()
==
EVENT_CHAIN_SOLVED
and
rc
:
IsRelateToEffect
(
re
)
then
rc
:
SetStatus
(
STATUS_EFFECT_ENABLED
,
true
)
rc
:
SetStatus
(
STATUS_EFFECT_ENABLED
,
true
)
end
end
if
e
:
GetCode
()
==
EVENT_CHAIN_NEGATED
and
rc
:
IsRelateToEffect
(
re
)
and
not
(
rc
:
IsOnField
()
and
rc
:
IsFacedown
())
then
if
e
:
GetCode
()
==
EVENT_CHAIN_NEGATED
and
rc
:
IsRelateToEffect
(
re
)
and
not
(
rc
:
IsOnField
()
and
rc
:
IsFacedown
())
then
rc
:
SetStatus
(
STATUS_ACTIVATE_DISABLED
,
true
)
rc
:
SetStatus
(
STATUS_ACTIVATE_DISABLED
,
true
)
end
end
end
end
function
c114303426
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c114303426
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c114303426
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
not
Duel
.
IsExistingMatchingCard
(
aux
.
NOT
(
Card
.
IsSetCard
),
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
0xaa
)
return
c114303426
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
not
Duel
.
IsExistingMatchingCard
(
aux
.
NOT
(
Card
.
IsSetCard
),
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
0xaa
)
end
end
function
c114303426
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c114303426
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ConfirmCards
(
1
-
tp
,
Duel
.
GetFieldGroup
(
tp
,
LOCATION_EXTRA
,
0
))
Duel
.
ConfirmCards
(
1
-
tp
,
Duel
.
GetFieldGroup
(
tp
,
LOCATION_EXTRA
,
0
))
c114303426
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c114303426
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
local
st
=
Effect
.
SetTargetRange
local
st
=
Effect
.
SetTargetRange
Effect
.
SetTargetRange
=
function
(
e
,
s
,
o
)
Effect
.
SetTargetRange
=
function
(
e
,
s
,
o
)
if
e
:
GetOwner
():
IsOriginalCodeRule
(
51194046
)
and
e
:
GetCode
()
==
EFFECT_MATERIAL_CHECK
then
if
e
:
GetOwner
():
IsOriginalCodeRule
(
51194046
)
and
e
:
GetCode
()
==
EFFECT_MATERIAL_CHECK
then
return
st
(
e
,
LOCATION_HAND
+
LOCATION_DECK
,
LOCATION_HAND
+
LOCATION_DECK
)
return
st
(
e
,
LOCATION_HAND
+
LOCATION_DECK
,
LOCATION_HAND
+
LOCATION_DECK
)
else
else
return
st
(
e
,
s
,
o
)
return
st
(
e
,
s
,
o
)
end
end
end
end
expansions/script/c118776531.lua
View file @
fac425cd
...
@@ -61,6 +61,33 @@ function c118776531.initial_effect(c)
...
@@ -61,6 +61,33 @@ function c118776531.initial_effect(c)
ge2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge2
:
SetOperation
(
c118776531
.
clearop
)
ge2
:
SetOperation
(
c118776531
.
clearop
)
Duel
.
RegisterEffect
(
ge2
,
0
)
Duel
.
RegisterEffect
(
ge2
,
0
)
local
st
=
Effect
.
SetTarget
Effect
.
SetTarget
=
function
(
e
,
tg
)
if
e
:
GetDescription
()
==
aux
.
Stringid
(
58984738
,
1
)
or
e
:
GetDescription
()
==
aux
.
Stringid
(
22499034
,
1
)
then
return
st
(
e
,
c118776531
.
tg
)
else
return
st
(
e
,
tg
)
end
end
local
so
=
Effect
.
SetOperation
Effect
.
SetOperation
=
function
(
e
,
op
)
if
e
:
GetDescription
()
==
aux
.
Stringid
(
58984738
,
1
)
or
e
:
GetDescription
()
==
aux
.
Stringid
(
22499034
,
1
)
then
return
so
(
e
,
c118776531
.
op
)
else
return
so
(
e
,
op
)
end
end
local
rg
=
Duel
.
GetMatchingGroup
(
Card
.
IsOriginalCodeRule
,
tp
,
0xff
,
0xff
,
nil
,
58984738
,
22499034
)
for
tc
in
aux
.
Next
(
rg
)
do
if
tc
.
initial_effect
then
local
tinit
=
c118776531
.
initial_effect
c118776531
.
initial_effect
=
function
()
end
tc
:
ReplaceEffect
(
118776531
,
0
)
c118776531
.
initial_effect
=
tinit
tc
.
initial_effect
(
tc
)
end
end
end
end
end
end
...
@@ -163,22 +190,6 @@ end
...
@@ -163,22 +190,6 @@ end
--change script
--change script
local
st
=
Effect
.
SetTarget
Effect
.
SetTarget
=
function
(
e
,
tg
)
if
e
:
GetDescription
()
==
aux
.
Stringid
(
58984738
,
1
)
or
e
:
GetDescription
()
==
aux
.
Stringid
(
22499034
,
1
)
then
return
st
(
e
,
c118776531
.
tg
)
else
return
st
(
e
,
tg
)
end
end
local
so
=
Effect
.
SetOperation
Effect
.
SetOperation
=
function
(
e
,
op
)
if
e
:
GetDescription
()
==
aux
.
Stringid
(
58984738
,
1
)
or
e
:
GetDescription
()
==
aux
.
Stringid
(
22499034
,
1
)
then
return
so
(
e
,
c118776531
.
op
)
else
return
so
(
e
,
op
)
end
end
function
c118776531
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c118776531
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c121082832.lua
View file @
fac425cd
--混沌
--混沌
function
c121082832
.
initial_effect
(
c
)
function
c121082832
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c121082832
.
actcost
)
e1
:
SetCost
(
c121082832
.
actcost
)
e1
:
SetTarget
(
c121082832
.
target
)
e1
:
SetTarget
(
c121082832
.
target
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--duel start
--duel start
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_TO_HAND
)
e2
:
SetCode
(
EVENT_TO_HAND
)
e2
:
SetRange
(
LOCATION_DECK
+
LOCATION_HAND
)
e2
:
SetRange
(
LOCATION_DECK
+
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
121082832
+
EFFECT_COUNT_CODE_DUEL
)
e2
:
SetCountLimit
(
1
,
121082832
+
EFFECT_COUNT_CODE_DUEL
)
e2
:
SetCondition
(
c121082832
.
chcon
)
e2
:
SetCondition
(
c121082832
.
chcon
)
e2
:
SetOperation
(
c121082832
.
chop
)
e2
:
SetOperation
(
c121082832
.
chop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
if
not
c121082832
.
initcheck
then
c121082832
.
initcheck
=
true
local
st
=
Effect
.
SetTarget
Effect
.
SetTarget
=
function
(
e
,
tg
)
if
e
:
GetOwner
():
IsOriginalCodeRule
(
92746535
)
and
e
:
GetCategory
()
==
CATEGORY_TOHAND
+
CATEGORY_SEARCH
then
return
st
(
e
,
c121082832
.
thtg
)
else
return
st
(
e
,
tg
)
end
end
local
so
=
Effect
.
SetOperation
Effect
.
SetOperation
=
function
(
e
,
op
)
if
e
:
GetOwner
():
IsOriginalCodeRule
(
92746535
)
and
e
:
GetCategory
()
==
CATEGORY_TOHAND
+
CATEGORY_SEARCH
then
return
so
(
e
,
c121082832
.
thop
)
else
return
so
(
e
,
op
)
end
end
local
rg
=
Duel
.
GetMatchingGroup
(
Card
.
IsOriginalCodeRule
,
tp
,
0xff
,
0xff
,
nil
,
92746535
)
for
tc
in
aux
.
Next
(
rg
)
do
if
tc
.
initial_effect
then
local
tinit
=
c121082832
.
initial_effect
c121082832
.
initial_effect
=
function
()
end
tc
:
ReplaceEffect
(
121082832
,
0
)
c121082832
.
initial_effect
=
tinit
tc
.
initial_effect
(
tc
)
end
end
end
end
end
function
c121082832
.
actcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c121082832
.
actcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
121082832
)
==
0
end
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
121082832
)
==
0
end
Duel
.
RegisterFlagEffect
(
tp
,
121082832
,
0
,
0
,
0
)
Duel
.
RegisterFlagEffect
(
tp
,
121082832
,
0
,
0
,
0
)
end
end
function
c121082832
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c121082832
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetLabel
(
0
)
e1
:
SetLabel
(
0
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c121082832
.
tgcon
)
e1
:
SetCondition
(
c121082832
.
tgcon
)
e1
:
SetOperation
(
c121082832
.
tgop
)
e1
:
SetOperation
(
c121082832
.
tgop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
3
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
3
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
end
end
function
c121082832
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c121082832
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
return
Duel
.
GetTurnPlayer
()
~=
tp
end
end
function
c121082832
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c121082832
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
ct
=
e
:
GetLabel
()
local
ct
=
e
:
GetLabel
()
ct
=
ct
+
1
ct
=
ct
+
1
e
:
SetLabel
(
ct
)
e
:
SetLabel
(
ct
)
if
ct
<=
3
then
e
:
GetHandler
():
SetTurnCounter
(
ct
)
end
if
ct
<=
3
then
e
:
GetHandler
():
SetTurnCounter
(
ct
)
end
if
ct
==
3
then
if
ct
==
3
then
--search & destroy
--search & destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c121082832
.
destg
)
e1
:
SetTarget
(
c121082832
.
destg
)
e1
:
SetOperation
(
c121082832
.
desop
)
e1
:
SetOperation
(
c121082832
.
desop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
end
end
function
c121082832
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c121082832
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c121082832
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c121082832
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
==
0
then
return
end
if
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
==
0
then
return
end
Duel
.
SetLP
(
tp
,
4000
)
Duel
.
SetLP
(
tp
,
4000
)
local
dc
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
local
dc
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
if
Duel
.
GetLP
(
tp
)
<
Duel
.
GetLP
(
1
-
tp
)
and
dc
>
1
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
121082832
,
2
))
then
if
Duel
.
GetLP
(
tp
)
<
Duel
.
GetLP
(
1
-
tp
)
and
dc
>
1
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
121082832
,
2
))
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
then
if
tc
then
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
MoveSequence
(
tc
,
0
)
Duel
.
MoveSequence
(
tc
,
0
)
Duel
.
ConfirmDecktop
(
tp
,
1
)
Duel
.
ConfirmDecktop
(
tp
,
1
)
end
end
end
end
end
end
function
c121082832
.
chcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c121082832
.
chcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnCount
()
==
0
return
Duel
.
GetTurnCount
()
==
0
end
end
function
c121082832
.
chop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c121082832
.
chop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetOwner
()
local
tp
=
c
:
GetOwner
()
if
not
c
:
IsLocation
(
LOCATION_DECK
+
LOCATION_HAND
)
then
return
end
if
not
c
:
IsLocation
(
LOCATION_DECK
+
LOCATION_HAND
)
then
return
end
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
LOCATION_HAND
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
LOCATION_HAND
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_RULE
)
end
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_RULE
)
end
if
c
:
GetActivateEffect
():
IsActivatable
(
tp
)
then
if
c
:
GetActivateEffect
():
IsActivatable
(
tp
)
then
Duel
.
SSet
(
tp
,
c
)
Duel
.
SSet
(
tp
,
c
)
c
:
RegisterFlagEffect
(
121082832
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
c
:
RegisterFlagEffect
(
121082832
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
--cannot activate
--cannot activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetCondition
(
c121082832
.
negcon
)
e1
:
SetCondition
(
c121082832
.
negcon
)
e1
:
SetValue
(
c121082832
.
actlimit
)
e1
:
SetValue
(
c121082832
.
actlimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
--cannot set
--cannot set
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SSET
)
e2
:
SetCode
(
EFFECT_CANNOT_SSET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetCondition
(
c121082832
.
negcon
)
e2
:
SetCondition
(
c121082832
.
negcon
)
e2
:
SetTarget
(
c121082832
.
setlimit
)
e2
:
SetTarget
(
c121082832
.
setlimit
)
e2
:
SetValue
(
c121082832
.
actlimit
)
e2
:
SetValue
(
c121082832
.
actlimit
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e3
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetTargetRange
(
1
,
1
)
e3
:
SetTargetRange
(
1
,
1
)
e3
:
SetCondition
(
c121082832
.
negcon
)
e3
:
SetCondition
(
c121082832
.
negcon
)
e3
:
SetValue
(
c121082832
.
nofilter
)
e3
:
SetValue
(
c121082832
.
nofilter
)
Duel
.
RegisterEffect
(
e3
,
tp
)
Duel
.
RegisterEffect
(
e3
,
tp
)
--indes
--indes
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e4
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e4
:
SetTarget
(
c121082832
.
indtg
)
e4
:
SetTarget
(
c121082832
.
indtg
)
e4
:
SetCondition
(
c121082832
.
negcon
)
e4
:
SetCondition
(
c121082832
.
negcon
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE
)
e4
:
SetValue
(
1
)
e4
:
SetValue
(
1
)
Duel
.
RegisterEffect
(
e4
,
tp
)
Duel
.
RegisterEffect
(
e4
,
tp
)
local
e5
=
e4
:
Clone
()
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_CANNOT_REMOVE
)
e5
:
SetCode
(
EFFECT_CANNOT_REMOVE
)
Duel
.
RegisterEffect
(
e5
,
tp
)
Duel
.
RegisterEffect
(
e5
,
tp
)
local
e6
=
e4
:
Clone
()
local
e6
=
e4
:
Clone
()
e6
:
SetCode
(
EFFECT_CANNOT_TO_DECK
)
e6
:
SetCode
(
EFFECT_CANNOT_TO_DECK
)
Duel
.
RegisterEffect
(
e6
,
tp
)
Duel
.
RegisterEffect
(
e6
,
tp
)
local
e7
=
e4
:
Clone
()
local
e7
=
e4
:
Clone
()
e7
:
SetCode
(
EFFECT_CANNOT_TO_HAND
)
e7
:
SetCode
(
EFFECT_CANNOT_TO_HAND
)
Duel
.
RegisterEffect
(
e7
,
tp
)
Duel
.
RegisterEffect
(
e7
,
tp
)
local
e8
=
e4
:
Clone
()
local
e8
=
e4
:
Clone
()
e8
:
SetCode
(
EFFECT_UNRELEASABLE_SUM
)
e8
:
SetCode
(
EFFECT_UNRELEASABLE_SUM
)
Duel
.
RegisterEffect
(
e8
,
tp
)
Duel
.
RegisterEffect
(
e8
,
tp
)
local
e9
=
e4
:
Clone
()
local
e9
=
e4
:
Clone
()
e9
:
SetCode
(
EFFECT_UNRELEASABLE_NONSUM
)
e9
:
SetCode
(
EFFECT_UNRELEASABLE_NONSUM
)
Duel
.
RegisterEffect
(
e9
,
tp
)
Duel
.
RegisterEffect
(
e9
,
tp
)
local
e10
=
e4
:
Clone
()
local
e10
=
e4
:
Clone
()
e10
:
SetCode
(
EFFECT_CANNOT_TO_GRAVE
)
e10
:
SetCode
(
EFFECT_CANNOT_TO_GRAVE
)
Duel
.
RegisterEffect
(
e10
,
tp
)
Duel
.
RegisterEffect
(
e10
,
tp
)
--chage name
--chage name
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_REPEAT
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_REPEAT
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetTargetRange
(
0xff
,
0xff
)
e1
:
SetTargetRange
(
0xff
,
0xff
)
e1
:
SetValue
(
121082832
)
e1
:
SetValue
(
121082832
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
Draw
(
Duel
.
GetTurnPlayer
(),
5
,
REASON_RULE
)
Duel
.
Draw
(
Duel
.
GetTurnPlayer
(),
5
,
REASON_RULE
)
end
end
function
c121082832
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c121082832
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsFacedown
()
return
e
:
GetHandler
():
IsFacedown
()
end
end
function
c121082832
.
indtg
(
e
,
c
)
function
c121082832
.
indtg
(
e
,
c
)
return
c
:
IsCode
(
121082832
)
and
c
:
IsFacedown
()
and
c
:
IsType
(
TYPE_FIELD
)
and
c
:
GetFlagEffect
(
121082832
)
~=
0
return
c
:
IsCode
(
121082832
)
and
c
:
IsFacedown
()
and
c
:
IsType
(
TYPE_FIELD
)
and
c
:
GetFlagEffect
(
121082832
)
~=
0
end
end
function
c121082832
.
actlimit
(
e
,
re
,
tp
)
function
c121082832
.
actlimit
(
e
,
re
,
tp
)
return
re
:
IsActiveType
(
TYPE_FIELD
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
not
re
:
GetHandler
():
IsCode
(
121082832
)
return
re
:
IsActiveType
(
TYPE_FIELD
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
not
re
:
GetHandler
():
IsCode
(
121082832
)
end
end
function
c121082832
.
setlimit
(
e
,
c
,
tp
)
function
c121082832
.
setlimit
(
e
,
c
,
tp
)
return
c
:
IsType
(
TYPE_FIELD
)
return
c
:
IsType
(
TYPE_FIELD
)
end
end
function
c121082832
.
nofilter
(
e
,
re
,
tp
)
function
c121082832
.
nofilter
(
e
,
re
,
tp
)
return
re
:
GetHandler
():
IsCode
(
73468603
)
return
re
:
GetHandler
():
IsCode
(
73468603
)
end
local
st
=
Effect
.
SetTarget
Effect
.
SetTarget
=
function
(
e
,
tg
)
if
e
:
GetOwner
():
IsOriginalCodeRule
(
92746535
)
and
e
:
GetCategory
()
==
CATEGORY_TOHAND
+
CATEGORY_SEARCH
then
return
st
(
e
,
c121082832
.
thtg
)
else
return
st
(
e
,
tg
)
end
end
local
so
=
Effect
.
SetOperation
Effect
.
SetOperation
=
function
(
e
,
op
)
if
e
:
GetOwner
():
IsOriginalCodeRule
(
92746535
)
and
e
:
GetCategory
()
==
CATEGORY_TOHAND
+
CATEGORY_SEARCH
then
return
so
(
e
,
c121082832
.
thop
)
else
return
so
(
e
,
op
)
end
end
end
function
c121082832
.
thfilter
(
c
,
code
)
function
c121082832
.
thfilter
(
c
,
code
)
return
c
:
IsCode
(
code
)
and
c
:
IsAbleToHand
()
return
c
:
IsCode
(
code
)
and
c
:
IsAbleToHand
()
end
end
function
c121082832
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c121082832
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
sc
=
Duel
.
GetFirstMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
e
:
GetHandler
())
local
sc
=
Duel
.
GetFirstMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
e
:
GetHandler
())
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c121082832
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
sc
:
GetCode
())
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c121082832
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
sc
:
GetCode
())
end
Duel
.
SetTargetCard
(
sc
)
Duel
.
SetTargetCard
(
sc
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
sc
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
sc
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c121082832
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c121082832
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c121082832
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tc
:
GetCode
())
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c121082832
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tc
:
GetCode
())
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
end
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