diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 96e8bd6c05..ebc4ebf421 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -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 \ No newline at end of file +#define INCORPOREAL_MOVE_JAUNT 3 // is blocked by holy water/salt +#define MEGAFAUNA_DEFAULT_RECOVERY_TIME 5 diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index b7de5b9440..15fa6c3bb2 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -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) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm index 6f97737616..15db5ab50a 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm @@ -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)) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index ec72989474..cd3563661e 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -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