Here are my thoughts:
Movement: you can do with path finding,if you find it hard to implement as an algorithm start with simple logic (while move if hit wall do
...), and after that try to create a simple algorithm to make it more efficient. The A* algorithm seems to be the best for path finding. If that's too hard use "zombie movements" (if target.x>me.x me.x-=speed
...).
Attack: you can use collision detection for close range (and timer so it wont attack every tick of game loop), check distance of entities, if close shot. Or you can use raycasting for FOV.
Behavior per enemy level: check Pacman every ghost had a different behavior pattern. You can also use a finite state machine (i used it for patrolling enemy).
Defend: like attack but you should randomize so it wont block every time, or create a weak spot an enemy can't defend from (in Golden Axe it was jump attack and from behind, and also when the enemy slept, ate, etc.).
As this is javascript you should take a look at some AS3 AI (and get a good SWF decompiler for educational purpose ).
Also check out waypoints, circular movement (mostly like circle point by point drawing functions with trigonometry), and move by path (irregular paths I found it simple to learn its easy math even for me).
Check Google for tutorials and info, research is the programmer's best friend. Here are some of my findings:
Edit: about tiles you can implement non-tile behavior if you know how to convert tile coordinates to normal x,y(,z?) coordinates, e.g.:
player.x = tile_cor_x * tile_size_width / 2
// same for y (and z?)
Or maybe a loop that checks who's on 20 tiles in front of a character, if there's an enemy shooting here, take cover and switch to a "coward" behavior.