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
59a68af3
Commit
59a68af3
authored
Apr 02, 2025
by
POLYMER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
23d16351
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
426 additions
and
364 deletions
+426
-364
expansions/script/c11410000.lua
expansions/script/c11410000.lua
+41
-9
expansions/script/c11450997.lua
expansions/script/c11450997.lua
+4
-8
expansions/script/c11451548.lua
expansions/script/c11451548.lua
+3
-5
expansions/script/c11451652.lua
expansions/script/c11451652.lua
+5
-7
expansions/script/c11451655.lua
expansions/script/c11451655.lua
+1
-4
expansions/script/c11451835.lua
expansions/script/c11451835.lua
+2
-5
expansions/script/c28321714.lua
expansions/script/c28321714.lua
+1
-0
expansions/script/c89390000.lua
expansions/script/c89390000.lua
+85
-84
expansions/script/c89390001.lua
expansions/script/c89390001.lua
+85
-84
expansions/script/c89390002.lua
expansions/script/c89390002.lua
+146
-145
expansions/script/c89390100.lua
expansions/script/c89390100.lua
+10
-2
expansions/script/c89390102.lua
expansions/script/c89390102.lua
+10
-2
expansions/script/c89390106.lua
expansions/script/c89390106.lua
+10
-2
expansions/script/c89390108.lua
expansions/script/c89390108.lua
+10
-2
expansions/script/c91300037.lua
expansions/script/c91300037.lua
+3
-3
expansions/script/c91300051.lua
expansions/script/c91300051.lua
+1
-1
expansions/script/special.lua
expansions/script/special.lua
+9
-1
No files found.
expansions/script/c11410000.lua
View file @
59a68af3
...
@@ -97,16 +97,42 @@ if not Duel.LoadScript and loadfile then
...
@@ -97,16 +97,42 @@ if not Duel.LoadScript and loadfile then
return
require_list
[
str
]
return
require_list
[
str
]
end
end
end
end
if
not
dofile
and
Duel
.
LoadScript
then
function
dofile
(
str
)
require_list
=
require_list
or
{}
local
name
=
str
for
word
in
string.gmatch
(
str
,
"%w+"
)
do
name
=
word
end
if
not
require_list
[
str
]
then
require_list
[
str
]
=
Duel
.
LoadScript
(
name
)
end
return
require_list
[
str
]
end
function
loadfile
(
str
)
require_list
=
require_list
or
{}
local
name
=
str
for
word
in
string.gmatch
(
str
,
"%w+"
)
do
name
=
word
end
return
function
()
if
not
require_list
[
str
]
then
require_list
[
str
]
=
Duel
.
LoadScript
(
name
)
end
return
require_list
[
str
]
end
end
end
function
cm
.
nnfilter
(
c
,
ec
)
function
cm
.
nnfilter
(
c
,
ec
)
if
c
:
GetOriginalType
()
==
0x11
or
c
:
GetOriginalType
()
==
0x1011
then
return
false
end
if
c
:
GetOriginalType
()
&
0x11
==
0x11
and
c
:
GetOriginalType
()
&
TYPE_PENDULUM
==
0
then
return
false
end
if
not
c
.
initial_effect
then
return
true
end
if
not
c
.
initial_effect
then
return
true
end
return
false
return
false
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--if apricot_nightfall_adjust then return end
--if apricot_nightfall_adjust then return end
apricot_nightfall_adjust
=
true
apricot_nightfall_adjust
=
true
e
:
Reset
()
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
e
:
Reset
()
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
c
:
IsLocation
(
LOCATION_DECK
)
and
#
g
>=
36
then
if
c
:
IsLocation
(
LOCATION_DECK
)
and
#
g
>=
36
then
...
@@ -120,16 +146,22 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -120,16 +146,22 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if
not
cm
.
r
then
if
not
cm
.
r
then
cm
.
r
=
Duel
.
GetFieldGroup
(
0
,
LOCATION_DECK
+
LOCATION_HAND
,
LOCATION_DECK
+
LOCATION_EXTRA
):
GetSum
(
Card
.
GetCode
)
cm
.
r
=
Duel
.
GetFieldGroup
(
0
,
LOCATION_DECK
+
LOCATION_HAND
,
LOCATION_DECK
+
LOCATION_EXTRA
):
GetSum
(
Card
.
GetCode
)
end
end
--[[local tab={}
for i=1,10000000 do
tab[cm.r]=true
cm.roll(1,#g)
if i%100000==0 then Debug.Message(cm.r) end
if tab[cm.r] then Debug.Message(i.." "..cm.r) end
end--]]
local
ct
=
cm
.
roll
(
1
,
#
g
)
-
1
local
ct
=
cm
.
roll
(
1
,
#
g
)
-
1
local
tc
=
g
:
Filter
(
function
(
c
)
return
c
:
GetSequence
()
==
ct
end
,
nil
):
GetFirst
()
local
tc
=
g
:
Filter
(
function
(
c
)
return
c
:
GetSequence
()
==
ct
end
,
nil
):
GetFirst
()
if
KOISHI_CHECK
then
if
KOISHI_CHECK
then
c
:
SetEntityCode
(
tc
:
GetOriginalCode
())
c
:
SetEntityCode
(
tc
:
GetOriginalCode
())
local
ini
=
cm
.
initial_effect
if
tc
:
GetOriginalType
()
&
0x11
~=
0x11
or
tc
:
GetOriginalType
()
&
TYPE_PENDULUM
>
0
then
cm
.
initial_effect
=
function
()
end
c
:
ReplaceEffect
(
tc
:
GetOriginalCode
(),
0
)
c
:
ReplaceEffect
(
m
,
0
)
else
c
:
SetStatus
(
STATUS_EFFECT_REPLACED
,
false
)
c
:
ReplaceEffect
(
80316585
,
0
)
cm
.
initial_effect
=
ini
end
if
tc
.
initial_effect
then
tc
.
initial_effect
(
c
)
end
Duel
.
DisableShuffleCheck
()
Duel
.
DisableShuffleCheck
()
Duel
.
Exile
(
tc
,
0
)
Duel
.
Exile
(
tc
,
0
)
else
else
...
@@ -165,7 +197,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -165,7 +197,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
GetID
=
function
()
GetID
=
function
()
return
_G
[
"c"
..
int
],
int
,
int
<
100000000
and
1
or
100
return
_G
[
"c"
..
int
],
int
,
int
<
100000000
and
1
or
100
end
end
require
(
"expansions/script/c"
..
int
)
pcall
(
require
,
"expansions/script/c"
..
int
)
local
ini
=
ac
.
initial_effect
local
ini
=
ac
.
initial_effect
if
ini
then
stack
[
#
stack
+
1
]
=
ac
end
if
ini
then
stack
[
#
stack
+
1
]
=
ac
end
end
end
...
...
expansions/script/c11450997.lua
View file @
59a68af3
...
@@ -48,14 +48,10 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -48,14 +48,10 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if
KOISHI_CHECK
then
if
KOISHI_CHECK
then
local
code
=
g
:
GetFirst
():
GetOriginalCode
()
local
code
=
g
:
GetFirst
():
GetOriginalCode
()
c
:
SetEntityCode
(
code
)
c
:
SetEntityCode
(
code
)
local
ini
=
cm
.
initial_effect
if
g
:
GetFirst
():
GetOriginalType
()
&
0x11
~=
0x11
or
g
:
GetFirst
():
GetOriginalType
()
&
TYPE_PENDULUM
>
0
then
cm
.
initial_effect
=
function
()
end
c
:
ReplaceEffect
(
code
,
0
)
c
:
ReplaceEffect
(
m
,
0
)
else
cm
.
initial_effect
=
ini
c
:
ReplaceEffect
(
80316585
,
0
)
if
not
g
:
GetFirst
():
IsType
(
TYPE_NORMAL
)
or
g
:
GetFirst
():
IsType
(
TYPE_PENDULUM
)
then
local
cn
=
getmetatable
(
g
:
GetFirst
())
if
cn
then
cn
.
initial_effect
(
c
)
end
--c:ReplaceEffect(code,0)
end
end
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleDeck
(
tp
)
...
...
expansions/script/c11451548.lua
View file @
59a68af3
...
@@ -68,6 +68,7 @@ function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -68,6 +68,7 @@ function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
tc
,
tc
:
GetLevel
())
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
tc
,
tc
:
GetLevel
())
if
tc
and
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
(
not
tc
:
IsLocation
(
LOCATION_MZONE
)
or
tc
:
IsFaceup
())
and
#
g
>
0
then
if
tc
and
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
(
not
tc
:
IsLocation
(
LOCATION_MZONE
)
or
tc
:
IsFaceup
())
and
#
g
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
fc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
fc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
code
=
tc
:
GetOriginalCode
()
local
code
=
tc
:
GetOriginalCode
()
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
@@ -78,13 +79,10 @@ function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -78,13 +79,10 @@ function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
fc
:
RegisterEffect
(
e1
)
fc
:
RegisterEffect
(
e1
)
if
fc
:
IsImmuneToEffect
(
e
)
then
return
end
if
fc
:
IsImmuneToEffect
(
e
)
then
return
end
if
tc
:
GetOriginalType
()
&
TYPE_NORMAL
==
0
then
if
tc
:
GetOriginalType
()
&
0x11
~=
0x11
or
tc
:
GetOriginalType
()
&
TYPE_PENDULUM
>
0
then
fc
:
ReplaceEffect
(
code
,
RESET_EVENT
+
RESETS_STANDARD
,
1
)
fc
:
ReplaceEffect
(
code
,
RESET_EVENT
+
RESETS_STANDARD
,
1
)
else
else
local
ini
=
cm
.
initial_effect
fc
:
ReplaceEffect
(
80316585
,
RESET_EVENT
+
RESETS_STANDARD
,
1
)
cm
.
initial_effect
=
function
()
end
fc
:
ReplaceEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
,
1
)
cm
.
initial_effect
=
ini
end
end
end
end
end
end
\ No newline at end of file
expansions/script/c11451652.lua
View file @
59a68af3
...
@@ -25,7 +25,7 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -25,7 +25,7 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
0x20000000
+
m
)
e1
:
SetCode
(
EFFECT_FLAG_EFFECT
+
m
)
e1
:
SetLabelObject
(
re
)
e1
:
SetLabelObject
(
re
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
...
@@ -56,6 +56,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -56,6 +56,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
end--]]
end--]]
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsOriginalCodeRule
,
tp
,
0xff
,
0xff
,
nil
,
ac
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsOriginalCodeRule
,
tp
,
0xff
,
0xff
,
nil
,
ac
)
local
og
=
Duel
.
GetOverlayGroup
(
0
,
1
,
1
):
Filter
(
Card
.
IsOriginalCodeRule
,
nil
,
ac
)
g
:
Merge
(
og
)
local
reg
=
Card
.
RegisterEffect
local
reg
=
Card
.
RegisterEffect
local
ctl
=
Effect
.
SetCountLimit
local
ctl
=
Effect
.
SetCountLimit
Effect
.
SetCountLimit
=
function
(
se
,
ct
,
code
)
Effect
.
SetCountLimit
=
function
(
se
,
ct
,
code
)
...
@@ -76,7 +78,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -76,7 +78,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
reg
(
sc
,
se
,
true
)
reg
(
sc
,
se
,
true
)
if
cm
[
se
]
then
if
cm
[
se
]
then
cm
[
se
]
=
nil
cm
[
se
]
=
nil
local
eset
=
{
sc
:
IsHasEffect
(
0x20000000
+
m
)}
local
eset
=
{
sc
:
IsHasEffect
(
EFFECT_FLAG_EFFECT
+
m
)}
if
#
eset
>
0
then
if
#
eset
>
0
then
local
ct
=
0
local
ct
=
0
for
_
,
ee
in
pairs
(
eset
)
do
for
_
,
ee
in
pairs
(
eset
)
do
...
@@ -88,11 +90,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -88,11 +90,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
for
tc
in
aux
.
Next
(
g
)
do
for
tc
in
aux
.
Next
(
g
)
do
if
tc
.
initial_effect
then
if
tc
.
initial_effect
then
local
ini
=
cm
.
initial_effect
tc
:
ReplaceEffect
(
tc
:
GetOriginalCode
(),
0
)
cm
.
initial_effect
=
function
()
end
tc
:
ReplaceEffect
(
m
,
0
)
cm
.
initial_effect
=
ini
tc
.
initial_effect
(
tc
)
end
end
end
end
Card
.
RegisterEffect
=
reg
Card
.
RegisterEffect
=
reg
...
...
expansions/script/c11451655.lua
View file @
59a68af3
...
@@ -44,10 +44,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -44,10 +44,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
58192742
,
0
,
0x11
,
300
,
200
,
1
,
RACE_INSECT
,
ATTRIBUTE_EARTH
)
then
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
58192742
,
0
,
0x11
,
300
,
200
,
1
,
RACE_INSECT
,
ATTRIBUTE_EARTH
)
then
if
KOISHI_CHECK
then
if
KOISHI_CHECK
then
c
:
SetEntityCode
(
58192742
,
true
)
c
:
SetEntityCode
(
58192742
,
true
)
local
ini
=
cm
.
initial_effect
c
:
ReplaceEffect
(
80316585
,
0
)
cm
.
initial_effect
=
function
()
end
c
:
ReplaceEffect
(
m
,
0
)
cm
.
initial_effect
=
ini
else
else
Duel
.
Remove
(
c
,
POS_FACEDOWN
,
REASON_RULE
)
Duel
.
Remove
(
c
,
POS_FACEDOWN
,
REASON_RULE
)
c
=
Duel
.
CreateToken
(
tp
,
58192742
)
c
=
Duel
.
CreateToken
(
tp
,
58192742
)
...
...
expansions/script/c11451835.lua
View file @
59a68af3
...
@@ -185,13 +185,10 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab)
...
@@ -185,13 +185,10 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab)
local
tc
=
g2
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
tc
=
g2
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
code
=
tc
:
GetOriginalCode
()
local
code
=
tc
:
GetOriginalCode
()
if
not
fc
:
IsImmuneToEffect
(
e
)
then
if
not
fc
:
IsImmuneToEffect
(
e
)
then
if
tc
:
GetOriginalType
()
&
TYPE_NORMAL
==
0
then
if
tc
:
GetOriginalType
()
&
0x11
~=
0x11
or
tc
:
GetOriginalType
()
&
TYPE_PENDULUM
>
0
then
fc
:
ReplaceEffect
(
code
,
RESET_EVENT
+
RESETS_STANDARD
,
1
)
fc
:
ReplaceEffect
(
code
,
RESET_EVENT
+
RESETS_STANDARD
,
1
)
else
else
local
ini
=
cm
.
initial_effect
fc
:
ReplaceEffect
(
80316585
,
RESET_EVENT
+
RESETS_STANDARD
,
1
)
cm
.
initial_effect
=
function
()
end
fc
:
ReplaceEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
,
1
)
cm
.
initial_effect
=
ini
end
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
...
...
expansions/script/c28321714.lua
View file @
59a68af3
...
@@ -43,6 +43,7 @@ function c28321714.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -43,6 +43,7 @@ function c28321714.activate(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ConfirmDecktop
(
p
,
ct
)
Duel
.
ConfirmDecktop
(
p
,
ct
)
local
g
=
Duel
.
GetDecktopGroup
(
p
,
ct
)
local
g
=
Duel
.
GetDecktopGroup
(
p
,
ct
)
if
#
g
>
0
then
if
#
g
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
FilterSelect
(
tp
,
c28321714
.
thfilter
,
0
,
#
g
,
nil
)
local
sg
=
g
:
FilterSelect
(
tp
,
c28321714
.
thfilter
,
0
,
#
g
,
nil
)
if
#
sg
>
0
then
if
#
sg
>
0
then
Duel
.
DisableShuffleCheck
()
Duel
.
DisableShuffleCheck
()
...
...
expansions/script/c89390000.lua
View file @
59a68af3
...
@@ -2,108 +2,109 @@
...
@@ -2,108 +2,109 @@
local
m
=
89390000
local
m
=
89390000
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_REMOVE
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
+
LOCATION_HAND
)
e2
:
SetRange
(
LOCATION_MZONE
+
LOCATION_HAND
)
e2
:
SetCondition
(
cm
.
thcon
)
e2
:
SetCondition
(
cm
.
thcon
)
e2
:
SetCost
(
cm
.
thcost
)
e2
:
SetCost
(
cm
.
thcost
)
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetOperation
(
cm
.
thop
)
e2
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_REMOVE
)
e1
:
SetCode
(
EVENT_REMOVE
)
e1
:
SetTarget
(
cm
.
srettg
)
e1
:
SetTarget
(
cm
.
srettg
)
e1
:
SetOperation
(
cm
.
sretop
)
e1
:
SetOperation
(
cm
.
sretop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
if
not
cm
.
global_check
then
if
not
cm
.
global_check
then
cm
.
global_check
=
true
cm
.
global_check
=
true
cm
[
0
]
=
{}
cm
[
0
]
=
{}
cm
[
1
]
=
{}
cm
[
1
]
=
{}
local
ge1
=
Effect
.
CreateEffect
(
c
)
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_CHAINING
)
ge1
:
SetCode
(
EVENT_CHAINING
)
ge1
:
SetOperation
(
cm
.
checkop
)
ge1
:
SetOperation
(
cm
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
ge1
:
Clone
()
local
ge2
=
ge1
:
Clone
()
ge2
:
SetCode
(
EVENT_CHAIN_NEGATED
)
ge2
:
SetCode
(
EVENT_CHAIN_NEGATED
)
ge2
:
SetOperation
(
cm
.
regop2
)
ge2
:
SetOperation
(
cm
.
regop2
)
Duel
.
RegisterEffect
(
ge2
,
0
)
Duel
.
RegisterEffect
(
ge2
,
0
)
local
ge4
=
Effect
.
CreateEffect
(
c
)
local
ge4
=
Effect
.
CreateEffect
(
c
)
ge4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge4
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge4
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge4
:
SetOperation
(
cm
.
clearop
)
ge4
:
SetOperation
(
cm
.
clearop
)
Duel
.
RegisterEffect
(
ge4
,
0
)
Duel
.
RegisterEffect
(
ge4
,
0
)
end
end
end
end
function
cm
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
==
1
-
tp
return
rp
==
1
-
tp
end
end
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
end
function
cm
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsRace
(
RACE_PSYCHO
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
return
c
:
IsRace
(
RACE_PSYCHO
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetChainLimit
(
aux
.
FALSE
)
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
tg
:
GetCount
()
>
0
then
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
local
tc
=
tg
:
GetFirst
()
if
Duel
.
Remove
(
tg
,
POS_FACEUP
,
REASON_EFFECT
)
==
0
or
not
tc
:
IsLocation
(
LOCATION_REMOVED
)
then
return
end
if
Duel
.
Remove
(
tg
,
POS_FACEUP
,
REASON_EFFECT
)
==
0
or
not
tc
:
IsLocation
(
LOCATION_REMOVED
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
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
)
end
end
end
end
end
end
function
cm
.
srettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
srettg
(
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_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetChainLimit
(
aux
.
FALSE
)
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
end
function
cm
.
sretop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
sretop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
>
0
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToHand
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
then
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
>
0
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToHand
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
then
local
copyt
=
cm
[
tp
]
local
copyt
=
cm
[
tp
]
local
exg
=
Group
.
CreateGroup
()
local
exg
=
Group
.
CreateGroup
()
for
k
,
v
in
pairs
(
copyt
)
do
for
k
,
v
in
pairs
(
copyt
)
do
if
k
and
v
then
exg
:
AddCard
(
k
)
end
if
k
and
v
then
exg
:
AddCard
(
k
)
end
end
end
local
cd
=
3
local
cd
=
3
if
c89390009
then
cd
=
c89390009
.
cd
end
if
c89390009
then
cd
=
c89390009
.
cd
end
if
exg
:
GetClassCount
(
Card
.
GetOriginalCode
)
>=
cd
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
if
exg
:
GetClassCount
(
Card
.
GetOriginalCode
)
>=
cd
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToHand
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToHand
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
==
1
then
if
g
:
GetCount
()
==
1
then
Duel
.
HintSelection
(
g
)
Duel
.
HintSelection
(
g
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
end
end
end
end
end
end
function
cm
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
re
:
IsActiveType
(
TYPE_MONSTER
)
and
rc
:
IsRace
(
RACE_PSYCHO
)
then
if
re
:
IsActiveType
(
TYPE_MONSTER
)
and
rc
:
IsRace
(
RACE_PSYCHO
)
then
cm
[
rp
][
rc
]
=
1
if
cm
[
rp
][
rc
]
then
cm
[
rp
][
rc
]
=
cm
[
rp
][
rc
]
+
1
else
cm
[
rp
][
rc
]
=
1
end
end
end
end
end
function
cm
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
cm
[
rp
][
re
:
GetHandler
()]
=
nil
local
rc
=
re
:
GetHandler
()
if
cm
[
rp
][
rc
]
then
cm
[
rp
][
rc
]
=
cm
[
rp
][
rc
]
-
1
else
cm
[
rp
][
rc
]
=
nil
end
end
end
function
cm
.
clearop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
clearop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
cm
[
0
]
=
{}
cm
[
0
]
=
{}
cm
[
1
]
=
{}
cm
[
1
]
=
{}
end
end
expansions/script/c89390001.lua
View file @
59a68af3
...
@@ -2,108 +2,109 @@
...
@@ -2,108 +2,109 @@
local
m
=
89390001
local
m
=
89390001
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_REMOVE
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
+
LOCATION_HAND
)
e2
:
SetRange
(
LOCATION_MZONE
+
LOCATION_HAND
)
e2
:
SetCondition
(
cm
.
thcon
)
e2
:
SetCondition
(
cm
.
thcon
)
e2
:
SetCost
(
cm
.
thcost
)
e2
:
SetCost
(
cm
.
thcost
)
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetOperation
(
cm
.
thop
)
e2
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_REMOVE
)
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_REMOVE
)
e1
:
SetCode
(
EVENT_REMOVE
)
e1
:
SetTarget
(
cm
.
srettg
)
e1
:
SetTarget
(
cm
.
srettg
)
e1
:
SetOperation
(
cm
.
sretop
)
e1
:
SetOperation
(
cm
.
sretop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
if
not
cm
.
global_check
then
if
not
cm
.
global_check
then
cm
.
global_check
=
true
cm
.
global_check
=
true
cm
[
0
]
=
{}
cm
[
0
]
=
{}
cm
[
1
]
=
{}
cm
[
1
]
=
{}
local
ge1
=
Effect
.
CreateEffect
(
c
)
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_CHAINING
)
ge1
:
SetCode
(
EVENT_CHAINING
)
ge1
:
SetOperation
(
cm
.
checkop
)
ge1
:
SetOperation
(
cm
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
ge1
:
Clone
()
local
ge2
=
ge1
:
Clone
()
ge2
:
SetCode
(
EVENT_CHAIN_NEGATED
)
ge2
:
SetCode
(
EVENT_CHAIN_NEGATED
)
ge2
:
SetOperation
(
cm
.
regop2
)
ge2
:
SetOperation
(
cm
.
regop2
)
Duel
.
RegisterEffect
(
ge2
,
0
)
Duel
.
RegisterEffect
(
ge2
,
0
)
local
ge4
=
Effect
.
CreateEffect
(
c
)
local
ge4
=
Effect
.
CreateEffect
(
c
)
ge4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge4
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge4
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge4
:
SetOperation
(
cm
.
clearop
)
ge4
:
SetOperation
(
cm
.
clearop
)
Duel
.
RegisterEffect
(
ge4
,
0
)
Duel
.
RegisterEffect
(
ge4
,
0
)
end
end
end
end
function
cm
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
==
1
-
tp
return
rp
==
1
-
tp
end
end
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
end
function
cm
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsRace
(
RACE_PSYCHO
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
return
c
:
IsRace
(
RACE_PSYCHO
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetChainLimit
(
aux
.
FALSE
)
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
tg
:
GetCount
()
>
0
then
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
local
tc
=
tg
:
GetFirst
()
if
Duel
.
Remove
(
tg
,
POS_FACEUP
,
REASON_EFFECT
)
==
0
or
not
tc
:
IsLocation
(
LOCATION_REMOVED
)
then
return
end
if
Duel
.
Remove
(
tg
,
POS_FACEUP
,
REASON_EFFECT
)
==
0
or
not
tc
:
IsLocation
(
LOCATION_REMOVED
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
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
)
end
end
end
end
end
end
function
cm
.
srettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
srettg
(
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_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetChainLimit
(
aux
.
FALSE
)
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
end
function
cm
.
sretop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
sretop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
>
0
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
)
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
then
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
>
0
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
)
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
then
local
copyt
=
cm
[
tp
]
local
copyt
=
cm
[
tp
]
local
exg
=
Group
.
CreateGroup
()
local
exg
=
Group
.
CreateGroup
()
for
k
,
v
in
pairs
(
copyt
)
do
for
k
,
v
in
pairs
(
copyt
)
do
if
k
and
v
then
exg
:
AddCard
(
k
)
end
if
k
and
v
then
exg
:
AddCard
(
k
)
end
end
end
local
cd
=
3
local
cd
=
3
if
c89390009
then
cd
=
c89390009
.
cd
end
if
c89390009
then
cd
=
c89390009
.
cd
end
if
exg
:
GetClassCount
(
Card
.
GetOriginalCode
)
>=
cd
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
if
exg
:
GetClassCount
(
Card
.
GetOriginalCode
)
>=
cd
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
2
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
2
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
HintSelection
(
g
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
end
end
end
end
end
end
function
cm
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
re
:
IsActiveType
(
TYPE_MONSTER
)
and
rc
:
IsRace
(
RACE_PSYCHO
)
then
if
re
:
IsActiveType
(
TYPE_MONSTER
)
and
rc
:
IsRace
(
RACE_PSYCHO
)
then
cm
[
rp
][
rc
]
=
1
if
cm
[
rp
][
rc
]
then
cm
[
rp
][
rc
]
=
cm
[
rp
][
rc
]
+
1
else
cm
[
rp
][
rc
]
=
1
end
end
end
end
end
function
cm
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
cm
[
rp
][
re
:
GetHandler
()]
=
nil
local
rc
=
re
:
GetHandler
()
if
cm
[
rp
][
rc
]
then
cm
[
rp
][
rc
]
=
cm
[
rp
][
rc
]
-
1
else
cm
[
rp
][
rc
]
=
nil
end
end
end
function
cm
.
clearop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
clearop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
cm
[
0
]
=
{}
cm
[
0
]
=
{}
cm
[
1
]
=
{}
cm
[
1
]
=
{}
end
end
expansions/script/c89390002.lua
View file @
59a68af3
This diff is collapsed.
Click to expand it.
expansions/script/c89390100.lua
View file @
59a68af3
...
@@ -123,17 +123,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -123,17 +123,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
s
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
s
[
0
][
re
:
GetHandler
()]
then
re
:
GetHandler
():
RegisterFlagEffect
(
id
+
100
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_CHAIN
,
0
,
1
)
end
if
Duel
.
GetCurrentChain
()
>=
4
then
if
Duel
.
GetCurrentChain
()
>=
4
then
for
i
=
1
,
ev
do
for
i
=
1
,
ev
do
local
te
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
)
local
te
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
)
if
te
:
IsActiveType
(
TYPE_MONSTER
)
then
if
te
:
GetHandler
():
GetFlagEffect
(
id
+
100
)
>
0
then
s
[
0
][
te
:
GetHandler
()]
=
1
s
[
0
][
te
:
GetHandler
()]
=
1
end
end
end
end
end
end
end
end
function
s
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
s
[
0
][
re
:
GetHandler
()]
=
nil
if
re
:
GetHandler
():
GetFlagEffect
(
id
+
100
)
>
0
then
re
:
GetHandler
():
IsHasEffect
(
EFFECT_FLAG_EFFECT
+
id
+
100
):
Reset
()
if
re
:
GetHandler
():
GetFlagEffect
(
id
+
100
)
==
0
then
s
[
0
][
re
:
GetHandler
()]
=
nil
end
end
end
end
function
s
.
clearop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
clearop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
s
[
0
]
=
{}
s
[
0
]
=
{}
...
...
expansions/script/c89390102.lua
View file @
59a68af3
...
@@ -122,17 +122,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -122,17 +122,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
s
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
s
[
0
][
re
:
GetHandler
()]
then
re
:
GetHandler
():
RegisterFlagEffect
(
id
+
100
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_CHAIN
,
0
,
1
)
end
if
Duel
.
GetCurrentChain
()
>=
4
then
if
Duel
.
GetCurrentChain
()
>=
4
then
for
i
=
1
,
ev
do
for
i
=
1
,
ev
do
local
te
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
)
local
te
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
)
if
te
:
IsActiveType
(
TYPE_MONSTER
)
then
if
te
:
GetHandler
():
GetFlagEffect
(
id
+
100
)
>
0
then
s
[
0
][
te
:
GetHandler
()]
=
1
s
[
0
][
te
:
GetHandler
()]
=
1
end
end
end
end
end
end
end
end
function
s
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
s
[
0
][
re
:
GetHandler
()]
=
nil
if
re
:
GetHandler
():
GetFlagEffect
(
id
+
100
)
>
0
then
re
:
GetHandler
():
IsHasEffect
(
EFFECT_FLAG_EFFECT
+
id
+
100
):
Reset
()
if
re
:
GetHandler
():
GetFlagEffect
(
id
+
100
)
==
0
then
s
[
0
][
re
:
GetHandler
()]
=
nil
end
end
end
end
function
s
.
clearop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
clearop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
s
[
0
]
=
{}
s
[
0
]
=
{}
...
...
expansions/script/c89390106.lua
View file @
59a68af3
...
@@ -143,17 +143,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -143,17 +143,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
s
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
s
[
0
][
re
:
GetHandler
()]
then
re
:
GetHandler
():
RegisterFlagEffect
(
id
+
100
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_CHAIN
,
0
,
1
)
end
if
Duel
.
GetCurrentChain
()
>=
4
then
if
Duel
.
GetCurrentChain
()
>=
4
then
for
i
=
1
,
ev
do
for
i
=
1
,
ev
do
local
te
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
)
local
te
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
)
if
te
:
IsActiveType
(
TYPE_MONSTER
)
then
if
te
:
GetHandler
():
GetFlagEffect
(
id
+
100
)
>
0
then
s
[
0
][
te
:
GetHandler
()]
=
1
s
[
0
][
te
:
GetHandler
()]
=
1
end
end
end
end
end
end
end
end
function
s
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
s
[
0
][
re
:
GetHandler
()]
=
nil
if
re
:
GetHandler
():
GetFlagEffect
(
id
+
100
)
>
0
then
re
:
GetHandler
():
IsHasEffect
(
EFFECT_FLAG_EFFECT
+
id
+
100
):
Reset
()
if
re
:
GetHandler
():
GetFlagEffect
(
id
+
100
)
==
0
then
s
[
0
][
re
:
GetHandler
()]
=
nil
end
end
end
end
function
s
.
clearop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
clearop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
s
[
0
]
=
{}
s
[
0
]
=
{}
...
...
expansions/script/c89390108.lua
View file @
59a68af3
...
@@ -145,17 +145,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -145,17 +145,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
s
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
s
[
0
][
re
:
GetHandler
()]
then
re
:
GetHandler
():
RegisterFlagEffect
(
id
+
100
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_CHAIN
,
0
,
1
)
end
if
Duel
.
GetCurrentChain
()
>=
4
then
if
Duel
.
GetCurrentChain
()
>=
4
then
for
i
=
1
,
ev
do
for
i
=
1
,
ev
do
local
te
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
)
local
te
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
)
if
te
:
IsActiveType
(
TYPE_MONSTER
)
then
if
te
:
GetHandler
():
GetFlagEffect
(
id
+
100
)
>
0
then
s
[
0
][
te
:
GetHandler
()]
=
1
s
[
0
][
te
:
GetHandler
()]
=
1
end
end
end
end
end
end
end
end
function
s
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
s
[
0
][
re
:
GetHandler
()]
=
nil
if
re
:
GetHandler
():
GetFlagEffect
(
id
+
100
)
>
0
then
re
:
GetHandler
():
IsHasEffect
(
EFFECT_FLAG_EFFECT
+
id
+
100
):
Reset
()
if
re
:
GetHandler
():
GetFlagEffect
(
id
+
100
)
==
0
then
s
[
0
][
re
:
GetHandler
()]
=
nil
end
end
end
end
function
s
.
clearop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
clearop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
s
[
0
]
=
{}
s
[
0
]
=
{}
...
...
expansions/script/c91300037.lua
View file @
59a68af3
...
@@ -61,12 +61,12 @@ end
...
@@ -61,12 +61,12 @@ end
function
s
.
stop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
stop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
not
(
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsControler
(
tp
)
and
not
tc
:
IsImmuneToEffect
(
e
))
then
return
end
if
not
(
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsControler
(
tp
)
and
not
tc
:
IsImmuneToEffect
(
e
))
then
return
end
local
zone
=
1
<<
tc
:
GetSequence
()
local
zone
=
1
<<
4
-
tc
:
GetSequence
()
local
oc
=
Duel
.
GetMatchingGroup
(
s
.
seqfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
tc
:
GetSequence
()):
GetFirst
()
local
oc
=
Duel
.
GetMatchingGroup
(
s
.
seqfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
tc
:
GetSequence
()):
GetFirst
()
if
oc
then
if
oc
then
Duel
.
Destroy
(
oc
,
REASON_RULE
)
Duel
.
Destroy
(
oc
,
REASON_RULE
)
end
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
2
))
and
Duel
.
GetControl
(
tc
,
1
-
tp
,
0
,
0
,
zone
)
then
if
Duel
.
GetControl
(
tc
,
1
-
tp
,
0
,
0
,
zone
)
then
local
oc
=
Duel
.
GetMatchingGroup
(
s
.
seqfilter
,
tp
,
0
,
LOCATION_SZONE
,
nil
,
tc
:
GetSequence
()):
GetFirst
()
local
oc
=
Duel
.
GetMatchingGroup
(
s
.
seqfilter
,
tp
,
0
,
LOCATION_SZONE
,
nil
,
tc
:
GetSequence
()):
GetFirst
()
if
oc
then
if
oc
then
Duel
.
Destroy
(
oc
,
REASON_RULE
)
Duel
.
Destroy
(
oc
,
REASON_RULE
)
...
@@ -89,5 +89,5 @@ function s.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -89,5 +89,5 @@ function s.stop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
function
s
.
seqfilter
(
c
,
seq
)
function
s
.
seqfilter
(
c
,
seq
)
return
c
:
GetSequence
()
==
seq
return
4
-
c
:
GetSequence
()
==
seq
end
end
\ No newline at end of file
expansions/script/c91300051.lua
View file @
59a68af3
...
@@ -71,7 +71,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -71,7 +71,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return
false
return
false
end
end
end
end
function
s
.
thfilter
(
c
,
chk
)
function
s
.
thfilter
(
c
,
e
,
chk
)
return
c
:
IsRace
(
RACE_ZOMBIE
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsRace
(
RACE_ZOMBIE
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
expansions/script/special.lua
View file @
59a68af3
...
@@ -182,7 +182,15 @@ function Auxiliary.PreloadUds()
...
@@ -182,7 +182,15 @@ function Auxiliary.PreloadUds()
return
0
return
0
end
end
end
end
if
not
Card
.
GetLinkMarker
then
function
Card
.
GetLinkMarker
(
c
)
local
res
=
0
for
i
=
0
,
8
do
if
i
~=
4
and
c
:
IsLinkMarker
(
1
<<
i
)
then
res
=
res
|
(
1
<<
i
)
end
return
res
end
end
local
_CRegisterEffect
=
Card
.
RegisterEffect
local
_CRegisterEffect
=
Card
.
RegisterEffect
function
Card
.
RegisterEffect
(
c
,
e
,
...
)
function
Card
.
RegisterEffect
(
c
,
e
,
...
)
if
aux
.
GetValueType
(
c
)
~=
"Card"
then
error
(
"Card.RegisterEffect没有输入正确的Card参数。"
,
2
)
return
end
if
aux
.
GetValueType
(
c
)
~=
"Card"
then
error
(
"Card.RegisterEffect没有输入正确的Card参数。"
,
2
)
return
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