Fix: small bugs

This commit is contained in:
2026-06-09 20:10:11 +02:00
parent 2fb43c385b
commit 3318801913
2 changed files with 6 additions and 7 deletions
@@ -72,15 +72,14 @@ public class Sustenance extends EventCard {
int NGatherers = player.getNType(CharacterType.GATHERER);
int NCharDiscount = 0;
for(Player p : playerList){
for(BuildingCard b : player.buildingCards){
if(b.getEffectId() == 1){
CharacterType c = ((Building1)b).getIcon();
NCharDiscount += p.getNType(c);
}
for(BuildingCard b : player.buildingCards){
if(b.getEffectId() == 1){
CharacterType c = ((Building1)b).getIcon();
NCharDiscount += player.getNType(c);
}
}
int FoodDebt = NChar - (3 * NGatherers + NCharDiscount);
if(FoodDebt <= 0){
@@ -154,7 +154,7 @@ public class Game implements Serializable {
}
else {
if (totemChoiceQueue.isEmpty()) {
player.totem = getAvailableTotems().get(new Random().nextInt(getAvailableTotems().size() - 1));
player.totem = getAvailableTotems().get(new Random().nextInt(getAvailableTotems().size()));
} else {
totemChoiceQueue.add(player);
}