mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Merge pull request #8469 from mwerezak/robot-emp
Reduces the effect of EMP on robot power cells, some other things
This commit is contained in:
@@ -721,7 +721,7 @@
|
|||||||
else
|
else
|
||||||
//Want this to be roughly independant of the number of modules, meaning that X emp hits will disable Y% of the suit's modules on average.
|
//Want this to be roughly independant of the number of modules, meaning that X emp hits will disable Y% of the suit's modules on average.
|
||||||
//that way people designing hardsuits don't have to worry (as much) about how adding that extra module will affect emp resiliance by 'soaking' hits for other modules
|
//that way people designing hardsuits don't have to worry (as much) about how adding that extra module will affect emp resiliance by 'soaking' hits for other modules
|
||||||
chance = max(0, damage - emp_protection)*min(installed_modules.len/15, 1)
|
chance = 2*max(0, damage - emp_protection)*min(installed_modules.len/15, 1)
|
||||||
|
|
||||||
if(!prob(chance))
|
if(!prob(chance))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -39,9 +39,9 @@
|
|||||||
flags_inv = HIDEJUMPSUIT|HIDETAIL
|
flags_inv = HIDEJUMPSUIT|HIDETAIL
|
||||||
flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT
|
flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT
|
||||||
slowdown = 0
|
slowdown = 0
|
||||||
//will reach 10 breach damage after 18 laser carbine blasts, or 7 revolver hits. Completely immune to smg hits.
|
//will reach 10 breach damage after 25 laser carbine blasts, 3 revolver hits, or ~1 PTR hit. Completely immune to smg or sts hits.
|
||||||
breach_threshold = 28
|
breach_threshold = 38
|
||||||
resilience = 0.05
|
resilience = 0.2
|
||||||
can_breach = 1
|
can_breach = 1
|
||||||
sprite_sheets = list("Tajara" = 'icons/mob/species/tajaran/suit.dmi',"Unathi" = 'icons/mob/species/unathi/suit.dmi')
|
sprite_sheets = list("Tajara" = 'icons/mob/species/tajaran/suit.dmi',"Unathi" = 'icons/mob/species/unathi/suit.dmi')
|
||||||
supporting_limbs = list()
|
supporting_limbs = list()
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
/obj/item/clothing/suit/space/rig/light
|
/obj/item/clothing/suit/space/rig/light
|
||||||
name = "suit"
|
name = "suit"
|
||||||
breach_threshold = 18 //comparable to voidsuits
|
breach_threshold = 18 //comparable to voidsuits
|
||||||
resilience = 0.2
|
|
||||||
|
|
||||||
/obj/item/clothing/gloves/rig/light
|
/obj/item/clothing/gloves/rig/light
|
||||||
name = "gloves"
|
name = "gloves"
|
||||||
@@ -82,8 +81,7 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/clothing/suit/space/rig/light/ninja
|
/obj/item/clothing/suit/space/rig/light/ninja
|
||||||
breach_threshold = 28 //comparable to regular hardsuits
|
breach_threshold = 38 //comparable to regular hardsuits
|
||||||
resilience = 0.05
|
|
||||||
|
|
||||||
/obj/item/weapon/rig/light/stealth
|
/obj/item/weapon/rig/light/stealth
|
||||||
name = "stealth suit control module"
|
name = "stealth suit control module"
|
||||||
|
|||||||
@@ -241,7 +241,7 @@
|
|||||||
src.updatehealth()
|
src.updatehealth()
|
||||||
|
|
||||||
// damage ONE external organ, organ gets randomly selected from damaged ones.
|
// damage ONE external organ, organ gets randomly selected from damaged ones.
|
||||||
/mob/living/proc/take_organ_damage(var/brute, var/burn)
|
/mob/living/proc/take_organ_damage(var/brute, var/burn, var/emp=0)
|
||||||
if(status_flags & GODMODE) return 0 //godmode
|
if(status_flags & GODMODE) return 0 //godmode
|
||||||
adjustBruteLoss(brute)
|
adjustBruteLoss(brute)
|
||||||
adjustFireLoss(burn)
|
adjustFireLoss(burn)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
icon_state = "repairbot"
|
icon_state = "repairbot"
|
||||||
maxHealth = 35
|
maxHealth = 35
|
||||||
health = 35
|
health = 35
|
||||||
|
cell_emp_mult = 1
|
||||||
universal_speak = 0
|
universal_speak = 0
|
||||||
universal_understand = 1
|
universal_understand = 1
|
||||||
gender = NEUTER
|
gender = NEUTER
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
if(bruteloss<0) bruteloss = 0
|
if(bruteloss<0) bruteloss = 0
|
||||||
if(fireloss<0) fireloss = 0
|
if(fireloss<0) fireloss = 0
|
||||||
|
|
||||||
/mob/living/silicon/robot/drone/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0)
|
/mob/living/silicon/robot/drone/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0, var/emp = 0)
|
||||||
take_overall_damage(brute,burn)
|
take_overall_damage(brute,burn)
|
||||||
|
|
||||||
/mob/living/silicon/robot/drone/heal_organ_damage(var/brute, var/burn)
|
/mob/living/silicon/robot/drone/heal_organ_damage(var/brute, var/burn)
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ var/list/robot_verbs_default = list(
|
|||||||
var/obj/item/weapon/cell/cell = null
|
var/obj/item/weapon/cell/cell = null
|
||||||
var/obj/machinery/camera/camera = null
|
var/obj/machinery/camera/camera = null
|
||||||
|
|
||||||
|
var/cell_emp_mult = 2
|
||||||
|
|
||||||
// Components are basically robot organs.
|
// Components are basically robot organs.
|
||||||
var/list/components = list()
|
var/list/components = list()
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
var/datum/robot_component/picked = pick(parts)
|
var/datum/robot_component/picked = pick(parts)
|
||||||
picked.heal_damage(brute,burn)
|
picked.heal_damage(brute,burn)
|
||||||
|
|
||||||
/mob/living/silicon/robot/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0, var/edge = 0)
|
/mob/living/silicon/robot/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0, var/edge = 0, var/emp = 0)
|
||||||
var/list/components = get_damageable_components()
|
var/list/components = get_damageable_components()
|
||||||
if(!components.len)
|
if(!components.len)
|
||||||
return
|
return
|
||||||
@@ -84,6 +84,7 @@
|
|||||||
burn -= absorb_burn
|
burn -= absorb_burn
|
||||||
src << "\red Your shield absorbs some of the impact!"
|
src << "\red Your shield absorbs some of the impact!"
|
||||||
|
|
||||||
|
if(!emp)
|
||||||
var/datum/robot_component/armour/A = get_armour()
|
var/datum/robot_component/armour/A = get_armour()
|
||||||
if(A)
|
if(A)
|
||||||
A.take_damage(brute,burn,sharp,edge)
|
A.take_damage(brute,burn,sharp,edge)
|
||||||
|
|||||||
@@ -56,10 +56,10 @@
|
|||||||
/mob/living/silicon/emp_act(severity)
|
/mob/living/silicon/emp_act(severity)
|
||||||
switch(severity)
|
switch(severity)
|
||||||
if(1)
|
if(1)
|
||||||
src.take_organ_damage(20)
|
src.take_organ_damage(0,20,emp=1)
|
||||||
Stun(rand(5,10))
|
Stun(rand(5,10))
|
||||||
if(2)
|
if(2)
|
||||||
src.take_organ_damage(10)
|
src.take_organ_damage(0,10,emp=1)
|
||||||
Stun(rand(1,5))
|
Stun(rand(1,5))
|
||||||
flick("noise", src:flash)
|
flick("noise", src:flash)
|
||||||
src << "\red <B>*BZZZT*</B>"
|
src << "\red <B>*BZZZT*</B>"
|
||||||
|
|||||||
@@ -128,6 +128,11 @@
|
|||||||
rigged = 1 //broken batterys are dangerous
|
rigged = 1 //broken batterys are dangerous
|
||||||
|
|
||||||
/obj/item/weapon/cell/emp_act(severity)
|
/obj/item/weapon/cell/emp_act(severity)
|
||||||
|
//remove this once emp changes on dev are merged in
|
||||||
|
if(isrobot(loc))
|
||||||
|
var/mob/living/silicon/robot/R = loc
|
||||||
|
severity *= R.cell_emp_mult
|
||||||
|
|
||||||
charge -= maxcharge / severity
|
charge -= maxcharge / severity
|
||||||
if (charge < 0)
|
if (charge < 0)
|
||||||
charge = 0
|
charge = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user