Commit b9f5dfeb authored by nanahira's avatar nanahira

fix genesys card in

parent c2af17dc
Pipeline #42018 failed with stages
in 8 minutes and 15 seconds
......@@ -1957,12 +1957,11 @@ bool DeckBuilder::check_limit(code_pointer pointer) {
auto handle_card = [&](ygo::code_pointer& card) {
if (card->first == limitcode || card->second.alias == limitcode) {
limit--;
if(limit <= 0)
if(limit < 0)
return false;
}
auto code = card->second.alias ? card->second.alias : card->first;
spend_credit(code);
return true;
return spend_credit(code);
};
for (auto& card : deckManager.current_deck.main) {
if(!handle_card(card))
......@@ -1976,6 +1975,6 @@ bool DeckBuilder::check_limit(code_pointer pointer) {
if(!handle_card(card))
return false;
}
return spend_credit(limitcode);
return handle_card(pointer);
}
}
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