Skip to content

Commit

Permalink
Simple Mob Slowdown (#20293)
Browse files Browse the repository at this point in the history
* Tweaked mobs to use the universal speed variable when chasing after a
target.
* Made Reavers move much slower when pursuing a target.
  • Loading branch information
Geevies authored Dec 26, 2024
1 parent e7666b9 commit 4bf1c81
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 29 deletions.
9 changes: 3 additions & 6 deletions code/modules/mob/living/simple_animal/hostile/alien.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
icon_living = "samak"
icon_dead = "samak_dead"
icon = 'icons/jungle.dmi'
move_to_delay = 2
speed = 2
maxHealth = 125
health = 125
speed = 2
melee_damage_lower = 5
melee_damage_upper = 15
attacktext = "mauled"
Expand All @@ -29,10 +28,9 @@
icon_living = "diyaab"
icon_dead = "diyaab_dead"
icon = 'icons/jungle.dmi'
move_to_delay = 1
speed = 1
maxHealth = 25
health = 25
speed = 1
melee_damage_lower = 1
melee_damage_upper = 8
attacktext = "gouged"
Expand All @@ -55,10 +53,9 @@
icon_living = "shantak"
icon_dead = "shantak_dead"
icon = 'icons/jungle.dmi'
move_to_delay = 1
speed = 1
maxHealth = 75
health = 75
speed = 1
melee_damage_lower = 3
melee_damage_upper = 12
attacktext = "gouged"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ ABSTRACT_TYPE(/mob/living/simple_animal/hostile/commanded)
stop_automated_movement = 1
var/mob/mob_to_follow = following_mob_ref?.resolve()
if(mob_to_follow && get_dist(src, mob_to_follow) <= 10)
walk_to(src,mob_to_follow,1,move_to_delay)
walk_to(src, mob_to_follow, 1, speed)

/mob/living/simple_animal/hostile/commanded/proc/commanded_stop() //basically a proc that runs whenever we are asked to stay put. Probably going to remain unused.
return
Expand Down
15 changes: 7 additions & 8 deletions code/modules/mob/living/simple_animal/hostile/giant_spider.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
faction = "spiders"
var/busy = 0
pass_flags = PASSTABLE
move_to_delay = 6
speed = 3
speed = 6
mob_size = 6
smart_melee = FALSE

Expand Down Expand Up @@ -113,7 +112,7 @@
melee_damage_upper = 20
armor_penetration = 15
poison_per_bite = 5
move_to_delay = 4
speed = 4
sample_data = list("Genetic markers identified as being linked with stem cell differentiaton", "Cellular biochemistry shows high metabolic capacity")
smart_melee = TRUE

Expand All @@ -130,7 +129,7 @@
armor_penetration = 15
poison_type = /singleton/reagent/perconol // mildly beneficial for organics
poison_per_bite = 2
move_to_delay = 5
speed = 5
sample_data = list("Genetic markers identified as being linked with stem cell differentiaton", "Cellular biochemistry geared towards creating strong electrical potential differences")
smart_melee = TRUE

Expand All @@ -149,7 +148,7 @@
ranged_attack_range = 4
poison_type = /singleton/reagent/capsaicin/condensed
poison_per_bite = 2
move_to_delay = 5
speed = 5
sample_data = list("Genetic markers identified as being linked with stem cell differentiaton", "Exocrinic caspaicin synthesis detected")
smart_melee = TRUE

Expand Down Expand Up @@ -232,7 +231,7 @@
for(var/turf/T in orange(20, src))
move_targets.Add(T)*/
stop_automated_movement = 1
GLOB.move_manager.move_to(src, pick(orange(20, src)), 1, move_to_delay)
GLOB.move_manager.move_to(src, pick(orange(20, src)), 1, speed)
addtimer(CALLBACK(src, PROC_REF(stop_walking)), 50, TIMER_UNIQUE)

/mob/living/simple_animal/hostile/giant_spider/proc/stop_walking()
Expand All @@ -250,7 +249,7 @@
if(C.stat && !istype(C, /mob/living/simple_animal/hostile/giant_spider))
cocoon_target = C
busy = MOVING_TO_TARGET
GLOB.move_manager.move_to(src, C, 1, move_to_delay)
GLOB.move_manager.move_to(src, C, 1, speed)
//give up if we can't reach them after 10 seconds
addtimer(CALLBACK(src, PROC_REF(GiveUp), C), 100, TIMER_UNIQUE)
return
Expand Down Expand Up @@ -279,7 +278,7 @@
cocoon_target = O
busy = MOVING_TO_TARGET
stop_automated_movement = 1
GLOB.move_manager.move_to(src, O, 1, move_to_delay)
GLOB.move_manager.move_to(src, O, 1, speed)
//give up if we can't reach them after 10 seconds
GiveUp(O)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
icon_state = "hivebotbomber"
organ_names = list("head", "core", "bottom thruster")
attacktext = "bumped"
move_to_delay = 8
speed = 8
var/has_exploded = FALSE

/mob/living/simple_animal/hostile/hivebot/bomber/AttackingTarget()
Expand Down
5 changes: 2 additions & 3 deletions code/modules/mob/living/simple_animal/hostile/hostile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ ABSTRACT_TYPE(/mob/living/simple_animal/hostile)
var/projectiletype
var/projectilesound
var/casingtype
var/move_to_delay = 4 //delay for the automated movement.
var/attack_delay = DEFAULT_ATTACK_COOLDOWN
var/list/friends = list()
var/break_stuff_probability = 10
Expand Down Expand Up @@ -191,10 +190,10 @@ ABSTRACT_TYPE(/mob/living/simple_animal/hostile)
GLOB.move_manager.stop_looping(src)
OpenFire(last_found_target)
else
GLOB.move_manager.move_to(src, last_found_target, 6, move_to_delay)
GLOB.move_manager.move_to(src, last_found_target, 6, speed)
else
change_stance(HOSTILE_STANCE_ATTACKING)
GLOB.move_manager.move_to(src, last_found_target, 1, move_to_delay)
GLOB.move_manager.move_to(src, last_found_target, 1, speed)

/**
* Attack the mob set in `target_mob`
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/simple_animal/hostile/krampus.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
minbodytemp = 0

faction = "Krampus"
move_to_delay = 4
speed = 4

tameable = FALSE

Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/simple_animal/hostile/mimic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
minbodytemp = 0

faction = "mimic"
move_to_delay = 8
speed = 8

tameable = FALSE
sample_data = null
Expand Down Expand Up @@ -163,7 +163,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
health = 15 * I.w_class
melee_damage_lower = 2 + I.force
melee_damage_upper = 2 + I.force
move_to_delay = 2 * I.w_class
speed = 2 * I.w_class

maxHealth = health
if(creator)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
icon_state = "sadrone"
icon_living = "sadrone"
icon_dead = "sadrone_dead"
move_to_delay = 5
speed = 5
health = 60
maxHealth = 60
harm_intent_damage = 5
Expand Down Expand Up @@ -177,7 +177,7 @@
break

if(target_ore)
GLOB.move_manager.move_to(src, target_ore, 1, move_to_delay)
GLOB.move_manager.move_to(src, target_ore, 1, speed)
else if(found_turfs.len)
for(var/turf/simulated/mineral/M in found_turfs)
if(!QDELETED(M) || !M.mineral)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
icon_state = "royalcrab"
icon_living = "royalcrab"
icon_dead = "royalcrab_dead"
move_to_delay = 3
maxHealth = 150
health = 150
speed = 1
speed = 3
melee_damage_lower = 10
melee_damage_upper = 15
natural_armor = list(
Expand Down
4 changes: 3 additions & 1 deletion code/modules/mob/living/simple_animal/hostile/space_fauna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
stop_automated_movement = 1
if(istype(last_found_target, /obj/effect/energy_field) && !QDELETED(last_found_target) && (last_found_target in targets))
change_stance(HOSTILE_STANCE_ATTACKING)
GLOB.move_manager.move_to(src, last_found_target, 1, move_to_delay)
GLOB.move_manager.move_to(src, last_found_target, 1, speed)
return 1
..()

Expand Down Expand Up @@ -152,6 +152,8 @@
maxHealth = 100
health = 100

speed = 10

mob_size = 15

melee_damage_lower = 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
attack_sound = 'sound/weapons/bite.ogg'

pass_flags = PASSTABLE|PASSRAILING
move_to_delay = 6
speed = -1
speed = 6
mob_size = 15
environment_smash = 2

Expand Down
7 changes: 7 additions & 0 deletions html/changelogs/geeves-simple_mob_slowdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
author: Geeves

delete-after: True

changes:
- balance: "Tweaked mobs to use the universal speed variable when chasing after a target."
- balance: "Made Reavers move much slower when pursuing a target."

0 comments on commit 4bf1c81

Please sign in to comment.