Adds a small recovery window to variable length megafauna attacks for more predictable melee resolution (#1844)

This commit is contained in:
CitadelStationBot
2017-06-30 22:47:21 -05:00
committed by kevinz000
parent 72a9272969
commit 1ad4947e58
4 changed files with 9 additions and 2 deletions
+2 -1
View File
@@ -134,4 +134,5 @@
#define INCORPOREAL_MOVE_BASIC 1
#define INCORPOREAL_MOVE_SHADOW 2 // leaves a trail of shadows
#define INCORPOREAL_MOVE_JAUNT 3 // is blocked by holy water/salt
#define INCORPOREAL_MOVE_JAUNT 3 // is blocked by holy water/salt
#define MEGAFAUNA_DEFAULT_RECOVERY_TIME 5
@@ -170,6 +170,7 @@ Difficulty: Hard
charge(bonus_charges)
else
Goto(target, move_to_delay, minimum_distance)
SetRecoveryTime(MEGAFAUNA_DEFAULT_RECOVERY_TIME)
/mob/living/simple_animal/hostile/megafauna/bubblegum/Bump(atom/A)
@@ -259,6 +259,7 @@ Difficulty: Medium
density = TRUE
sleep(1)
swooping &= ~SWOOP_DAMAGEABLE
SetRecoveryTime(MEGAFAUNA_DEFAULT_RECOVERY_TIME)
/mob/living/simple_animal/hostile/megafauna/dragon/AltClickOn(atom/movable/A)
if(!istype(A))
@@ -40,6 +40,7 @@
var/elimination = 0
var/anger_modifier = 0
var/obj/item/device/gps/internal
var/recovery_time = 0
anchored = TRUE
mob_size = MOB_SIZE_LARGE
layer = LARGE_MOB_LAYER //Looks weird with them slipping under mineral walls and cameras and shit otherwise
@@ -83,6 +84,8 @@
..()
/mob/living/simple_animal/hostile/megafauna/AttackingTarget()
if(recovery_time >= world.time)
return
. = ..()
if(. && isliving(target))
var/mob/living/L = target
@@ -121,7 +124,8 @@
if(3)
adjustBruteLoss(50)
/mob/living/simple_animal/hostile/megafauna/proc/SetRecoveryTime(buffer_time)
recovery_time = world.time + buffer_time
/mob/living/simple_animal/hostile/megafauna/proc/grant_achievement(medaltype,scoretype)
if(medal_type == "Boss") //Don't award medals if the medal type isn't set