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
liucerf
pre-release-database-cdb
Commits
2fa164a3
Commit
2fa164a3
authored
May 21, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use function type announce_filter
parent
e111a6ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
54 deletions
+5
-54
script/c101301054.lua
script/c101301054.lua
+5
-54
No files found.
script/c101301054.lua
View file @
2fa164a3
...
...
@@ -127,11 +127,8 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local
ac
=
Duel
.
AnnounceCard
(
tp
,
table.unpack
(
afilter
))
s
.
AddToAnnounced
(
tp
,
ac
)
Duel
.
SetTargetParam
(
ac
)
if
#
s
.
announce_filter_func
(
e
:
GetHandler
())
<=
9
+
4
*
(
ARTMEGIA_COUNT
-
1
)
then
-- it should be at least 1 possible choice to make it changeable
Auxiliary
.
DefineGetterTemp
(
getmetatable
(
e
:
GetHandler
()),
"announce_filter"
,
s
.
announce_filter_func
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ANNOUNCE
,
nil
,
0
,
tp
,
0
)
end
getmetatable
(
e
:
GetHandler
()).
announce_filter
=
s
.
announce_filter_func
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ANNOUNCE
,
nil
,
0
,
tp
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
thlimit
(
e
,
c
,
tp
,
re
)
...
...
@@ -182,57 +179,11 @@ function Auxiliary.DefineGetter(mt,field,f)
mt
.
_getters
[
field
]
=
f
end
function
Auxiliary
.
DefineSetter
(
mt
,
field
,
f
)
local
mtmt
=
getmetatable
(
mt
)
if
not
mt
.
_setters
then
mt
.
_setters
=
{}
end
if
not
mtmt
.
__define_setter_registered__
then
mtmt
.
__define_setter_registered__
=
true
local
old_newindex
=
mtmt
.
__newindex
mtmt
.
__newindex
=
function
(
self
,
key
,
value
)
if
self
.
_setters
and
self
.
_setters
[
key
]
~=
nil
then
self
.
_setters
[
key
](
self
,
value
)
else
if
type
(
old_newindex
)
==
"function"
then
old_newindex
(
self
,
key
,
value
)
else
rawset
(
self
,
key
,
value
)
end
end
end
end
mt
.
_setters
[
field
]
=
f
end
function
Auxiliary
.
DefineGetterTemp
(
mt
,
field
,
f
)
Auxiliary
.
DefineGetter
(
mt
,
field
,
f
)
Auxiliary
.
DefineSetter
(
mt
,
field
,
function
(
self
,
value
)
if
self
.
_getters
and
self
.
_getters
[
field
]
==
f
then
self
.
_getters
[
field
]
=
nil
end
if
self
.
_setters
then
self
.
_setters
[
field
]
=
nil
end
rawset
(
self
,
field
,
value
)
end
)
end
function
s
.
announce_filter_func
(
c
)
local
tp
=
c
:
GetControler
()
function
s
.
announce_filter_func
(
e
,
tp
,
ev
)
local
exg
=
Duel
.
GetMatchingGroup
(
aux
.
AND
(
Card
.
IsFaceup
,
Card
.
IsSetCard
),
tp
,
LOCATION_MZONE
,
0
,
nil
,
0x2cd
)
local
cchain
=
Duel
.
GetCurrentChain
()
local
called_by_engraver
=
false
if
cchain
>
1
then
local
ce
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TRIGGERING_EFFECT
)
if
ce
:
GetHandler
()
~=
c
then
called_by_engraver
=
true
end
end
local
ncodes
=
s
.
CreateCodeList
(
exg
,
s
.
announced
[
tp
],
nil
,
nil
)
if
#
ncodes
>=
ARTMEGIA_COUNT
and
called_by_engraver
then
-- make Engraver's effect quit
error
(
"Nothing can be declared. 没有东西可以被宣言。"
,
3
)
if
#
ncodes
>=
ARTMEGIA_COUNT
then
return
false
end
local
af
=
{
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
,
OPCODE_ISTYPE
,
OPCODE_NOT
,
...
...
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