Wall attacks are no longer able to be queued for massive damage. (#9273)

You could previously queue a lot of do_afters to stack damage. No longer possible. In exchange, the damage applied is less.
This commit is contained in:
Matt Atlas
2020-07-06 18:57:37 +03:00
committed by GitHub
parent 101cdd252f
commit 60fc2e5339
3 changed files with 65 additions and 28 deletions
+11 -13
View File
@@ -181,20 +181,18 @@
var/damage_to_deal = W.force
var/weaken = 0
if(reinf_material)
weaken += reinf_material.integrity * 2.5 //Since girders don't have a secondary material, buff 'em up a bit.
weaken += reinf_material.integrity * 3 //Since girders don't have a secondary material, buff 'em up a bit.
weaken /= 100
visible_message("<span class='notice'>[user] retracts their [W] and starts winding up a strike...</span>")
var/hit_delay = W.w_class * 10 //Heavier weapons take longer to swing, yeah?
if(do_after(user, hit_delay))
do_attack_animation(src)
playsound(src, 'sound/weapons/smash.ogg', 50)
if(damage_to_deal > weaken && (damage_to_deal > MIN_DAMAGE_TO_HIT))
damage_to_deal -= weaken
visible_message("<span class='warning'>[user] strikes \the [src] with \the [W], [is_sharp(W) ? "slicing" : "denting"] a support rod!</span>")
take_damage(damage_to_deal)
else
visible_message("<span class='warning'>[user] strikes \the [src] with \the [W], but it bounces off!</span>")
return
do_attack_animation(src)
playsound(src, 'sound/weapons/smash.ogg', 50)
if(damage_to_deal > weaken && (damage_to_deal > MIN_DAMAGE_TO_HIT))
damage_to_deal -= weaken
visible_message("<span class='warning'>[user] strikes \the [src] with \the [W], [is_sharp(W) ? "slicing" : "denting"] a support rod!</span>")
take_damage(damage_to_deal)
else
visible_message("<span class='warning'>[user] strikes \the [src] with \the [W], but it bounces off!</span>")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
return
return ..()
+13 -15
View File
@@ -376,21 +376,19 @@
var/weaken = 0
var/sound_to_play = 'sound/weapons/smash.ogg'
if(material)
weaken += material.integrity * 2
weaken += material.integrity * 2.5
sound_to_play = material.hitsound
if(reinf_material)
weaken += reinf_material.integrity * 2
weaken += reinf_material.integrity * 2.5
weaken /= 100 //For reference, plasteel's integrity is 600.
visible_message("<span class='notice'>[user] retracts their [W] and starts winding up a strike...</span>")
var/hit_delay = W.w_class * 10 //Heavier weapons take longer to swing, yeah?
if(do_after(user, hit_delay))
user.do_attack_animation(src)
playsound(src, sound_to_play, 50)
if(damage_to_deal > weaken && (damage_to_deal > MIN_DAMAGE_TO_HIT))
//Plasteel walls take 24 & 15 minimum damage.
//Steel walls take 3 & 15 minimum damage.
damage_to_deal -= weaken
visible_message("<span class='warning'>[user] strikes \the [src] with \the [W], [is_sharp(W) ? "slicing some of the plating" : "putting a heavy dent on it"]!</span>")
take_damage(damage_to_deal)
else
visible_message("<span class='warning'>[user] strikes \the [src] with \the [W], but it bounces off!</span>")
user.do_attack_animation(src)
playsound(src, sound_to_play, 50)
if(damage_to_deal > weaken && (damage_to_deal > MIN_DAMAGE_TO_HIT))
//Plasteel walls take 24 & 15 minimum damage.
//Steel walls take 3 & 15 minimum damage.
damage_to_deal -= weaken
visible_message("<span class='warning'>[user] strikes \the [src] with \the [W], [is_sharp(W) ? "slicing some of the plating" : "putting a heavy dent on it"]!</span>")
take_damage(damage_to_deal)
else
visible_message("<span class='warning'>[user] strikes \the [src] with \the [W], but it bounces off!</span>")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
+41
View File
@@ -0,0 +1,41 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: MattAtlas
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- tweak: "Hitting walls is now instant instead of being charged up. This means you can no longer queue up an insane amount of attacks."