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.Cards.TribeCards.Character;
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType;
import it.polimi.ingsw.gc14.Model.Player;

import java.util.HashMap;

/**
 * During the Sustenance Event, you have a discount of 1 food token on the total you
 * would have to pay, for each of the indicated characters in your tribe.
 */
public class Building1 extends BuildingCard {

    /**
     * The icon attribute indicates the character type involved in the building effect.
     */
    private CharacterType icon ;

    /**
     * @return The character type associated with this building effect.
     */
    public CharacterType getIcon() {return icon;}

    /**
     * Constructor of the building.
     * @param era The game era of the building.
     * @param price The price (in food) of the building.
     * @param prestigeValue The number of Prestige Points gained from this building at the end of the game.
     * @param icon The character type used by the building effect.
     */
    public Building1(int era, int price,int prestigeValue, CharacterType icon) {
        super(era,price,prestigeValue);
        effectType = EffectType.ON_EVENT;
        effectId = 1;
        this.icon = icon;
    }

    /**
     * Method to clone the building: it creates an exact copy.
     * @return The new copy of the building.
     */
    @Override
    public BuildingCard clone() {
        return new Building1(getEra(),getPrice(),getPrestigeValue(),getIcon());
    }

}
