public class Shit extends Obj implements java.io.Serializable {
	static final long serialVersionUID = 1L;
	
	private static final int SHITLIMIT[] = {100*12, 100*24, 100*24*2};
	private int ageState;
	private int falldownDamage = 0;
	
	public Shit (int initX, int initY, int initZ, int initAgeState) {
		objType = SHIT;
		x = initX;
		y = initY;
		z = initZ;
		ageState = initAgeState;
		removed = false;
	}
	
	public int getAgeState() {
		return ageState;
	}
	
	public int getShitState() {
		if (age >= SHITLIMIT[ageState]/2) {
			return 1;
		}
		return 0;
	}
	
	public int clockTick() {
		if (removed == false) {
			age += TICK;
			if (age >= SHITLIMIT[ageState]) {
				removed = true;
			}
			if (!grabbed && z > 0) {
				z -= 2;
				falldownDamage += 2;
				if (z <= 0) {
					if (falldownDamage > 10) {
						age += SHITLIMIT[ageState]/2;
					}
					z = 0;
					falldownDamage = 0;
				}
			}
			return DONOTHING;
		}
		return REMOVED;
	}
}