Commit afb4a624 authored by DailyShana's avatar DailyShana

fix solve continuous

parent 8a15b9e7
...@@ -2108,17 +2108,17 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori ...@@ -2108,17 +2108,17 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
core.select_chains.push_back(*clit); core.select_chains.push_back(*clit);
} }
//delayed activate //delayed activate
for(auto evit = core.full_event.begin(); evit != core.full_event.end(); ++evit) { for(auto eit = core.full_event.begin(); eit != core.full_event.end(); ++eit) {
auto pr = effects.activate_effect.equal_range(evit->event_code); auto pr = effects.activate_effect.equal_range(eit->event_code);
for(; pr.first != pr.second; ++pr.first) { for(; pr.first != pr.second; ++pr.first) {
effect* peffect = pr.first->second; effect* peffect = pr.first->second;
card* phandler = peffect->get_handler(); card* phandler = peffect->get_handler();
peffect->s_range = phandler->current.location; peffect->s_range = phandler->current.location;
peffect->o_range = phandler->current.sequence; peffect->o_range = phandler->current.sequence;
if(peffect->is_flag(EFFECT_FLAG_DELAY) && peffect->is_chainable(priority) && peffect->is_activateable(priority, *evit)) { if(peffect->is_flag(EFFECT_FLAG_DELAY) && peffect->is_chainable(priority) && peffect->is_activateable(priority, *eit)) {
newchain.flag = 0; newchain.flag = 0;
newchain.chain_id = infos.field_id++; newchain.chain_id = infos.field_id++;
newchain.evt = *evit; newchain.evt = *eit;
newchain.triggering_controler = phandler->current.controler; newchain.triggering_controler = phandler->current.controler;
newchain.triggering_effect = peffect; newchain.triggering_effect = peffect;
newchain.triggering_location = phandler->current.location; newchain.triggering_location = phandler->current.location;
...@@ -4500,6 +4500,11 @@ int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_pl ...@@ -4500,6 +4500,11 @@ int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_pl
if(peffect->is_flag(EFFECT_FLAG_DELAY) || !(peffect->code & 0x10030000) && (peffect->code & (EVENT_PHASE | EVENT_PHASE_START))) { 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();
return FALSE;
}
return TRUE;
}
case 4: {
if(core.conti_player == PLAYER_NONE) if(core.conti_player == PLAYER_NONE)
core.conti_player = infos.turn_player; core.conti_player = infos.turn_player;
if(core.conti_player == infos.turn_player) { if(core.conti_player == infos.turn_player) {
...@@ -4526,7 +4531,6 @@ int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_pl ...@@ -4526,7 +4531,6 @@ int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_pl
} else } else
core.conti_player = PLAYER_NONE; core.conti_player = PLAYER_NONE;
} }
}
return TRUE; return TRUE;
} }
} }
...@@ -4671,8 +4675,6 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2 ...@@ -4671,8 +4675,6 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
core.spsummon_state_count_tmp[0] = 0; core.spsummon_state_count_tmp[0] = 0;
core.spsummon_state_count_tmp[1] = 0; core.spsummon_state_count_tmp[1] = 0;
core.chain_solving = FALSE; core.chain_solving = FALSE;
effect_vector::iterator eit;
event_list::iterator evit;
if(core.delayed_tp.size()) { if(core.delayed_tp.size()) {
core.conti_player = infos.turn_player; core.conti_player = infos.turn_player;
core.sub_solving_event.push_back(core.delayed_tev.front()); core.sub_solving_event.push_back(core.delayed_tev.front());
......
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