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
e09dd463
Commit
e09dd463
authored
Aug 18, 2018
by
DailyShana
Committed by
GitHub
Aug 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update solve continuous (#180)
* update solve continuous * tweak
parent
8a97fed9
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
123 additions
and
126 deletions
+123
-126
field.h
field.h
+7
-6
operations.cpp
operations.cpp
+5
-10
processor.cpp
processor.cpp
+111
-110
No files found.
field.h
View file @
e09dd463
...
@@ -193,6 +193,10 @@ struct processor {
...
@@ -193,6 +193,10 @@ struct processor {
chain_array
select_chains
;
chain_array
select_chains
;
chain_array
current_chain
;
chain_array
current_chain
;
chain_list
continuous_chain
;
chain_list
continuous_chain
;
chain_list
solving_continuous
;
chain_list
sub_solving_continuous
;
chain_list
delayed_continuous_tp
;
chain_list
delayed_continuous_ntp
;
chain_list
desrep_chain
;
chain_list
desrep_chain
;
chain_list
new_fchain
;
chain_list
new_fchain
;
chain_list
new_fchain_s
;
chain_list
new_fchain_s
;
...
@@ -231,10 +235,6 @@ struct processor {
...
@@ -231,10 +235,6 @@ struct processor {
effect_set_v
extram_effects
;
effect_set_v
extram_effects
;
effect_set_v
extras_effects
;
effect_set_v
extras_effects
;
std
::
set
<
effect
*>
reseted_effects
;
std
::
set
<
effect
*>
reseted_effects
;
std
::
list
<
effect
*>
delayed_tp
;
std
::
list
<
effect
*>
delayed_ntp
;
event_list
delayed_tev
;
event_list
delayed_ntev
;
std
::
unordered_map
<
card
*
,
uint32
>
readjust_map
;
std
::
unordered_map
<
card
*
,
uint32
>
readjust_map
;
std
::
unordered_set
<
card
*>
unique_cards
[
2
];
std
::
unordered_set
<
card
*>
unique_cards
[
2
];
std
::
unordered_map
<
uint32
,
uint32
>
effect_count_code
;
std
::
unordered_map
<
uint32
,
uint32
>
effect_count_code
;
...
@@ -488,7 +488,7 @@ public:
...
@@ -488,7 +488,7 @@ public:
int32
process_quick_effect
(
int16
step
,
int32
skip_freechain
,
uint8
priority
);
int32
process_quick_effect
(
int16
step
,
int32
skip_freechain
,
uint8
priority
);
int32
process_instant_event
();
int32
process_instant_event
();
int32
process_single_event
();
int32
process_single_event
();
int32
process_single_event
(
effect
*
peffect
,
const
tevent
&
e
,
effect_vector
&
tp
,
effect_vector
&
ntp
,
event_list
&
tev
,
event_list
&
ntev
);
int32
process_single_event
(
effect
*
peffect
,
const
tevent
&
e
,
chain_list
&
tp
,
chain_list
&
ntp
);
int32
process_idle_command
(
uint16
step
);
int32
process_idle_command
(
uint16
step
);
int32
process_battle_command
(
uint16
step
);
int32
process_battle_command
(
uint16
step
);
int32
process_damage_step
(
uint16
step
,
uint32
new_attack
);
int32
process_damage_step
(
uint16
step
,
uint32
new_attack
);
...
@@ -496,7 +496,8 @@ public:
...
@@ -496,7 +496,8 @@ public:
int32
process_turn
(
uint16
step
,
uint8
turn_player
);
int32
process_turn
(
uint16
step
,
uint8
turn_player
);
int32
add_chain
(
uint16
step
);
int32
add_chain
(
uint16
step
);
int32
solve_continuous
(
uint16
step
,
effect
*
peffect
,
uint8
triggering_player
);
void
solve_continuous
(
uint8
playerid
,
effect
*
peffect
,
const
tevent
&
e
);
int32
solve_continuous
(
uint16
step
);
int32
solve_chain
(
uint16
step
,
uint32
chainend_arg1
,
uint32
chainend_arg2
);
int32
solve_chain
(
uint16
step
,
uint32
chainend_arg1
,
uint32
chainend_arg2
);
int32
break_effect
();
int32
break_effect
();
void
adjust_instant
();
void
adjust_instant
();
...
...
operations.cpp
View file @
e09dd463
...
@@ -657,8 +657,7 @@ int32 field::pay_lp_cost(uint32 step, uint8 playerid, uint32 cost) {
...
@@ -657,8 +657,7 @@ int32 field::pay_lp_cost(uint32 step, uint8 playerid, uint32 cost) {
e.reason = 0;
e.reason = 0;
e.reason_effect = core.reason_effect;
e.reason_effect = core.reason_effect;
e.reason_player = playerid;
e.reason_player = playerid;
core.sub_solving_event.push_back(e);
solve_continuous(playerid, peffect, e);
add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, peffect, 0, playerid, 0);
return TRUE;
return TRUE;
}
}
}
}
...
@@ -714,8 +713,7 @@ int32 field::remove_counter(uint16 step, uint32 reason, card* pcard, uint8 rplay
...
@@ -714,8 +713,7 @@ int32 field::remove_counter(uint16 step, uint32 reason, card* pcard, uint8 rplay
e.reason = reason;
e.reason = reason;
e.reason_effect = core.reason_effect;
e.reason_effect = core.reason_effect;
e.reason_player = rplayer;
e.reason_player = rplayer;
core.sub_solving_event.push_back(e);
solve_continuous(rplayer, peffect, e);
add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, peffect, 0, rplayer, 0);
core.units.begin()->step = 3;
core.units.begin()->step = 3;
return FALSE;
return FALSE;
}
}
...
@@ -791,8 +789,7 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8
...
@@ -791,8 +789,7 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8
e.reason = reason;
e.reason = reason;
e.reason_effect = core.reason_effect;
e.reason_effect = core.reason_effect;
e.reason_player = rplayer;
e.reason_player = rplayer;
core.sub_solving_event.push_back(e);
solve_continuous(rplayer, peffect, e);
add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, peffect, 0, rplayer, 0);
core.units.begin()->step = 3;
core.units.begin()->step = 3;
return FALSE;
return FALSE;
}
}
...
@@ -5952,8 +5949,7 @@ int32 field::toss_coin(uint16 step, effect * reason_effect, uint8 reason_player,
...
@@ -5952,8 +5949,7 @@ int32 field::toss_coin(uint16 step, effect * reason_effect, uint8 reason_player,
process_instant_event();
process_instant_event();
return FALSE;
return FALSE;
} else {
} else {
core.sub_solving_event.push_back(e);
solve_continuous(peffect->get_handler_player(), peffect, e);
add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, peffect, 0, peffect->get_handler_player(), 0);
return TRUE;
return TRUE;
}
}
}
}
...
@@ -6006,8 +6002,7 @@ int32 field::toss_dice(uint16 step, effect * reason_effect, uint8 reason_player,
...
@@ -6006,8 +6002,7 @@ int32 field::toss_dice(uint16 step, effect * reason_effect, uint8 reason_player,
process_instant_event();
process_instant_event();
return FALSE;
return FALSE;
} else {
} else {
core.sub_solving_event.push_back(e);
solve_continuous(peffect->get_handler_player(), peffect, e);
add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, peffect, 0, peffect->get_handler_player(), 0);
return TRUE;
return TRUE;
}
}
}
}
...
...
processor.cpp
View file @
e09dd463
This diff is collapsed.
Click to expand it.
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