15% chance of breaking a glass table on 3rd slap (#1324)

<!-- 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

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.

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

<!-- Please make sure to actually test your PRs. If you have not tested
your PR mention it. -->

## Why It's Good For The Game

Adds needed comedy, saves the game. Improves the experience by 100%

Trust me guys.

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## 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.

<img width="345" alt="Untitled"
src="https://github.com/Bubberstation/Bubberstation/assets/80724828/4b17aad0-f85a-4758-8c64-3c22a0f9464c">

<!-- Compile and run your code locally. Make sure it works. This is the
place to show off your changes! We are not responsible for testing your
features. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
add: Slapping glass tables have a 15% chance (cursed 30%) of breaking on
3rd slap
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 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. -->

<!-- By opening a pull request. You have read and understood the
repository rules located on the main README.md on this project. -->
This commit is contained in:
tmyqlfpir
2024-04-11 06:30:03 +00:00
committed by GitHub
parent 91ca2359b5
commit 2e46ce62be
+14
View File
@@ -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