public class Arme extends Objet{
	
	
	private int bonusAtk=0;
	private int missileDmg=0;
	private boolean equiped=false;
	private int poids=0;
	
	private int resistanceMat=0;
	private int structureMat=0;
	
	private int magicBonus=0;
	
	private int niveau=0;
	
	
	
	public Arme(boolean casse,String modele,String nom,String nomE,int bonusMagic,String typeObjet,boolean visible,String tileStr){
		super(casse,modele,nom,nomE,bonusMagic,typeObjet,visible,tileStr);
		
		
		magicBonus=bonusMagic;
	
	
		if((bonusMagic*4)-7>=0){
			niveau=(bonusMagic*4)-7;
		}
		else{niveau=0;
		}
		
		
		
		if(getModele().compareTo("longsword")==0){
			
			bonusAtk=4+bonusMagic;
			poids=3;
			missileDmg=(int)(poids*0.5)+bonusMagic;
			resistanceMat=70+(bonusMagic*20);
			structureMat=100+(bonusMagic*20);
			
		}
		
		if(getModele().compareTo("dagger")==0){
			
			bonusAtk=3+bonusMagic;
			poids=1;
			missileDmg=3+bonusMagic;
			resistanceMat=70+(bonusMagic*20);
			structureMat=60+(bonusMagic*20);
			
		}
		
		if(getModele().compareTo("battleaxe")==0){
			
			bonusAtk=6+bonusMagic;
			poids=10;
			missileDmg=(int)(poids*0.5)+bonusMagic;
			resistanceMat=100+(bonusMagic*20);
			structureMat=160+(bonusMagic*20);
			
		}
		
		if(getModele().compareTo("flail")==0){
			
			bonusAtk=5+bonusMagic;
			poids=8;
			missileDmg=(int)(poids*0.5)+bonusMagic;
			resistanceMat=70+(bonusMagic*20);
			structureMat=120+(bonusMagic*20);
			
		}
		
		if(getModele().compareTo("warhammer")==0){
			
			bonusAtk=5+bonusMagic;
			poids=8;
			missileDmg=(int)(poids*0.5)+bonusMagic;
			resistanceMat=120+(bonusMagic*20);
			structureMat=200+(bonusMagic*20);
			
		}
		
		if(getModele().compareTo("mace")==0){
			
			bonusAtk=3+bonusMagic;
			poids=7;
			missileDmg=(int)(poids*0.5)+bonusMagic;
			resistanceMat=120+(bonusMagic*20);
			structureMat=200+(bonusMagic*20);
			
		}
		
		if(getModele().compareTo("polearm")==0){
			
			bonusAtk=7+bonusMagic;
			poids=15;
			missileDmg=(int)(poids*0.5)+bonusMagic;
			resistanceMat=80+(bonusMagic*20);
			structureMat=140+(bonusMagic*20);
			
		}
		
		if(getModele().compareTo("quarterstaff")==0){
			
			bonusAtk=3+bonusMagic;
			poids=2;
			missileDmg=(int)(poids*0.5)+bonusMagic;
			resistanceMat=60+(bonusMagic*20);
			structureMat=100+(bonusMagic*20);
			
		}
		
		if(getModele().compareTo("shortaxe")==0){
			
			bonusAtk=4+bonusMagic;
			poids=2;
			missileDmg=5+bonusMagic;
			resistanceMat=100+(bonusMagic*20);
			structureMat=120+(bonusMagic*20);
			
		}
		
		if(getModele().compareTo("shortsword")==0){
			
			bonusAtk=4+bonusMagic;
			poids=2;
			missileDmg=2+bonusMagic;
			resistanceMat=60+(bonusMagic*20);
			structureMat=80+(bonusMagic*20);
			
		}
		
		
		
			
	}
	
	public int getNiveau(){
		return niveau;
	}
	
	public int getPoids(){
		return poids;
	}
	
	public void setPoids(int pds){
		poids=pds;
	}
	
	
	public boolean getEquiped(){
		return equiped;
	}
	
	public void setEquiped(boolean eq){
		equiped=eq;
	}
	
	public int getBonusAtk(){
		return bonusAtk;
	}
	
	public void setBonusAtk(int bonat){
		bonusAtk=bonat;
	}
	
	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 getMagicBonus(){
		return magicBonus;
	}
	
	public int getMissileDmg(){
		return missileDmg;
	}
	
	public void setMissileDmg(int md){
		missileDmg=md;
	}
}