Improves jousting and gives it to more weapons (#76321)

## About The Pull Request

I was reading over components and saw one called jousting, I vividly
remember it being mentioned every so often but I've never seen it
in-game. Turns out the SINGLE case for it is when you are using a spear
on a borg. The code itself was also very over the place, making it a
little confusing to figure out what it did.

I tried cleaning the file up as much as I could, and since I wanted to
see this in-game more often, I made some player-facing changes too:

- You can now joust from any vehicle, not just borgs (Secway, ATV,
scooter, Charger holoparasite)
- Added jousting to the broom, pitchfork, captain's sabre, and energy
sword while active (ONLY esword, NOT desword).
- Added examine text to indicate this feature exists.

Extra notes:
Esword gains half the damage increase and half the knockdown chance than
other ways of jousting
Broom only gets 25% damage increase from jousting, since the broom is
already pretty strong I thought it would be better off as something used
mostly to knockdown.
Spears have to travel a longer distance than other weapons to get their
jousting benefits (since it's supposed to be a ghetto weapon)
Jousting now takes the minimum distance needed into account when
handling knockdown chance & damage dealt, so travelling 5 tiles will no
longer be 100% chance of knockdown if you need a minimum distance of 3
tiles to joust (it will instead be 40%, since you've only traveled 2
tiles in 'jousting' mode).

## Why It's Good For The Game

This is an underused component and I thought it would bring some pretty
cool interactions, especially for Holoparasite & Janitors, as a new way
to use vehicles to your advantage when it's otherwise seen as just a
slowdown.

## Changelog

🆑
balance: Jousting now works on anything you're buckled to, not just
Cyborgs.
balance: Brooms, Pitchforks, the Captain's Sabre, and Energy swords can
now be used for jousting.
balance: Spears need to travel a longer distance to joust now.
balance: Jousting's knockdown and damage now only gets stronger after
you've traveled the minimum tiles needed to joust.
/🆑
This commit is contained in:
John Willard
2023-07-01 21:52:08 +00:00
committed by GitHub
parent f3d02ae36d
commit 333bef46fe
6 changed files with 126 additions and 50 deletions
+8 -1
View File
@@ -20,7 +20,14 @@
/obj/item/pushbroom/Initialize(mapload)
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12, icon_wielded="[base_icon_state]1", wield_callback = CALLBACK(src, PROC_REF(on_wield)), unwield_callback = CALLBACK(src, PROC_REF(on_unwield)))
AddComponent(/datum/component/jousting, damage_boost_per_tile = 1)
AddComponent(/datum/component/two_handed, \
force_unwielded = 8, \
force_wielded = 12, \
icon_wielded = "[base_icon_state]1", \
wield_callback = CALLBACK(src, PROC_REF(on_wield)), \
unwield_callback = CALLBACK(src, PROC_REF(on_unwield)), \
)
/obj/item/pushbroom/update_icon_state()
icon_state = "[base_icon_state]0"
+1
View File
@@ -250,6 +250,7 @@
/obj/item/melee/energy/sword/saber/Initialize(mapload)
. = ..()
AddComponent(/datum/component/jousting, damage_boost_per_tile = 1, knockdown_chance_per_tile = 10)
if(!sword_color_icon && LAZYLEN(possible_sword_colors))
sword_color_icon = pick(possible_sword_colors)
+4 -3
View File
@@ -86,11 +86,12 @@
/obj/item/melee/sabre/Initialize(mapload)
. = ..()
AddComponent(/datum/component/jousting)
//fast and effective, but as a sword, it might damage the results.
AddComponent(/datum/component/butchering, \
speed = 3 SECONDS, \
effectiveness = 95, \
bonus_modifier = 5, \
speed = 3 SECONDS, \
effectiveness = 95, \
bonus_modifier = 5, \
)
// The weight of authority comes down on the tider's crimes.
AddElement(/datum/element/bane, target_type = /mob/living/carbon/human, damage_multiplier = 0.35)
+1
View File
@@ -29,6 +29,7 @@
/obj/item/pitchfork/Initialize(mapload)
. = ..()
AddComponent(/datum/component/jousting)
AddComponent(/datum/component/two_handed, force_unwielded=7, force_wielded=15, icon_wielded="[base_icon_state]1")
/obj/item/pitchfork/update_icon_state()
+4 -1
View File
@@ -40,7 +40,10 @@
. = ..()
force = force_unwielded
//decent in a pinch, but pretty bad.
AddComponent(/datum/component/jousting)
AddComponent(/datum/component/jousting, \
max_tile_charge = 9, \
min_tile_charge = 6, \
)
AddComponent(/datum/component/butchering, \
speed = 10 SECONDS, \