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
07ca5517
Commit
07ca5517
authored
Jul 22, 2017
by
mercury233
Committed by
GitHub
Jul 22, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add attack controller change check (#102)
parent
05fcb21c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
card.h
card.h
+1
-0
processor.cpp
processor.cpp
+16
-4
No files found.
card.h
View file @
07ca5517
...
...
@@ -126,6 +126,7 @@ public:
uint8
announce_count
;
uint8
attacked_count
;
uint8
attack_all_target
;
uint8
attack_controler
;
uint16
cardid
;
uint32
fieldid
;
uint32
fieldid_r
;
...
...
processor.cpp
View file @
07ca5517
...
...
@@ -3200,8 +3200,11 @@ int32 field::process_battle_command(uint16 step) {
// start of PHASE_DAMAGE;
pduel
->
write_buffer8
(
MSG_DAMAGE_STEP_START
);
raise_single_event
(
core
.
attacker
,
0
,
EVENT_BATTLE_START
,
0
,
0
,
0
,
0
,
0
);
if(core.attack_target)
core
.
attacker
->
attack_controler
=
core
.
attacker
->
current
.
controler
;
if
(
core
.
attack_target
)
{
raise_single_event
(
core
.
attack_target
,
0
,
EVENT_BATTLE_START
,
0
,
0
,
0
,
0
,
1
);
core
.
attack_target
->
attack_controler
=
core
.
attack_target
->
current
.
controler
;
}
raise_event
((
card
*
)
0
,
EVENT_BATTLE_START
,
0
,
0
,
0
,
0
,
0
);
process_single_event
();
process_instant_event
();
...
...
@@ -3219,7 +3222,10 @@ int32 field::process_battle_command(uint16 step) {
}
case
21
:
{
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
|| (core.attack_target && (core.attack_target->current.location != LOCATION_MZONE || core.attack_target->fieldid_r != core.pre_field[1]))) {
||
core
.
attacker
->
current
.
controler
!=
core
.
attacker
->
attack_controler
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
current
.
controler
!=
core
.
attack_target
->
attack_controler
||
core
.
attack_target
->
fieldid_r
!=
core
.
pre_field
[
1
])))
{
core
.
units
.
begin
()
->
step
=
32
;
return
FALSE
;
}
...
...
@@ -3260,7 +3266,10 @@ int32 field::process_battle_command(uint16 step) {
case
23
:
{
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
||
((
core
.
attacker
->
current
.
position
&
POS_DEFENSE
)
&&
!
(
core
.
attacker
->
is_affected_by_effect
(
EFFECT_DEFENSE_ATTACK
)))
|| (core.attack_target && (core.attack_target->current.location != LOCATION_MZONE || core.attack_target->fieldid_r != core.pre_field[1]))) {
||
core
.
attacker
->
current
.
controler
!=
core
.
attacker
->
attack_controler
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
current
.
controler
!=
core
.
attack_target
->
attack_controler
||
core
.
attack_target
->
fieldid_r
!=
core
.
pre_field
[
1
])))
{
core
.
units
.
begin
()
->
step
=
32
;
return
FALSE
;
}
...
...
@@ -3291,7 +3300,10 @@ int32 field::process_battle_command(uint16 step) {
}
case
25
:
{
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
|| (core.attack_target && (core.attack_target->current.location != LOCATION_MZONE || core.attack_target->fieldid_r != core.pre_field[1]))) {
||
core
.
attacker
->
current
.
controler
!=
core
.
attacker
->
attack_controler
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
current
.
controler
!=
core
.
attack_target
->
attack_controler
||
core
.
attack_target
->
fieldid_r
!=
core
.
pre_field
[
1
])))
{
reset_phase
(
PHASE_DAMAGE_CAL
);
infos
.
phase
=
PHASE_DAMAGE
;
core
.
units
.
begin
()
->
step
=
32
;
...
...
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