Adds Tile-based Attacks

Adds ability to attack mobs by clicking their tile.
When someone clicks a tile with a weapon while off help intent, and if a mob is occupying that tile, the mob will be attacked as if they were clicked directly.
If more than one mob is on a tile, one is chosen randomly.
You cannot hit yourself by clicking your own tile.
Weapons with cleaving abilities will attempt a cleave on the tile clicked on, making it very easy to hit (simple) mobs with those weapons if near you.

Other changes.
Cleave proc can accept any atom now and not just a mob.
Also cleans up weapons deciding how they can cleave somewhat.
This commit is contained in:
Neerti
2018-04-05 13:07:38 -04:00
parent cdf794950e
commit 4ac6d34235
8 changed files with 57 additions and 25 deletions

View File

@@ -201,8 +201,11 @@ note dizziness decrements automatically in the mob's Life() proc.
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2)
animate(pixel_x = default_pixel_x, pixel_y = default_pixel_y, time = 2)
/mob/living/do_attack_animation(atom/A)
/mob/living/do_attack_animation(atom/A, no_attack_icons = FALSE)
..()
if(no_attack_icons)
return FALSE
//Check for clients with pref enabled
var/list/viewing = list()
for(var/m in viewers(A))