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
e45f2898
Commit
e45f2898
authored
Nov 28, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add effect flag in Card.RegisterEffect
parent
343115bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
effect.h
effect.h
+9
-0
libcard.cpp
libcard.cpp
+4
-0
No files found.
effect.h
View file @
e45f2898
...
@@ -215,6 +215,9 @@ enum effect_flag : uint64 {
...
@@ -215,6 +215,9 @@ enum effect_flag : uint64 {
EFFECT_FLAG_ACTIVATE_CONDITION
=
0x20000000
,
EFFECT_FLAG_ACTIVATE_CONDITION
=
0x20000000
,
// EFFECT_FLAG_CVAL_CHECK = 0x40000000,
// EFFECT_FLAG_CVAL_CHECK = 0x40000000,
EFFECT_FLAG_IMMEDIATELY_APPLY
=
0x80000000
,
EFFECT_FLAG_IMMEDIATELY_APPLY
=
0x80000000
,
EFFECT_FLAG_COIN
=
0x100000000
,
EFFECT_FLAG_DICE
=
0x200000000
,
EFFECT_FLAG_FUSION_SUMMON
=
0x400000000
,
};
};
enum
effect_flag2
:
uint64
{
enum
effect_flag2
:
uint64
{
EFFECT_FLAG2_REPEAT_UPDATE
=
0x0001
,
EFFECT_FLAG2_REPEAT_UPDATE
=
0x0001
,
...
@@ -263,6 +266,12 @@ enum effect_category :uint64 {
...
@@ -263,6 +266,12 @@ enum effect_category :uint64 {
CATEGORY_TOEXTRA
=
0x80000000
,
CATEGORY_TOEXTRA
=
0x80000000
,
};
};
const
std
::
map
<
uint64
,
uint64
>
category_checklist
{
{
CATEGORY_COIN
,
EFFECT_FLAG_COIN
},
{
CATEGORY_DICE
,
EFFECT_FLAG_DICE
},
{
CATEGORY_FUSION_SUMMON
,
EFFECT_FLAG_FUSION_SUMMON
},
};
//========== Codes ==========
//========== Codes ==========
#define EFFECT_IMMUNE_EFFECT 1 //
#define EFFECT_IMMUNE_EFFECT 1 //
#define EFFECT_DISABLE 2 //
#define EFFECT_DISABLE 2 //
...
...
libcard.cpp
View file @
e45f2898
...
@@ -1828,6 +1828,10 @@ int32 scriptlib::card_register_effect(lua_State *L) {
...
@@ -1828,6 +1828,10 @@ int32 scriptlib::card_register_effect(lua_State *L) {
pduel
->
game_field
->
core
.
reseted_effects
.
insert
(
peffect
);
pduel
->
game_field
->
core
.
reseted_effects
.
insert
(
peffect
);
return
0
;
return
0
;
}
}
for
(
auto
&
entry
:
category_checklist
)
{
if
(
peffect
->
category
&
entry
.
first
)
peffect
->
flag
[
0
]
|=
entry
.
second
;
}
int32
id
;
int32
id
;
if
(
peffect
->
handler
)
if
(
peffect
->
handler
)
id
=
-
1
;
id
=
-
1
;
...
...
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