jdoleary / Spellmasons

https://store.steampowered.com/app/1618380/Spellmasons/
Other
0 stars 1 forks source link

Why don't you level up past 98? #790

Closed jdoleary closed 1 week ago

SoulMuncher commented 1 week ago

You stop leveling up when there are no more cards to drop, and there are 98-99 cards with probability > 0 You can check this in localhost console by typing Object.values(cards.allCards).filter(c => c.probability > 0).length

Underworld.reportEnemyKilled():

const numberOfEnemiesKilledNeededForNextDrop = this.getNumberOfEnemyKillsNeededForNextLevelUp();
    if (numberOfEnemiesKilledNeededForNextDrop <= this.enemiesKilled) {
      // Stop dropping cards if players have enough scrolls have been dropped to cover all cards that can be picked
      if (Object.values(Cards.allCards).filter(c => c.probability > 0).length > this.cardDropsDropped) {
        console.log('Give players new card');
        this.cardDropsDropped++;
        // Give EVERY player an upgrade when any one player picks up a scroll
        this.players.forEach(p => Pickup.givePlayerUpgrade(p, this));
      } else {
        console.log('No more cards to drop');
      }
    }
jdoleary commented 1 week ago

Since the level is just a number representing how many upgrades you've chosen I'm okay with it having an arbitrary maximum.