mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Stops shields getting broken by pillows and disablers. (#75759)
## About The Pull Request See the title. Doing so by adding a new arg for damage type to `check_shields()` and `hit_reaction()`. The other way would had involved a couple istype checks for item or projectile damage type, but this is a longer term solution and can tackle more than just that. ## Why It's Good For The Game Fixes #74876. ## Changelog 🆑 fix: Stops shields getting broken by pillows and disablers. /🆑
This commit is contained in:
@@ -702,7 +702,7 @@
|
||||
user.visible_message(span_danger("[user] strikes with the force of [ghost_counter] vengeful spirits!"))
|
||||
..()
|
||||
|
||||
/obj/item/melee/ghost_sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
/obj/item/melee/ghost_sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
|
||||
var/ghost_counter = ghost_check()
|
||||
final_block_chance += clamp((ghost_counter * 5), 0, 75)
|
||||
owner.visible_message(span_danger("[owner] is protected by a ring of [ghost_counter] ghosts!"))
|
||||
|
||||
@@ -737,7 +737,7 @@
|
||||
. = ..()
|
||||
end_berserk(user)
|
||||
|
||||
/obj/item/clothing/head/hooded/berserker/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
/obj/item/clothing/head/hooded/berserker/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
|
||||
if(berserk_active)
|
||||
return
|
||||
var/berserk_value = damage * DAMAGE_TO_CHARGE_SCALE
|
||||
@@ -992,7 +992,7 @@
|
||||
user.changeNext_move(CLICK_CD_RAPID)
|
||||
return ..()
|
||||
|
||||
/obj/item/cursed_katana/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
/obj/item/cursed_katana/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 0 //Don't bring a sword to a gunfight
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user