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
71b4c40b
Commit
71b4c40b
authored
Aug 30, 2022
by
salix5
Committed by
GitHub
Aug 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix card::add_effect() (#464)
Now trigger-like effects cannot use continuous_event.
parent
5ba39d79
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
card.cpp
card.cpp
+1
-1
effect.h
effect.h
+4
-2
No files found.
card.cpp
View file @
71b4c40b
...
...
@@ -1571,7 +1571,7 @@ int32 card::add_effect(effect* peffect) {
if
(
peffect
->
type
&
EFFECT_TYPE_SINGLE
&&
!
peffect
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
)
&&
peffect
->
owner
==
this
&&
get_status
(
STATUS_DISABLED
)
&&
(
peffect
->
reset_flag
&
RESET_DISABLE
))
return
0
;
if
(
!
(
peffect
->
type
&
EFFECT_TYPE_CONTINUOUS
)
&&
is_continuous_event
(
peffect
->
code
))
if
(
peffect
->
type
&
EFFECT_TYPES_TRIGGER_LIKE
&&
is_continuous_event
(
peffect
->
code
))
return
0
;
// the trigger effect in phase is "once per turn" by default
if
(
peffect
->
get_code_type
()
==
CODE_PHASE
&&
peffect
->
code
&
(
PHASE_DRAW
|
PHASE_STANDBY
|
PHASE_END
)
&&
peffect
->
type
&
(
EFFECT_TYPE_TRIGGER_O
|
EFFECT_TYPE_TRIGGER_F
)
...
...
effect.h
View file @
71b4c40b
...
...
@@ -166,6 +166,8 @@ public:
#define EFFECT_TYPE_GRANT 0x2000 //
#define EFFECT_TYPE_TARGET 0x4000 //
#define EFFECT_TYPES_TRIGGER_LIKE (EFFECT_TYPE_ACTIVATE | EFFECT_TYPE_TRIGGER_O | EFFECT_TYPE_TRIGGER_F | EFFECT_TYPE_QUICK_O | EFFECT_TYPE_QUICK_F)
//========== Flags ==========
enum
effect_flag
:
uint32
{
EFFECT_FLAG_INITIAL
=
0x0001
,
...
...
@@ -466,7 +468,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_ACTIVATION_COUNT_LIMIT 367
#define EFFECT_LIMIT_SPECIAL_SUMMON_POSITION 368
#define EVENT_STARTUP 1000
//
#define EVENT_STARTUP 1000
#define EVENT_FLIP 1001
#define EVENT_FREE_CHAIN 1002
#define EVENT_DESTROY 1010
...
...
@@ -543,7 +545,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define DOUBLE_DAMAGE 0x80000000
#define HALF_DAMAGE 0x80000001
// The type of
bit field
in code
// The type of
event
in code
#define CODE_CUSTOM 1 // header + id (28 bits)
#define CODE_COUNTER 2 // header + counter_id (16 bits)
#define CODE_PHASE 3 // header + phase_id (12 bits)
...
...
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