-- NPC used to represent the concept of a player holding multiple bombs at once

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

local battleBombs = require("scripts/battleBombs")

local onlinePlayNPC = require("scripts/onlinePlay_npc")


local bombBunch = {}
local npcID = NPC_ID

local bombBunchSettings = {
	id = npcID,

	gfxwidth = 32,
	gfxheight = 32,

	width = 28,
	height = 32,

	gfxoffsetx = 0,
	gfxoffsety = 0,

	frames = 1,
	framestyle = 0,
	framespeed = 8,

	luahandlesspeed = false,
	nowaterphysics = false,
	cliffturn = false,
	staticdirection = false,

	npcblock = false,
	npcblocktop = false,
	playerblock = false,
	playerblocktop = false,

	nohurt = true,
	nogravity = false,
	noblockcollision = true,
	notcointransformable = true,
	nofireball = true,
	noiceball = true,
	noyoshi = true,

	jumphurt = true,
	spinjumpsafe = false,
	harmlessgrab = false,
	harmlessthrown = false,
	nowalldeath = false,

	linkshieldable = false,
	noshieldfireeffect = false,

	grabside = false,
	grabtop = false,

	nogliding = true,

	ignorethrownnpcs = true,


	isBunch = true,

	forwardThrowBaseAngle = -45,
	forwardThrowAngleVariance = -20,
	forwardThrowSpeed = 8,

	upwardThrowBaseAngle = -90,
	upwardThrowAngleVariance = 20,
	upwardThrowSpeed = 10,
}

npcManager.setNpcSettings(bombBunchSettings)
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_LAVA] = {id=13, xoffset=0.5, xoffsetBack = 0, yoffset=1, yoffsetBack = 1.5},
		[HARM_TYPE_SPINJUMP] = 10,
	}
)


battleBombs.bunchNPCID = npcID

battleBombs.register(npcID)


return bombBunch