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
27c8bf37
Commit
27c8bf37
authored
Oct 16, 2016
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
f9e9eca2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
28 deletions
+28
-28
card.cpp
card.cpp
+14
-9
field.cpp
field.cpp
+1
-0
field.h
field.h
+1
-0
processor.cpp
processor.cpp
+12
-19
No files found.
card.cpp
View file @
27c8bf37
...
@@ -1284,12 +1284,12 @@ int32 card::add_effect(effect* peffect) {
...
@@ -1284,12 +1284,12 @@ int32 card::add_effect(effect* peffect) {
peffect
->
reset_flag
|=
pduel
->
game_field
->
core
.
copy_reset
;
peffect
->
reset_flag
|=
pduel
->
game_field
->
core
.
copy_reset
;
peffect
->
reset_count
=
(
peffect
->
reset_count
&
0xffffff00
)
|
pduel
->
game_field
->
core
.
copy_reset_count
;
peffect
->
reset_count
=
(
peffect
->
reset_count
&
0xffffff00
)
|
pduel
->
game_field
->
core
.
copy_reset_count
;
}
}
if
(
peffect
->
is_flag
(
EFFECT_FLAG_COPY_INHERIT
)
&&
pduel
->
game_field
->
core
.
reason_effect
effect
*
reason_effect
=
pduel
->
game_field
->
core
.
reason_effect
;
&&
(
pduel
->
game_field
->
core
.
reason_effect
->
copy_id
)
)
{
if
(
peffect
->
is_flag
(
EFFECT_FLAG_COPY_INHERIT
)
&&
reason_effect
&&
reason_effect
->
copy_id
)
{
peffect
->
copy_id
=
pduel
->
game_field
->
core
.
reason_effect
->
copy_id
;
peffect
->
copy_id
=
reason_effect
->
copy_id
;
peffect
->
reset_flag
|=
pduel
->
game_field
->
core
.
reason_effect
->
reset_flag
;
peffect
->
reset_flag
|=
reason_effect
->
reset_flag
;
if
((
peffect
->
reset_count
&
0xff
)
>
(
pduel
->
game_field
->
core
.
reason_effect
->
reset_count
&
0xff
))
if
((
peffect
->
reset_count
&
0xff
)
>
(
reason_effect
->
reset_count
&
0xff
))
peffect
->
reset_count
=
(
peffect
->
reset_count
&
0xffffff00
)
|
(
pduel
->
game_field
->
core
.
reason_effect
->
reset_count
&
0xff
);
peffect
->
reset_count
=
(
peffect
->
reset_count
&
0xffffff00
)
|
(
reason_effect
->
reset_count
&
0xff
);
}
}
indexer
.
insert
(
std
::
make_pair
(
peffect
,
eit
));
indexer
.
insert
(
std
::
make_pair
(
peffect
,
eit
));
peffect
->
handler
=
this
;
peffect
->
handler
=
this
;
...
@@ -1300,7 +1300,6 @@ int32 card::add_effect(effect* peffect) {
...
@@ -1300,7 +1300,6 @@ int32 card::add_effect(effect* peffect) {
pduel
->
game_field
->
add_to_disable_check_list
(
check_target
);
pduel
->
game_field
->
add_to_disable_check_list
(
check_target
);
}
}
if
(
peffect
->
is_flag
(
EFFECT_FLAG_OATH
))
{
if
(
peffect
->
is_flag
(
EFFECT_FLAG_OATH
))
{
effect
*
reason_effect
=
pduel
->
game_field
->
core
.
reason_effect
;
pduel
->
game_field
->
effects
.
oath
.
insert
(
std
::
make_pair
(
peffect
,
reason_effect
));
pduel
->
game_field
->
effects
.
oath
.
insert
(
std
::
make_pair
(
peffect
,
reason_effect
));
}
}
if
(
peffect
->
reset_flag
&
RESET_PHASE
)
{
if
(
peffect
->
reset_flag
&
RESET_PHASE
)
{
...
@@ -1605,10 +1604,16 @@ void card::refresh_disable_status() {
...
@@ -1605,10 +1604,16 @@ void card::refresh_disable_status() {
}
}
uint8
card
::
refresh_control_status
()
{
uint8
card
::
refresh_control_status
()
{
uint8
final
=
owner
;
uint8
final
=
owner
;
uint32
last_id
=
0
;
if
(
pduel
->
game_field
->
core
.
remove_brainwashing
&&
is_affected_by_effect
(
EFFECT_REMOVE_BRAINWASHING
))
last_id
=
pduel
->
game_field
->
core
.
last_control_changed_id
;
effect_set
eset
;
effect_set
eset
;
filter_effect
(
EFFECT_SET_CONTROL
,
&
eset
);
filter_effect
(
EFFECT_SET_CONTROL
,
&
eset
);
if
(
eset
.
size
())
if
(
eset
.
size
())
{
final
=
(
uint8
)
(
eset
.
get_last
()
->
get_value
(
this
,
0
));
effect
*
peffect
=
eset
.
get_last
();
if
(
peffect
->
id
>=
last_id
)
final
=
(
uint8
)
peffect
->
get_value
(
this
);
}
return
final
;
return
final
;
}
}
void
card
::
count_turn
(
uint16
ct
)
{
void
card
::
count_turn
(
uint16
ct
)
{
...
...
field.cpp
View file @
27c8bf37
...
@@ -83,6 +83,7 @@ field::field(duel* pduel) {
...
@@ -83,6 +83,7 @@ field::field(duel* pduel) {
core
.
limit_xyz
=
0
;
core
.
limit_xyz
=
0
;
core
.
limit_xyz_minc
=
0
;
core
.
limit_xyz_minc
=
0
;
core
.
limit_xyz_maxc
=
0
;
core
.
limit_xyz_maxc
=
0
;
core
.
last_control_changed_id
=
0
;
core
.
duel_options
=
0
;
core
.
duel_options
=
0
;
core
.
attacker
=
0
;
core
.
attacker
=
0
;
core
.
attack_target
=
0
;
core
.
attack_target
=
0
;
...
...
field.h
View file @
27c8bf37
...
@@ -259,6 +259,7 @@ struct processor {
...
@@ -259,6 +259,7 @@ struct processor {
int32
duel_options
;
int32
duel_options
;
uint32
copy_reset
;
uint32
copy_reset
;
uint8
copy_reset_count
;
uint8
copy_reset_count
;
uint32
last_control_changed_id
;
uint8
dice_result
[
5
];
uint8
dice_result
[
5
];
uint8
coin_result
[
5
];
uint8
coin_result
[
5
];
uint8
to_bp
;
uint8
to_bp
;
...
...
processor.cpp
View file @
27c8bf37
...
@@ -5070,21 +5070,22 @@ int32 field::adjust_step(uint16 step) {
...
@@ -5070,21 +5070,22 @@ int32 field::adjust_step(uint16 step) {
if
(
!
pcard
)
continue
;
if
(
!
pcard
)
continue
;
uint8
cur
=
pcard
->
current
.
controler
;
uint8
cur
=
pcard
->
current
.
controler
;
uint8
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
);
}
}
}
}
}
if
(
core
.
control_adjust_set
[
0
].
size
()
||
core
.
control_adjust_set
[
1
].
size
())
{
if
(
core
.
control_adjust_set
[
0
].
size
()
||
core
.
control_adjust_set
[
1
].
size
())
{
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
);
}
}
core
.
last_control_changed_id
=
infos
.
field_id
;
return
FALSE
;
return
FALSE
;
}
}
case
5
:
{
case
5
:
{
//remove brainwashing
//remove brainwashing
bool
re_adjust
=
false
;
if
(
core
.
global_flag
&
GLOBALFLAG_BRAINWASHING_CHECK
)
{
if
(
core
.
global_flag
&
GLOBALFLAG_BRAINWASHING_CHECK
)
{
core
.
control_adjust_set
[
0
].
clear
();
core
.
control_adjust_set
[
1
].
clear
();
effect_set
eset
;
effect_set
eset
;
uint32
res
=
0
;
uint32
res
=
0
;
filter_field_effect
(
EFFECT_REMOVE_BRAINWASHING
,
&
eset
,
FALSE
);
filter_field_effect
(
EFFECT_REMOVE_BRAINWASHING
,
&
eset
,
FALSE
);
...
@@ -5096,27 +5097,22 @@ int32 field::adjust_step(uint16 step) {
...
@@ -5096,27 +5097,22 @@ int32 field::adjust_step(uint16 step) {
// remove EFFECT_SET_CONTROL
// remove EFFECT_SET_CONTROL
if
(
pcard
&&
pcard
->
is_affected_by_effect
(
EFFECT_REMOVE_BRAINWASHING
))
{
if
(
pcard
&&
pcard
->
is_affected_by_effect
(
EFFECT_REMOVE_BRAINWASHING
))
{
pcard
->
reset
(
EFFECT_SET_CONTROL
,
RESET_CODE
);
pcard
->
reset
(
EFFECT_SET_CONTROL
,
RESET_CODE
);
if
(
p
!=
pcard
->
owner
)
if
(
p
!=
pcard
->
owner
&&
pcard
->
is_capable_change_control
()
)
re_adjust
=
true
;
core
.
control_adjust_set
[
p
].
insert
(
pcard
)
;
}
}
}
}
}
}
}
}
core
.
remove_brainwashing
=
res
;
core
.
remove_brainwashing
=
res
;
if
(
core
.
control_adjust_set
[
0
].
size
()
||
core
.
control_adjust_set
[
1
].
size
())
{
core
.
re_adjust
=
TRUE
;
add_process
(
PROCESSOR_CONTROL_ADJUST
,
0
,
0
,
0
,
0
,
0
);
}
}
}
if
(
re_adjust
)
core
.
units
.
begin
()
->
step
=
8
;
core
.
units
.
begin
()
->
step
=
3
;
else
core
.
units
.
begin
()
->
step
=
7
;
return
FALSE
;
}
case
6
:
{
return
FALSE
;
return
FALSE
;
}
}
case
7
:
{
case
9
:
{
return
FALSE
;
}
case
8
:
{
if
(
core
.
selfdes_disabled
)
{
if
(
core
.
selfdes_disabled
)
{
core
.
units
.
begin
()
->
step
=
10
;
core
.
units
.
begin
()
->
step
=
10
;
return
FALSE
;
return
FALSE
;
...
@@ -5125,9 +5121,6 @@ int32 field::adjust_step(uint16 step) {
...
@@ -5125,9 +5121,6 @@ int32 field::adjust_step(uint16 step) {
adjust_self_destroy_set
();
adjust_self_destroy_set
();
return
FALSE
;
return
FALSE
;
}
}
case
9
:
{
return
FALSE
;
}
case
10
:
{
case
10
:
{
//equip check
//equip check
uint8
tp
=
infos
.
turn_player
;
uint8
tp
=
infos
.
turn_player
;
...
...
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