Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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
nanahira
ygopro-core
Commits
9a15ea11
Commit
9a15ea11
authored
Nov 21, 2024
by
Chen Bill
Committed by
GitHub
Nov 21, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
effect: use uint64 label (#667)
parent
87a3541a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
9 deletions
+8
-9
effect.h
effect.h
+1
-1
libcard.cpp
libcard.cpp
+3
-3
libduel.cpp
libduel.cpp
+3
-3
libeffect.cpp
libeffect.cpp
+1
-2
No files found.
effect.h
View file @
9a15ea11
...
@@ -52,7 +52,7 @@ public:
...
@@ -52,7 +52,7 @@ public:
uint16
active_sequence
{
0
};
uint16
active_sequence
{
0
};
card
*
active_handler
{
nullptr
};
card
*
active_handler
{
nullptr
};
uint16
status
{
0
};
uint16
status
{
0
};
std
::
vector
<
uint
32
>
label
;
std
::
vector
<
uint
64
>
label
;
int32
label_object
{
0
};
int32
label_object
{
0
};
int32
condition
{
0
};
int32
condition
{
0
};
int32
cost
{
0
};
int32
cost
{
0
};
...
...
libcard.cpp
View file @
9a15ea11
...
@@ -1893,10 +1893,10 @@ int32 scriptlib::card_register_flag_effect(lua_State *L) {
...
@@ -1893,10 +1893,10 @@ int32 scriptlib::card_register_flag_effect(lua_State *L) {
int32
reset
=
(
int32
)
lua_tointeger
(
L
,
3
);
int32
reset
=
(
int32
)
lua_tointeger
(
L
,
3
);
uint32
flag
=
(
uint32
)
lua_tointeger
(
L
,
4
);
uint32
flag
=
(
uint32
)
lua_tointeger
(
L
,
4
);
int32
count
=
(
int32
)
lua_tointeger
(
L
,
5
);
int32
count
=
(
int32
)
lua_tointeger
(
L
,
5
);
int32
lab
=
0
;
lua_Integer
lab
=
0
;
int32
desc
=
0
;
int32
desc
=
0
;
if
(
lua_gettop
(
L
)
>=
6
)
if
(
lua_gettop
(
L
)
>=
6
)
lab
=
(
int32
)
lua_tointeger
(
L
,
6
);
lab
=
lua_tointeger
(
L
,
6
);
if
(
lua_gettop
(
L
)
>=
7
)
if
(
lua_gettop
(
L
)
>=
7
)
desc
=
(
int32
)
lua_tointeger
(
L
,
7
);
desc
=
(
int32
)
lua_tointeger
(
L
,
7
);
if
(
count
==
0
)
if
(
count
==
0
)
...
@@ -1940,7 +1940,7 @@ int32 scriptlib::card_set_flag_effect_label(lua_State *L) {
...
@@ -1940,7 +1940,7 @@ int32 scriptlib::card_set_flag_effect_label(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT_FLAG_EFFECT
;
uint32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT_FLAG_EFFECT
;
int32
lab
=
(
int32
)
lua_tointeger
(
L
,
3
);
auto
lab
=
lua_tointeger
(
L
,
3
);
auto
eit
=
pcard
->
single_effect
.
find
(
code
);
auto
eit
=
pcard
->
single_effect
.
find
(
code
);
if
(
eit
==
pcard
->
single_effect
.
end
())
if
(
eit
==
pcard
->
single_effect
.
end
())
lua_pushboolean
(
L
,
FALSE
);
lua_pushboolean
(
L
,
FALSE
);
...
...
libduel.cpp
View file @
9a15ea11
...
@@ -99,9 +99,9 @@ int32 scriptlib::duel_register_flag_effect(lua_State *L) {
...
@@ -99,9 +99,9 @@ int32 scriptlib::duel_register_flag_effect(lua_State *L) {
int32
reset
=
(
int32
)
lua_tointeger
(
L
,
3
);
int32
reset
=
(
int32
)
lua_tointeger
(
L
,
3
);
uint32
flag
=
(
uint32
)
lua_tointeger
(
L
,
4
);
uint32
flag
=
(
uint32
)
lua_tointeger
(
L
,
4
);
int32
count
=
(
int32
)
lua_tointeger
(
L
,
5
);
int32
count
=
(
int32
)
lua_tointeger
(
L
,
5
);
int32
lab
=
0
;
lua_Integer
lab
=
0
;
if
(
lua_gettop
(
L
)
>=
6
)
if
(
lua_gettop
(
L
)
>=
6
)
lab
=
(
int32
)
lua_tointeger
(
L
,
6
);
lab
=
lua_tointeger
(
L
,
6
);
if
(
count
==
0
)
if
(
count
==
0
)
count
=
1
;
count
=
1
;
if
(
reset
&
(
RESET_PHASE
)
&&
!
(
reset
&
(
RESET_SELF_TURN
|
RESET_OPPO_TURN
)))
if
(
reset
&
(
RESET_PHASE
)
&&
!
(
reset
&
(
RESET_SELF_TURN
|
RESET_OPPO_TURN
)))
...
@@ -157,7 +157,7 @@ int32 scriptlib::duel_set_flag_effect_label(lua_State *L) {
...
@@ -157,7 +157,7 @@ int32 scriptlib::duel_set_flag_effect_label(lua_State *L) {
if
(
playerid
!=
0
&&
playerid
!=
1
)
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
return
0
;
uint32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT_FLAG_EFFECT
;
uint32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT_FLAG_EFFECT
;
int32
lab
=
(
int32
)
lua_tointeger
(
L
,
3
);
auto
lab
=
lua_tointeger
(
L
,
3
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
effect_set
eset
;
effect_set
eset
;
pduel
->
game_field
->
filter_player_effect
(
playerid
,
code
,
&
eset
);
pduel
->
game_field
->
filter_player_effect
(
playerid
,
code
,
&
eset
);
...
...
libeffect.cpp
View file @
9a15ea11
...
@@ -238,8 +238,7 @@ int32 scriptlib::effect_set_label(lua_State *L) {
...
@@ -238,8 +238,7 @@ int32 scriptlib::effect_set_label(lua_State *L) {
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
peffect
->
label
.
clear
();
peffect
->
label
.
clear
();
for
(
int32
i
=
2
;
i
<=
lua_gettop
(
L
);
++
i
)
{
for
(
int32
i
=
2
;
i
<=
lua_gettop
(
L
);
++
i
)
{
uint32
v
=
(
uint32
)
lua_tointeger
(
L
,
i
);
peffect
->
label
.
push_back
(
lua_tointeger
(
L
,
i
));
peffect
->
label
.
push_back
(
v
);
}
}
return
0
;
return
0
;
}
}
...
...
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