Commit 68920d71 authored by salix5's avatar salix5

field::solve_continuous()

Now continuous effect in the phase will set core.conti_solving.
Continuous effects with EFFECT_FLAG_DELAY should be triggered after the operation is finished.
parent 722adaa3
...@@ -4449,7 +4449,7 @@ int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_pl ...@@ -4449,7 +4449,7 @@ int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_pl
newchain.disable_reason = 0; newchain.disable_reason = 0;
newchain.flag = 0; newchain.flag = 0;
core.continuous_chain.push_back(newchain); core.continuous_chain.push_back(newchain);
if(peffect->is_flag(EFFECT_FLAG_DELAY)) if(peffect->is_flag(EFFECT_FLAG_DELAY) || !(peffect->code & 0x10030000) && (peffect->code & (EVENT_PHASE | EVENT_PHASE_START)))
core.conti_solving = TRUE; core.conti_solving = TRUE;
core.units.begin()->ptarget = (group*)core.reason_effect; core.units.begin()->ptarget = (group*)core.reason_effect;
core.units.begin()->arg2 = core.reason_player; core.units.begin()->arg2 = core.reason_player;
...@@ -4481,7 +4481,7 @@ int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_pl ...@@ -4481,7 +4481,7 @@ int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_pl
} }
core.continuous_chain.pop_back(); core.continuous_chain.pop_back();
core.solving_event.pop_front(); core.solving_event.pop_front();
if(peffect->is_flag(EFFECT_FLAG_DELAY)) { if(peffect->is_flag(EFFECT_FLAG_DELAY) || !(peffect->code & 0x10030000) && (peffect->code & (EVENT_PHASE | EVENT_PHASE_START))) {
core.conti_solving = FALSE; core.conti_solving = FALSE;
adjust_all(); adjust_all();
if(core.conti_player == PLAYER_NONE) if(core.conti_player == PLAYER_NONE)
......
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