Skip to content

Commit

Permalink
Missing update from
Browse files Browse the repository at this point in the history
  • Loading branch information
edo9300 committed Apr 1, 2024
1 parent b769f3a commit 2249622
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions operations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5975,10 +5975,15 @@ bool field::process(Processors::SelectTribute& arg) {
uint32_t rmax = 0;
for(auto& pcard : core.operated_set)
rmax += pcard->release_param;
min -= rmax;
max -= rmin;
min = min > 0 ? min : 0;
max = max > 0 ? max : 0;
if(rmax > min)
min = 0;
else
min -= rmax;

if(rmin > max)
max = 0;
else
max -= rmin;
if((return_cards.canceled && min <= 0) || !max) {
return_cards.clear();
std::copy(core.operated_set.begin(), core.operated_set.end(), std::back_inserter(return_cards.list));
Expand Down

0 comments on commit 2249622

Please sign in to comment.