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
REIKAI
ygopro
Commits
2ebec728
Commit
2ebec728
authored
May 28, 2015
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chain attack
parent
1e6da9ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
46 deletions
+4
-46
ocgcore/field.cpp
ocgcore/field.cpp
+4
-1
ocgcore/processor.cpp
ocgcore/processor.cpp
+0
-45
No files found.
ocgcore/field.cpp
View file @
2ebec728
...
@@ -1649,11 +1649,14 @@ int32 field::get_attack_target(card* pcard, card_vector* v, uint8 chain_attack)
...
@@ -1649,11 +1649,14 @@ int32 field::get_attack_target(card* pcard, card_vector* v, uint8 chain_attack)
continue
;
continue
;
if
(
pcard
->
is_affected_by_effect
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
,
atarget
))
if
(
pcard
->
is_affected_by_effect
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
,
atarget
))
continue
;
continue
;
if
(
chain_attack
&&
core
.
chain_attack_target
&&
atarget
!=
core
.
chain_attack_target
)
continue
;
v
->
push_back
(
atarget
);
v
->
push_back
(
atarget
);
}
}
if
(
must_be_attack
.
size
())
if
(
must_be_attack
.
size
())
return
TRUE
;
return
TRUE
;
if
((
mcount
==
0
||
pcard
->
is_affected_by_effect
(
EFFECT_DIRECT_ATTACK
))
&&
!
pcard
->
is_affected_by_effect
(
EFFECT_CANNOT_DIRECT_ATTACK
))
if
((
mcount
==
0
||
pcard
->
is_affected_by_effect
(
EFFECT_DIRECT_ATTACK
))
&&
!
pcard
->
is_affected_by_effect
(
EFFECT_CANNOT_DIRECT_ATTACK
)
&&
!
core
.
chain_attack_target
)
pcard
->
operation_param
=
1
;
pcard
->
operation_param
=
1
;
return
must_be_attack
.
size
()
?
TRUE
:
FALSE
;
return
must_be_attack
.
size
()
?
TRUE
:
FALSE
;
}
}
...
...
ocgcore/processor.cpp
View file @
2ebec728
...
@@ -3007,11 +3007,6 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3007,11 +3007,6 @@ int32 field::process_battle_command(uint16 step) {
}
}
core
.
select_cards
.
clear
();
core
.
select_cards
.
clear
();
core
.
units
.
begin
()
->
arg1
=
FALSE
;
core
.
units
.
begin
()
->
arg1
=
FALSE
;
if
(
core
.
chain_attack
&&
core
.
chain_attack_target
)
{
core
.
attack_target
=
core
.
chain_attack_target
;
core
.
units
.
begin
()
->
step
=
6
;
return
FALSE
;
}
core
.
units
.
begin
()
->
arg2
=
get_attack_target
(
core
.
attacker
,
&
core
.
select_cards
,
core
.
chain_attack
);
core
.
units
.
begin
()
->
arg2
=
get_attack_target
(
core
.
attacker
,
&
core
.
select_cards
,
core
.
chain_attack
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -3256,23 +3251,6 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3256,23 +3251,6 @@ int32 field::process_battle_command(uint16 step) {
core
.
units
.
begin
()
->
step
=
19
;
core
.
units
.
begin
()
->
step
=
19
;
return
FALSE
;
return
FALSE
;
}
}
if
(
core
.
chain_attack
&&
core
.
chain_attack_target
)
{
core
.
attacker
->
announce_count
++
;
attack_all_target_check
();
if
(
!
(
core
.
chain_attack_target
->
current
.
location
&
LOCATION_MZONE
))
{
core
.
units
.
begin
()
->
step
=
-
1
;
reset_phase
(
PHASE_DAMAGE
);
return
FALSE
;
}
uint8
seq
=
core
.
chain_attack_target
->
current
.
sequence
;
if
(
core
.
opp_mzone
[
seq
]
!=
core
.
chain_attack_target
->
fieldid_r
)
{
core
.
units
.
begin
()
->
step
=
-
1
;
reset_phase
(
PHASE_DAMAGE
);
return
FALSE
;
}
core
.
units
.
begin
()
->
step
=
19
;
return
FALSE
;
}
core
.
select_cards
.
clear
();
core
.
select_cards
.
clear
();
core
.
units
.
begin
()
->
arg2
=
get_attack_target
(
core
.
attacker
,
&
core
.
select_cards
,
core
.
chain_attack
);
core
.
units
.
begin
()
->
arg2
=
get_attack_target
(
core
.
attacker
,
&
core
.
select_cards
,
core
.
chain_attack
);
for
(
uint32
i
=
0
;
i
<
5
;
++
i
)
{
for
(
uint32
i
=
0
;
i
<
5
;
++
i
)
{
...
@@ -3803,29 +3781,6 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3803,29 +3781,6 @@ int32 field::process_battle_command(uint16 step) {
if
(
core
.
effect_damage_step
)
if
(
core
.
effect_damage_step
)
return
TRUE
;
return
TRUE
;
if
(
core
.
chain_attack
)
{
if
(
core
.
chain_attack
)
{
core
.
chain_attack
=
FALSE
;
if
(
core
.
attacker
->
is_status
(
STATUS_BATTLE_DESTROYED
)
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
||
(
core
.
attacker
->
current
.
controler
!=
infos
.
turn_player
)
||
!
core
.
attacker
->
is_capable_attack_announce
(
infos
.
turn_player
))
return
FALSE
;
if
(
core
.
chain_attack_target
)
{
if
(
!
core
.
chain_attack_target
->
is_capable_be_battle_target
(
core
.
attacker
)
||
core
.
chain_attack_target
->
current
.
location
!=
LOCATION_MZONE
)
return
FALSE
;
}
else
{
core
.
select_cards
.
clear
();
get_attack_target
(
core
.
attacker
,
&
core
.
select_cards
,
TRUE
);
if
(
core
.
select_cards
.
size
()
==
0
&&
core
.
attacker
->
operation_param
==
0
)
return
FALSE
;
}
effect_set
eset
;
filter_player_effect
(
infos
.
turn_player
,
EFFECT_ATTACK_COST
,
&
eset
,
FALSE
);
core
.
attacker
->
filter_effect
(
EFFECT_ATTACK_COST
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
eset
[
i
]
->
operation
)
{
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
eset
[
i
],
0
,
infos
.
turn_player
,
0
);
}
}
core
.
chain_attack
=
TRUE
;
core
.
chain_attack
=
TRUE
;
}
}
return
FALSE
;
return
FALSE
;
...
...
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