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

import java.util.ArrayList;

public class Building11 extends BuildingCard {
    private CharacterType icon ;
    public CharacterType getIcon() {return icon;}
    private int PrestigeMul;
    public int getPrestigeMul() {return PrestigeMul;}


    public Building11(int era, int price,int prestigeValue, CharacterType  icon, int prestigeMul) {
        super(era,price,prestigeValue);
        effectType = EffectType.FINAL;
        effectId = 11;
        this.icon = icon;
        this.PrestigeMul = prestigeMul;
    }
    @Override
    public BuildingCard clone() {
        return new Building11(getEra(),getPrice(),getPrestigeValue(), getIcon(), getPrestigeMul());
    }
    @Override
    public void applyEffect(Player player) throws IllegalArgumentException {
        if(!player.buildingCards.contains(this))
            throw new IllegalArgumentException();
        player.addPrestige(player.getNType(getIcon()) * this.getPrestigeMul());
    }
}
