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
fe020efd
Commit
fe020efd
authored
Oct 16, 2016
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix EFFECT_REMOVE_BRAINWASHING
parent
800ecbbf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
29 deletions
+24
-29
card.cpp
card.cpp
+0
-2
processor.cpp
processor.cpp
+24
-27
No files found.
card.cpp
View file @
fe020efd
...
@@ -1605,8 +1605,6 @@ void card::refresh_disable_status() {
...
@@ -1605,8 +1605,6 @@ void card::refresh_disable_status() {
}
}
uint8
card
::
refresh_control_status
()
{
uint8
card
::
refresh_control_status
()
{
uint8
final
=
owner
;
uint8
final
=
owner
;
if
(
pduel
->
game_field
->
core
.
remove_brainwashing
&&
is_affected_by_effect
(
EFFECT_REMOVE_BRAINWASHING
))
return
final
;
effect_set
eset
;
effect_set
eset
;
filter_effect
(
EFFECT_SET_CONTROL
,
&
eset
);
filter_effect
(
EFFECT_SET_CONTROL
,
&
eset
);
if
(
eset
.
size
())
if
(
eset
.
size
())
...
...
processor.cpp
View file @
fe020efd
...
@@ -5061,39 +5061,15 @@ int32 field::adjust_step(uint16 step) {
...
@@ -5061,39 +5061,15 @@ int32 field::adjust_step(uint16 step) {
return
FALSE
;
return
FALSE
;
}
}
case
4
:
{
case
4
:
{
//remove brainwashing
effect_set
eset
;
uint32
res
=
0
;
if
(
core
.
global_flag
&
GLOBALFLAG_BRAINWASHING_CHECK
)
{
filter_field_effect
(
EFFECT_REMOVE_BRAINWASHING
,
&
eset
,
FALSE
);
res
=
eset
.
size
()
?
TRUE
:
FALSE
;
if
(
res
)
{
card
*
pcard
;
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
for
(
uint8
i
=
0
;
i
<
5
;
++
i
)
{
pcard
=
player
[
p
].
list_mzone
[
i
];
// remove EFFECT_SET_CONTROL
if
(
pcard
&&
pcard
->
is_affected_by_effect
(
EFFECT_REMOVE_BRAINWASHING
))
pcard
->
reset
(
EFFECT_SET_CONTROL
,
RESET_CODE
);
}
}
}
core
.
remove_brainwashing
=
res
;
}
return
FALSE
;
}
case
5
:
{
//1-5 control
//1-5 control
card
*
pcard
;
uint8
cur
,
ref
;
core
.
control_adjust_set
[
0
].
clear
();
core
.
control_adjust_set
[
0
].
clear
();
core
.
control_adjust_set
[
1
].
clear
();
core
.
control_adjust_set
[
1
].
clear
();
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
for
(
uint8
i
=
0
;
i
<
5
;
++
i
)
{
for
(
uint8
i
=
0
;
i
<
5
;
++
i
)
{
pcard
=
player
[
p
].
list_mzone
[
i
];
card
*
pcard
=
player
[
p
].
list_mzone
[
i
];
if
(
!
pcard
)
continue
;
if
(
!
pcard
)
continue
;
cur
=
pcard
->
current
.
controler
;
uint8
cur
=
pcard
->
current
.
controler
;
ref
=
pcard
->
refresh_control_status
();
uint8
ref
=
pcard
->
refresh_control_status
();
if
(
cur
!=
ref
&&
pcard
->
is_capable_change_control
())
{
if
(
cur
!=
ref
&&
pcard
->
is_capable_change_control
())
{
core
.
control_adjust_set
[
p
].
insert
(
pcard
);
core
.
control_adjust_set
[
p
].
insert
(
pcard
);
}
}
...
@@ -5103,6 +5079,27 @@ int32 field::adjust_step(uint16 step) {
...
@@ -5103,6 +5079,27 @@ int32 field::adjust_step(uint16 step) {
core
.
re_adjust
=
TRUE
;
core
.
re_adjust
=
TRUE
;
add_process
(
PROCESSOR_CONTROL_ADJUST
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_CONTROL_ADJUST
,
0
,
0
,
0
,
0
,
0
);
}
}
return
FALSE
;
}
case
5
:
{
//remove brainwashing
if
(
core
.
global_flag
&
GLOBALFLAG_BRAINWASHING_CHECK
)
{
effect_set
eset
;
uint32
res
=
0
;
filter_field_effect
(
EFFECT_REMOVE_BRAINWASHING
,
&
eset
,
FALSE
);
res
=
eset
.
size
()
?
TRUE
:
FALSE
;
if
(
res
)
{
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
for
(
uint8
i
=
0
;
i
<
5
;
++
i
)
{
card
*
pcard
=
player
[
p
].
list_mzone
[
i
];
// remove EFFECT_SET_CONTROL
if
(
pcard
&&
pcard
->
is_affected_by_effect
(
EFFECT_REMOVE_BRAINWASHING
))
pcard
->
reset
(
EFFECT_SET_CONTROL
,
RESET_CODE
);
}
}
}
core
.
remove_brainwashing
=
res
;
}
core
.
units
.
begin
()
->
step
=
7
;
core
.
units
.
begin
()
->
step
=
7
;
return
FALSE
;
return
FALSE
;
}
}
...
...
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