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
d57237d1
Commit
d57237d1
authored
Nov 29, 2024
by
Nanahira
Committed by
GitHub
Nov 29, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #24 from mycard/develop-8888
Develop 8888
parents
1df6818e
7ae9d7ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
0 deletions
+51
-0
effect.h
effect.h
+47
-0
libcard.cpp
libcard.cpp
+4
-0
No files found.
effect.h
View file @
d57237d1
...
@@ -22,6 +22,7 @@ struct effect_set;
...
@@ -22,6 +22,7 @@ struct effect_set;
struct
effect_set_v
;
struct
effect_set_v
;
enum
effect_flag
:
uint64
;
enum
effect_flag
:
uint64
;
enum
effect_flag2
:
uint64
;
enum
effect_flag2
:
uint64
;
enum
effect_category
:
uint64
;
enum
code_type
:
int32
;
enum
code_type
:
int32
;
bool
is_continuous_event
(
uint32
code
);
bool
is_continuous_event
(
uint32
code
);
...
@@ -231,6 +232,9 @@ enum effect_flag : uint64 {
...
@@ -231,6 +232,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
,
...
@@ -245,6 +249,49 @@ constexpr effect_flag operator|(effect_flag flag1, effect_flag flag2) {
...
@@ -245,6 +249,49 @@ constexpr effect_flag operator|(effect_flag flag1, effect_flag flag2) {
return
static_cast
<
effect_flag
>
(
static_cast
<
uint32
>
(
flag1
)
|
static_cast
<
uint32
>
(
flag2
));
return
static_cast
<
effect_flag
>
(
static_cast
<
uint32
>
(
flag1
)
|
static_cast
<
uint32
>
(
flag2
));
}
}
constexpr
uint32
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
uint32
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
enum
effect_category
:
uint64
{
CATEGORY_DESTROY
=
0x1
,
CATEGORY_RELEASE
=
0x2
,
CATEGORY_REMOVE
=
0x4
,
CATEGORY_TOHAND
=
0x8
,
CATEGORY_TODECK
=
0x10
,
CATEGORY_TOGRAVE
=
0x20
,
CATEGORY_DECKDES
=
0x40
,
CATEGORY_HANDES
=
0x80
,
CATEGORY_SUMMON
=
0x100
,
CATEGORY_SPECIAL_SUMMON
=
0x200
,
CATEGORY_TOKEN
=
0x400
,
CATEGORY_GRAVE_ACTION
=
0x800
,
CATEGORY_POSITION
=
0x1000
,
CATEGORY_CONTROL
=
0x2000
,
CATEGORY_DISABLE
=
0x4000
,
CATEGORY_DISABLE_SUMMON
=
0x8000
,
CATEGORY_DRAW
=
0x10000
,
CATEGORY_SEARCH
=
0x20000
,
CATEGORY_EQUIP
=
0x40000
,
CATEGORY_DAMAGE
=
0x80000
,
CATEGORY_RECOVER
=
0x100000
,
CATEGORY_ATKCHANGE
=
0x200000
,
CATEGORY_DEFCHANGE
=
0x400000
,
CATEGORY_COUNTER
=
0x800000
,
CATEGORY_COIN
=
0x1000000
,
CATEGORY_DICE
=
0x2000000
,
CATEGORY_LEAVE_GRAVE
=
0x4000000
,
CATEGORY_GRAVE_SPSUMMON
=
0x8000000
,
CATEGORY_NEGATE
=
0x10000000
,
CATEGORY_ANNOUNCE
=
0x20000000
,
CATEGORY_FUSION_SUMMON
=
0x40000000
,
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 @
d57237d1
...
@@ -1959,6 +1959,10 @@ int32 scriptlib::card_register_effect(lua_State *L) {
...
@@ -1959,6 +1959,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