public class Nourriture extends Comestible{
	
	
	private int poids=0;
	private int resistanceMat=0;
	private int structureMat=0;
	private int nutrition=0;
	private int niveau=0;
	
	
	
	public Nourriture(boolean casse,String modele,String nom,String nomE,String typeObjet,boolean visible,String tileStr){
		super(casse,modele,nom,nomE,typeObjet,visible,tileStr);
		
		
		if(modele.compareTo("mushroom")==0){
			structureMat=1;
			resistanceMat=5;
			poids=1;
			nutrition=100;
			
		}
		
		if(modele.compareTo("ration")==0){
			structureMat=5;
			resistanceMat=20;
			poids=5;
			nutrition=500;
			
		}
		
		if(modele.compareTo("potiron")==0){
			structureMat=10;
			resistanceMat=25;
			poids=5;
			nutrition=500;
			
		}
		
		
		
		
	}
	
	public void effetNourriture(Personnage perso){
		System.out.println("manger nourriture");
		
		if(perso.getFaim()-nutrition>=0){
			perso.setFaim(perso.getFaim()-nutrition);
		}
		else{
			perso.setFaim(0);
		}
		
		perso.message("Pas mauvais (diminution de "+nutrition+" points de faim)",false);
		perso.message("Nice taste...(you lose "+nutrition+" hunger points)",true);
		
		
		
	}
	
	public int getNiveau(){
		return niveau;
	}
	
	public int getNutrition(){
		return nutrition;
	}
	
	public void setNutrition(int nut){
		nutrition=nut;
	}
	
	public int getResistanceMat(){
		return resistanceMat;
	}
	
	public void setResistanceMat(int res){
		resistanceMat=res;
	}
	
	public int getStructureMat(){
		return structureMat;
	}
	
	public void setStructureMat(int struct){
		structureMat=struct;
	}
	
	public int getPoids(){
		return poids;
	}
	
	public void setPoids(int pds){
		poids=pds;
	}
	
	
	
}