mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +01:00
Sabrage uses skills now (#22854)
Bartender sabrage now uses the skills system instead. Gives a small morale boost on success.
This commit is contained in:
@@ -69,3 +69,14 @@
|
||||
|
||||
var/datum/moodlet/new_moodlet = morale_comp.load_moodlet(/datum/moodlet/bartender_drink, moodlet_value)
|
||||
new_moodlet.refresh_moodlet() // Reset the duration when they drink it.
|
||||
|
||||
/datum/moodlet/bartender_sabrage
|
||||
moodlet_descriptor = SPAN_GOOD("Saw a skillfully done sabrage.")
|
||||
initial_descriptor = SPAN_GOOD("You have gained a morale modifier from seeing a successful sabrage.")
|
||||
|
||||
/datum/component/sabrage_moodlet_provider
|
||||
/// The morale boosting value of the moodlet this drink will provide.
|
||||
var/moodlet_value = 0
|
||||
|
||||
/// Whether the DrinkMoodletProvider is allowed to overwrite stronger moodlets with weaker moodlets.
|
||||
var/overwrite_moodlet = FALSE
|
||||
|
||||
@@ -390,12 +390,13 @@
|
||||
src.reagents.remove_any(reagents.total_volume / 5)
|
||||
return
|
||||
|
||||
///The bonus to success chance that the user gets for being a command role
|
||||
var/command_bonus = (user.mind?.assigned_role in command_positions) ? 20 : 0
|
||||
var/skill_bonus = 0
|
||||
|
||||
var/job_bonus = user.mind?.assigned_role == "Bartender" ? 25 : 0
|
||||
var/datum/component/skill/bartending/bar_skill = user.GetComponent(BARTENDING_SKILL_COMPONENT)
|
||||
if(bar_skill)
|
||||
skill_bonus = 6.25 * bar_skill.skill_level
|
||||
|
||||
var/sabrage_chance = (attacking_item.force * sabrage_success_percentile) + command_bonus + job_bonus
|
||||
var/sabrage_chance = (attacking_item.force * sabrage_success_percentile) + skill_bonus
|
||||
|
||||
if(prob(sabrage_chance))
|
||||
///Severity of the resulting froth to pass to make_froth()
|
||||
@@ -439,6 +440,28 @@
|
||||
user.visible_message(SPAN_DANGER("[user] cleanly slices off the cork of [src], causing it to fly off the bottle with great force."), \
|
||||
SPAN_GOOD("You elegantly slice the cork off of [src], causing it to fly off the bottle with great force."), \
|
||||
"You can hear a pop.")
|
||||
|
||||
var/moodlet_value = 5
|
||||
if (!moodlet_value)
|
||||
return
|
||||
|
||||
var/list/listening = get_hearers_in_view(world.view, user)
|
||||
if (!listening)
|
||||
return
|
||||
listening -= user
|
||||
|
||||
for (var/mob/player_mob in listening)
|
||||
var/datum/component/morale/receiver_morale = player_mob.GetComponent(MORALE_COMPONENT)
|
||||
if (!receiver_morale)
|
||||
continue
|
||||
|
||||
if (astype(receiver_morale.moodlets[/datum/moodlet/bartender_sabrage], /datum/moodlet)?.get_morale_modifier() >= moodlet_value)
|
||||
receiver_morale.load_moodlet(/datum/moodlet/bartender_sabrage)?.refresh_moodlet()
|
||||
continue // Don't overwrite stronger moodlets.
|
||||
|
||||
var/datum/moodlet/sabraged = receiver_morale.load_moodlet(/datum/moodlet/bartender_sabrage, moodlet_value)
|
||||
sabraged.refresh_moodlet()
|
||||
sabraged.moodlet_descriptor += " from [user.name]."
|
||||
playsound(src, 'sound/items/champagne_pop.ogg', 70, TRUE)
|
||||
atom_flags |= ATOM_FLAG_OPEN_CONTAINER
|
||||
update_icon()
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
################################
|
||||
# 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
|
||||
# - (fixes bugs)
|
||||
# wip
|
||||
# - (work in progress)
|
||||
# qol
|
||||
# - (quality of life)
|
||||
# soundadd
|
||||
# - (adds a sound)
|
||||
# sounddel
|
||||
# - (removes a sound)
|
||||
# rscadd
|
||||
# - (adds a feature)
|
||||
# rscdel
|
||||
# - (removes a feature)
|
||||
# imageadd
|
||||
# - (adds an image or sprite)
|
||||
# imagedel
|
||||
# - (removes an image or sprite)
|
||||
# spellcheck
|
||||
# - (fixes spelling or grammar)
|
||||
# experiment
|
||||
# - (experimental change)
|
||||
# balance
|
||||
# - (balance changes)
|
||||
# code_imp
|
||||
# - (misc internal code change)
|
||||
# refactor
|
||||
# - (refactors code)
|
||||
# config
|
||||
# - (makes a change to the config files)
|
||||
# admin
|
||||
# - (makes changes to administrator tools)
|
||||
# server
|
||||
# - (miscellaneous changes to server)
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Wowzewow (Wezzy)
|
||||
|
||||
# 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, this gets changed to [] after reading. Just remove the brackets when you add new shit.
|
||||
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "Sabrage skill now uses the bartending skill component to determine success chance."
|
||||
- rscadd: "A successful Sabrage also gives a minor morale boost."
|
||||
Reference in New Issue
Block a user