package it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters;

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

public class Shaman extends Character {

    private int icon;

    /**
     * Returns the icon value of this Shaman card.
     *
     * @return the icon value of this Shaman card.
     */
    public int getIcon() {
            return icon;
    }

    /**
     * Creates a Shaman character card with the specified era and icon value.
     *
     * @param Era the era of the Shaman card.
     * @param icon the icon value of the Shaman card.
     */
    public Shaman(int Era, int icon) {
        super(Era, CharacterType.SHAMAN);
        this.icon = icon;
    }

    /**
     * Creates a Shaman character card with the specified era, icon value,
     * and minimum number of players.
     *
     * @param Era the era of the Shaman card.
     * @param icon the icon value of the Shaman card.
     * @param nMin the minimum number of players required for the card.
     */
    public Shaman(int Era, int icon, int nMin) {
        super(Era, CharacterType.SHAMAN,nMin);
        this.icon = icon;
    }

    /**
     * Returns the string representation of this Shaman card.
     *
     * @return the string representation of this Shaman card.
     */
    @Override
    public String toString() {
        return super.toString() + "Icon: " + String.valueOf(icon);
    }

    /**
     * Creates and returns a copy of this Shaman card.
     *
     * @return a clone of this Shaman card.
     */
    @Override
    public Character clone()  {
        return new  Shaman(getEra(), getIcon(), getNMin());
    }

    /**
     * Inserts this Shaman card into the specified player's Shaman collection.
     *
     * @param player the player who receives the card.
     */
    @Override
    public void insert(Player player)
    {
        player.shamans.add(this);
    }
}
