@Override
	public void onEntityHit(Player p, MapObject mo) {

		flicker = true;

		int dmg = p.getAttackDamage();

		int wepDmg = 0;
		ItemStack wep = world.getPlayer().invArmor.getWeapon();
		if(wep != null && 3 == ((ItemTool)wep.getItem()).getEffectiveness())
			wepDmg = ((ItemTool)wep.getItem()).getEffectiveDamage();

		health -= wepDmg + dmg;

		Music.play("hitpig_" + (rand.nextInt(5)+1));
		ai.panic(this);
		if(health < 0)
			kill(p);
	}