From 6a7456ae1f0a687f151cbb39946c53cffbf574ce Mon Sep 17 00:00:00 2001
From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Date: Sat, 7 Nov 2020 16:50:40 -0500
Subject: [PATCH] Adds Brute / burn mod to borgs (only syndicate for now) and
gives syndicate borgs 5 damage reduction (#14818)
* Adds Brute / burn mod to borgs (only syndicate for now) and gives syndicate borgs 5 damage reduction
* But what if it had documentation
* Autodoc
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
* Update code/modules/mob/living/silicon/robot/syndicate.dm
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
* Steels other suggestion
* Update code/modules/mob/living/silicon/robot/robot_damage.dm
Co-authored-by: Kyep <16434066+Kyep@users.noreply.github.com>
* Update code/modules/mob/living/silicon/robot/robot_damage.dm
Co-authored-by: Kyep <16434066+Kyep@users.noreply.github.com>
* Henks stuff
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
Co-authored-by: Kyep <16434066+Kyep@users.noreply.github.com>
---
code/modules/mob/living/silicon/robot/robot.dm | 4 ++++
code/modules/mob/living/silicon/robot/robot_damage.dm | 5 ++---
code/modules/mob/living/silicon/robot/syndicate.dm | 7 +++++++
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 57802bc294b..2b476a4e043 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -59,6 +59,10 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
var/ear_protection = 0
var/damage_protection = 0
var/emp_protection = FALSE
+ /// Value incoming brute damage to borgs is mutiplied by.
+ var/brute_mod = 1
+ /// Value incoming burn damage to borgs is multiplied by.
+ var/burn_mod = 1
var/list/force_modules = list()
var/allow_rename = TRUE
diff --git a/code/modules/mob/living/silicon/robot/robot_damage.dm b/code/modules/mob/living/silicon/robot/robot_damage.dm
index b7b81ed40b7..cfd7b9e5ddc 100644
--- a/code/modules/mob/living/silicon/robot/robot_damage.dm
+++ b/code/modules/mob/living/silicon/robot/robot_damage.dm
@@ -107,9 +107,8 @@
if(status_flags & GODMODE)
return
- if(damage_protection)
- brute = clamp(brute - damage_protection, 0, brute)
- burn = clamp(burn - damage_protection, 0, burn)
+ brute = max((brute - damage_protection) * brute_mod, 0)
+ burn = max((burn - damage_protection) * burn_mod, 0)
var/list/datum/robot_component/parts = get_damageable_components()
diff --git a/code/modules/mob/living/silicon/robot/syndicate.dm b/code/modules/mob/living/silicon/robot/syndicate.dm
index cfc6e1bd59d..a772ff9594b 100644
--- a/code/modules/mob/living/silicon/robot/syndicate.dm
+++ b/code/modules/mob/living/silicon/robot/syndicate.dm
@@ -11,6 +11,9 @@
modtype = "Syndicate"
req_access = list(ACCESS_SYNDICATE)
ionpulse = 1
+ damage_protection = 5
+ brute_mod = 0.7 //30% less damage
+ burn_mod = 0.7
can_lock_cover = TRUE
lawchannel = "State"
var/playstyle_string = "You are a Syndicate assault cyborg!
\
@@ -41,6 +44,8 @@
icon_state = "syndi-medi"
modtype = "Syndicate Medical"
designation = "Syndicate Medical"
+ brute_mod = 0.8 //20% less damage
+ burn_mod = 0.8
playstyle_string = "You are a Syndicate medical cyborg!
\
You are armed with powerful medical tools to aid you in your mission: help the operatives secure the nuclear authentication disk. \
Your hypospray will produce Restorative Nanites, a wonder-drug that will heal most types of bodily damages, including clone and brain damage. It also produces morphine for offense. \
@@ -57,6 +62,8 @@
icon_state = "syndi-engi"
modtype = "Syndicate Saboteur"
designation = "Syndicate Saboteur"
+ brute_mod = 0.8
+ burn_mod = 0.8
var/mail_destination = 0
var/obj/item/borg_chameleon/cham_proj = null
playstyle_string = "You are a Syndicate saboteur cyborg!
\