Skip to content

Commit

Permalink
Fix checking for tributes if multiple decrease tribute effects were a…
Browse files Browse the repository at this point in the history
…pplying at the same time

Regression introduced in 90e2c65
  • Loading branch information
edo9300 committed Aug 30, 2024
1 parent 2617027 commit 607a5fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2532,7 +2532,12 @@ int32_t field::check_tribute(card* pcard, int32_t min, int32_t max, group* mg, u
int32_t ct = get_tofield_count(pcard, toplayer, LOCATION_MZONE, sumplayer, LOCATION_REASON_TOFIELD, zone);
if(ct <= 0 && max <= 0)
return FALSE;
for(auto& _pcard : (static_cast<int>(ex_list.size()) >= min) ? ex_list : release_list) {
const auto& to_check_release_list = [&] {
if(ex_list.size() > 0 && ex_list.size() >= min)
return ex_list;
return release_list;
}();
for(auto& _pcard : to_check_release_list) {
if(_pcard->current.location == LOCATION_MZONE && _pcard->current.controler == toplayer) {
++s;
if((zone >> _pcard->current.sequence) & 1)
Expand Down

0 comments on commit 607a5fc

Please sign in to comment.