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
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
MyCard
ygopro-core
Commits
5a2958c6
Commit
5a2958c6
authored
Jul 27, 2018
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove EFFECT_FLAG_CHAIN_UNIQUE
parent
510b99df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
68 deletions
+9
-68
effect.h
effect.h
+2
-2
processor.cpp
processor.cpp
+7
-66
No files found.
effect.h
View file @
5a2958c6
...
@@ -184,10 +184,10 @@ enum effect_flag : uint32 {
...
@@ -184,10 +184,10 @@ enum effect_flag : uint32 {
EFFECT_FLAG_OWNER_RELATE
=
0x1000000
,
EFFECT_FLAG_OWNER_RELATE
=
0x1000000
,
EFFECT_FLAG_AVAILABLE_BD
=
0x2000000
,
EFFECT_FLAG_AVAILABLE_BD
=
0x2000000
,
EFFECT_FLAG_CLIENT_HINT
=
0x4000000
,
EFFECT_FLAG_CLIENT_HINT
=
0x4000000
,
EFFECT_FLAG_CHAIN_UNIQUE
=
0x8000000
,
//
EFFECT_FLAG_CHAIN_UNIQUE = 0x8000000,
// EFFECT_FLAG_NAGA = 0x10000000,
// EFFECT_FLAG_NAGA = 0x10000000,
// EFFECT_FLAG_COF = 0x20000000,
// EFFECT_FLAG_COF = 0x20000000,
EFFECT_FLAG_CVAL_CHECK
=
0x40000000
,
//
EFFECT_FLAG_CVAL_CHECK = 0x40000000,
EFFECT_FLAG_IMMEDIATELY_APPLY
=
0x80000000
,
EFFECT_FLAG_IMMEDIATELY_APPLY
=
0x80000000
,
};
};
enum
effect_flag2
:
uint32
{
enum
effect_flag2
:
uint32
{
...
...
processor.cpp
View file @
5a2958c6
...
@@ -1706,14 +1706,7 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
...
@@ -1706,14 +1706,7 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
&&
(
peffect
->
code
==
EVENT_FLIP
&&
infos
.
phase
==
PHASE_DAMAGE
&&
(
peffect
->
code
==
EVENT_FLIP
&&
infos
.
phase
==
PHASE_DAMAGE
||
(
clit
->
triggering_location
&
0x43
)
&&
(
clit
->
triggering_position
&
POS_FACEDOWN
)
||
(
clit
->
triggering_location
&
0x43
)
&&
(
clit
->
triggering_position
&
POS_FACEDOWN
)
||
!
(
phandler
->
current
.
location
&
0x43
)
||
phandler
->
is_position
(
POS_FACEUP
)))
{
||
!
(
phandler
->
current
.
location
&
0x43
)
||
phandler
->
is_position
(
POS_FACEUP
)))
{
if(peffect->is_flag(EFFECT_FLAG_CHAIN_UNIQUE)) {
for(auto tpit = core.current_chain.begin(); tpit != core.current_chain.end(); ++tpit) {
if(tpit->triggering_effect->get_handler()->data.code == phandler->data.code && tpit->triggering_player == tp) {
act = false;
break;
}
}
}
}
else
}
else
act
=
false
;
act
=
false
;
if
(
act
)
{
if
(
act
)
{
...
@@ -1803,14 +1796,6 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
...
@@ -1803,14 +1796,6 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
}
}
}
}
}
}
if(peffect->is_flag(EFFECT_FLAG_CHAIN_UNIQUE)) {
for(auto tpit = core.current_chain.begin(); tpit != core.current_chain.end(); ++tpit) {
if(tpit->triggering_player == tp && tpit->triggering_effect->get_handler()->data.code == phandler->data.code) {
act = false;
break;
}
}
}
}
else
}
else
act
=
false
;
act
=
false
;
}
else
act
=
false
;
}
else
act
=
false
;
...
@@ -2020,49 +2005,13 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
...
@@ -2020,49 +2005,13 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
if
(
peffect
->
is_chainable
(
ifit
->
second
.
triggering_player
)
&&
peffect
->
check_count_limit
(
ifit
->
second
.
triggering_player
)
if
(
peffect
->
is_chainable
(
ifit
->
second
.
triggering_player
)
&&
peffect
->
check_count_limit
(
ifit
->
second
.
triggering_player
)
&&
phandler
->
is_has_relation
(
ifit
->
second
))
{
&&
phandler
->
is_has_relation
(
ifit
->
second
))
{
if
(
ifit
->
second
.
triggering_player
==
infos
.
turn_player
)
{
if
(
ifit
->
second
.
triggering_player
==
infos
.
turn_player
)
{
act = true;
core
.
tpchain
.
push_back
(
ifit
->
second
);
if(peffect->is_flag(EFFECT_FLAG_CHAIN_UNIQUE)) {
phandler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
for (auto cait = core.tpchain.begin(); cait != core.tpchain.end(); ++cait) {
peffect
->
dec_count
(
infos
.
turn_player
);
if (cait->triggering_effect->get_handler()->data.code == phandler->data.code) {
act = false;
break;
}
}
for (auto cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) {
if ((cait->triggering_effect->get_handler()->data.code == phandler->data.code)
&& (cait->triggering_player == infos.turn_player)) {
act = false;
break;
}
}
}
if(act) {
core.tpchain.push_back(ifit->second);
phandler->set_status(STATUS_CHAINING, TRUE);
peffect->dec_count(infos.turn_player);
}
}
else
{
}
else
{
act = true;
core
.
ntpchain
.
push_back
(
ifit
->
second
);
if(peffect->is_flag(EFFECT_FLAG_CHAIN_UNIQUE)) {
phandler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
for (auto cait = core.ntpchain.begin(); cait != core.ntpchain.end(); ++cait) {
peffect
->
dec_count
(
1
-
infos
.
turn_player
);
if (cait->triggering_effect->get_handler()->data.code == phandler->data.code) {
act = false;
break;
}
}
for (auto cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) {
if ((cait->triggering_effect->get_handler()->data.code == phandler->data.code)
&& (cait->triggering_player != infos.turn_player)) {
act = false;
break;
}
}
}
if(act) {
core.ntpchain.push_back(ifit->second);
phandler->set_status(STATUS_CHAINING, TRUE);
peffect->dec_count(1 - infos.turn_player);
}
}
}
}
}
}
}
...
@@ -2146,14 +2095,6 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
...
@@ -2146,14 +2095,6 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
}
}
}
}
}
}
if(peffect->is_flag(EFFECT_FLAG_CHAIN_UNIQUE)) {
for(auto cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) {
if(cait->triggering_player == priority && cait->triggering_effect->get_handler()->data.code == phandler->data.code) {
act = false;
break;
}
}
}
}
else
}
else
act
=
false
;
act
=
false
;
if
(
act
)
if
(
act
)
...
...
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