mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
Updated the ante rarity code. Previously, it would add both Rare and MythicRare rarities to the pool of choices, but it considers both interchangeable. This led to a large increase of Rare and MythicRare cards being chosen. The game now adds only one.
This commit is contained in:
@@ -633,6 +633,8 @@ public class Game {
|
|||||||
onePlayerHasTimeShifted = false;
|
onePlayerHasTimeShifted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.out.println(validRarities.size());
|
||||||
|
|
||||||
CardRarity anteRarity = validRarities.get(new Random().nextInt(validRarities.size()));
|
CardRarity anteRarity = validRarities.get(new Random().nextInt(validRarities.size()));
|
||||||
|
|
||||||
System.out.println("Rarity chosen for ante: " + anteRarity.name());
|
System.out.println("Rarity chosen for ante: " + anteRarity.name());
|
||||||
@@ -697,8 +699,10 @@ public class Game {
|
|||||||
Set<CardRarity> rarities = new HashSet<>();
|
Set<CardRarity> rarities = new HashSet<>();
|
||||||
for (Card card : cards) {
|
for (Card card : cards) {
|
||||||
if (card.getRarity() == CardRarity.Rare || card.getRarity() == CardRarity.MythicRare) {
|
if (card.getRarity() == CardRarity.Rare || card.getRarity() == CardRarity.MythicRare) {
|
||||||
|
//Since both rare and mythic rare are considered the same, adding both rarities
|
||||||
|
//massively increases the odds chances of the game picking rare cards to ante.
|
||||||
|
//This is a little unfair, so we add just one of the two.
|
||||||
rarities.add(CardRarity.Rare);
|
rarities.add(CardRarity.Rare);
|
||||||
rarities.add(CardRarity.MythicRare);
|
|
||||||
} else {
|
} else {
|
||||||
rarities.add(card.getRarity());
|
rarities.add(card.getRarity());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user