Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] EMP Damage Scaling #1574

Merged
merged 1 commit into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions code/modules/organs/external/_external.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,16 @@
return

var/burn_damage = 0
var/rand_modifier = rand(1,3)
switch (severity)
if (EMP_ACT_HEAVY)
burn_damage = 30
burn_damage = 10 * rand_modifier
if (EMP_ACT_LIGHT)
burn_damage = 15
burn_damage = 4 * rand_modifier

/// Ions can't be aimed like conventional weaponry. This way damage is more even between center mass and limbs based on their total health relative to each other.
if(!(src.body_part & FULL_TORSO))
burn_damage *= 0.5

var/mult = 1 + !!(BP_IS_ASSISTED(src)) // This macro returns (large) bitflags.
burn_damage *= mult/species.get_burn_mod(owner) //ignore burn mod for EMP damage
Expand All @@ -175,9 +180,6 @@
if(owner && limb_flags & ORGAN_FLAG_CAN_GRASP)
owner.grasp_damage_disarm(src)

if(owner && limb_flags & ORGAN_FLAG_CAN_STAND)
owner.stance_damage_prone(src)

..()

/obj/item/organ/external/attack_self(mob/user)
Expand Down
5 changes: 3 additions & 2 deletions code/modules/organs/internal/_internal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,10 @@
/obj/item/organ/internal/emp_act(severity)
if(!BP_IS_ROBOTIC(src))
return
var/rand_modifier = rand(1, 3)
switch (severity)
if (EMP_ACT_HEAVY)
take_internal_damage(16)
take_internal_damage(5 * rand_modifier)
if (EMP_ACT_LIGHT)
take_internal_damage(9)
take_internal_damage(2 * rand_modifier)
..()
1 change: 1 addition & 0 deletions code/modules/organs/internal/species/fbp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
if(!checked_use(cost) && owner.isSynthetic())
if(!owner.lying && !owner.buckled)
to_chat(owner, SPAN_WARNING("You don't have enough energy to function!"))
owner.Weaken(3)
owner.Paralyse(3)
if(percent() < 10 && prob(1))
to_chat(owner, SPAN_WARNING("Your internal battery beeps an alert code, it is low on charge!"))
Expand Down
1 change: 1 addition & 0 deletions code/modules/projectiles/guns/energy/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
one_hand_penalty = 0
charge_cost = 40
max_shots = 3
fire_delay = 30
projectile_type = /obj/item/projectile/ion/small

/obj/item/gun/energy/ionrifle/mounted
Expand Down
8 changes: 4 additions & 4 deletions mods/hairs_ports/_hairs_ports.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/singleton/modpack/hairs_ports
name = "Дополнительные прически"
desc = "Порт причесок и бород с aurora, onyxbay, infinity, rs666."
author = "Kam_Survivor, (ресусрсы сообществ aurora, onyxbay, infinity, rs666)."
/singleton/modpack/hairs_ports
name = "Дополнительные прически"
desc = "Порт причесок и бород с aurora, onyxbay, infinity, rs666."
author = "Kam_Survivor, (ресусрсы сообществ aurora, onyxbay, infinity, rs666)."
Loading