Skip to content

Commit

Permalink
Mob Speed Improvements (vlggms#2091)
Browse files Browse the repository at this point in the history
* speed improvements

* fixed an oversight
  • Loading branch information
Halonexus authored May 18, 2024
1 parent 299d250 commit c79333e
Show file tree
Hide file tree
Showing 28 changed files with 123 additions and 88 deletions.
2 changes: 1 addition & 1 deletion ModularTegustation/tegu_mobs/lc13_outskirtdwellers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ Mobs that mostly focus on dealing RED damage, they are all a bit more frail than
icon_state = icon_living
current_stage = 2
//Speed changed from 6 to 4
SpeedChange(-counter_speed)
ChangeMoveToDelayBy(-counter_speed)
attack_delay = 1 SECONDS
counter_threshold = 300
playsound(get_turf(src), 'sound/creatures/lc13/lovetown/abomination_stagetransition.ogg', 75, 0, 3)
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/movespeed_modification.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//flags
#define IGNORE_NOSLOW (1 << 0)
#define IS_ACTUALLY_MULTIPLICATIVE (1 << 1)

//conflict types

Expand Down
15 changes: 4 additions & 11 deletions code/datums/status_effects/debuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@


//~~~LC13 General Debuffs~~~
#define CARBON_HALFSPEED /datum/movespeed_modifier/qliphothoverload
#define MOB_HALFSPEED /datum/movespeed_modifier/qliphothoverload
/datum/status_effect/qliphothoverload
id = "qliphoth intervention field"
duration = 15 SECONDS
Expand All @@ -991,12 +991,7 @@

/datum/status_effect/qliphothoverload/on_apply()
. = ..()
if(ishostile(owner))
var/mob/living/simple_animal/hostile/L = owner
L.TemporarySpeedChange(4, duration)
if(iscarbon(owner))
var/mob/living/carbon/M = owner
M.add_movespeed_modifier(CARBON_HALFSPEED)
owner.add_movespeed_modifier(MOB_HALFSPEED)

var/mutable_appearance/effectvisual = mutable_appearance('icons/obj/clockwork_objects.dmi', "vanguard")
effectvisual.pixel_x = -owner.pixel_x
Expand All @@ -1005,9 +1000,7 @@
owner.add_overlay(statuseffectvisual)

/datum/status_effect/qliphothoverload/on_remove()
if(iscarbon(owner))
var/mob/living/carbon/M = owner
M.remove_movespeed_modifier(CARBON_HALFSPEED)
owner.remove_movespeed_modifier(MOB_HALFSPEED)

owner.cut_overlay(statuseffectvisual)
return ..()
Expand Down Expand Up @@ -1081,7 +1074,7 @@
var/mob/living/simple_animal/M = owner
M.RemoveModifier(/datum/dc_change/rend/black)

#undef CARBON_HALFSPEED
#undef MOB_HALFSPEED

#define STATUS_EFFECT_LCBURN /datum/status_effect/stacking/lc_burn // Deals true damage every 5 sec, can't be applied to godmode (contained abos)
/datum/status_effect/stacking/lc_burn
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/ego_weapons/he.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@
if(!isanimal(owner))
return
var/mob/living/simple_animal/hostile/M = owner
M.TemporarySpeedChange(M.move_to_delay*0.25 , 3 SECONDS)
M.TemporarySpeedChange(1.25 , 3 SECONDS, TRUE)

/atom/movable/screen/alert/status_effect/brown_bricks
name = "Yello Bricks"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ GLOBAL_LIST_EMPTY(army)
SetSpeed()//wait for a patrol path. What could possibly go wrong?
return
var/dist_travelled = LAZYLEN(patrol_path)
move_to_delay -= clamp((dist_travelled / 4), 0, 15)//armies that spawn closest to dept centers can actually be suppressed this way, while further ones remain a threat. Math needs tweaking
ChangeMoveToDelayBy(-clamp((dist_travelled / 4), 0, 15)) //armies that spawn closest to dept centers can actually be suppressed this way, while further ones remain a threat. Math needs tweaking

/mob/living/simple_animal/hostile/army_enemy/proc/FearEffect()
for(var/mob/living/carbon/human/H in view(7, src))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@
maxHealth = 4000
damage_coeff = list(RED_DAMAGE = 0.4, WHITE_DAMAGE = 0.8, BLACK_DAMAGE = 0.4, PALE_DAMAGE = 1)
revive(full_heal = TRUE, admin_revive = FALSE)
move_to_delay = 4
ChangeMoveToDelay(4)
burn_mod = 2
can_act = TRUE
charge = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
attack_sound = 'sound/abnormalities/distortedform/slam.ogg'
melee_damage_type = RED_DAMAGE
ChangeResistances(list(RED_DAMAGE = 0.4, WHITE_DAMAGE = 0.4, BLACK_DAMAGE = 0.4, PALE_DAMAGE = 0.8))
ChangeMoveToDelay(3)
melee_damage_lower = 55
melee_damage_upper = 65
rapid_melee = 1
Expand Down Expand Up @@ -764,8 +765,7 @@
ChangeResistances(list(RED_DAMAGE = 0, WHITE_DAMAGE = 0.4, BLACK_DAMAGE = 0.4, PALE_DAMAGE = 0.8))
melee_damage_lower = 65
melee_damage_upper = 75
move_to_delay = 4.5
UpdateSpeed()
ChangeMoveToDelay(4.5)
can_move = TRUE
addtimer(CALLBACK(src, PROC_REF(Goodbye)), 30)
special_attack = PROC_REF(Hello)
Expand Down Expand Up @@ -838,8 +838,7 @@
attack_verb_continuous = "slashes"
attack_verb_simple = "slash"
rapid_melee = 4
move_to_delay = 2.5
UpdateSpeed()
ChangeMoveToDelay(2.5)
can_move = TRUE
can_attack = TRUE
special_attack = PROC_REF(Execute)
Expand Down Expand Up @@ -1040,7 +1039,7 @@
melee_damage_upper = 30
pixel_x = -8
base_pixel_x = -8
move_to_delay = 5
ChangeMoveToDelay(5)
can_move = TRUE
special_attack = PROC_REF(SpearAttack)
addtimer(CALLBACK(src, PROC_REF(ScytheAttack)), 30)
Expand Down Expand Up @@ -1192,7 +1191,7 @@
attack_sound = 'sound/abnormalities/blubbering_toad/attack.ogg'
attack_verb_continuous = "mauls"
attack_verb_simple = "maul"
UpdateSpeed()
ChangeMoveToDelay(3)
can_move = TRUE
special_attack = PROC_REF(ToadAttack)

Expand Down Expand Up @@ -1271,14 +1270,13 @@
ChangeResistances(list(RED_DAMAGE = 0.3, WHITE_DAMAGE = 0.3, BLACK_DAMAGE = 0.5, PALE_DAMAGE = 0.8))
melee_damage_lower = 65
melee_damage_upper = 75
move_to_delay = 4.5
ChangeMoveToDelay(4.5)
melee_damage_type = WHITE_DAMAGE
pixel_x = -8
base_pixel_x = -8
attack_sound = 'sound/abnormalities/ichthys/slap.ogg'
attack_verb_continuous = "mauls"
attack_verb_simple = "maul"
UpdateSpeed()
can_move = TRUE
addtimer(CALLBACK(src, PROC_REF(BloodBathBeamPrep)), 30)
special_attack = PROC_REF(BloodBathSlam)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
return TRUE

/mob/living/simple_animal/hostile/abnormality/melting_love/proc/Empower()
SpeedChange(-0.5)
ChangeMoveToDelayBy(-0.5)
melee_damage_lower = 80
melee_damage_upper = 85
projectiletype = /obj/projectile/melting_blob/enraged
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,13 @@
base_pixel_x = -32
if(phase == 3)
icon_living = "mosb_breach2"
SpeedChange(1)
ChangeMoveToDelay(5)
patrol_cooldown_time = 30 SECONDS
if(phase == 2)
icon_living = "mosb_breach"
SpeedChange(2)
ChangeMoveToDelay(4)
patrol_cooldown_time = 20 SECONDS
icon_state = icon_living
update_simplemob_varspeed()
UpdateSpeed()
return
// Decrease stage
if(phase <= 1) // Death
Expand All @@ -244,17 +242,15 @@
icon = 'ModularTegustation/Teguicons/64x64.dmi'
pixel_x = -16
base_pixel_x = -16
SpeedChange(-2)
ChangeMoveToDelay(2)
patrol_cooldown_time = 10 SECONDS
if(phase == 2)
icon = 'ModularTegustation/Teguicons/96x96.dmi'
pixel_x = -32
base_pixel_x = -32
SpeedChange(-1)
ChangeMoveToDelay(4)
patrol_cooldown_time = 20 SECONDS
icon_state = icon_living
UpdateSpeed()
update_simplemob_varspeed()
return TRUE

/* Special attacks */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,7 @@
icon_state = icon_living
ChangeResistances(list(RED_DAMAGE = 0.6, WHITE_DAMAGE = 0.6, BLACK_DAMAGE = 0, PALE_DAMAGE = 1.2))
can_act = TRUE
SpeedChange(1.5)
UpdateSpeed()
ChangeMoveToDelayBy(1.5)
current_stage = clamp(current_stage + 1, 1, 3)

/mob/living/simple_animal/hostile/abnormality/nobody_is/apply_damage(damage, damagetype, def_zone, blocked, forced, spread_damage, wound_bonus, bare_wound_bonus, sharpness, white_healable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
if(!istype(disguise))
return
next_transform = world.time + rand(30 SECONDS, 40 SECONDS)
SpeedChange(1.5)
ChangeMoveToDelayBy(1.5)
appearance = saved_appearance
disguise.forceMove(get_turf(src))
disguise.gib()
Expand Down Expand Up @@ -298,10 +298,9 @@
can_act = TRUE
melee_damage_lower = 65
melee_damage_upper = 75
SpeedChange(1.5)
ChangeMoveToDelayBy(1.5)
heartbeat.stop()
breachloop.start()
UpdateSpeed()
adjustBruteLoss(-maxHealth)
current_stage = clamp(current_stage + 1, 1, 3)

Expand Down Expand Up @@ -399,8 +398,7 @@
// Teleport us somewhere where nobody will see us at first
disguiseloop.stop()
fear_level = 0 // So it doesn't inflict fear to those around them
SpeedChange(-1.5) // This will make them move at a speed similar to normal players
UpdateSpeed()
ChangeMoveToDelayBy(-1.5) // This will make them move at a speed similar to normal players
var/list/priority_list = list()
for(var/turf/T in GLOB.xeno_spawn)
var/people_in_range = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
. = ..()

if(H.stat == DEAD && target == nemesis) //Does she slay Oberon personally? If so, get buffed.
SpeedChange(-1)
ChangeMoveToDelayBy(-1)
melee_damage_lower = 110
melee_damage_upper = 140
adjustBruteLoss(-maxHealth) // Round 2, baby
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
slash_damage = 50
melee_damage_lower = 30
melee_damage_upper = 40
SpeedChange(-0.5)
ChangeMoveToDelayBy(-0.5)
maxHealth = maxHealth * 4 //5000 health, will get hurt by buddy's howl to make up for the high health
set_health(health * 4)
med_hud_set_health()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
melee_damage_type = BLACK_DAMAGE
fear_level = WAW_LEVEL
is_maggot = TRUE
SpeedChange(-1)
ChangeMoveToDelayBy(-1)

/mob/living/simple_animal/hostile/abnormality/golden_apple/AttackingTarget()//regular attacks or AOE. Determines the outcome for both players and the AI behavior
if(!can_act)
Expand Down Expand Up @@ -330,7 +330,7 @@
victim_name = "Yuri"
maxHealth = 1500
BecomeRotten()
SpeedChange(-0.5)
ChangeMoveToDelayBy(-0.5)
ChangeResistances(list(RED_DAMAGE = 1, WHITE_DAMAGE = 1, BLACK_DAMAGE = 0.8, PALE_DAMAGE = 0.3))
if(H)
victim_name = H.real_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@
awoo_cooldown = 0 //resets the awoo cooldown too
melee_damage_lower = 60
melee_damage_upper = 80
SpeedChange(-1) //this doesn't matter as much as you'd think because he can't move before shepherd
UpdateSpeed()
ChangeMoveToDelayBy(-1) //this doesn't matter as much as you'd think because he can't move before shepherd
vision_range = 3
aggro_vision_range = 3 //red buddy should only move for things it can actually reach, in this case somewhat within shepherd's reach
can_patrol = FALSE //just in case
Expand Down Expand Up @@ -244,7 +243,7 @@
awakened_master.melee_damage_lower = 10
awakened_master.melee_damage_upper = 15
awakened_master.slash_damage = 20
awakened_master.SpeedChange(-0.8) //we severely nerf shepherd's damage but make him way faster on buddy's death, it's last one tango.
awakened_master.ChangeMoveToDelayBy(-0.8) //we severely nerf shepherd's damage but make him way faster on buddy's death, it's last one tango.
awakened_master.say("A wolf. A wolf. Why won't you believe me? it's right there. IT WAS RIGHT THERE!")
awakened_master = null
density = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@
melee_damage_upper = initial_melee_damage_upper + (ramping * 3)
flurry_delay = initial_flurry_delay - (ramping * 0.1) SECONDS
flurry_pause = initial_flurry_pause - (ramping * 0.01) SECONDS
move_to_delay = initial_move_to_delay - (ramping * 0.22)
UpdateSpeed()
ChangeMoveToDelay(initial_move_to_delay - (ramping * 0.22))

/mob/living/simple_animal/hostile/abnormality/woodsman/proc/Heal(mob/living/carbon/human/body)
src.visible_message(span_warning("[src] plunges their hand into [body]'s chest and rips out their heart!"), \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@
melee_damage_lower = 3*gear
melee_damage_upper = 5*gear
//Reset the speed. First proc changes this only with 0.
SpeedChange(gear_speed)
ChangeMoveToDelayBy(gear_speed)
//Calculate speed change.
gear_speed = FLOOR(gear / 3, 1)
//CRANK UP THE SPEED.
SpeedChange(-gear_speed)
ChangeMoveToDelayBy(-gear_speed)
rapid_melee = gear > 7 ? 2 : 1

/mob/living/simple_animal/hostile/grown_strong/Life()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,10 @@
talismans += 1
if(talismans > 10)
TalismanStun()
move_to_delay = initial(move_to_delay)
ChangeMoveToDelay(initial(move_to_delay))
return
new /obj/effect/temp_visual/talisman(get_turf(src))
move_to_delay = (3 + (talismans / 10))
UpdateSpeed()
ChangeMoveToDelay(3 + (talismans / 10))

/mob/living/simple_animal/hostile/abnormality/so_that_no_cry/proc/TalismanStun()
if(!can_act)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
return
icon = 'ModularTegustation/Teguicons/32x64.dmi'
punched = TRUE
SpeedChange(-2)
ChangeMoveToDelayBy(-2)
ability_cooldown_time = 8 SECONDS
ability_cooldown = 0
REMOVE_TRAIT(src, TRAIT_MOVE_FLYING, ROUNDSTART_TRAIT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
animate(src, transform = matrix()*1.2, color = "#FF0000", time = 10)
playsound(get_turf(src), 'sound/abnormalities/nosferatu/transform.ogg', 35, 8)
bloodlust_cooldown = clamp(bloodlust_cooldown - 2, 0, 4)
SpeedChange(-1)
ChangeMoveToDelayBy(-1)
berzerk = TRUE

/mob/living/simple_animal/hostile/abnormality/nosferatu/add_splatter_floor(turf/T, small_drip) //no spilling blood, it just works.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,11 @@

// it gets faster.
if(move_to_delay>1)
SpeedChange(-move_to_delay*0.25)
ChangeMoveToDelayBy(0.75, TRUE)
if(melee_damage_lower > 30)
melee_damage_lower -=5

adjustBruteLoss(-(maxHealth*0.2)) // Heals 20% HP, fuck you that's why. Still not as bad as judgement or big bird
update_simplemob_varspeed()

finishing = FALSE
icon_state = "warden"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@
melee_damage_lower = 30
melee_damage_upper = 45
rapid_melee = 3
move_to_delay = 2
ChangeMoveToDelay(2)
icon_state = "bunnyman_enraged"
Loading

0 comments on commit c79333e

Please sign in to comment.