Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
cda2b2ad
Commit
cda2b2ad
authored
Aug 19, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c383b611
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
103 additions
and
89 deletions
+103
-89
ocgcore/processor.cpp
ocgcore/processor.cpp
+103
-89
No files found.
ocgcore/processor.cpp
View file @
cda2b2ad
...
@@ -1313,7 +1313,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1313,7 +1313,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
case
0
:
{
case
0
:
{
if
((
phase
==
PHASE_DRAW
&&
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_DP
))
if
((
phase
==
PHASE_DRAW
&&
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_DP
))
||
(
phase
==
PHASE_STANDBY
&&
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_SP
)))
{
||
(
phase
==
PHASE_STANDBY
&&
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_SP
)))
{
core
.
units
.
begin
()
->
step
=
1
4
;
core
.
units
.
begin
()
->
step
=
2
4
;
return
FALSE
;
return
FALSE
;
}
}
int32
phase_event
=
EVENT_PHASE
+
phase
;
int32
phase_event
=
EVENT_PHASE
+
phase
;
...
@@ -1323,7 +1323,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1323,7 +1323,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
int32
check_player
=
infos
.
turn_player
;
int32
check_player
=
infos
.
turn_player
;
chain
newchain
;
chain
newchain
;
core
.
select_chains
.
clear
();
core
.
select_chains
.
clear
();
int32
tf_count
=
0
,
to_count
=
0
,
fc_count
=
0
;
int32
tf_count
=
0
,
to_count
=
0
,
fc_count
=
0
,
cn_count
=
0
;
auto
pr
=
effects
.
trigger_f_effect
.
equal_range
(
phase_event
);
auto
pr
=
effects
.
trigger_f_effect
.
equal_range
(
phase_event
);
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
peffect
=
pr
.
first
->
second
;
peffect
=
pr
.
first
->
second
;
...
@@ -1350,6 +1350,16 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1350,6 +1350,16 @@ int32 field::process_phase_event(int16 step, int32 phase) {
to_count
++
;
to_count
++
;
core
.
spe_effect
[
check_player
]
++
;
core
.
spe_effect
[
check_player
]
++
;
}
}
pr
=
effects
.
continuous_effect
.
equal_range
(
phase_event
);
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
peffect
=
pr
.
first
->
second
;
if
(
!
peffect
->
is_activateable
(
check_player
,
nil_event
))
continue
;
peffect
->
id
=
infos
.
field_id
++
;
newchain
.
triggering_effect
=
peffect
;
core
.
select_chains
.
push_back
(
newchain
);
cn_count
++
;
}
if
(
phase
==
PHASE_DRAW
)
if
(
phase
==
PHASE_DRAW
)
core
.
hint_timing
[
infos
.
turn_player
]
=
TIMING_DRAW_PHASE
;
core
.
hint_timing
[
infos
.
turn_player
]
=
TIMING_DRAW_PHASE
;
else
if
(
phase
==
PHASE_STANDBY
)
else
if
(
phase
==
PHASE_STANDBY
)
...
@@ -1384,13 +1394,13 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1384,13 +1394,13 @@ int32 field::process_phase_event(int16 step, int32 phase) {
fc_count
++
;
fc_count
++
;
}
}
if
(
core
.
select_chains
.
size
()
==
0
)
{
if
(
core
.
select_chains
.
size
()
==
0
)
{
core
.
units
.
begin
()
->
step
=
3
;
core
.
units
.
begin
()
->
step
=
9
;
return
FALSE
;
return
FALSE
;
}
else
if
(
tf_count
==
1
&&
to_count
==
0
&&
fc_count
==
0
)
{
}
else
if
(
tf_count
==
1
&&
to_count
==
0
&&
fc_count
==
0
&&
cn_count
==
0
)
{
returns
.
ivalue
[
0
]
=
0
;
returns
.
ivalue
[
0
]
=
0
;
core
.
units
.
begin
()
->
step
=
1
;
core
.
units
.
begin
()
->
step
=
1
;
return
FALSE
;
return
FALSE
;
}
else
if
(
tf_count
==
0
&&
to_count
==
1
&&
fc_count
==
0
)
{
}
else
if
(
tf_count
==
0
&&
to_count
==
1
&&
fc_count
==
0
&&
cn_count
==
0
)
{
add_process
(
PROCESSOR_SELECT_EFFECTYN
,
0
,
0
,
(
group
*
)
core
.
select_chains
[
0
].
triggering_effect
->
handler
,
check_player
,
0
);
add_process
(
PROCESSOR_SELECT_EFFECTYN
,
0
,
0
,
(
group
*
)
core
.
select_chains
[
0
].
triggering_effect
->
handler
,
check_player
,
0
);
return
FALSE
;
return
FALSE
;
}
else
{
}
else
{
...
@@ -1405,7 +1415,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1405,7 +1415,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
pduel
->
write_buffer32
(
25
);
pduel
->
write_buffer32
(
25
);
else
else
pduel
->
write_buffer32
(
26
);
pduel
->
write_buffer32
(
26
);
add_process
(
PROCESSOR_SELECT_CHAIN
,
0
,
0
,
0
,
check_player
,
core
.
spe_effect
[
check_player
]
|
(
tf_count
?
0x10000
:
0
));
add_process
(
PROCESSOR_SELECT_CHAIN
,
0
,
0
,
0
,
check_player
,
core
.
spe_effect
[
check_player
]
|
(
tf_count
+
cn_count
?
0x10000
:
0
));
core
.
units
.
begin
()
->
step
=
1
;
core
.
units
.
begin
()
->
step
=
1
;
return
FALSE
;
return
FALSE
;
}
}
...
@@ -1418,11 +1428,12 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1418,11 +1428,12 @@ int32 field::process_phase_event(int16 step, int32 phase) {
case
2
:
{
case
2
:
{
chain
newchain
;
chain
newchain
;
if
(
returns
.
ivalue
[
0
]
==
-
1
)
{
if
(
returns
.
ivalue
[
0
]
==
-
1
)
{
core
.
units
.
begin
()
->
step
=
3
;
core
.
units
.
begin
()
->
step
=
9
;
return
FALSE
;
return
FALSE
;
}
}
newchain
=
core
.
select_chains
[
returns
.
ivalue
[
0
]];
newchain
=
core
.
select_chains
[
returns
.
ivalue
[
0
]];
effect
*
peffect
=
newchain
.
triggering_effect
;
effect
*
peffect
=
newchain
.
triggering_effect
;
if
(
!
(
peffect
->
type
&
EFFECT_TYPE_CONTINUOUS
))
{
newchain
.
flag
=
0
;
newchain
.
flag
=
0
;
newchain
.
chain_id
=
infos
.
field_id
++
;
newchain
.
chain_id
=
infos
.
field_id
++
;
newchain
.
evt
=
nil_event
;
newchain
.
evt
=
nil_event
;
...
@@ -1431,13 +1442,19 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1431,13 +1442,19 @@ int32 field::process_phase_event(int16 step, int32 phase) {
newchain
.
triggering_sequence
=
peffect
->
handler
->
current
.
sequence
;
newchain
.
triggering_sequence
=
peffect
->
handler
->
current
.
sequence
;
newchain
.
triggering_player
=
infos
.
turn_player
;
newchain
.
triggering_player
=
infos
.
turn_player
;
core
.
new_chains
.
push_back
(
newchain
);
core
.
new_chains
.
push_back
(
newchain
);
p
effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
newchain
.
triggering_
effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
(
infos
.
turn_player
);
peffect
->
dec_count
(
infos
.
turn_player
);
core
.
select_chains
.
clear
();
core
.
select_chains
.
clear
();
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
FALSE
,
1
-
infos
.
turn_player
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
FALSE
,
1
-
infos
.
turn_player
);
infos
.
priorities
[
0
]
=
0
;
infos
.
priorities
[
0
]
=
0
;
infos
.
priorities
[
1
]
=
0
;
infos
.
priorities
[
1
]
=
0
;
}
else
{
core
.
select_chains
.
clear
();
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_SOLVE_CONTINUOUS
,
0
,
peffect
,
0
,
peffect
->
get_handler_player
(),
0
);
core
.
units
.
begin
()
->
step
=
3
;
}
return
FALSE
;
return
FALSE
;
}
}
case
3
:
{
case
3
:
{
...
@@ -1452,6 +1469,11 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1452,6 +1469,11 @@ int32 field::process_phase_event(int16 step, int32 phase) {
return
FALSE
;
return
FALSE
;
}
}
case
4
:
{
case
4
:
{
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
core
.
units
.
begin
()
->
step
=
-
1
;
return
FALSE
;
}
case
10
:
{
int32
phase_event
=
EVENT_PHASE
+
phase
;
int32
phase_event
=
EVENT_PHASE
+
phase
;
effect
*
peffect
;
effect
*
peffect
;
nil_event
.
event_code
=
phase_event
;
nil_event
.
event_code
=
phase_event
;
...
@@ -1459,7 +1481,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1459,7 +1481,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
int32
check_player
=
1
-
infos
.
turn_player
;
int32
check_player
=
1
-
infos
.
turn_player
;
chain
newchain
;
chain
newchain
;
core
.
select_chains
.
clear
();
core
.
select_chains
.
clear
();
int32
tf_count
=
0
,
to_count
=
0
,
fc_count
=
0
;
int32
tf_count
=
0
,
to_count
=
0
,
fc_count
=
0
,
cn_count
=
0
;
auto
pr
=
effects
.
trigger_f_effect
.
equal_range
(
phase_event
);
auto
pr
=
effects
.
trigger_f_effect
.
equal_range
(
phase_event
);
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
peffect
=
pr
.
first
->
second
;
peffect
=
pr
.
first
->
second
;
...
@@ -1486,6 +1508,16 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1486,6 +1508,16 @@ int32 field::process_phase_event(int16 step, int32 phase) {
to_count
++
;
to_count
++
;
core
.
spe_effect
[
check_player
]
++
;
core
.
spe_effect
[
check_player
]
++
;
}
}
pr
=
effects
.
continuous_effect
.
equal_range
(
phase_event
);
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
peffect
=
pr
.
first
->
second
;
if
(
!
peffect
->
is_activateable
(
check_player
,
nil_event
))
continue
;
peffect
->
id
=
infos
.
field_id
++
;
newchain
.
triggering_effect
=
peffect
;
core
.
select_chains
.
push_back
(
newchain
);
cn_count
++
;
}
if
(
phase
==
PHASE_DRAW
)
if
(
phase
==
PHASE_DRAW
)
core
.
hint_timing
[
infos
.
turn_player
]
=
TIMING_DRAW_PHASE
;
core
.
hint_timing
[
infos
.
turn_player
]
=
TIMING_DRAW_PHASE
;
else
if
(
phase
==
PHASE_STANDBY
)
else
if
(
phase
==
PHASE_STANDBY
)
...
@@ -1522,13 +1554,13 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1522,13 +1554,13 @@ int32 field::process_phase_event(int16 step, int32 phase) {
fc_count
++
;
fc_count
++
;
}
}
if
(
core
.
select_chains
.
size
()
==
0
)
{
if
(
core
.
select_chains
.
size
()
==
0
)
{
core
.
units
.
begin
()
->
step
=
6
;
core
.
units
.
begin
()
->
step
=
19
;
return
FALSE
;
return
FALSE
;
}
else
if
(
tf_count
==
1
&&
to_count
==
0
&&
fc_count
==
0
)
{
}
else
if
(
tf_count
==
1
&&
to_count
==
0
&&
fc_count
==
0
&&
cn_count
==
0
)
{
returns
.
ivalue
[
0
]
=
0
;
returns
.
ivalue
[
0
]
=
0
;
core
.
units
.
begin
()
->
step
=
5
;
core
.
units
.
begin
()
->
step
=
11
;
return
FALSE
;
return
FALSE
;
}
else
if
(
tf_count
==
0
&&
to_count
==
1
&&
fc_count
==
0
)
{
}
else
if
(
tf_count
==
0
&&
to_count
==
1
&&
fc_count
==
0
&&
cn_count
==
0
)
{
add_process
(
PROCESSOR_SELECT_EFFECTYN
,
0
,
0
,
(
group
*
)
core
.
select_chains
[
0
].
triggering_effect
->
handler
,
check_player
,
0
);
add_process
(
PROCESSOR_SELECT_EFFECTYN
,
0
,
0
,
(
group
*
)
core
.
select_chains
[
0
].
triggering_effect
->
handler
,
check_player
,
0
);
return
FALSE
;
return
FALSE
;
}
else
{
}
else
{
...
@@ -1543,24 +1575,25 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1543,24 +1575,25 @@ int32 field::process_phase_event(int16 step, int32 phase) {
pduel
->
write_buffer32
(
25
);
pduel
->
write_buffer32
(
25
);
else
else
pduel
->
write_buffer32
(
26
);
pduel
->
write_buffer32
(
26
);
add_process
(
PROCESSOR_SELECT_CHAIN
,
0
,
0
,
0
,
check_player
,
core
.
spe_effect
[
check_player
]
|
(
tf_count
?
0x10000
:
0
));
add_process
(
PROCESSOR_SELECT_CHAIN
,
0
,
0
,
0
,
check_player
,
core
.
spe_effect
[
check_player
]
|
(
tf_count
+
cn_count
?
0x10000
:
0
));
core
.
units
.
begin
()
->
step
=
5
;
core
.
units
.
begin
()
->
step
=
11
;
return
FALSE
;
return
FALSE
;
}
}
return
FALSE
;
return
FALSE
;
}
}
case
5
:
{
case
11
:
{
returns
.
ivalue
[
0
]
--
;
returns
.
ivalue
[
0
]
--
;
return
FALSE
;
return
FALSE
;
}
}
case
6
:
{
case
12
:
{
chain
newchain
;
chain
newchain
;
if
(
returns
.
ivalue
[
0
]
==
-
1
)
{
if
(
returns
.
ivalue
[
0
]
==
-
1
)
{
core
.
units
.
begin
()
->
step
=
6
;
core
.
units
.
begin
()
->
step
=
19
;
return
FALSE
;
return
FALSE
;
}
}
newchain
=
core
.
select_chains
[
returns
.
ivalue
[
0
]];
newchain
=
core
.
select_chains
[
returns
.
ivalue
[
0
]];
effect
*
peffect
=
newchain
.
triggering_effect
;
effect
*
peffect
=
newchain
.
triggering_effect
;
if
(
!
(
peffect
->
type
&
EFFECT_TYPE_CONTINUOUS
))
{
newchain
.
flag
=
0
;
newchain
.
flag
=
0
;
newchain
.
chain_id
=
infos
.
field_id
++
;
newchain
.
chain_id
=
infos
.
field_id
++
;
newchain
.
evt
=
nil_event
;
newchain
.
evt
=
nil_event
;
...
@@ -1569,55 +1602,40 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1569,55 +1602,40 @@ int32 field::process_phase_event(int16 step, int32 phase) {
newchain
.
triggering_sequence
=
peffect
->
handler
->
current
.
sequence
;
newchain
.
triggering_sequence
=
peffect
->
handler
->
current
.
sequence
;
newchain
.
triggering_player
=
1
-
infos
.
turn_player
;
newchain
.
triggering_player
=
1
-
infos
.
turn_player
;
core
.
new_chains
.
push_back
(
newchain
);
core
.
new_chains
.
push_back
(
newchain
);
p
effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
newchain
.
triggering_
effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
(
1
-
infos
.
turn_player
);
peffect
->
dec_count
(
1
-
infos
.
turn_player
);
core
.
select_chains
.
clear
();
core
.
select_chains
.
clear
();
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
FALSE
,
infos
.
turn_player
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
FALSE
,
infos
.
turn_player
);
infos
.
priorities
[
0
]
=
0
;
infos
.
priorities
[
0
]
=
0
;
infos
.
priorities
[
1
]
=
0
;
infos
.
priorities
[
1
]
=
0
;
core
.
units
.
begin
()
->
step
=
2
;
}
else
{
return
FALSE
;
core
.
select_chains
.
clear
();
}
case
7
:
{
core
.
hint_timing
[
infos
.
turn_player
]
=
0
;
int32
phase_event
=
EVENT_PHASE
+
phase
;
auto
pr
=
effects
.
continuous_effect
.
equal_range
(
phase_event
);
effect_vector
tp
;
effect_vector
ntp
;
effect
*
peffect
;
nil_event
.
event_code
=
phase_event
;
nil_event
.
event_player
=
infos
.
turn_player
;
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
peffect
=
pr
.
first
->
second
;
uint8
owner_player
=
peffect
->
get_handler_player
();
if
(
peffect
->
is_activateable
(
owner_player
,
nil_event
))
{
if
(
owner_player
==
infos
.
turn_player
)
tp
.
push_back
(
peffect
);
else
ntp
.
push_back
(
peffect
);
}
}
for
(
auto
eit
=
tp
.
begin
();
eit
!=
tp
.
end
();
++
eit
)
{
core
.
sub_solving_event
.
push_back
(
nil_event
);
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_SOLVE_CONTINUOUS
,
0
,
(
*
eit
),
0
,
(
*
eit
)
->
get_handler_player
(),
0
);
add_process
(
PROCESSOR_SOLVE_CONTINUOUS
,
0
,
peffect
,
0
,
peffect
->
get_handler_player
(),
0
);
core
.
units
.
begin
()
->
step
=
13
;
}
}
for
(
auto
eit
=
ntp
.
begin
();
eit
!=
ntp
.
end
();
++
eit
)
{
return
FALSE
;
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_SOLVE_CONTINUOUS
,
0
,
(
*
eit
),
0
,
(
*
eit
)
->
get_handler_player
(),
0
);
}
}
if
(
core
.
sub_solving_event
.
size
()
==
0
)
case
13
:
{
core
.
units
.
begin
()
->
step
=
8
;
if
(
core
.
chain_limit
)
{
luaL_unref
(
pduel
->
lua
->
lua_state
,
LUA_REGISTRYINDEX
,
core
.
chain_limit
);
core
.
chain_limit
=
0
;
}
for
(
auto
cait
=
core
.
current_chain
.
begin
();
cait
!=
core
.
current_chain
.
end
();
++
cait
)
cait
->
triggering_effect
->
handler
->
set_status
(
STATUS_CHAINING
,
FALSE
);
add_process
(
PROCESSOR_SOLVE_CHAIN
,
0
,
0
,
0
,
FALSE
,
0
);
core
.
units
.
begin
()
->
step
=
9
;
return
FALSE
;
return
FALSE
;
}
}
case
8
:
{
case
14
:
{
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
core
.
units
.
begin
()
->
step
=
-
1
;
core
.
units
.
begin
()
->
step
=
9
;
return
FALSE
;
return
FALSE
;
}
}
case
9
:
{
case
20
:
{
if
(
phase
!=
PHASE_END
)
{
if
(
phase
!=
PHASE_END
)
{
core
.
units
.
begin
()
->
step
=
1
4
;
core
.
units
.
begin
()
->
step
=
2
4
;
return
FALSE
;
return
FALSE
;
}
}
int32
limit
=
6
;
int32
limit
=
6
;
...
@@ -1627,7 +1645,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1627,7 +1645,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
limit
=
eset
.
get_last
()
->
get_value
();
limit
=
eset
.
get_last
()
->
get_value
();
int32
hd
=
player
[
infos
.
turn_player
].
list_hand
.
size
();
int32
hd
=
player
[
infos
.
turn_player
].
list_hand
.
size
();
if
(
hd
<=
limit
)
{
if
(
hd
<=
limit
)
{
core
.
units
.
begin
()
->
step
=
1
4
;
core
.
units
.
begin
()
->
step
=
2
4
;
return
FALSE
;
return
FALSE
;
}
}
core
.
select_cards
.
clear
();
core
.
select_cards
.
clear
();
...
@@ -1640,25 +1658,25 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1640,25 +1658,25 @@ int32 field::process_phase_event(int16 step, int32 phase) {
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
infos
.
turn_player
,
hd
-
limit
+
((
hd
-
limit
)
<<
16
));
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
infos
.
turn_player
,
hd
-
limit
+
((
hd
-
limit
)
<<
16
));
return
FALSE
;
return
FALSE
;
}
}
case
10
:
{
case
21
:
{
card_set
cset
;
card_set
cset
;
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
cset
.
insert
(
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]]);
cset
.
insert
(
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]]);
send_to
(
&
cset
,
0
,
REASON_RULE
+
REASON_DISCARD
+
REASON_ADJUST
,
infos
.
turn_player
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
send_to
(
&
cset
,
0
,
REASON_RULE
+
REASON_DISCARD
+
REASON_ADJUST
,
infos
.
turn_player
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
return
FALSE
;
return
FALSE
;
}
}
case
11
:
{
case
22
:
{
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
core
.
units
.
begin
()
->
step
=
-
1
;
core
.
units
.
begin
()
->
step
=
-
1
;
return
FALSE
;
return
FALSE
;
}
}
case
1
5
:
{
case
2
5
:
{
core
.
hint_timing
[
infos
.
turn_player
]
=
0
;
core
.
hint_timing
[
infos
.
turn_player
]
=
0
;
reset_phase
(
phase
);
reset_phase
(
phase
);
adjust_all
();
adjust_all
();
return
FALSE
;
return
FALSE
;
}
}
case
1
6
:
{
case
2
6
:
{
if
(
core
.
new_fchain
.
size
()
||
core
.
new_ochain
.
size
())
{
if
(
core
.
new_fchain
.
size
()
||
core
.
new_ochain
.
size
())
{
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
core
.
units
.
begin
()
->
step
=
-
1
;
core
.
units
.
begin
()
->
step
=
-
1
;
...
@@ -4369,10 +4387,6 @@ int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_pl
...
@@ -4369,10 +4387,6 @@ int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_pl
switch
(
step
)
{
switch
(
step
)
{
case
0
:
{
case
0
:
{
core
.
solving_event
.
splice
(
core
.
solving_event
.
begin
(),
core
.
sub_solving_event
);
core
.
solving_event
.
splice
(
core
.
solving_event
.
begin
(),
core
.
sub_solving_event
);
if
(
!
peffect
->
is_activateable
(
triggering_player
,
core
.
solving_event
.
front
()))
{
core
.
solving_event
.
pop_front
();
return
TRUE
;
}
chain
newchain
;
chain
newchain
;
newchain
.
chain_id
=
0
;
newchain
.
chain_id
=
0
;
newchain
.
chain_count
=
0
;
newchain
.
chain_count
=
0
;
...
...
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