local npcManager = require("npcManager")
local npcutils = require("npcs/npcutils")

local enemies = require("maskCollection/scripts/enemies")
local ai = require("maskCollection/scripts/npc/fauxPlayer")


local fauxPlayer = {}
local npcID = NPC_ID

local fauxPlayerSettings = table.join({
	id = npcID,

	gfxwidth = 96,
	gfxheight = 72,

	width = 22,
	height = 54,

	gfxoffsetx = 0,
	gfxoffsety = 2,

	frames = 11,
	framestyle = 1,
	framespeed = 8,


	skidEnabled = false,
	--stompJumpEnabled = false,
	harmKnockbackEnabled = true,
	linkStabEnabled = true,
	linkShieldEnabled = true,

	stompJumpMinSpeedY = -10,
	stompJumpMaxSpeedY = -8,

	runAcceleration = 0.025,

	--runSpeed = 4.75,

	animationSet = {
		idle = {1},
		walk = {1,4,3,2, frameDelay = 12},
		jump = {5},
		fall = {3},
		crouch = {5},

		stabPrepare = {6},
		stab = {7},
		crouchStab = {8},

		hurt = {11},
	},

	hurtSound = Misc.resolveSoundFile("maskCollection/resources/sound/fauxPlayer/linkHurt"),
	deathSound = Misc.resolveSoundFile("maskCollection/resources/sound/fauxPlayer/linkDeath"),
},ai.sharedSettings)

npcManager.setNpcSettings(fauxPlayerSettings)
npcManager.registerHarmTypes(npcID,
	{
		HARM_TYPE_JUMP,
		HARM_TYPE_FROMBELOW,
		HARM_TYPE_NPC,
		HARM_TYPE_PROJECTILE_USED,
		HARM_TYPE_LAVA,
		HARM_TYPE_HELD,
		HARM_TYPE_TAIL,
		HARM_TYPE_SPINJUMP,
		HARM_TYPE_OFFSCREEN,
		HARM_TYPE_SWORD
	}, 
	{
		--[HARM_TYPE_JUMP]=10,
		--[HARM_TYPE_FROMBELOW]=10,
		--[HARM_TYPE_NPC]=10,
		--[HARM_TYPE_PROJECTILE_USED]=10,
		--[HARM_TYPE_LAVA]={id=13, xoffset=0.5, xoffsetBack = 0, yoffset=1, yoffsetBack = 1.5},
		--[HARM_TYPE_HELD]=10,
		--[HARM_TYPE_TAIL]=10,
		--[HARM_TYPE_SPINJUMP]=10,
		--[HARM_TYPE_OFFSCREEN]=10,
		--[HARM_TYPE_SWORD]=10,
	}
)


ai.register(npcID)


enemies.config[npcID].goopWidth = 32
enemies.config[npcID].goopHeight = 64


return fauxPlayer