Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
P
pre-release-database-cdb
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
MyCard
pre-release-database-cdb
Commits
ec3a99de
Commit
ec3a99de
authored
May 15, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use __index for 神芸学都アルトメギア
parent
642ad39a
Pipeline
#36366
failed with stages
in 4 minutes and 2 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
106 additions
and
41 deletions
+106
-41
script/c101301054.lua
script/c101301054.lua
+106
-41
No files found.
script/c101301054.lua
View file @
ec3a99de
...
...
@@ -26,7 +26,32 @@ function s.initial_effect(c)
e3
:
SetTarget
(
s
.
thtg
)
e3
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e3
)
--global resetter
if
not
s
.
global_check
then
s
.
global_check
=
true
s
.
announced
=
{}
s
.
announced_set
=
{}
s
.
clearop
()
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge1
:
SetOperation
(
s
.
resetop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
s
.
AddToAnnounced
(
tp
,
code
)
table.insert
(
s
.
announced
[
tp
],
code
)
s
.
announced_set
[
tp
][
code
]
=
true
end
function
s
.
clearop
()
s
.
announced
[
0
]
=
{}
s
.
announced
[
1
]
=
{}
s
.
announced_set
[
0
]
=
{}
s
.
announced_set
[
1
]
=
{}
end
function
s
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsDiscardable
()
end
...
...
@@ -36,26 +61,57 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
s
.
anfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x2cd
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
c
:
GetCode
())
and
not
c
:
IsHasEffect
(
id
,
tp
)
and
not
s
.
announced_set
[
tp
][
c
:
GetCode
()]
end
function
s
.
thfilter
(
c
,
code
)
return
c
:
IsSetCard
(
0x2cd
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
c
:
IsCode
(
code
)
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
anfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
local
g
=
Duel
.
GetMatchingGroup
(
s
.
anfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
tp
)
local
ag
=
Group
.
CreateGroup
()
function
s
.
CreateCodeList
(
g
,
list
,
exg
,
exlist
)
local
codes
=
{}
local
existing
=
{}
-- exclude group
if
exg
then
for
c
in
aux
.
Next
(
exg
)
do
local
code
=
c
:
GetCode
()
existing
[
code
]
=
true
end
end
-- exclude list
if
exlist
then
for
_
,
code
in
ipairs
(
exlist
)
do
existing
[
code
]
=
true
end
end
-- add group
if
g
then
for
c
in
aux
.
Next
(
g
)
do
local
code
=
c
:
GetCode
()
if
not
ag
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
code
)
then
ag
:
AddCard
(
c
)
if
not
existing
[
code
]
then
existing
[
code
]
=
true
table.insert
(
codes
,
code
)
end
end
end
-- add list
if
list
then
for
_
,
code
in
ipairs
(
list
)
do
if
not
existing
[
code
]
then
existing
[
code
]
=
true
table.insert
(
codes
,
code
)
end
end
end
table.sort
(
codes
)
return
codes
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
anfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
tp
)
local
exg
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
codes
=
s
.
CreateCodeList
(
g
,
nil
,
exg
,
nil
)
if
chk
==
0
then
return
#
codes
>
0
end
local
afilter
=
{
codes
[
1
],
OPCODE_ISCODE
}
if
#
codes
>
1
then
--or ... or c:IsCode(codes[i])
...
...
@@ -65,41 +121,12 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
table.insert
(
afilter
,
OPCODE_OR
)
end
end
ag
:
Clear
()
local
ncodes
=
{}
local
exg
=
Duel
.
GetMatchingGroup
(
aux
.
AND
(
Card
.
IsFaceup
,
Card
.
IsSetCard
),
tp
,
LOCATION_MZONE
,
0
,
nil
,
0x2cd
)
for
c
in
aux
.
Next
(
exg
)
do
local
code
=
c
:
GetCode
()
if
not
ag
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
code
)
then
ag
:
AddCard
(
c
)
table.insert
(
ncodes
,
code
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CODE
)
local
ac
=
Duel
.
AnnounceCard
(
tp
,
table.unpack
(
afilter
))
local
af
=
{
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
,
OPCODE_ISTYPE
,
OPCODE_NOT
,
0x2cd
,
OPCODE_ISSETCARD
,
OPCODE_AND
,
TYPE_MONSTER
,
OPCODE_ISTYPE
,
OPCODE_AND
}
for
i
=
1
,
#
ncodes
do
table.insert
(
af
,
ncodes
[
i
])
table.insert
(
af
,
OPCODE_ISCODE
)
table.insert
(
af
,
OPCODE_NOT
)
table.insert
(
af
,
OPCODE_AND
)
end
getmetatable
(
e
:
GetHandler
()).
announce_filter
=
af
s
.
AddToAnnounced
(
tp
,
ac
)
Duel
.
SetTargetParam
(
ac
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ANNOUNCE
,
nil
,
0
,
tp
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
local
e0
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
id
)
e0
:
SetTargetRange
(
1
,
0
)
e0
:
SetTarget
(
s
.
thlimit
)
e0
:
SetLabel
(
ac
)
e0
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e0
,
tp
)
end
function
s
.
thlimit
(
e
,
c
,
tp
,
re
)
return
c
:
IsCode
(
e
:
GetLabel
())
...
...
@@ -124,3 +151,41 @@ end
function
s
.
splimit
(
e
,
c
)
return
not
(
c
:
IsSetCard
(
0x2cd
)
or
c
:
IsCode
(
101301008
))
and
not
c
:
IsLocation
(
LOCATION_EXTRA
)
end
-- should move to Auxiliary
function
Auxiliary
.
DefineCardmetaGetter
(
mt
,
field
,
f
)
if
not
mt
.
_getters
then
mt
.
_getters
=
{}
mt
.
__index
=
function
(
self
,
key
)
if
mt
.
_getters
[
key
]
~=
nil
then
return
mt
.
_getters
[
key
](
self
)
end
if
mt
[
key
]
~=
nil
then
return
mt
[
key
]
end
return
Card
[
key
]
end
end
mt
.
_getters
[
field
]
=
f
end
function
s
.
announce_filter_func
(
c
)
local
tp
=
c
:
GetControler
()
local
exg
=
Duel
.
GetMatchingGroup
(
aux
.
AND
(
Card
.
IsFaceup
,
Card
.
IsSetCard
),
tp
,
LOCATION_MZONE
,
0
,
nil
,
0x2cd
)
local
ncodes
=
s
.
CreateCodeList
(
exg
,
s
.
announced
[
tp
],
nil
,
nil
)
local
af
=
{
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
,
OPCODE_ISTYPE
,
OPCODE_NOT
,
0x2cd
,
OPCODE_ISSETCARD
,
OPCODE_AND
,
TYPE_MONSTER
,
OPCODE_ISTYPE
,
OPCODE_AND
}
for
i
=
1
,
#
ncodes
do
table.insert
(
af
,
ncodes
[
i
])
table.insert
(
af
,
OPCODE_ISCODE
)
table.insert
(
af
,
OPCODE_NOT
)
table.insert
(
af
,
OPCODE_AND
)
end
return
af
end
Auxiliary
.
DefineCardmetaGetter
(
s
,
"announce_filter"
,
s
.
announce_filter_func
)
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