From 2e46ce62be5c698e8defa32c7047337c992e88ac Mon Sep 17 00:00:00 2001 From: tmyqlfpir <80724828+tmyqlfpir@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:30:03 +1000 Subject: [PATCH] 15% chance of breaking a glass table on 3rd slap (#1324) ## About The Pull Request This PR introduces a change to slapping behavior for glass tables. Upon the last slap on a glass table, it will roll a 15% chance (cursed trait 30%) to break the table for the epic lols and funny. ## Why It's Good For The Game Adds needed comedy, saves the game. Improves the experience by 100% Trust me guys. ## Proof Of Testing https://github.com/Bubberstation/Bubberstation/assets/80724828/dc6f3cf1-39b7-4f41-8441-66d2ba304e23 It only executes the break with glass tables. Other tables are unaffected. Untitled ## Changelog :cl: add: Slapping glass tables have a 15% chance (cursed 30%) of breaking on 3rd slap /:cl: --- code/game/objects/items/hand_items.dm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/code/game/objects/items/hand_items.dm b/code/game/objects/items/hand_items.dm index 2255afe1054..d461746478d 100644 --- a/code/game/objects/items/hand_items.dm +++ b/code/game/objects/items/hand_items.dm @@ -303,6 +303,20 @@ table_smacks_left-- if(table_smacks_left <= 0) + //BUBBER ADDITION BEGIN - Potentially break glass tables - This introduces a potential check to break a glass table + if(table.type == /obj/structure/table/glass) /// Glass table... roll that dice, dice man + if(prob(!HAS_TRAIT(user, TRAIT_CURSED) ? 15 : 30)) /// 15% chance (or double for cursed folk) + var/obj/item/bodypart/arm/active_arm = user.get_active_hand() + var/extra_wound = 0 + if(HAS_TRAIT(user, TRAIT_HULK)) + extra_wound = 20 + user.visible_message(span_danger("[user.name] slams their hand through \the [table]!"), + span_userdanger("You smash your hand through \the [table]!"), span_hear("You hear a loud crash of broken glass!"), COMBAT_MESSAGE_RANGE, user) + active_arm?.receive_damage(brute = 10, wound_bonus = extra_wound) + user.apply_damage(30, STAMINA) + table.deconstruct(FALSE) + log_combat(user, user, "hand slammed", null, "through [table]") + //BUBBER ADDITION END qdel(src) /// Slam the table, demand some attention