Skip to content

Commit

Permalink
force disconnect = feedback damage
Browse files Browse the repository at this point in the history
AIs that get force disconnected from a mech (by the mech blowing up) take 33% of their maximum integrity as feedback damage from the flash sever (mostly to balance their inherent resilience to physical death when interfacing remotely. Woe, cross-zlevel combat)
  • Loading branch information
DeltaFire15 committed Dec 12, 2024
1 parent c9569ce commit 82175eb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion code/game/mecha/mecha_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,18 @@
/obj/mecha/obj_destruction()
if(wreckage)
var/mob/living/silicon/ai/AI
//NSV13 - AI disconnects from the mech if it dies, if not shunted.
//NSV13 - AI disconnects from the mech if it dies, if not shunted. Causes damage equal to 33% of maximum integrity.
if(isAI(occupant))
var/mob/living/silicon/ai/ai_ref = occupant
var/kill_ai = FALSE
if(eject_action in occupant.actions) //This AI did not one-way.
go_out() //Release direct control.
if(occupant) //Didn't work!
kill_ai = TRUE
else
to_chat(ai_ref, "<span class='userdanger'>Interface protocols flash-severed. Feedback damage detected.</span>")
var/feedback_damage = CEILING((ai_ref.maxHealth + 100) / 3, 1) // 1/3rd of maximum health as damage, rounded up.
ai_ref.apply_damage(feedback_damage, BURN)
else
kill_ai = TRUE //Sorry Harbinger.
if(kill_ai)
Expand Down

0 comments on commit 82175eb

Please sign in to comment.