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
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
Vee4
ygopro-scripts-888
Commits
0568ff6a
Commit
0568ff6a
authored
Jul 27, 2022
by
Chrono-Genex
Committed by
GitHub
Jul 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add aux.GetAttributeCount (#1920)
parent
233692df
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
22 additions
and
57 deletions
+22
-57
c22908820.lua
c22908820.lua
+1
-12
c33609093.lua
c33609093.lua
+1
-7
c56733747.lua
c56733747.lua
+1
-1
c58116537.lua
c58116537.lua
+1
-10
c62256492.lua
c62256492.lua
+1
-12
c62312469.lua
c62312469.lua
+1
-12
c65046521.lua
c65046521.lua
+1
-1
c68957925.lua
c68957925.lua
+2
-2
utility.lua
utility.lua
+13
-0
No files found.
c22908820.lua
View file @
0568ff6a
...
@@ -67,18 +67,7 @@ function c22908820.atkfilter(c)
...
@@ -67,18 +67,7 @@ function c22908820.atkfilter(c)
end
end
function
c22908820
.
val
(
e
,
c
)
function
c22908820
.
val
(
e
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c22908820
.
atkfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c22908820
.
atkfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
nil
)
local
att
=
0
return
aux
.
GetAttributeCount
(
g
)
*
200
local
tc
=
g
:
GetFirst
()
while
tc
do
att
=
bit
.
bor
(
att
,
tc
:
GetAttribute
())
tc
=
g
:
GetNext
()
end
local
ct
=
0
while
att
~=
0
do
if
bit
.
band
(
att
,
0x1
)
~=
0
then
ct
=
ct
+
1
end
att
=
bit
.
rshift
(
att
,
1
)
end
return
ct
*
200
end
end
function
c22908820
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c22908820
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
c33609093.lua
View file @
0568ff6a
...
@@ -65,14 +65,8 @@ function c33609093.cfilter(c)
...
@@ -65,14 +65,8 @@ function c33609093.cfilter(c)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x137
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x137
)
end
end
function
c33609093
.
tfcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33609093
.
tfcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
att
=
0
local
g
=
Duel
.
GetMatchingGroup
(
c33609093
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c33609093
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tc
=
g
:
GetFirst
()
return
aux
.
GetAttributeCount
(
g
)
>
1
while
tc
do
att
=
bit
.
bor
(
att
,
tc
:
GetAttribute
())
tc
=
g
:
GetNext
()
end
return
bit
.
band
(
att
,
att
-
1
)
~=
0
end
end
function
c33609093
.
tffilter
(
c
,
tp
)
function
c33609093
.
tffilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsSetCard
(
0x137
)
and
not
c
:
IsCode
(
33609093
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsSetCard
(
0x137
)
and
not
c
:
IsCode
(
33609093
)
...
...
c56733747.lua
View file @
0568ff6a
...
@@ -65,7 +65,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -65,7 +65,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
cg
=
Duel
.
GetMatchingGroup
(
s
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
cg
=
Duel
.
GetMatchingGroup
(
s
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
ct
=
cg
:
GetClassCount
(
Card
.
GetAttribute
)
local
ct
=
aux
.
GetAttributeCount
(
cg
)
if
ct
==
0
then
return
end
if
ct
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
ct
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
ct
,
nil
)
...
...
c58116537.lua
View file @
0568ff6a
...
@@ -44,16 +44,7 @@ function c58116537.actcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -44,16 +44,7 @@ function c58116537.actcon(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c58116537
.
acttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c58116537
.
acttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
chk
==
0
then
if
chk
==
0
then
return
aux
.
GetAttributeCount
(
g
)
>
1
end
if
g
:
GetCount
()
==
0
then
return
false
end
local
tc
=
g
:
GetFirst
()
local
att
=
0
while
tc
do
att
=
bit
.
bor
(
att
,
tc
:
GetAttribute
())
tc
=
g
:
GetNext
()
end
return
att
~=
0
end
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
local
att
=
0
local
att
=
0
while
tc
do
while
tc
do
...
...
c62256492.lua
View file @
0568ff6a
...
@@ -42,18 +42,7 @@ function c62256492.atkfilter(c)
...
@@ -42,18 +42,7 @@ function c62256492.atkfilter(c)
end
end
function
c62256492
.
atkval
(
e
,
c
)
function
c62256492
.
atkval
(
e
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c62256492
.
atkfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c62256492
.
atkfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
nil
)
local
att
=
0
return
aux
.
GetAttributeCount
(
g
)
*
300
local
tc
=
g
:
GetFirst
()
while
tc
do
att
=
bit
.
bor
(
att
,
tc
:
GetAttribute
())
tc
=
g
:
GetNext
()
end
local
ct
=
0
while
att
~=
0
do
if
bit
.
band
(
att
,
0x1
)
~=
0
then
ct
=
ct
+
1
end
att
=
bit
.
rshift
(
att
,
1
)
end
return
ct
*
300
end
end
function
c62256492
.
target
(
e
,
c
)
function
c62256492
.
target
(
e
,
c
)
return
c
:
IsSetCard
(
0xbf
,
0x10c0
)
return
c
:
IsSetCard
(
0xbf
,
0x10c0
)
...
...
c62312469.lua
View file @
0568ff6a
...
@@ -32,19 +32,8 @@ function c62312469.atktg(e,c)
...
@@ -32,19 +32,8 @@ function c62312469.atktg(e,c)
end
end
function
c62312469
.
value
(
e
,
c
)
function
c62312469
.
value
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
local
att
=
0
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tc
=
g
:
GetFirst
()
return
aux
.
GetAttributeCount
(
g
)
*
200
while
tc
do
att
=
bit
.
bor
(
att
,
tc
:
GetAttribute
())
tc
=
g
:
GetNext
()
end
local
ct
=
0
while
att
~=
0
do
if
bit
.
band
(
att
,
0x1
)
~=
0
then
ct
=
ct
+
1
end
att
=
bit
.
rshift
(
att
,
1
)
end
return
ct
*
200
end
end
function
c62312469
.
sttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c62312469
.
sttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAttribute
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
ATTRIBUTE_EARTH
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAttribute
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
ATTRIBUTE_EARTH
)
...
...
c65046521.lua
View file @
0568ff6a
...
@@ -42,7 +42,7 @@ function c65046521.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -42,7 +42,7 @@ function c65046521.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
local
mg
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
mg
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
if
mg
:
GetClassCount
(
Card
.
GetAttribute
)
>=
2
and
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
65046521
,
1
))
then
if
aux
.
GetAttributeCount
(
mg
)
>=
2
and
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
65046521
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
...
...
c68957925.lua
View file @
0568ff6a
...
@@ -14,7 +14,7 @@ function c68957925.filter(c)
...
@@ -14,7 +14,7 @@ function c68957925.filter(c)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_LINK
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_LINK
)
end
end
function
c68957925
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c68957925
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ct
=
Duel
.
GetMatchingGroup
(
c68957925
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
):
GetClassCount
(
Card
.
GetAttribute
)
local
ct
=
Duel
.
GetMatchingGroup
(
c68957925
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
):
GetClassCount
(
Card
.
Get
Original
Attribute
)
if
chk
==
0
then
return
(
ct
==
1
and
Duel
.
IsExistingMatchingCard
(
c68957925
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
))
if
chk
==
0
then
return
(
ct
==
1
and
Duel
.
IsExistingMatchingCard
(
c68957925
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
))
or
(
ct
==
2
and
Duel
.
IsExistingMatchingCard
(
c68957925
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
))
or
(
ct
==
2
and
Duel
.
IsExistingMatchingCard
(
c68957925
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
))
or
ct
==
3
or
ct
==
4
or
ct
==
3
or
ct
==
4
...
@@ -38,7 +38,7 @@ function c68957925.desfilter(c)
...
@@ -38,7 +38,7 @@ function c68957925.desfilter(c)
return
c
:
IsFaceup
()
and
c
:
IsAttackBelow
(
3000
)
return
c
:
IsFaceup
()
and
c
:
IsAttackBelow
(
3000
)
end
end
function
c68957925
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c68957925
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
Duel
.
GetMatchingGroup
(
c68957925
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
):
GetClassCount
(
Card
.
GetAttribute
)
local
ct
=
Duel
.
GetMatchingGroup
(
c68957925
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
):
GetClassCount
(
Card
.
Get
Original
Attribute
)
local
g1
=
Duel
.
GetMatchingGroup
(
c68957925
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g1
=
Duel
.
GetMatchingGroup
(
c68957925
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
ct
==
1
and
g1
:
GetCount
()
>
0
then
if
ct
==
1
and
g1
:
GetCount
()
>
0
then
local
tc1
=
g1
:
GetFirst
()
local
tc1
=
g1
:
GetFirst
()
...
...
utility.lua
View file @
0568ff6a
...
@@ -2204,6 +2204,19 @@ end
...
@@ -2204,6 +2204,19 @@ end
function
Auxiliary
.
IsTypeInText
(
c
,
type
)
function
Auxiliary
.
IsTypeInText
(
c
,
type
)
return
c
.
has_text_type
and
type
&
c
.
has_text_type
==
type
return
c
.
has_text_type
and
type
&
c
.
has_text_type
==
type
end
end
function
Auxiliary
.
GetAttributeCount
(
g
)
if
#
g
==
0
then
return
0
end
local
att
=
0
for
tc
in
Auxiliary
.
Next
(
g
)
do
att
=
att
|
tc
:
GetAttribute
()
end
local
ct
=
0
while
att
~=
0
do
if
att
&
0x1
~=
0
then
ct
=
ct
+
1
end
att
=
att
>>
1
end
return
ct
end
function
Auxiliary
.
IsInGroup
(
c
,
g
)
function
Auxiliary
.
IsInGroup
(
c
,
g
)
return
g
:
IsContains
(
c
)
return
g
:
IsContains
(
c
)
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