package it.polimi.ingsw.gc14.Model.Cards.Building.Effects;

import it.polimi.ingsw.gc14.Model.Cards.Building.EffectType;
import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
import it.polimi.ingsw.gc14.Model.Player;

public class Building13 extends BuildingCard{

    /**
     * Creates a Building13 card with the specified era, price, and prestige value.
     *
     * @param era the era of the building card.
     * @param price the price of the building card.
     * @param prestigeValue the prestige value of the building card.
     */
    public Building13(int era, int price,int prestigeValue) {
        super(era,price,prestigeValue);
        effectType= EffectType.FINAL;
        effectId=13;
    }

    /**
     * Creates and returns a copy of this Building13 card.
     *
     * @return a clone of this Building13 card.
     */
    @Override
    public BuildingCard clone() {
        return new Building13(getEra(),getPrice(),getPrestigeValue());
    }

    /**
     * Applies the effect of this building card to the specified player.
     *
     * @param player the player to whom the effect is applied.
     * @throws IllegalArgumentException if the player does not own this building card.
     */
    @Override
    public void applyEffect(Player player) throws IllegalArgumentException {
        if(!player.buildingCards.contains(this))
            throw new IllegalArgumentException();
        player.addPrestige(25);
    }

}