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
efc65786
Commit
efc65786
authored
Feb 13, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add EFFECT_ALLOW_FOR_SYNCHRO
parent
fe48b4fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
card.cpp
card.cpp
+25
-2
effect.h
effect.h
+1
-0
No files found.
card.cpp
View file @
efc65786
...
...
@@ -1019,7 +1019,18 @@ uint32_t card::get_link() {
}
uint32_t card::get_synchro_level(card* pcard) {
if((data.type & (TYPE_XYZ | TYPE_LINK)) || (status & STATUS_NO_LEVEL))
{
effect_set eset;
filter_effect(EFFECT_ALLOW_FOR_SYNCHRO, &eset);
for(int32_t i = 0; i < eset.size(); ++i) {
uint32_t lev = eset[i]->get_value(pcard);
if(lev) {
return lev;
}
}
return 0;
}
//return 0;
uint32_t lev;
effect_set eset;
filter_effect(EFFECT_SYNCHRO_LEVEL, &eset);
...
...
@@ -4077,7 +4088,19 @@ int32_t card::is_can_be_fusion_material(card* fcard, uint32_t summon_type) {
return TRUE;
}
int32_t card::is_can_be_synchro_material(card* scard, card* tuner) {
if
(
data
.
type
&
(
TYPE_XYZ
|
TYPE_LINK
))
effect_set eset;
if(data.type & (TYPE_XYZ | TYPE_LINK)) {
filter_effect(EFFECT_ALLOW_FOR_SYNCHRO, &eset);
auto found = FALSE;
for(int32_t i = 0; i < eset.size(); ++i) {
if(eset[i]->get_value(scard)) {
found = TRUE;
break;
}
}
if(!found)
return FALSE;
}
return FALSE;
if(!(get_synchro_type() & TYPE_MONSTER))
return FALSE;
...
...
@@ -4088,7 +4111,7 @@ int32_t card::is_can_be_synchro_material(card* scard, card* tuner) {
if(is_affected_by_effect(EFFECT_SCRAP_CHIMERA, tuner))
return false;
}
e
ffect_set
eset
;
e
set.clear()
;
filter_effect(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL, &eset);
for(int32_t i = 0; i < eset.size(); ++i)
if(eset[i]->get_value(scard))
...
...
effect.h
View file @
efc65786
...
...
@@ -530,6 +530,7 @@ const std::map<uint64_t, uint64_t> category_checklist{
#define EFFECT_KAISER_COLOSSEUM 370
#define EFFECT_REPLACE_DAMAGE 371
#define EFFECT_XYZ_MIN_COUNT 372
#define EFFECT_ALLOW_FOR_SYNCHRO 373
//#define EVENT_STARTUP 1000
#define EVENT_FLIP 1001
...
...
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