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
378c8aab
Commit
378c8aab
authored
May 17, 2016
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attack target
parent
5862cca6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
5 deletions
+9
-5
field.cpp
field.cpp
+1
-1
field.h
field.h
+1
-0
libduel.cpp
libduel.cpp
+2
-0
processor.cpp
processor.cpp
+5
-4
No files found.
field.cpp
View file @
378c8aab
...
...
@@ -1739,7 +1739,7 @@ int32 field::get_attack_target(card* pcard, card_vector* v, uint8 chain_attack)
continue
;
v
->
push_back
(
atarget
);
}
if
((
mcount
==
0
||
pcard
->
is_affected_by_effect
(
EFFECT_DIRECT_ATTACK
))
if
((
mcount
==
0
||
pcard
->
is_affected_by_effect
(
EFFECT_DIRECT_ATTACK
)
||
core
.
attack_player
)
&&
!
pcard
->
is_affected_by_effect
(
EFFECT_CANNOT_DIRECT_ATTACK
))
pcard
->
operation_param
=
1
;
return
atype
;
...
...
field.h
View file @
378c8aab
...
...
@@ -264,6 +264,7 @@ struct processor {
uint8
skip_m2
;
uint8
chain_attack
;
card
*
chain_attack_target
;
uint8
attack_player
;
uint8
selfdes_disabled
;
uint8
overdraw
[
2
];
int32
check_level
;
...
...
libduel.cpp
View file @
378c8aab
...
...
@@ -1215,6 +1215,8 @@ int32 scriptlib::duel_change_attack_target(lua_State *L) {
pduel
->
game_field
->
process_single_event
();
pduel
->
game_field
->
process_instant_event
();
}
else
pduel
->
game_field
->
core
.
attack_player
=
TRUE
;
lua_pushboolean
(
L
,
1
);
}
else
lua_pushboolean
(
L
,
0
);
...
...
processor.cpp
View file @
378c8aab
...
...
@@ -2747,6 +2747,7 @@ int32 field::process_battle_command(uint16 step) {
nil_event
.
event_code
=
EVENT_FREE_CHAIN
;
if
(
!
core
.
chain_attack
)
core
.
chain_attack_target
=
0
;
core
.
attack_player
=
FALSE
;
core
.
attacker
=
0
;
core
.
attack_target
=
0
;
if
((
peffect
=
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_BP
)))
{
...
...
@@ -2913,13 +2914,14 @@ int32 field::process_battle_command(uint16 step) {
core
.
units
.
begin
()
->
step
=
-
1
;
return
FALSE
;
}
core
.
select_cards
.
clear
();
core
.
units
.
begin
()
->
arg1
=
FALSE
;
core
.
units
.
begin
()
->
arg2
=
get_attack_target
(
core
.
attacker
,
&
core
.
select_cards
,
core
.
chain_attack
);
return
FALSE
;
}
case
4
:
{
// confirm attack_target(replay start point)
core
.
attack_player
=
FALSE
;
core
.
select_cards
.
clear
();
auto
atype
=
get_attack_target
(
core
.
attacker
,
&
core
.
select_cards
,
core
.
chain_attack
);
// direct attack
if
(
core
.
attacker
->
operation_param
)
{
if
(
core
.
select_cards
.
size
()
==
0
)
{
...
...
@@ -2949,7 +2951,7 @@ int32 field::process_battle_command(uint16 step) {
return
FALSE
;
}
// must attack monster
if
(
core
.
units
.
begin
()
->
arg2
==
3
||
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_PATRICIAN_OF_DARKNESS
))
{
if
(
atype
==
3
||
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_PATRICIAN_OF_DARKNESS
))
{
if
(
core
.
select_cards
.
size
()
==
1
)
returns
.
bvalue
[
1
]
=
0
;
else
{
...
...
@@ -3132,7 +3134,6 @@ int32 field::process_battle_command(uint16 step) {
return
FALSE
;
}
// replay
core
.
units
.
begin
()
->
arg2
=
atype
;
if
(
!
core
.
attacker
->
is_affected_by_effect
(
EFFECT_MUST_ATTACK
))
add_process
(
PROCESSOR_SELECT_YESNO
,
0
,
0
,
0
,
infos
.
turn_player
,
30
);
else
{
...
...
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