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
ea1d5b9f
Commit
ea1d5b9f
authored
Nov 30, 2024
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/patch-flag' into develop
parents
3c13a8c8
d78a4a69
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
effect.h
effect.h
+3
-3
libcard.cpp
libcard.cpp
+1
-1
libduel.cpp
libduel.cpp
+1
-1
libeffect.cpp
libeffect.cpp
+2
-2
No files found.
effect.h
View file @
ea1d5b9f
...
@@ -226,12 +226,12 @@ enum effect_flag2 : uint64 {
...
@@ -226,12 +226,12 @@ enum effect_flag2 : uint64 {
EFFECT_FLAG2_OPTION
=
0x0008
,
EFFECT_FLAG2_OPTION
=
0x0008
,
};
};
constexpr
effect_flag
operator
|
(
effect_flag
flag1
,
effect_flag
flag2
)
{
constexpr
effect_flag
operator
|
(
effect_flag
flag1
,
effect_flag
flag2
)
{
return
static_cast
<
effect_flag
>
(
static_cast
<
uint
32
>
(
flag1
)
|
static_cast
<
uint32
>
(
flag2
));
return
static_cast
<
effect_flag
>
(
static_cast
<
uint
64
>
(
flag1
)
|
static_cast
<
uint64
>
(
flag2
));
}
}
constexpr
uint
32
INTERNAL_FLAGS
=
EFFECT_FLAG_INITIAL
|
EFFECT_FLAG_COPY
|
EFFECT_FLAG_FUNC_VALUE
|
EFFECT_FLAG_COUNT_LIMIT
|
EFFECT_FLAG_FIELD_ONLY
|
EFFECT_FLAG_ABSOLUTE_TARGET
;
constexpr
uint
64
INTERNAL_FLAGS
=
EFFECT_FLAG_INITIAL
|
EFFECT_FLAG_COPY
|
EFFECT_FLAG_FUNC_VALUE
|
EFFECT_FLAG_COUNT_LIMIT
|
EFFECT_FLAG_FIELD_ONLY
|
EFFECT_FLAG_ABSOLUTE_TARGET
;
//Category
//Category
enum
effect_category
:
uint64
{
enum
effect_category
:
uint64
{
CATEGORY_DESTROY
=
0x1
,
CATEGORY_DESTROY
=
0x1
,
CATEGORY_RELEASE
=
0x2
,
CATEGORY_RELEASE
=
0x2
,
CATEGORY_REMOVE
=
0x4
,
CATEGORY_REMOVE
=
0x4
,
...
...
libcard.cpp
View file @
ea1d5b9f
...
@@ -1895,7 +1895,7 @@ int32 scriptlib::card_register_flag_effect(lua_State *L) {
...
@@ -1895,7 +1895,7 @@ int32 scriptlib::card_register_flag_effect(lua_State *L) {
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
int32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT_FLAG_EFFECT
;
int32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT_FLAG_EFFECT
;
int32
reset
=
(
int32
)
lua_tointeger
(
L
,
3
);
int32
reset
=
(
int32
)
lua_tointeger
(
L
,
3
);
uint
32
flag
=
(
uint32
)
lua_tointeger
(
L
,
4
);
uint
64
flag
=
lua_tointeger
(
L
,
4
);
int32
count
=
(
int32
)
lua_tointeger
(
L
,
5
);
int32
count
=
(
int32
)
lua_tointeger
(
L
,
5
);
lua_Integer
lab
=
0
;
lua_Integer
lab
=
0
;
int32
desc
=
0
;
int32
desc
=
0
;
...
...
libduel.cpp
View file @
ea1d5b9f
...
@@ -97,7 +97,7 @@ int32 scriptlib::duel_register_flag_effect(lua_State *L) {
...
@@ -97,7 +97,7 @@ int32 scriptlib::duel_register_flag_effect(lua_State *L) {
return
0
;
return
0
;
int32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT_FLAG_EFFECT
;
int32
code
=
(
lua_tointeger
(
L
,
2
)
&
MAX_CARD_ID
)
|
EFFECT_FLAG_EFFECT
;
int32
reset
=
(
int32
)
lua_tointeger
(
L
,
3
);
int32
reset
=
(
int32
)
lua_tointeger
(
L
,
3
);
uint
32
flag
=
(
uint32
)
lua_tointeger
(
L
,
4
);
uint
64
flag
=
lua_tointeger
(
L
,
4
);
int32
count
=
(
int32
)
lua_tointeger
(
L
,
5
);
int32
count
=
(
int32
)
lua_tointeger
(
L
,
5
);
lua_Integer
lab
=
0
;
lua_Integer
lab
=
0
;
if
(
lua_gettop
(
L
)
>=
6
)
if
(
lua_gettop
(
L
)
>=
6
)
...
...
libeffect.cpp
View file @
ea1d5b9f
...
@@ -226,8 +226,8 @@ int32 scriptlib::effect_set_property(lua_State *L) {
...
@@ -226,8 +226,8 @@ int32 scriptlib::effect_set_property(lua_State *L) {
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
uint
32
v1
=
(
uint32
)
lua_tointeger
(
L
,
2
);
uint
64
v1
=
lua_tointeger
(
L
,
2
);
uint
32
v2
=
(
uint32
)
lua_tointeger
(
L
,
3
);
uint
64
v2
=
lua_tointeger
(
L
,
3
);
peffect
->
flag
[
0
]
=
(
peffect
->
flag
[
0
]
&
INTERNAL_FLAGS
)
|
(
v1
&
~
INTERNAL_FLAGS
);
peffect
->
flag
[
0
]
=
(
peffect
->
flag
[
0
]
&
INTERNAL_FLAGS
)
|
(
v1
&
~
INTERNAL_FLAGS
);
peffect
->
flag
[
1
]
=
v2
;
peffect
->
flag
[
1
]
=
v2
;
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