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
04362c80
Commit
04362c80
authored
Aug 07, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
7fb46ee7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
field.cpp
field.cpp
+2
-3
processor.cpp
processor.cpp
+6
-5
No files found.
field.cpp
View file @
04362c80
...
@@ -2115,12 +2115,11 @@ int32 field::get_attack_target(card* pcard, card_vector* v, uint8 chain_attack)
...
@@ -2115,12 +2115,11 @@ int32 field::get_attack_target(card* pcard, card_vector* v, uint8 chain_attack)
std
::
set
<
uint32
>
idset
;
std
::
set
<
uint32
>
idset
;
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
idset
.
insert
(
eset
[
i
]
->
label
);
idset
.
insert
(
eset
[
i
]
->
label
);
if
(
idset
.
size
()
==
1
&&
only_be_attack
.
size
()
==
1
&&
only_be_attack
.
front
()
->
fieldid_r
==
*
idset
.
begin
())
if
(
idset
.
size
()
==
1
&&
only_be_attack
.
size
()
==
1
&&
only_be_attack
.
front
()
->
fieldid_r
==
*
idset
.
begin
())
pv
=
&
only_be_attack
;
pv
=
&
only_be_attack
;
else
else
return
atype
;
return
atype
;
}
}
else
if
(
pcard
->
is_affected_by_effect
(
EFFECT_ONLY_ATTACK_MONSTER
))
{
else
if
(
pcard
->
is_affected_by_effect
(
EFFECT_ONLY_ATTACK_MONSTER
))
{
atype
=
2
;
atype
=
2
;
if
(
only_be_attack
.
size
()
==
1
)
if
(
only_be_attack
.
size
()
==
1
)
pv
=
&
only_be_attack
;
pv
=
&
only_be_attack
;
...
...
processor.cpp
View file @
04362c80
...
@@ -2839,9 +2839,9 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2839,9 +2839,9 @@ int32 field::process_battle_command(uint16 step) {
uint8
chain_attack
=
FALSE
;
uint8
chain_attack
=
FALSE
;
if
(
core
.
chain_attack
&&
core
.
chain_attacker_id
==
pcard
->
fieldid
)
if
(
core
.
chain_attack
&&
core
.
chain_attacker_id
==
pcard
->
fieldid
)
chain_attack
=
TRUE
;
chain_attack
=
TRUE
;
c
ore
.
select_cards
.
clear
()
;
c
ard_vector
cv
;
get_attack_target
(
pcard
,
&
c
ore
.
select_cards
,
chain_attack
);
get_attack_target
(
pcard
,
&
c
v
,
chain_attack
);
if
(
c
ore
.
select_cards
.
size
()
==
0
&&
pcard
->
direct_attackable
==
0
)
if
(
c
v
.
size
()
==
0
&&
pcard
->
direct_attackable
==
0
)
continue
;
continue
;
core
.
attackable_cards
.
push_back
(
pcard
);
core
.
attackable_cards
.
push_back
(
pcard
);
if
(
pcard
->
is_affected_by_effect
(
EFFECT_FIRST_ATTACK
))
if
(
pcard
->
is_affected_by_effect
(
EFFECT_FIRST_ATTACK
))
...
@@ -2953,7 +2953,6 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2953,7 +2953,6 @@ int32 field::process_battle_command(uint16 step) {
core
.
attack_player
=
FALSE
;
core
.
attack_player
=
FALSE
;
core
.
select_cards
.
clear
();
core
.
select_cards
.
clear
();
auto
atype
=
get_attack_target
(
core
.
attacker
,
&
core
.
select_cards
,
core
.
chain_attack
);
auto
atype
=
get_attack_target
(
core
.
attacker
,
&
core
.
select_cards
,
core
.
chain_attack
);
core
.
units
.
begin
()
->
arg2
=
(
ptr
)
core
.
select_cards
.
size
();
// direct attack
// direct attack
if
(
core
.
attacker
->
direct_attackable
)
{
if
(
core
.
attacker
->
direct_attackable
)
{
if
(
core
.
select_cards
.
size
()
==
0
)
{
if
(
core
.
select_cards
.
size
()
==
0
)
{
...
@@ -3149,7 +3148,9 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3149,7 +3148,9 @@ int32 field::process_battle_command(uint16 step) {
return
FALSE
;
return
FALSE
;
}
}
// attack canceled
// attack canceled
if
(
!
core
.
units
.
begin
()
->
arg2
&&
!
core
.
attacker
->
direct_attackable
)
{
card_vector
cv
;
get_attack_target
(
core
.
attacker
,
&
cv
,
core
.
chain_attack
);
if
(
!
cv
.
size
()
&&
!
core
.
attacker
->
direct_attackable
)
{
core
.
chain_attack
=
FALSE
;
core
.
chain_attack
=
FALSE
;
core
.
units
.
begin
()
->
step
=
-
1
;
core
.
units
.
begin
()
->
step
=
-
1
;
reset_phase
(
PHASE_DAMAGE
);
reset_phase
(
PHASE_DAMAGE
);
...
...
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