micahstairs / bga-innovation

MIT License
6 stars 2 forks source link

Loom didn't lead to heritage with 5 icons in the second effect #1432

Closed ultimatefiend closed 10 months ago

ultimatefiend commented 10 months ago

image

Purple had 5 icons and I wasn't rewarded the achievement (and it was available).

ultimatefiend commented 10 months ago

This looks ok depending on what Colors::All gives you:

} else { foreach (Colors::ALL as $color) { if ($this->game->countVisibleIconsInPile(self::getPlayerId(), Icons::HEX_IMAGE, $color) >= 5) { $this->game->claimSpecialAchievement(self::getPlayerId(), CardIds::HERITAGE); break; } }

Purple is the last color so maybe that has something to do with it?

micahstairs commented 10 months ago

You must be looking at the wrong branch. This is what's there:

foreach (Colors::ALL as $color) {
        if (self::getIconCountInStack($color, Icons::HEX_IMAGE) >= 5) {
          self::claim(CardIds::HERITAGE);
          break;
        }
      }

Oh I see the problem though, that works on all icons except for the hex icons.