package common.entity.npc;

import common.entity.types.EntityLiving;
import common.rng.Random;
import common.world.World;

public class EntityDwarf extends EntityNPC {
	public EntityDwarf(World worldIn) {
		super(worldIn);
	}
	
//	public boolean isAggressive() {
//		return false;
//	}
//	
//    public boolean isPeaceful() {
//    	return false;
//    }
    
//    public boolean isAggressive(Class<? extends EntityNPC> clazz) {
//    	return false;
//    }
//    
//    public boolean isPeaceful(Class<? extends EntityNPC> clazz) {
//    	return false;
//    }
    
//    public boolean canInfight(Alignment align) {
//    	return false;
//    }
//    
//    public boolean canMurder(Alignment align) {
//    	return false;
//    }
    
//    public boolean canUseMagic() {
//    	return false;
//    }
    
//    public int getBaseEnergy(Random rand) {
//    	return 0;
//    }
    
    public int getBaseHealth(Random rand) {
    	return rand.range(16, 18);
    }

    public float getHeightDeviationMin() {
    	return -0.1f;
    }

    public float getHeightDeviationMax() {
    	return 0.1f;
    }
    
    public float getSpeciesBaseSize() {
    	return 1.56f;
    }
    
    public Alignment getNaturalAlign() {
    	return rand.pick(Alignment.GOOD, Alignment.LAWFUL_GOOD, Alignment.NEUTRAL, Alignment.LAWFUL);
    }
    
    public boolean canTrade() {
        return true;
    }
    
    public boolean canAmbush(EntityLiving entity) {
    	return (float)this.getHealth() >= ((float)this.getMaxHealth() / 2.85f) && entity.getHealth() < this.getHealth();
    }
}
