Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts-888
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
4
Merge Requests
4
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
ygopro-scripts-888
Commits
784936d4
Commit
784936d4
authored
Jan 08, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Auxiliary.SameValueCheck
parent
98714204
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
43 deletions
+52
-43
c41659072.lua
c41659072.lua
+1
-7
utility.lua
utility.lua
+51
-36
No files found.
c41659072.lua
View file @
784936d4
...
...
@@ -36,13 +36,7 @@ function c41659072.initial_effect(c)
c
:
RegisterEffect
(
e3
)
end
function
c41659072
.
syncheck
(
g
)
local
sg
=
g
:
Clone
()
local
attr
=
ATTRIBUTE_ALL
for
c
in
aux
.
Next
(
sg
)
do
attr
=
attr
&
c
:
GetAttribute
()
if
attr
==
0
then
break
end
end
return
attr
~=
0
return
aux
.
SameValueCheck
(
g
,
Card
.
GetAttribute
)
end
function
c41659072
.
sumlimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_SYNCHRO
)
~=
SUMMON_TYPE_SYNCHRO
or
not
se
...
...
utility.lua
View file @
784936d4
...
...
@@ -1481,3 +1481,18 @@ end
function
Auxiliary
.
NegateSummonCondition
()
return
Duel
.
GetReadyChain
()
==
0
end
--
function
Auxiliary
.
SameValueFilter
(
f
,
value
)
return
function
(
c
)
return
f
(
c
)
&
value
==
0
end
end
---Check if all cards in g have the same Attribute/Race
---@param g Group
---@param f function
---@return boolean
function
Auxiliary
.
SameValueCheck
(
g
,
f
)
local
tc
=
g
:
GetFirst
()
local
filter
=
Auxiliary
.
SameValueFilter
(
f
,
f
(
tc
))
return
not
g
:
IsExists
(
filter
,
1
,
tc
)
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