Skip to content

Commit

Permalink
New Trait: Sluggish / Snail-Paced (#692)
Browse files Browse the repository at this point in the history
# Description

This PR adds two new negative traits that decrease your movement speed:
**Sluggish** and **Snail-Paced**.

- Sluggish (+1 points)
  - 15% slower movement speed
- 35% slower climbing speed (for standard tables, from 1.5s to ~2.02
seconds)
- Cooldown on laying down/standing up increased from 2.5 seconds to 3
seconds
- Snail-Paced (+2 points)
  - 30% slower movement speed
- 66% slower climbing speed (for standard tables, from 1.5s to ~2.48
seconds)
- Cooldown on laying down/standing up increased from 2.5 seconds to 4
seconds

## Media

<details><summary>Expand</summary>

**Trait entry**


![image](https://github.com/user-attachments/assets/cb483536-ec3e-4c28-a4b4-c431bb1b669e)


![image](https://github.com/user-attachments/assets/a251844e-7058-4d4b-b21d-a5637c39489f)

</details>

# Changelog

:cl: Skubman
- add: Add two new negative traits: Sluggish (+1) and Snail-Paced (+2)
that make you move slower, and climb tables slower.

---------

Signed-off-by: Angelo Fallaria <[email protected]>
Co-authored-by: VMSolidus <[email protected]>
  • Loading branch information
angelofallars and VMSolidus authored Aug 7, 2024
1 parent dfe5c2c commit f79c6db
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 1 deletion.
14 changes: 14 additions & 0 deletions Content.Server/Traits/Assorted/TraitSpeedModifierComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Content.Server.Traits.Assorted;

/// <summary>
/// This component is used for traits that modify movement speed.
/// </summary>
[RegisterComponent]
public sealed partial class TraitSpeedModifierComponent : Component
{
[DataField(required: true)]
public float WalkModifier = 1.0f;

[DataField(required: true)]
public float SprintModifier = 1.0f;
}
19 changes: 19 additions & 0 deletions Content.Server/Traits/Assorted/TraitSpeedModifierSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Content.Shared.Movement.Systems;
using Content.Server.Traits.Assorted;

namespace Content.Shared.Traits.Assorted;

public sealed class TraitSpeedModifierSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<TraitSpeedModifierComponent, RefreshMovementSpeedModifiersEvent>(OnRefreshMovementSpeed);
}

private void OnRefreshMovementSpeed(EntityUid uid, TraitSpeedModifierComponent component, RefreshMovementSpeedModifiersEvent args)
{
args.ModifySpeed(component.WalkModifier, component.SprintModifier);
}
}
12 changes: 11 additions & 1 deletion Resources/Locale/en-US/traits/traits.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ trait-description-ParkourTraining =
Whether as a hobby, lifestyle, or professional training, you are trained in the discipline of parkour.
You're faster with climbing, crawling, lying down, and getting up.
trait-name-Sluggish = Sluggish
trait-description-Sluggish =
You navigate the world slower than others, perhaps due to a medical condition, inactivity, or age.
You move slower, and it takes longer for you to climb, lie down and get up.
trait-name-SnailPaced = Snail-Paced
trait-description-SnailPaced =
You walk at a snail's pace, perhaps due to a medical condition, mobility impairment, or age.
You move substantially slower, and it takes far longer for you to climb, lie down and get up.
trait-name-LightStep = Light Step
trait-description-LightStep =
You move with a gentle step, making your footsteps quieter.
Expand All @@ -106,4 +116,4 @@ trait-description-Spearmaster =
trait-name-WeaponsGeneralist = Weapons Generalist
trait-description-WeaponsGeneralist =
You are a jack of all trades with melee weapons, enabling you to be versatile with your weapon arsenal.
Your melee damage bonus for all Brute damage types (Blunt, Slash, Piercing) becomes 25%.
Your melee damage bonus for all Brute damage types (Blunt, Slash, Piercing) becomes 25%.
38 changes: 38 additions & 0 deletions Resources/Prototypes/Traits/disabilities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,44 @@
components:
- type: Snoring

- type: trait
id: Sluggish
category: Physical
points: 1
requirements:
- !type:CharacterTraitRequirement
inverted: true
traits:
- ParkourTraining
- SnailPaced
components:
- type: TraitSpeedModifier
sprintModifier: 0.85
walkModifier: 0.85
- type: ClimbDelayModifier
climbDelayMultiplier: 1.35
- type: LayingDownModifier
layingDownCooldownMultiplier: 1.2

- type: trait
id: SnailPaced
category: Physical
points: 2
requirements:
- !type:CharacterTraitRequirement
inverted: true
traits:
- ParkourTraining
- Sluggish
components:
- type: TraitSpeedModifier
sprintModifier: 0.7
walkModifier: 0.7
- type: ClimbDelayModifier
climbDelayMultiplier: 1.66
- type: LayingDownModifier
layingDownCooldownMultiplier: 1.6

- type: trait
id: BloodDeficiency
category: Physical
Expand Down
6 changes: 6 additions & 0 deletions Resources/Prototypes/Traits/skills.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@
id: ParkourTraining
category: Physical
points: -3
requirements:
- !type:CharacterTraitRequirement
inverted: true
traits:
- Sluggish
- SnailPaced
components:
- type: ClimbDelayModifier
climbDelayMultiplier: 0.70
Expand Down

0 comments on commit f79c6db

Please sign in to comment.