Class ShamanicRitual
java.lang.Object
it.polimi.ingsw.gc14.Model.PlayableCard
it.polimi.ingsw.gc14.Model.Cards.TribeCard
it.polimi.ingsw.gc14.Model.Cards.TribeCards.EventCard
it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events.ShamanicRitual
- All Implemented Interfaces:
Serializable
When activated, rewards the player with the most shaman icons and penalizes the one with the fewest.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intBonus shaman icons granted per Building 5 owned during this event.private final intPrestige points awarded to the player with the most shaman icons.private final intPrestige points removed from the player with the fewest shaman icons. -
Constructor Summary
ConstructorsConstructorDescriptionShamanicRitual(int Era, int prestigeToAdd, int prestigeToRemove) Creates a new ShamanicRitual event card.ShamanicRitual(String idIMG, int Era, int prestigeToAdd, int prestigeToRemove) Creates a new ShamanicRitual event card. -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateEvent(ArrayList<Player> playerList) Activates the event card "Shamanic Ritual".clone()Creates and returns a copy of this ShamanicRitual card.(package private) intReturns the prestige points awarded to the player with the most shaman icons.(package private) intReturns the prestige points removed from the player with the fewest shaman icons.Returns the representation shown on the board (offer track cards).Prints a string representation of thisTribeCard.Methods inherited from class TribeCard
getNMin, isEventCardMethods inherited from class PlayableCard
getEra, getIdIMG
-
Field Details
-
BUILDING5_BONUS_ICONS
private static final int BUILDING5_BONUS_ICONSBonus shaman icons granted per Building 5 owned during this event.- See Also:
-
prestigeToAdd
private final int prestigeToAddPrestige points awarded to the player with the most shaman icons. -
prestigeToRemove
private final int prestigeToRemovePrestige points removed from the player with the fewest shaman icons.
-
-
Constructor Details
-
ShamanicRitual
public ShamanicRitual(int Era, int prestigeToAdd, int prestigeToRemove) Creates a new ShamanicRitual event card.- Parameters:
Era- the era of the cardprestigeToAdd- prestige points awarded to the player with the most iconsprestigeToRemove- prestige points removed from the player with the fewest icons
-
ShamanicRitual
Creates a new ShamanicRitual event card.- Parameters:
idIMG- the image identifier of the ShamanicRitual event card.Era- the era of the card.prestigeToAdd- prestige points awarded to the player with the most icons.prestigeToRemove- prestige points removed from the player with the fewest icons.
-
-
Method Details
-
getPrestigeToAdd
int getPrestigeToAdd()Returns the prestige points awarded to the player with the most shaman icons.- Returns:
- prestige points to award.
-
getPrestigeToRemove
int getPrestigeToRemove()Returns the prestige points removed from the player with the fewest shaman icons.- Returns:
- prestige points to remove.
-
activateEvent
Activates the event card "Shamanic Ritual". 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 players gain or lose the Prestige Points indicated. If all players have the same amount of icons, they all gain and lose Prestige Points. Buildings influence: Building 2: if you have the lowest number of icons, you don't lose Prestige Points Building 5: during the Shamanic Ritual, you gain 3 icons Building 6: if you have more icons than any other player, you gain double of Prestige Points- Specified by:
activateEventin classEventCard- Parameters:
playerList- contains all the players in the game
-
clone
-
toStringPlayer
Prints a string representation of thisTribeCard. This specific variation is used in theGame's toString to print a more detailed version. Includes:- Specified by:
toStringPlayerin classPlayableCard- Returns:
String- a string representation of thisTribeCard.- See Also:
-
toStringBoard
Description copied from class:PlayableCardReturns the representation shown on the board (offer track cards).- Specified by:
toStringBoardin classPlayableCard- Returns:
- the board string representation of this card.
-