Commit 222ddb3a authored by salix5's avatar salix5

field::process_turn()

remove battle_phase_action
parent 1a763537
......@@ -287,7 +287,6 @@ struct processor {
uint8 attack_state_count[2];
uint8 battle_phase_count[2];
uint8 phase_action;
uint8 battle_phase_action;
uint32 hint_timing[2];
uint8 current_player;
uint8 conti_player;
......
......@@ -2728,9 +2728,7 @@ int32 field::process_battle_command(uint16 step) {
core.attack_target = 0;
if((peffect = is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_BP))) {
core.units.begin()->step = 41;
if(core.phase_action || core.battle_phase_action)
core.units.begin()->arg1 = 2;
else core.units.begin()->arg1 = 3;
if(is_player_affected_by_effect(infos.turn_player, EFFECT_BP_TWICE))
core.units.begin()->arg2 = 1;
else core.units.begin()->arg2 = 0;
......@@ -2745,7 +2743,6 @@ int32 field::process_battle_command(uint16 step) {
}
return FALSE;
}
core.battle_phase_action = TRUE;
auto pr = effects.activate_effect.equal_range(EVENT_FREE_CHAIN);
for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second;
......@@ -4070,10 +4067,18 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
core.quick_f_chain.clear();
core.delayed_quick_tmp.clear();
core.phase_action = FALSE;
core.battle_phase_action = FALSE;
core.battle_phase_count[infos.turn_player]++;
pduel->write_buffer8(MSG_NEW_PHASE);
pduel->write_buffer16(infos.phase);
// Show the texts to indicate that BP is entered and skipped
if(is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_BP)) {
core.units.begin()->step = 14;
reset_phase(PHASE_BATTLE_START);
reset_phase(PHASE_BATTLE_STEP);
reset_phase(PHASE_BATTLE);
adjust_all();
return FALSE;
}
raise_event((card*)0, EVENT_PHASE_START + PHASE_BATTLE_START, 0, 0, 0, turn_player, 0);
process_instant_event();
adjust_all();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment