Fix: small bugs
This commit is contained in:
@@ -72,15 +72,14 @@ public class Sustenance extends EventCard {
|
|||||||
int NGatherers = player.getNType(CharacterType.GATHERER);
|
int NGatherers = player.getNType(CharacterType.GATHERER);
|
||||||
|
|
||||||
int NCharDiscount = 0;
|
int NCharDiscount = 0;
|
||||||
for(Player p : playerList){
|
for(BuildingCard b : player.buildingCards){
|
||||||
for(BuildingCard b : player.buildingCards){
|
if(b.getEffectId() == 1){
|
||||||
if(b.getEffectId() == 1){
|
CharacterType c = ((Building1)b).getIcon();
|
||||||
CharacterType c = ((Building1)b).getIcon();
|
NCharDiscount += player.getNType(c);
|
||||||
NCharDiscount += p.getNType(c);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int FoodDebt = NChar - (3 * NGatherers + NCharDiscount);
|
int FoodDebt = NChar - (3 * NGatherers + NCharDiscount);
|
||||||
|
|
||||||
if(FoodDebt <= 0){
|
if(FoodDebt <= 0){
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ public class Game implements Serializable {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (totemChoiceQueue.isEmpty()) {
|
if (totemChoiceQueue.isEmpty()) {
|
||||||
player.totem = getAvailableTotems().get(new Random().nextInt(getAvailableTotems().size() - 1));
|
player.totem = getAvailableTotems().get(new Random().nextInt(getAvailableTotems().size()));
|
||||||
} else {
|
} else {
|
||||||
totemChoiceQueue.add(player);
|
totemChoiceQueue.add(player);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user