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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebalances Security Grenades #8598

Merged
merged 3 commits into from Jun 21, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 12 additions & 9 deletions code/game/objects/items/grenades/flashbang.dm
Expand Up @@ -21,16 +21,19 @@
/obj/item/grenade/flashbang/proc/bang(turf/T , mob/living/M)
if(M.stat == DEAD) //They're dead!
return
M.show_message("<span class='warning'>BANG</span>", 2)
M.show_message("<span class='userdanger'>BANG</span>", 2)
var/distance = max(0,get_dist(get_turf(src),T))

//Flash
if(M.flash_act(affect_silicon = 1))
M.Paralyze(max(200/max(1,distance), 60))
//Bang
if(!distance || loc == M || loc == M.loc) //Stop allahu akbarring rooms with this.
M.Paralyze(200)
M.soundbang_act(1, 200, 10, 15)
M.soundbang_act(1, 20, 10, 15)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means if you're on top of the flashbang when it goes off, you will be stunned for far less.

This lets you be a flashbang suicide bomber again, basically.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually changed the definition of soundbang_act. Paralyze() works in deciseconds, but confusion works in seconds. You can see in the code that I changed every other use of the function too.

Flashbang suicide bombing is degenerate but 200 seconds of confusion is a step too far. Of course, since it completely overlays the stun, it'll only affect someone with stun reduction.

return

var/flashed = M.flash_act(affect_silicon = 1)
var/banged = M.soundbang_act(1, 20/max(1,distance), rand(0, 5))

else
M.soundbang_act(1, max(200/max(1,distance), 60), rand(0, 5))
// If missing two resists
if(flashed && banged)
M.Paralyze(max(150/max(1,distance), 60))
// If missing one resist
else if (flashed || banged)
M.Paralyze(max(50/max(1, distance), 30))
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/alien/alien_defense.dm
Expand Up @@ -123,7 +123,7 @@ In all, this is a lot like the monkey code. /N
Unconscious(20)
adjustEarDamage(15,60)

/mob/living/carbon/alien/soundbang_act(intensity = 1, stun_pwr = 20, damage_pwr = 5, deafen_pwr = 15)
/mob/living/carbon/alien/soundbang_act(intensity = 1, conf_pwr = 20, damage_pwr = 5, deafen_pwr = 15)
return 0

/mob/living/carbon/alien/acid_act(acidpwr, acid_volume)
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/living/carbon/carbon_defense.dm
Expand Up @@ -340,16 +340,16 @@
mind.disrupt_spells(0)


/mob/living/carbon/soundbang_act(intensity = 1, stun_pwr = 20, damage_pwr = 5, deafen_pwr = 15)
/mob/living/carbon/soundbang_act(intensity = 1, conf_pwr = 20, damage_pwr = 5, deafen_pwr = 15)
var/list/reflist = list(intensity) // Need to wrap this in a list so we can pass a reference
SEND_SIGNAL(src, COMSIG_CARBON_SOUNDBANG, reflist)
intensity = reflist[1]
var/ear_safety = get_ear_protection()
var/obj/item/organ/ears/ears = getorganslot(ORGAN_SLOT_EARS)
var/effect_amount = intensity - ear_safety
if(effect_amount > 0)
if(stun_pwr)
Paralyze(stun_pwr*effect_amount)
if(conf_pwr)
confused += conf_pwr*effect_amount

if(istype(ears) && (deafen_pwr || damage_pwr))
var/ear_damage = damage_pwr * effect_amount
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/living/carbon/human/species_types/golems.dm
Expand Up @@ -871,21 +871,21 @@
if(M == H)
H.show_message("<span class='narsiesmall'>You cringe with pain as your body rings around you!</span>", 2)
H.playsound_local(H, 'sound/effects/gong.ogg', 100, TRUE)
H.soundbang_act(2, 0, 100, 1)
H.soundbang_act(2, 0, 10, 1)
H.jitteriness += 7
var/distance = max(0,get_dist(get_turf(H),get_turf(M)))
switch(distance)
if(0 to 1)
M.show_message("<span class='narsiesmall'>GONG!</span>", 2)
M.playsound_local(H, 'sound/effects/gong.ogg', 100, TRUE)
M.soundbang_act(1, 0, 30, 3)
M.soundbang_act(1, 0, 10, 3)
M.confused += 10
M.jitteriness += 4
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "gonged", /datum/mood_event/loud_gong)
if(2 to 3)
M.show_message("<span class='cult'>GONG!</span>", 2)
M.playsound_local(H, 'sound/effects/gong.ogg', 75, TRUE)
M.soundbang_act(1, 0, 15, 2)
M.soundbang_act(1, 0, 5, 2)
M.jitteriness += 3
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "gonged", /datum/mood_event/loud_gong)
else
Expand Down
9 changes: 7 additions & 2 deletions code/modules/reagents/chemistry/reagents/food_reagents.dm
Expand Up @@ -275,6 +275,7 @@
description = "A chemical agent used for self-defense and in police work."
color = "#B31008" // rgb: 179, 16, 8
taste_description = "scorching agony"
metabolization_rate = 4 * REAGENTS_METABOLISM

/datum/reagent/consumable/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
if(!ishuman(M) && !ismonkey(M))
Expand Down Expand Up @@ -313,8 +314,12 @@
victim.update_damage_hud()

/datum/reagent/consumable/condensedcapsaicin/on_mob_life(mob/living/carbon/M)
if(prob(5))
M.visible_message("<span class='warning'>[M] [pick("dry heaves!","coughs!","splutters!")]</span>")
if(prob(10))
M.visible_message("<span class='warning'>[M] [pick("dry heaves!","splutters!")]</span>")
if(prob(15))
M.emote("cough")

M.adjustStaminaLoss(3)
..()

/datum/reagent/consumable/sodiumchloride
Expand Down
4 changes: 2 additions & 2 deletions code/modules/reagents/chemistry/recipes/pyrotechnics.dm
Expand Up @@ -327,7 +327,7 @@
var/location = get_turf(holder.my_atom)
playsound(location, 'sound/effects/bang.ogg', 25, 1)
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/3, location))
C.soundbang_act(1, 100, rand(0, 5))
C.soundbang_act(1, 10, rand(0, 5))

/datum/chemical_reaction/sonic_powder_deafen
name = "sonic_powder_deafen"
Expand All @@ -339,7 +339,7 @@
var/location = get_turf(holder.my_atom)
playsound(location, 'sound/effects/bang.ogg', 25, 1)
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/10, location))
C.soundbang_act(1, 100, rand(0, 5))
C.soundbang_act(1, 10, rand(0, 5))

/datum/chemical_reaction/phlogiston
name = /datum/reagent/phlogiston
Expand Down