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
11de7027
Commit
11de7027
authored
Aug 06, 2023
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename HEADER_FLAG_EFFECT to EFFECT_FLAG_EFFECT
parent
bab7d057
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
effect.h
effect.h
+1
-1
libcard.cpp
libcard.cpp
+5
-5
libduel.cpp
libduel.cpp
+5
-5
No files found.
effect.h
View file @
11de7027
...
...
@@ -550,7 +550,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define HALF_DAMAGE 0x80000001
// flag effect
#define
HEADER
_FLAG_EFFECT 0x20000000
#define
EFFECT
_FLAG_EFFECT 0x20000000
#define MAX_CARD_ID 0xfffffff
// The type of effect code
...
...
libcard.cpp
View file @
11de7027
...
...
@@ -1793,7 +1793,7 @@ int32 scriptlib::card_register_flag_effect(lua_State *L) {
check_param_count
(
L
,
5
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
int32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
HEADER
_FLAG_EFFECT
;
int32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT
_FLAG_EFFECT
;
int32
reset
=
(
int32
)
lua_tointeger
(
L
,
3
);
int32
flag
=
(
int32
)
lua_tointeger
(
L
,
4
);
int32
count
=
(
int32
)
lua_tointeger
(
L
,
5
);
...
...
@@ -1827,7 +1827,7 @@ int32 scriptlib::card_get_flag_effect(lua_State *L) {
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
int32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
HEADER
_FLAG_EFFECT
;
int32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT
_FLAG_EFFECT
;
lua_pushinteger
(
L
,
pcard
->
single_effect
.
count
(
code
));
return
1
;
}
...
...
@@ -1835,7 +1835,7 @@ int32 scriptlib::card_reset_flag_effect(lua_State *L) {
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
int32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
HEADER
_FLAG_EFFECT
;
int32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT
_FLAG_EFFECT
;
pcard
->
reset
(
code
,
RESET_CODE
);
return
0
;
}
...
...
@@ -1843,7 +1843,7 @@ int32 scriptlib::card_set_flag_effect_label(lua_State *L) {
check_param_count
(
L
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
HEADER
_FLAG_EFFECT
;
uint32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT
_FLAG_EFFECT
;
int32
lab
=
(
int32
)
lua_tointeger
(
L
,
3
);
auto
eit
=
pcard
->
single_effect
.
find
(
code
);
if
(
eit
==
pcard
->
single_effect
.
end
())
...
...
@@ -1859,7 +1859,7 @@ int32 scriptlib::card_get_flag_effect_label(lua_State *L) {
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
HEADER
_FLAG_EFFECT
;
uint32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT
_FLAG_EFFECT
;
auto
rg
=
pcard
->
single_effect
.
equal_range
(
code
);
int32
count
=
0
;
for
(;
rg
.
first
!=
rg
.
second
;
++
rg
.
first
,
++
count
)
...
...
libduel.cpp
View file @
11de7027
...
...
@@ -85,7 +85,7 @@ int32 scriptlib::duel_register_flag_effect(lua_State *L) {
int32
playerid
=
(
int32
)
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
int32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
HEADER
_FLAG_EFFECT
;
int32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT
_FLAG_EFFECT
;
int32
reset
=
(
int32
)
lua_tointeger
(
L
,
3
);
int32
flag
=
(
int32
)
lua_tointeger
(
L
,
4
);
int32
count
=
(
int32
)
lua_tointeger
(
L
,
5
);
...
...
@@ -118,7 +118,7 @@ int32 scriptlib::duel_get_flag_effect(lua_State *L) {
int32
playerid
=
(
int32
)
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
int32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
HEADER
_FLAG_EFFECT
;
int32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT
_FLAG_EFFECT
;
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
effect_set
eset
;
pduel
->
game_field
->
filter_player_effect
(
playerid
,
code
,
&
eset
);
...
...
@@ -130,7 +130,7 @@ int32 scriptlib::duel_reset_flag_effect(lua_State *L) {
int32
playerid
=
(
int32
)
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
uint32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
HEADER
_FLAG_EFFECT
;
uint32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT
_FLAG_EFFECT
;
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
auto
pr
=
pduel
->
game_field
->
effects
.
aura_effect
.
equal_range
(
code
);
for
(;
pr
.
first
!=
pr
.
second
;
)
{
...
...
@@ -146,7 +146,7 @@ int32 scriptlib::duel_set_flag_effect_label(lua_State *L) {
int32
playerid
=
(
int32
)
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
uint32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
HEADER
_FLAG_EFFECT
;
uint32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT
_FLAG_EFFECT
;
int32
lab
=
(
int32
)
lua_tointeger
(
L
,
3
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
effect_set
eset
;
...
...
@@ -165,7 +165,7 @@ int32 scriptlib::duel_get_flag_effect_label(lua_State *L) {
int32
playerid
=
(
int32
)
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
uint32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
HEADER
_FLAG_EFFECT
;
uint32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT
_FLAG_EFFECT
;
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
effect_set
eset
;
pduel
->
game_field
->
filter_player_effect
(
playerid
,
code
,
&
eset
);
...
...
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