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
091ec4df
Commit
091ec4df
authored
Feb 28, 2019
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix reset control in end phase, close #203
parent
b8e1459d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
field.cpp
field.cpp
+3
-0
processor.cpp
processor.cpp
+4
-3
No files found.
field.cpp
View file @
091ec4df
...
...
@@ -1222,6 +1222,9 @@ void field::remove_oath_effect(effect* reason_effect) {
void
field
::
reset_phase
(
uint32
phase
)
{
for
(
auto
eit
=
effects
.
pheff
.
begin
();
eit
!=
effects
.
pheff
.
end
();)
{
auto
rm
=
eit
++
;
// work around: skip turn still raise reset_phase(PHASE_END)
// without this taking control only for one turn will be returned when skipping turn
// RESET_TURN_END should be introduced
if
((
*
rm
)
->
code
==
EFFECT_SET_CONTROL
)
continue
;
if
((
*
rm
)
->
reset
(
phase
,
RESET_PHASE
))
{
...
...
processor.cpp
View file @
091ec4df
...
...
@@ -1395,6 +1395,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
core
.
select_chains
.
push_back
(
newchain
);
cn_count
++
;
}
//all effects taking control non-permanently are only until End Phase, not until Turn end
for
(
auto
eit
=
effects
.
pheff
.
begin
();
eit
!=
effects
.
pheff
.
end
();)
{
effect
*
peffect
=
*
eit
++
;
if
(
peffect
->
code
!=
EFFECT_SET_CONTROL
)
...
...
@@ -1407,7 +1408,8 @@ int32 field::process_phase_event(int16 step, int32 phase) {
uint8
tp
=
infos
.
turn_player
;
if
(
!
(((
peffect
->
reset_flag
&
RESET_SELF_TURN
)
&&
pid
==
tp
)
||
((
peffect
->
reset_flag
&
RESET_OPPO_TURN
)
&&
pid
!=
tp
)))
continue
;
if
(
peffect
->
reset_count
!=
1
)
peffect
->
reset_count
--
;
if
(
peffect
->
reset_count
!=
0
)
continue
;
card
*
phandler
=
peffect
->
get_handler
();
if
(
pid
!=
phandler
->
current
.
controler
)
{
...
...
@@ -5047,7 +5049,7 @@ int32 field::adjust_step(uint16 step) {
return
FALSE
;
}
case
4
:
{
//
1-5
control
//control
core
.
control_adjust_set
[
0
].
clear
();
core
.
control_adjust_set
[
1
].
clear
();
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
...
...
@@ -5077,7 +5079,6 @@ int32 field::adjust_step(uint16 step) {
if
(
res
)
{
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
for
(
auto
&
pcard
:
player
[
p
].
list_mzone
)
{
// remove EFFECT_SET_CONTROL
if
(
pcard
&&
pcard
->
is_affected_by_effect
(
EFFECT_REMOVE_BRAINWASHING
))
{
pcard
->
reset
(
EFFECT_SET_CONTROL
,
RESET_CODE
);
if
(
p
!=
pcard
->
owner
&&
pcard
->
is_capable_change_control
())
...
...
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