Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
wind2009
ygopro
Commits
d26721b3
Commit
d26721b3
authored
Jul 20, 2015
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
2d7f3eb7
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
25 deletions
+44
-25
ocgcore/card.cpp
ocgcore/card.cpp
+12
-1
ocgcore/card.h
ocgcore/card.h
+1
-0
ocgcore/field.cpp
ocgcore/field.cpp
+1
-1
ocgcore/processor.cpp
ocgcore/processor.cpp
+29
-23
script/c94739788.lua
script/c94739788.lua
+1
-0
No files found.
ocgcore/card.cpp
View file @
d26721b3
...
...
@@ -1272,7 +1272,7 @@ int32 card::refresh_disable_status() {
}
uint8
card
::
refresh_control_status
()
{
uint8
final
=
owner
;
if
(
pduel
->
game_field
->
core
.
remove_brainwashing
)
if
(
pduel
->
game_field
->
core
.
remove_brainwashing
&&
is_affected_by_effect
(
EFFECT_REMOVE_BRAINWASHING
)
)
return
final
;
effect_set
eset
;
filter_effect
(
EFFECT_SET_CONTROL
,
&
eset
);
...
...
@@ -1473,6 +1473,17 @@ void card::filter_effect(int32 code, effect_set* eset, uint8 sort) {
if
(
sort
)
eset
->
sort
();
}
void
card
::
filter_single_effect
(
int32
code
,
effect_set
*
eset
,
uint8
sort
)
{
effect
*
peffect
;
auto
rg
=
single_effect
.
equal_range
(
code
);
for
(;
rg
.
first
!=
rg
.
second
;
++
rg
.
first
)
{
peffect
=
rg
.
first
->
second
;
if
(
peffect
->
is_available
()
&&
!
(
peffect
->
flag
&
EFFECT_FLAG_SINGLE_RANGE
))
eset
->
add_item
(
peffect
);
}
if
(
sort
)
eset
->
sort
();
}
void
card
::
filter_single_continuous_effect
(
int32
code
,
effect_set
*
eset
,
uint8
sort
)
{
auto
rg
=
single_effect
.
equal_range
(
code
);
for
(;
rg
.
first
!=
rg
.
second
;
++
rg
.
first
)
...
...
ocgcore/card.h
View file @
d26721b3
...
...
@@ -199,6 +199,7 @@ public:
void
cancel_card_target
(
card
*
pcard
);
void
filter_effect
(
int32
code
,
effect_set
*
eset
,
uint8
sort
=
TRUE
);
void
filter_single_effect
(
int32
code
,
effect_set
*
eset
,
uint8
sort
=
TRUE
);
void
filter_single_continuous_effect
(
int32
code
,
effect_set
*
eset
,
uint8
sort
=
TRUE
);
void
filter_immune_effect
();
void
filter_disable_related_cards
();
...
...
ocgcore/field.cpp
View file @
d26721b3
...
...
@@ -371,7 +371,7 @@ void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequenc
add_card
(
playerid
,
pcard
,
location
,
sequence
);
}
void
field
::
set_control
(
card
*
pcard
,
uint8
playerid
,
uint16
reset_phase
,
uint8
reset_count
)
{
if
(
core
.
remove_brainwashing
||
pcard
->
refresh_control_status
()
==
playerid
)
if
(
(
core
.
remove_brainwashing
&&
pcard
->
is_affected_by_effect
(
EFFECT_REMOVE_BRAINWASHING
))
||
pcard
->
refresh_control_status
()
==
playerid
)
return
;
effect
*
peffect
=
pduel
->
new_effect
();
if
(
core
.
reason_effect
)
...
...
ocgcore/processor.cpp
View file @
d26721b3
...
...
@@ -5221,6 +5221,34 @@ int32 field::adjust_step(uint16 step) {
return
FALSE
;
}
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
;
effect_set
ctrleff
;
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
for
(
uint8
i
=
0
;
i
<
5
;
++
i
)
{
pcard
=
player
[
p
].
list_mzone
[
i
];
if
(
pcard
&&
pcard
->
is_affected_by_effect
(
EFFECT_REMOVE_BRAINWASHING
))
{
ctrleff
.
clear
();
pcard
->
filter_single_effect
(
EFFECT_SET_CONTROL
,
&
ctrleff
,
FALSE
);
for
(
int32
i
=
0
;
i
<
ctrleff
.
size
();
++
i
)
{
pcard
->
remove_effect
(
ctrleff
[
i
]);
core
.
re_adjust
=
TRUE
;
}
}
}
}
}
core
.
remove_brainwashing
=
res
;
}
return
FALSE
;
}
case
5
:
{
//1-4 control
card
*
pcard
;
uint8
cur
,
ref
;
...
...
@@ -5245,9 +5273,6 @@ int32 field::adjust_step(uint16 step) {
core
.
units
.
begin
()
->
step
=
7
;
return
FALSE
;
}
case
5
:
{
return
FALSE
;
}
case
6
:
{
return
FALSE
;
}
...
...
@@ -5346,7 +5371,7 @@ int32 field::adjust_step(uint16 step) {
return
FALSE
;
}
case
13
:
{
//reverse_deck
&& remove brainwashing
//reverse_deck
effect_set
eset
;
uint32
res
=
0
;
if
(
core
.
global_flag
&
GLOBALFLAG_DECK_REVERSE_CHECK
)
{
...
...
@@ -5380,25 +5405,6 @@ int32 field::adjust_step(uint16 step) {
}
}
core
.
deck_reversed
=
res
;
eset
.
clear
();
}
if
(
core
.
global_flag
&
GLOBALFLAG_BRAINWASHING_CHECK
)
{
filter_field_effect
(
EFFECT_REMOVE_BRAINWASHING
,
&
eset
,
FALSE
);
res
=
eset
.
size
()
?
TRUE
:
FALSE
;
if
(
res
&&
!
core
.
remove_brainwashing
)
{
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
card
*
pcard
=
player
[
0
].
list_mzone
[
i
];
if
(
pcard
)
pcard
->
reset
(
EFFECT_SET_CONTROL
,
RESET_CODE
);
}
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
card
*
pcard
=
player
[
1
].
list_mzone
[
i
];
if
(
pcard
)
pcard
->
reset
(
EFFECT_SET_CONTROL
,
RESET_CODE
);
}
core
.
re_adjust
=
TRUE
;
}
core
.
remove_brainwashing
=
res
;
}
return
FALSE
;
}
...
...
script/c94739788.lua
View file @
d26721b3
...
...
@@ -11,5 +11,6 @@ function c94739788.initial_effect(c)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_REMOVE_BRAINWASHING
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
c
:
RegisterEffect
(
e2
)
end
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