Commit d08afe0a authored by Chen Bill's avatar Chen Bill

update PROCESSOR_SELECT_SUM

parent 3b873526
...@@ -513,7 +513,7 @@ int32 scriptlib::group_select_with_sum_equal(lua_State *L) { ...@@ -513,7 +513,7 @@ int32 scriptlib::group_select_with_sum_equal(lua_State *L) {
interpreter::group2value(L, empty_group); interpreter::group2value(L, empty_group);
return 1; return 1;
} }
pduel->game_field->add_process(PROCESSOR_SELECT_SUM, 0, 0, 0, acc, playerid + (min << 16) + (max << 24)); pduel->game_field->add_process(PROCESSOR_SELECT_SUM, 0, 0, 0, acc, playerid, min, max);
return lua_yieldk(L, 0, (lua_KContext)pduel, [](lua_State *L, int32 status, lua_KContext ctx) { return lua_yieldk(L, 0, (lua_KContext)pduel, [](lua_State *L, int32 status, lua_KContext ctx) {
duel* pduel = (duel*)ctx; duel* pduel = (duel*)ctx;
group* pgroup = pduel->new_group(); group* pgroup = pduel->new_group();
......
...@@ -5589,7 +5589,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in ...@@ -5589,7 +5589,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
pduel->write_buffer8(HINT_SELECTMSG); pduel->write_buffer8(HINT_SELECTMSG);
pduel->write_buffer8(playerid); pduel->write_buffer8(playerid);
pduel->write_buffer32(512); pduel->write_buffer32(512);
add_process(PROCESSOR_SELECT_SUM, 0, 0, 0, lv, playerid + (min << 16) + (max << 24)); add_process(PROCESSOR_SELECT_SUM, 0, 0, 0, lv, playerid, min, max);
return FALSE; return FALSE;
} }
case 8: { case 8: {
...@@ -5644,7 +5644,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in ...@@ -5644,7 +5644,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
pduel->write_buffer8(HINT_SELECTMSG); pduel->write_buffer8(HINT_SELECTMSG);
pduel->write_buffer8(playerid); pduel->write_buffer8(playerid);
pduel->write_buffer32(512); pduel->write_buffer32(512);
add_process(PROCESSOR_SELECT_SUM, 0, 0, 0, lv, playerid + (min << 16) + (max << 24)); add_process(PROCESSOR_SELECT_SUM, 0, 0, 0, lv, playerid, min, max);
core.units.begin()->step = 7; core.units.begin()->step = 7;
return FALSE; return FALSE;
} }
......
...@@ -175,7 +175,7 @@ uint32 field::process() { ...@@ -175,7 +175,7 @@ uint32 field::process() {
} }
} }
case PROCESSOR_SELECT_SUM: { case PROCESSOR_SELECT_SUM: {
if (select_with_sum_limit(it->step, it->arg2 & 0xffff, it->arg1, (it->arg2 >> 16) & 0xff, (it->arg2 >> 24) & 0xff)) { if (select_with_sum_limit(it->step, it->arg2, it->arg1, it->arg3, it->arg4)) {
core.units.pop_front(); core.units.pop_front();
return pduel->message_buffer.size(); return pduel->message_buffer.size();
} else { } else {
......
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