{
	code: "deer",
	class: "EntityAgent",
	tags: ["animal", "huntable", "habitat-land"],
	weight: 15,
	variantgroups: [
		{ code: "type", states: ["moose" ] },
		{ code: "age", states: ["baby"] },
		{ code: "gender", states: ["male", "female"] }
	],
	hitBoxSize: {	"x": 0.8,"y": 1.1},
	deadhitBoxSize: {	"x": 1.0,"y": 0.4},
	eyeHeight: 1.4,
	fallDamageMultiplier: 0.635,
	drops: [],
	attributes: {
		killedByInfoText: "deadcreature-killed",
		creatureDiet: {
			foodCategories: ["Vegetable", "Grain"],
			weightedFoodTags: [
				{ weight: 0.5, code: "nibbleCrop" }, 
				{ weight: 0.1, code: "grass" },
				{ weight: 0.9, code: "fruitmash" },
				{ weight: 1, code: "tastyvegetable" },
				{ weight: 0.2, code: "peanut" }
			],
			skipFoodTags: ["rice", "parsnip"]
		},
		trappable: {
			"small": { trapChance: 0.0,	trapDestroyChance: 0.0 },
			"large": { trapChance: 0.0,	trapDestroyChance: 0.0 }
		},
		handbook: {
			groupcode: "creaturegroup-moose",
			trappableGroupCode: "creaturegroup-deer-{type}-{age}"
		}
	},
	client: {
		renderer: "Shape",
		shape: { "base": "entity/animal/mammal/hooved/deer/moose/baby" },
		texture: { "base": "entity/animal/mammal/hooved/deer/moose-baby" },
		behaviors: [
			{ code: "repulseagents" },
			{ code: "controlledphysics", stepHeight: 2.1251 },
			{ code: "interpolateposition" },
			{ code: "floatupwhenstuck", "onlyWhenDead": true },
			{ code: "harvestable" },
			{ code: "despawn", minPlayerDistance: 16, belowLightLevel: 8, minSeconds: 300 },
			{ code: "ropetieable", minGeneration: 2 }
		],
		animations: [
			{
				code: "attack",
				animation: "Attack",
				animationSpeed: 2.2,
				weight: 10,
				blendMode: "AddAverage"
			},
			{
				code: "charge",
				animation: "Charge",
				animationSpeed: 2.2,
				weight: 10,
				blendMode: "AddAverage"
			},
			{
				code: "roar",
				animation: "Roar",
				animationSpeed: 2.2,
				weight: 10,
				blendMode: "AddAverage"
			},
			{
				code: "hurt",
				animation: "Hurt",
				animationSpeed: 2.2,
				weight: 10,
				blendMode: "AddAverage"
			},
			{
				code: "die",
				animation: "Die",
				easeInSpeed: 3,
				animationSpeed: 0.8,
				weight: 10,
				blendMode: "Average",
				triggeredBy: { "onControls": [ "dead" ] }
			},
			{
				code: "idle",
				animation: "Idle",
				blendMode: "AddAverage",
				easeOutSpeed: 4,
				triggeredBy: { "defaultAnim": true }
			},
			{
				code: "sleep",
				animation: "Sleep",
				easeInSpeed: 4,
				easeOutSpeed: 4,
				blendMode: "Average"
			},
			{
				code: "sit",
				animation: "Sit",
				easeInSpeed: 4,
				easeOutSpeed: 4,
				blendMode: "Average"
			},
			{
				code: "eat",
				animation: "Eat",
				easeInSpeed: 4,
				easeOutSpeed: 4,
				blendMode: "Average"
			},
			{
				code: "swim",
				animation: "Swim",
				supressDefaultAnimation: true,
				blendMode: "Average"
			},
			{
				code: "walk",
				animation: "Walk",
				supressDefaultAnimation: true,
				blendMode: "Average"
			},
			{
				code: "run",
				animation: "Run",
				supressDefaultAnimation: true,
				blendMode: "Average"
			},
			{
				code: "stot",
				animation: "Stot",
				supressDefaultAnimation: true,
				blendMode: "Average"
			},
			{
				code: "gallop",
				animation: "Gallop",
				supressDefaultAnimation: true,
				blendMode: "Average"
			}	
		]
	},
	server: {
		attributes: {
			pathfinder: {
				minTurnAnglePerSec: 90,
				maxTurnAnglePerSec: 180
			}
		},
		behaviors: [
			{ code: "ropetieable", minGeneration: 2 },
			{ code: "repulseagents" },
			{
				code: "controlledphysics",
				stepHeight: 2.1251
			},
			{
				code: "despawn",
				minPlayerDistance: 8,
				belowLightLevel: 8,
				minSeconds: 300
			},
			{
				code: "health",
				currenthealth: 6,
				maxhealth: 6
			},
			{
				code: "deaddecay",
				hoursToDecay: 96,
				decayedBlock: "carcass-small"
			},
			{
				code: "floatupwhenstuck",
				onlyWhenDead: true
			},
			{
				code: "harvestable",
				drops: [
					{
						type: "item",
						code: "redmeat-raw",
						quantity: {avg: 2, var: 1}
					},
					{
						type: "item",
						code: "hide-raw-small",
						quantity: {avg: 1.7, var: 0.0}
					}
				]
			},
			{ code: "breathe" },
			{ 
				code: "grow", 
				hoursToGrow: 336,
				adultEntityCodesByType: {
					"*-male": ["deer-moose-adult-male"],
					"*-female": ["deer-moose-adult-female"]
				},
			},
			{
				code: "emotionstates",
				states: [
					{
						code: "fleeondamage",
						duration: 20,
						chance: 1.0,
						slot: 0,
						priority: 5,
						accumType: "max",
						whenHealthRelBelow: 0.4
					},
					{ code: "alarmherdondamage", chance: 1, slot: 1, priority: 1, accumType: "max" },
					{ code: "saturated", duration: 1200, chance: 1,	slot: 0, priority: 1, accumType: "sum" }
				]
			},
			{
				code: "taskai",
				aiCreatureType: "LandCreature",
				aitasks: [
					{
						code: "fleeentity",
						instafleeOnDamageChance: 1,
						animation: "Run",
						entityCodes: [ "player", "wolf-*", "hyena-*", "bear-*" ],
						priority: 1.51,
						movespeed: 0.02,
						seekingRange: 14,
						animationSpeed: 2,
						sound: "creature/hooved/generic/sniff*",
						whenNotInEmotionState: "aggressiveondamage"
					},
					{
						code: "followleadholder",
						minGeneration: 2,
						priority: 1.45,
						animation: "Walk",
						movespeed: 0.01,
						animationSpeed: 7.2
					},
					{
						code: "stayclosetoentity",
						animation: "Trot",
						priority: 1.4,
						entityCode: "deer-moose-adult-female",
						movespeed: 0.02,
						animationSpeed: 1.5,
						maxDistance: 5,
						searchRange: 25
					},
					{
						code: "getoutofwater",
						animation: "Swim",
						priority: 1.4,
						movespeed: 0.0045,
						animationSpeed: 0.8
					},
					{
						code: "idle",
						animation: "Sleep",
						priority: 1.38,
						minduration: 200000,
						maxduration: 800000,
						mincooldown: 10000,
						maxcooldown: 30000,
						priorityForCancel: 1.38,
						whenNotInEmotionState: "aggressiveondamage",
						duringDayTimeFrames: [
							{ fromHour: 18, toHour: 10 }
						],
						stopOnNearbyEntityCodes: [ "player", "wolf-*", "hyena-*", "bear-*" ],
						stopRange: 8,
						stopOnHurt: true
					},
					{
						code: "seekfoodandeat",
						movespeed: 0.0055,
						priority: 1.25,
						eatSound: "creature/animal-eat-small",
						eatTime: 1.5,
						eatLooseItems: true,
						animationSpeed: 3.3,
						animation: "Walk",
						eatAnimation: "Eat",
						mincooldownHours: 1,
						maxcooldownHours: 4
					},
					{
						code: "idle",
						animation: "Eat",
						priority: 1.2,
						priorityForCancel: 1.35,
						minduration: 2667,
						maxduration: 2667,
						mincooldown: 6000,
						maxcooldown: 20000,
						animationSpeed: 1.5
					},
					{
						code: "idle",
						animation: "Roar",
						priority: 1.0,
						priorityForCancel: 1.35,
						minduration: 4667,
						maxduration: 4667,
						chance: 0.1,
						mincooldown: 8000,
						maxcooldown: 50000,
						animationSpeed: 1.0,
						sound: "creature/hooved/generic/sniff*",
						soundRange: 30
					},
					{
						code: "wander",
						animation: "Walk",
						priority: 1.0,
						priorityForCancel: 1.35,
						movespeed: 0.0055,
						animationSpeed: 1.4,
						preferredLightLevel: 12
					},
					{
						code: "wander",
						animation: "Stot",
						priority: 0.75,
						priorityForCancel: 1.35,
						movespeed: 0.02,
						animationSpeed: 1.5,
						preferredLightLevel: 12
					},
					{
						code: "wander",
						animation: "Jump",
						priority: 0.4,
						priorityForCancel: 1.8,
						maxduration: 1000,
						movespeed: 0.03,
						animationSpeed: 1.5,
						preferredLightLevel: 12
					},
					{
						code: "idle",
						animation: "Idle",
						priority: 0.9,
						minduration: 6000,
						maxduration: 45000,
						mincooldown: 6000,
						maxcooldown: 120000,
						priorityForCancel: 1.28,
						stopOnNearbyEntityCodes: [ "player", "wolf-*", "hyena-*", "bear-*" ],
						stopRange: 10,
						stopOnHurt: true,
						sound: "creature/hooved/generic/sniff*"
					},
					{
						code: "idle",
						animation: "Sit",
						priority: 0.9,
						minduration: 6000,
						maxduration: 45000,
						mincooldown: 6000,
						maxcooldown: 120000,
						priorityForCancel: 1.28,
						stopOnNearbyEntityCodes: [ "player", "wolf-*", "hyena-*", "bear-*" ],
						stopRange: 10,
						stopOnHurt: true
					},
					{
						code: "lookaround",
						priority: 0.5
					}
				]
			},
			{
				code: "pettable",
				minGeneration: 4
			}
		]
	},
	sounds:{
		hurt: "creature/hooved/small/fawn/fawn*",
		death: "creature/hooved/small/fawn/fawn*",
		idle: { path: "creature/hooved/small/strange/mew*", pitch: { avg: 1, var: 0.25 } }
	},
	idleSoundChance: 0.05
}
