Small fix: ShamanicRitual
Hunt: changed the food logic HuntTest: test adapted to the new version
This commit is contained in:
@@ -13,10 +13,10 @@ import java.util.ArrayList;
|
||||
* @see EventCard
|
||||
*/
|
||||
public class Hunt extends EventCard {
|
||||
/** Food points to add during the event. */
|
||||
int foodToAdd;
|
||||
/** Food points multiplier used during the event. */
|
||||
int foodMultiplier;
|
||||
|
||||
/** Prestige Points multiplicator used during the event. */
|
||||
/** Prestige Points multiplier used during the event. */
|
||||
int prestigeMultiplier;
|
||||
|
||||
/**
|
||||
@@ -27,23 +27,23 @@ public class Hunt extends EventCard {
|
||||
*/
|
||||
public Hunt(int Era, int prestigeMultiplier) {
|
||||
super(Era, EventType.HUNT);
|
||||
this.foodToAdd = 1;
|
||||
this.foodMultiplier = 1;
|
||||
this.prestigeMultiplier = prestigeMultiplier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Activates the event card "Hunt".
|
||||
* Each player takes 1 Food and gains Prestige Points equal to prestigeMultiplier times the number of Hunters in their tribe.
|
||||
* Each player takes 1 Food and gains Prestige Points for each Hunter in their tribe.
|
||||
*
|
||||
* Buildings influence:
|
||||
* Building 7: you take 1 Food and gain 1 additional Prestige Point for each Hunter
|
||||
* Building 7: you take 1 Food and 1 additional Prestige Point for each Hunter
|
||||
*
|
||||
* @param playerList contains all the players in the game
|
||||
*/
|
||||
@Override
|
||||
public void activateEvent (ArrayList <Player> playerList){
|
||||
for (Player player : playerList) {
|
||||
int tmpFoodToAdd = foodToAdd;
|
||||
int tmpFoodMultiplier = foodMultiplier;
|
||||
int tmpPrestigeMultiplier = prestigeMultiplier;
|
||||
|
||||
ArrayList <BuildingCard> buildingList = player.buildingCards;
|
||||
@@ -51,12 +51,12 @@ public class Hunt extends EventCard {
|
||||
|
||||
for (BuildingCard buildingCard : buildingList) {
|
||||
if (buildingCard.getEffectId() == 7) {
|
||||
tmpFoodToAdd++;
|
||||
tmpFoodMultiplier++;
|
||||
tmpPrestigeMultiplier++;
|
||||
}
|
||||
}
|
||||
|
||||
player.addFood(tmpFoodToAdd);
|
||||
player.addFood(tmpFoodMultiplier * hunterCounter);
|
||||
player.addPrestige(tmpPrestigeMultiplier * hunterCounter);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class ShamanicRitual extends EventCard {
|
||||
* The player with the most icons gains the Prestige Points indicated.
|
||||
* The player with the fewest icons loses the Prestige Points indicated.
|
||||
* In case of a tie, all player gain or lose the Prestige Points indicated.
|
||||
* If all players have the same amount of icons, they all gains Prestige Points.
|
||||
* If all players have the same amount of icons, they all gain and lose Prestige Points.
|
||||
*
|
||||
* Buildings influence:
|
||||
* Building 2: if you have fewer icons than all other players, you don't lose Prestige Points
|
||||
|
||||
Reference in New Issue
Block a user