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
6ed45241
Commit
6ed45241
authored
Apr 30, 2024
by
mercury233
Committed by
GitHub
Apr 30, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add EFFECT_FLAG_ACTIVATE_CONDITION (#571)
parent
675678a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
effect.h
effect.h
+1
-1
processor.cpp
processor.cpp
+11
-7
No files found.
effect.h
View file @
6ed45241
...
@@ -201,7 +201,7 @@ enum effect_flag : uint32 {
...
@@ -201,7 +201,7 @@ enum effect_flag : uint32 {
EFFECT_FLAG_CLIENT_HINT
=
0x4000000
,
EFFECT_FLAG_CLIENT_HINT
=
0x4000000
,
EFFECT_FLAG_CONTINUOUS_TARGET
=
0x8000000
,
EFFECT_FLAG_CONTINUOUS_TARGET
=
0x8000000
,
EFFECT_FLAG_LIMIT_ZONE
=
0x10000000
,
EFFECT_FLAG_LIMIT_ZONE
=
0x10000000
,
// EFFECT_FLAG_COF
= 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
,
};
};
...
...
processor.cpp
View file @
6ed45241
...
@@ -1317,7 +1317,8 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
...
@@ -1317,7 +1317,8 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
clit
->
set_triggering_state
(
phandler
);
clit
->
set_triggering_state
(
phandler
);
}
}
uint8
tp
=
clit
->
triggering_player
;
uint8
tp
=
clit
->
triggering_player
;
if
(
check_trigger_effect
(
*
clit
)
&&
peffect
->
is_chainable
(
tp
)
&&
peffect
->
is_activateable
(
tp
,
clit
->
evt
,
TRUE
))
{
if
(
check_trigger_effect
(
*
clit
)
&&
peffect
->
is_chainable
(
tp
)
&&
peffect
->
is_activateable
(
tp
,
clit
->
evt
,
!
peffect
->
is_flag
(
EFFECT_FLAG_ACTIVATE_CONDITION
)))
{
if
(
tp
==
core
.
current_player
)
if
(
tp
==
core
.
current_player
)
core
.
select_chains
.
push_back
(
*
clit
);
core
.
select_chains
.
push_back
(
*
clit
);
}
else
{
}
else
{
...
@@ -1378,8 +1379,8 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
...
@@ -1378,8 +1379,8 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
clit
->
set_triggering_state
(
phandler
);
clit
->
set_triggering_state
(
phandler
);
}
}
uint8
tp
=
clit
->
triggering_player
;
uint8
tp
=
clit
->
triggering_player
;
if
(
check_nonpublic_trigger
(
*
clit
)
&&
check_trigger_effect
(
*
clit
)
if
(
check_nonpublic_trigger
(
*
clit
)
&&
check_trigger_effect
(
*
clit
)
&&
peffect
->
is_chainable
(
tp
)
&&
peffect
->
is_
chainable
(
tp
)
&&
peffect
->
is_activateable
(
tp
,
clit
->
evt
,
TRUE
)
&&
peffect
->
is_
activateable
(
tp
,
clit
->
evt
,
!
peffect
->
is_flag
(
EFFECT_FLAG_ACTIVATE_CONDITION
)
)
&&
check_spself_from_hand_trigger
(
*
clit
))
{
&&
check_spself_from_hand_trigger
(
*
clit
))
{
if
(
tp
==
core
.
current_player
)
if
(
tp
==
core
.
current_player
)
core
.
select_chains
.
push_back
(
*
clit
);
core
.
select_chains
.
push_back
(
*
clit
);
...
@@ -1723,7 +1724,7 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
...
@@ -1723,7 +1724,7 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
const
tevent
&
evt
=
eit
->
second
;
const
tevent
&
evt
=
eit
->
second
;
++
eit
;
++
eit
;
peffect
->
set_activate_location
();
peffect
->
set_activate_location
();
if
(
peffect
->
is_chainable
(
priority
)
&&
peffect
->
is_activateable
(
priority
,
evt
,
TRUE
,
FALSE
,
FALSE
))
{
if
(
peffect
->
is_chainable
(
priority
)
&&
peffect
->
is_activateable
(
priority
,
evt
,
TRUE
))
{
card
*
phandler
=
peffect
->
get_handler
();
card
*
phandler
=
peffect
->
get_handler
();
newchain
.
flag
=
0
;
newchain
.
flag
=
0
;
newchain
.
chain_id
=
infos
.
field_id
++
;
newchain
.
chain_id
=
infos
.
field_id
++
;
...
@@ -1855,7 +1856,9 @@ int32 field::process_instant_event() {
...
@@ -1855,7 +1856,9 @@ int32 field::process_instant_event() {
effect
*
peffect
=
eit
->
second
;
effect
*
peffect
=
eit
->
second
;
++
eit
;
++
eit
;
card
*
phandler
=
peffect
->
get_handler
();
card
*
phandler
=
peffect
->
get_handler
();
if
(
!
phandler
->
is_status
(
STATUS_EFFECT_ENABLED
)
||
!
peffect
->
is_condition_check
(
phandler
->
current
.
controler
,
ev
))
if
(
!
phandler
->
is_status
(
STATUS_EFFECT_ENABLED
))
continue
;
if
(
!
peffect
->
is_flag
(
EFFECT_FLAG_ACTIVATE_CONDITION
)
&&
!
peffect
->
is_condition_check
(
phandler
->
current
.
controler
,
ev
))
continue
;
continue
;
peffect
->
set_activate_location
();
peffect
->
set_activate_location
();
newchain
.
flag
=
0
;
newchain
.
flag
=
0
;
...
@@ -1875,7 +1878,8 @@ int32 field::process_instant_event() {
...
@@ -1875,7 +1878,8 @@ int32 field::process_instant_event() {
effect
*
peffect
=
eit
->
second
;
effect
*
peffect
=
eit
->
second
;
++
eit
;
++
eit
;
card
*
phandler
=
peffect
->
get_handler
();
card
*
phandler
=
peffect
->
get_handler
();
bool
act
=
phandler
->
is_status
(
STATUS_EFFECT_ENABLED
)
&&
peffect
->
is_condition_check
(
phandler
->
current
.
controler
,
ev
);
bool
act
=
phandler
->
is_status
(
STATUS_EFFECT_ENABLED
)
&&
(
peffect
->
is_flag
(
EFFECT_FLAG_ACTIVATE_CONDITION
)
||
peffect
->
is_condition_check
(
phandler
->
current
.
controler
,
ev
));
if
(
!
act
&&
!
(
peffect
->
range
&
LOCATION_HAND
))
if
(
!
act
&&
!
(
peffect
->
range
&
LOCATION_HAND
))
continue
;
continue
;
peffect
->
set_activate_location
();
peffect
->
set_activate_location
();
...
@@ -2009,7 +2013,7 @@ int32 field::process_single_event(effect* peffect, const tevent& e, chain_list&
...
@@ -2009,7 +2013,7 @@ int32 field::process_single_event(effect* peffect, const tevent& e, chain_list&
}
}
}
else
{
}
else
{
card
*
phandler
=
peffect
->
get_handler
();
card
*
phandler
=
peffect
->
get_handler
();
if
(
!
peffect
->
is_condition_check
(
phandler
->
current
.
controler
,
e
))
if
(
!
peffect
->
is_
flag
(
EFFECT_FLAG_ACTIVATE_CONDITION
)
&&
!
peffect
->
is_
condition_check
(
phandler
->
current
.
controler
,
e
))
return
FALSE
;
return
FALSE
;
peffect
->
set_activate_location
();
peffect
->
set_activate_location
();
chain
newchain
;
chain
newchain
;
...
...
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