{
	code: "eidolon-immobilized",
	class: "EntityEidolon",
	tags: ["mechanical", "boss", "habitat-land"],
	weight: 2500,
	hitboxSize: { x: 1.7, y: 2 },
	deadHitboxSize: { x: 1.7, y: 1.5 },
	eyeHeight: 1.7,
	attributes: {
		isMechanical: true,
		spawnDamageParticles: true
	},
	drops: [
		{
			// Drop rate of this hardcoded to correspond to number of attackers. Must be the first entry
			type: "item",
			code: "rustypart-eidolon2tr",
			quantity: { avg: 1 }
		},
		{
			type: "item",
			code: "gear-temporal",
			dropModbyStat: "rustyGearDropRate",
			quantity: { avg: 1.5, var: 2, dist: "invexp" }
		},
		{
			type: "item",
			code: "gear-rusty",
			dropModbyStat: "rustyGearDropRate",
			quantity: { avg: 12, var: 30, dist: "invexp" }
		},
		{
			type: "block",
			code: "metal-parts",
			quantity: { avg: 4.5, var: 0.5 }
		},
		{
			type: "block",
			code: "metal-scraps",
			quantity: { avg: 3, var: 5, dist: "invexp" }
		}
	],
	client: {
		renderer: "Shape",
		pitchStep: false,
		shape: { base: "entity/lore/eidolon/immobilized" },
		behaviors: [
			{ code: "repulseagents", movable: false }, 
			{ code: "controlledphysics", stepHeight: 1.1251 }, 
			{ code: "interpolateposition" },
			{ code: "boss", bossHpBarRange: 30, musicTrack: "theresonancearchives-eidolon" },
		],
		animations: [
			{ 
				code: "inactive",
				animation: "inactive",
				blendMode: "Average"
			},
			{ 
				code: "idle",
				animation: "idle",
				blendMode: "Average", 
				triggeredBy: { defaultAnim: true },
			},
			{
				code: "die",
				animation: "die", 
				animationSpeed: 0.5,
				weight: 10,
				blendMode: "Average",
				triggeredBy: { onControls: ["dead"] }
			}
		]
	},
	server: {
		behaviors: [
			{ code: "repulseagents", movable: false }, 
			{ code: "controlledphysics", stepHeight: 1.1251 },
			{ code: "reviveondeath", minHours: 168, maxHours: 192 },
			{ code: "health", currenthealth: 500, maxhealth: 500 },
			{
				code: "emotionstates",
				states: [ { code: "aggressiveondamage", duration: 200, chance: 1, slot: 0, priority: 0.5, accumType: "noaccum" }, ]
			},
			{
				code: "taskai",
				aitasks: [
					{
						code: "eidolonmeleeattack",
						entityCodes: ["player"],
						priority: 2,
						damage: 12,
						damageTier: 3,
						damageType: "SlashingAttack",
						knockbackStrength: 3,
						mincooldown: 250, 
						maxcooldown: 1000, 
						damagePlayerAtMs: 1250,
						attackDurationMs: 1850,
						attackAngleRangeDeg: 360,
						animation: "slash",
						animationSpeed: 1,
						sound: "creature/drifter-hit",
						soundStartMs: 400,
						minDist: 4,
						minVerDist: 4
					},
					{
						code: "throwatentity",
						entityCodes: ["player"],
						projectileCode: "thrownboulder-granite",
						projectileDamage: 8,
						projectileDamageTier: 2,
						priority: 1.55,
						priorityForCancel: 9,
						mincooldown: 1000, 
						maxcooldown: 2000, 
						durationMs: 2166,
						releaseAtMs: 1400,
						seekingRange: 15,
						sound: "creature/eidolon/throw",
						soundStartMs: 200,
						soundRange: 32,
						animationSpeed: 1.25,
						animation: "throw",
						immobile: true,
						maxTurnAngleDeg: 35,
						maxOffAngleThrowDeg: 85,
					},
					{
						code: "eidolonslam",
						entityCodes: ["player"],
						projectileCode: "thrownboulder-granite",
						creatureCode: "locust-bronze",
						projectileDamage: 8,
						projectileDamageTier: 1,
						priority: 1.5,
						priorityForCancel: 9,
						mincooldown: 1000, 
						maxcooldown: 3000, 
						durationMs: 1433,
						releaseAtMs: 1333,
						seekingRange: 15,
						animationSpeed: 1,
						animation: "slam",
						sound: "creature/eidolon/rockfallslam",
						soundStartMs: 1200,
					},
					{
						priority: 1.25,
						maxTurnAngleDeg: 35,
						code: "lookatentity",
						entityCodes: ["player"]
					},
					{
						code: "idle",
						id: "idle",
						animation: "idle",
						priority: 1,
						maxduration: -1
					},
					{
						code: "idle",
						id: "inactive",
						animation: "inactive",
						priority: 0.1,
						priorityForCancel: 9,
						maxduration: -1,
						finishSound: "creature/eidolon/awaken",
						soundRange: 32
					}
				]
			},
			{ code: "harvestable", duration: 2, fixedweight: true, drops: [
					{
						type: "item",
						code: "gear-temporal",
						quantity: { avg: 0.02666, var: 0 }
					},
					{
						type: "item",
						code: "flaxfibers",
						quantity: { avg: 0.2, var: 0 }
					},
					{
						type: "item",
						code: "gear-rusty",
						dropModbyStat: "rustyGearDropRate",
						quantity: { avg: 0.01, var: 0 }
					}
				]
			},
			{ code: "entitystatetags" }
		],
	},
	sounds: {
		hurt: "creature/eidolon/hit",
		death: "creature/eidolon/death"
	}
}
