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
4bb6b8d6
Commit
4bb6b8d6
authored
Mar 19, 2022
by
salix5
Committed by
GitHub
Mar 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add aux.GetCappedValue() (#1830)
parent
698c62fa
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
7 deletions
+16
-7
c29253591.lua
c29253591.lua
+1
-1
c29888389.lua
c29888389.lua
+1
-1
c34334692.lua
c34334692.lua
+1
-1
c4632019.lua
c4632019.lua
+1
-1
c47106439.lua
c47106439.lua
+1
-1
c90307777.lua
c90307777.lua
+1
-1
c92676637.lua
c92676637.lua
+1
-1
constant.lua
constant.lua
+1
-0
utility.lua
utility.lua
+8
-0
No files found.
c29253591.lua
View file @
4bb6b8d6
...
@@ -29,7 +29,7 @@ function c29253591.synlimit(e,c)
...
@@ -29,7 +29,7 @@ function c29253591.synlimit(e,c)
return
not
c
:
IsSetCard
(
0x29
)
return
not
c
:
IsSetCard
(
0x29
)
end
end
function
c29253591
.
slevel
(
e
,
c
)
function
c29253591
.
slevel
(
e
,
c
)
local
lv
=
e
:
GetHandler
():
GetLevel
(
)
local
lv
=
aux
.
GetCappedValue
(
e
:
GetHandler
(),
Card
.
GetLevel
)
return
(
4
<<
16
)
+
lv
return
(
4
<<
16
)
+
lv
end
end
function
c29253591
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c29253591
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
c29888389.lua
View file @
4bb6b8d6
...
@@ -18,7 +18,7 @@ function c29888389.initial_effect(c)
...
@@ -18,7 +18,7 @@ function c29888389.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c29888389
.
rlevel
(
e
,
c
)
function
c29888389
.
rlevel
(
e
,
c
)
local
lv
=
e
:
GetHandler
():
GetLevel
(
)
local
lv
=
aux
.
GetCappedValue
(
e
:
GetHandler
(),
Card
.
GetLevel
)
if
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
then
if
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
then
local
clv
=
c
:
GetLevel
()
local
clv
=
c
:
GetLevel
()
return
(
lv
<<
16
)
+
clv
return
(
lv
<<
16
)
+
clv
...
...
c34334692.lua
View file @
4bb6b8d6
...
@@ -8,7 +8,7 @@ function c34334692.initial_effect(c)
...
@@ -8,7 +8,7 @@ function c34334692.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c34334692
.
rlevel
(
e
,
c
)
function
c34334692
.
rlevel
(
e
,
c
)
local
lv
=
e
:
GetHandler
():
GetLevel
(
)
local
lv
=
aux
.
GetCappedValue
(
e
:
GetHandler
(),
Card
.
GetLevel
)
if
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
then
if
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
then
local
clv
=
c
:
GetLevel
()
local
clv
=
c
:
GetLevel
()
return
(
lv
<<
16
)
+
clv
return
(
lv
<<
16
)
+
clv
...
...
c4632019.lua
View file @
4bb6b8d6
...
@@ -18,7 +18,7 @@ function c4632019.initial_effect(c)
...
@@ -18,7 +18,7 @@ function c4632019.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c4632019
.
synclv
(
e
,
c
)
function
c4632019
.
synclv
(
e
,
c
)
local
lv
=
e
:
GetHandler
():
GetLevel
(
)
local
lv
=
aux
.
GetCappedValue
(
e
:
GetHandler
(),
Card
.
GetLevel
)
return
(
8
<<
16
)
+
lv
return
(
8
<<
16
)
+
lv
end
end
function
c4632019
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4632019
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
c47106439.lua
View file @
4bb6b8d6
...
@@ -18,7 +18,7 @@ function c47106439.initial_effect(c)
...
@@ -18,7 +18,7 @@ function c47106439.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c47106439
.
rlevel
(
e
,
c
)
function
c47106439
.
rlevel
(
e
,
c
)
local
lv
=
e
:
GetHandler
():
GetLevel
(
)
local
lv
=
aux
.
GetCappedValue
(
e
:
GetHandler
(),
Card
.
GetLevel
)
if
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
then
if
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
then
local
clv
=
c
:
GetLevel
()
local
clv
=
c
:
GetLevel
()
return
(
lv
<<
16
)
+
clv
return
(
lv
<<
16
)
+
clv
...
...
c90307777.lua
View file @
4bb6b8d6
...
@@ -20,7 +20,7 @@ function c90307777.initial_effect(c)
...
@@ -20,7 +20,7 @@ function c90307777.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c90307777
.
rlevel
(
e
,
c
)
function
c90307777
.
rlevel
(
e
,
c
)
local
lv
=
e
:
GetHandler
():
GetLevel
(
)
local
lv
=
aux
.
GetCappedValue
(
e
:
GetHandler
(),
Card
.
GetLevel
)
if
c
:
IsSetCard
(
0xb4
)
then
if
c
:
IsSetCard
(
0xb4
)
then
local
clv
=
c
:
GetLevel
()
local
clv
=
c
:
GetLevel
()
return
(
lv
<<
16
)
+
clv
return
(
lv
<<
16
)
+
clv
...
...
c92676637.lua
View file @
4bb6b8d6
...
@@ -21,7 +21,7 @@ function c92676637.initial_effect(c)
...
@@ -21,7 +21,7 @@ function c92676637.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c92676637
.
slevel
(
e
,
c
)
function
c92676637
.
slevel
(
e
,
c
)
local
lv
=
e
:
GetHandler
():
GetLevel
(
)
local
lv
=
aux
.
GetCappedValue
(
e
:
GetHandler
(),
Card
.
GetLevel
)
return
(
2
<<
16
)
+
lv
return
(
2
<<
16
)
+
lv
end
end
function
c92676637
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c92676637
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
constant.lua
View file @
4bb6b8d6
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
MIN_ID
=
1000
--4 digits, by DataManager::GetDesc()
MIN_ID
=
1000
--4 digits, by DataManager::GetDesc()
MAX_ID
=
268435455
--28 bits, by DataManager::GetDesc()
MAX_ID
=
268435455
--28 bits, by DataManager::GetDesc()
MAX_COUNTER
=
65535
--max number for adding/removing counters, by card::add_counter(), field::remove_counter()
MAX_COUNTER
=
65535
--max number for adding/removing counters, by card::add_counter(), field::remove_counter()
MAX_PARAMETER
=
0xffff
--Locations 区域
--Locations 区域
LOCATION_DECK
=
0x01
--卡组
LOCATION_DECK
=
0x01
--卡组
LOCATION_HAND
=
0x02
--手牌
LOCATION_HAND
=
0x02
--手牌
...
...
utility.lua
View file @
4bb6b8d6
...
@@ -2813,3 +2813,11 @@ end
...
@@ -2813,3 +2813,11 @@ end
function
Auxiliary
.
IsSpecialSummonedByEffect
(
e
)
function
Auxiliary
.
IsSpecialSummonedByEffect
(
e
)
return
not
((
e
:
GetCode
()
==
EFFECT_SPSUMMON_PROC
or
e
:
GetCode
()
==
EFFECT_SPSUMMON_PROC_G
)
and
e
:
GetProperty
()
&
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
==
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
))
return
not
((
e
:
GetCode
()
==
EFFECT_SPSUMMON_PROC
or
e
:
GetCode
()
==
EFFECT_SPSUMMON_PROC_G
)
and
e
:
GetProperty
()
&
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
==
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
))
end
end
--
function
Auxiliary
.
GetCappedValue
(
c
,
f
)
if
f
(
c
)
>
MAX_PARAMETER
then
return
MAX_PARAMETER
else
return
f
(
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