Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 2834ade

Browse files
Makes beepsky do stamina damage instead of an instant stun, for real this time 2 electric boogaloo (#22466)
* beep beep im beepsky * Update code/modules/mob/living/simple_animal/bot/secbot.dm yes Co-authored-by: SapphicOverload <[email protected]> --------- Co-authored-by: SapphicOverload <[email protected]>
1 parent 73fbb2a commit 2834ade

File tree

1 file changed

+15
-11
lines changed
  • code/modules/mob/living/simple_animal/bot

1 file changed

+15
-11
lines changed

code/modules/mob/living/simple_animal/bot/secbot.dm

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
icon_state = "secbot"
66
density = FALSE
77
anchored = FALSE
8-
health = 25
9-
maxHealth = 25
8+
health = 50
9+
maxHealth = 50
1010
damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
1111
pass_flags = PASSMOB
1212

@@ -21,6 +21,7 @@
2121
data_hud_type = DATA_HUD_SECURITY_ADVANCED
2222
path_image_color = "#FF0000"
2323

24+
var/baton_damage = 60
2425
var/baton_type = /obj/item/melee/baton
2526
var/mob/living/carbon/target
2627
var/oldtarget_name
@@ -58,6 +59,8 @@
5859
AddElement(/datum/element/connect_loc, loc_connections)
5960
update_transform()
6061

62+
/mob/living/simple_animal/bot/secbot/apply_damage(damage, damagetype, def_zone, blocked, wound_bonus, bare_wound_bonus, sharpness, attack_direction)
63+
return ..(max(damage - 6, 0), damagetype, def_zone, blocked, wound_bonus, bare_wound_bonus, sharpness, attack_direction) // has 6 innate flat damage reduction
6164

6265
/mob/living/simple_animal/bot/secbot/beepsky/explode()
6366
lastStunned = null
@@ -226,7 +229,7 @@ Auto Patrol: []"},
226229
return
227230
if(iscarbon(A))
228231
var/mob/living/carbon/C = A
229-
if((!C.IsParalyzed() || arrest_type) && stuncount < 30)
232+
if((C.getStaminaLoss() < C.maxHealth || arrest_type) && stuncount < 30)
230233
stun_attack(A)
231234
if(lastStunned && lastStunned == A)
232235
stuncount++
@@ -272,18 +275,19 @@ Auto Patrol: []"},
272275
if(ishuman(C))
273276
var/mob/living/carbon/human/H = C
274277
threat = H.assess_threat(judgement_criteria, weaponcheck=CALLBACK(src, PROC_REF(check_for_weapons)))
278+
if(H.check_shields(src, baton_damage, "[src]'s baton", MELEE_ATTACK, damage_type = STAMINA))
279+
return
275280
else
276281
threat = C.assess_threat(judgement_criteria, weaponcheck=CALLBACK(src, PROC_REF(check_for_weapons)))
277-
278-
C.Paralyze(10 SECONDS)
279-
C.adjust_stutter(5 SECONDS)
282+
C.apply_damage(baton_damage, STAMINA, BODY_ZONE_CHEST, C.run_armor_check(BODY_ZONE_CHEST, ENERGY)) // baton runs off of the tiny bot's power instead of an actual cell, not enough to work at full capacity
280283
log_combat(src,C,"stunned")
281284
if(declare_arrests)
282285
var/area/location = get_area(src)
283286
speak("[arrest_type ? "Detaining" : "Arresting"] level [threat] scumbag <b>[C]</b> in [location].", radio_channel)
284-
C.visible_message(span_danger("[src] has stunned [C]!"),\
285-
span_userdanger("[src] has stunned you!"))
286-
287+
C.visible_message(
288+
span_danger("[src] has stunned [C]!"),
289+
span_userdanger("[src] has stunned you!")
290+
)
287291
/mob/living/simple_animal/bot/secbot/handle_automated_action()
288292
if(!..())
289293
return
@@ -327,7 +331,7 @@ Auto Patrol: []"},
327331
if(BOT_PREP_ARREST) // preparing to arrest target
328332

329333
// see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again.
330-
if( !Adjacent(target) || !isturf(target.loc) || target.AmountParalyzed() < 40)
334+
if( !Adjacent(target) || !isturf(target.loc) || target.getStaminaLoss() < target.maxHealth)
331335
back_to_hunt()
332336
return
333337

@@ -354,7 +358,7 @@ Auto Patrol: []"},
354358
back_to_idle()
355359
return
356360

357-
if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountParalyzed() < 40)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
361+
if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.getStaminaLoss() < target.maxHealth)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
358362
back_to_hunt()
359363
return
360364
else //Try arresting again if the target escapes.

0 commit comments

Comments
 (0)