YdoBoon = {
	Description = "Ydo boon",

	Char	= "Y",

	HP		= 100,

	AttackRating  = 90,
	DefenseRating = 60,

	AttackPlus  = 0,
	DefensePlus = 0,

	Inventory = {
		Weapon = { MinDamage = 20, DamageRange = 15 },
		Armor  = { MinArmor  = 10,  ArmorRange = 10 }
	},

	Level	= 15
}

function YdoBoon:Update()
	if TileVisible( self.TileX, self.TileY ) then
		if ObjectDistanceSq( self, Hero ) == 1 then
			CalculateDamage( self, Hero )
		else
			if math.abs( Hero.TileX - self.TileX ) > math.abs( Hero.TileY - self.TileY ) then
				self.MoveX = Sgn( Hero.TileX - self.TileX )
				self.MoveY = 0
			else
				self.MoveX = 0
				self.MoveY = Sgn( Hero.TileY - self.TileY )
			end
		end
	end
end

function YdoBoon:BumpInto()
	CalculateDamage( Hero, self )

	SyncObject( Hero )
end

function YdoBoon:Death()
	PrintLog( "Ydo boon stares at his heart in your hand as it stops beating." )

	GameWon = true
	Hero.HP = -1
	SyncObject( Hero )
end
