Skip to content

Commit

Permalink
update PROCESSOR_SELECT_SUM
Browse files Browse the repository at this point in the history
  • Loading branch information
salix5 committed Jun 6, 2024
1 parent 3b87352 commit d08afe0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libgroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ int32 scriptlib::group_select_with_sum_equal(lua_State *L) {
interpreter::group2value(L, empty_group);
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) {
duel* pduel = (duel*)ctx;
group* pgroup = pduel->new_group();
Expand Down
4 changes: 2 additions & 2 deletions operations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5589,7 +5589,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
pduel->write_buffer8(HINT_SELECTMSG);
pduel->write_buffer8(playerid);
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;
}
case 8: {
Expand Down Expand Up @@ -5644,7 +5644,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
pduel->write_buffer8(HINT_SELECTMSG);
pduel->write_buffer8(playerid);
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;
return FALSE;
}
Expand Down
2 changes: 1 addition & 1 deletion processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ uint32 field::process() {
}
}
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();
return pduel->message_buffer.size();
} else {
Expand Down

0 comments on commit d08afe0

Please sign in to comment.