Skip to content

Commit

Permalink
Nerfs Block Chance + Cooldown (shiptest-ss13#2172)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
Weapons with blockchance are mildly degenerate, due to how you can carry
multiple, and they allow near nullification of ranged weapons if stacked
enough. Thus I am nerfing their chances to fire and adding a cooldown.
Shields are exempt from the cooldown because they're shields.
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
Combat should be *more* lethal. Harder to cheese. That sort of thing.
Wear armor and carry a shield if you want to avoid damage. Or buy a gun.
<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## Changelog

:cl:
add: blocking something now starts a short timer before you can block
something again, unless you're using a shield.
balance: Block Chances have been altered (usually decreased) across the
board. In tandem with the cooldown, don't expect to block as much
automatic weaponry, while still being alright against slow attacks.
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Signed-off-by: Bjarl <94164348+Bjarl@users.noreply.github.com>
Co-authored-by: Mark Suckerberg <mark@suckerberg.gay>
  • Loading branch information
Erikafox and MarkSuckerberg committed Sep 13, 2023
1 parent 15c4e9d commit af84bb2
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 17 deletions.
14 changes: 13 additions & 1 deletion code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
var/toolspeed = 1

var/block_chance = 0
var/block_cooldown_time = 1 SECONDS
COOLDOWN_DECLARE(block_cooldown)
var/hit_reaction_chance = 0 //If you want to have something unrelated to blocking/armour piercing etc. Maybe not needed, but trying to think ahead/allow more freedom
///In tiles, how far this weapon can reach; 1 for adjacent, which is default
var/reach = 1
Expand Down Expand Up @@ -449,8 +451,18 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb

/obj/item/proc/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
SEND_SIGNAL(src, COMSIG_ITEM_HIT_REACT, args)
if(prob(final_block_chance))
if((prob(final_block_chance) && COOLDOWN_FINISHED(src, block_cooldown)) || (prob(final_block_chance) && istype(src, /obj/item/shield)))
owner.visible_message("<span class='danger'>[owner] blocks [attack_text] with [src]!</span>")
var/rand_ricochet = pick(list(
'sound/weapons/effects/ric1.ogg',
'sound/weapons/effects/ric2.ogg',
'sound/weapons/effects/ric3.ogg',
'sound/weapons/effects/ric4.ogg',
'sound/weapons/effects/ric5.ogg'
))
playsound(src, rand_ricochet, 100)
if(!istype(src, /obj/item/shield))
COOLDOWN_START(src, block_cooldown, block_cooldown_time)
return 1
return 0

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/holy_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
w_class = WEIGHT_CLASS_HUGE
force = 5
slot_flags = ITEM_SLOT_BACK
block_chance = 50
block_chance = 40
var/shield_icon = "shield-red"

/obj/item/nullrod/staff/worn_overlays(isinhands)
Expand Down
5 changes: 2 additions & 3 deletions code/game/objects/items/melee/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
force = 15
throwforce = 10
w_class = WEIGHT_CLASS_BULKY
block_chance = 50
block_chance = 60
armour_penetration = 75
sharpness = IS_SHARP
attack_verb = list("slashed", "cut")
Expand Down Expand Up @@ -581,7 +581,6 @@
force = 14
w_class = WEIGHT_CLASS_BULKY
throwforce = 8
block_chance = 10
armour_penetration = 50
attack_verb = list("smacked", "struck", "cracked", "beaten")
var/overlay_state = "mace_handle"
Expand Down Expand Up @@ -673,7 +672,7 @@
throw_speed = 4
throw_range = 5
throwforce = 12
block_chance = 40
block_chance = 20
armour_penetration = 50
hitsound = 'sound/weapons/anime_slash.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "diced", "cut")
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/shields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "shield"
icon = 'icons/obj/shields.dmi'
block_chance = 50
block_cooldown_time = 0 SECONDS
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
var/transparent = FALSE // makes beam projectiles pass through the shield

Expand Down Expand Up @@ -110,7 +111,7 @@
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 10)
resistance_flags = FLAMMABLE
block_chance = 30
block_chance = 25
transparent = FALSE
max_integrity = 55
w_class = WEIGHT_CLASS_NORMAL
Expand Down
12 changes: 6 additions & 6 deletions code/game/objects/items/weaponry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
throwforce = 10
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 50
block_chance = 40
sharpness = IS_SHARP
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
Expand Down Expand Up @@ -209,7 +209,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
w_class = WEIGHT_CLASS_HUGE
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 50
block_chance = 10
sharpness = IS_SHARP
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
Expand Down Expand Up @@ -746,7 +746,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
name = "vibro sword"
desc = "A potent weapon capable of cutting through nearly anything. Wielding it in two hands will allow you to deflect gunfire."
armour_penetration = 100
block_chance = 40
block_chance = 30
force = 20
throwforce = 20
throw_speed = 4
Expand Down Expand Up @@ -803,7 +803,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
name = "legionnaire staff"
desc = "The remnants of a legionnaire, reconstructed around a pole of bone. The skulls it produces are loyal to the wielder, seeming to recognize them as their host body."
icon = 'icons/obj/guns/magic.dmi'
block_chance = 25
block_chance = 20
force = 20
throwforce = 10
throw_speed = 4
Expand Down Expand Up @@ -837,11 +837,11 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
force = 15
throwforce = 10
armour_penetration = 15
block_chance = 30


/obj/item/vibro_weapon/weak
armour_penetration = 10
block_chance = 5
block_chance = 10
force = 15
throwforce = 20

2 changes: 1 addition & 1 deletion code/modules/mining/equipment/kinetic_crusher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@
slot_flags = ITEM_SLOT_BACK
throwforce = 5
throw_speed = 4
block_chance = 30
block_chance = 20
custom_materials = list(/datum/material/titanium=5000, /datum/material/iron=2075)
hitsound = 'sound/weapons/blade1.ogg'
attack_verb = list("sliced", "bisected", "diced", "chopped", "filleted")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mining/lavaland/necropolis_chests.dm
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@
item_flags = NEEDS_PERMIT
force = 15
sharpness = IS_SHARP
block_chance = 25//A pittance, but might be worth something in a scuffle
block_chance = 5//A pittance, but might be worth something in a scuffle
hitsound = 'sound/weapons/chainhit.ogg'

/obj/item/gun/magic/hook/melee_attack_chain(mob/user, atom/target, params)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
var/block_chance_modifier = round(damage / -3)

for(var/obj/item/I in held_items)
if(!istype(I, /obj/item/clothing))
if(!istype(I, /obj/item/clothing) || I == get_active_held_item() || istype(I ,/obj/item/shield))
var/final_block_chance = I.block_chance - (clamp((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
if(I.hit_reaction(src, AM, attack_text, final_block_chance, damage, attack_type))
return TRUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
w_class = WEIGHT_CLASS_BULKY
throwforce = 25
block_chance = 35
block_chance = 65
armour_penetration = 50
sharpness = IS_SHARP

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Slimecrossing Weapons
w_class = WEIGHT_CLASS_HUGE
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
slot_flags = ITEM_SLOT_BACK
block_chance = 75
block_chance = 50
force = 0
throw_range = 1 //How far do you think you're gonna throw a solid crystalline shield...?
throw_speed = 2
Expand Down

0 comments on commit af84bb2

Please sign in to comment.