Skip to content

Commit

Permalink
Add new negative traits to character creation (#18491)
Browse files Browse the repository at this point in the history
  • Loading branch information
Glamurio committed Apr 15, 2024
1 parent 892bd33 commit 1c6dd39
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
20 changes: 20 additions & 0 deletions code/datums/traits.dm
Expand Up @@ -649,6 +649,19 @@ ABSTRACT_TYPE(/datum/trait/job)
category = list("stats")
points = -2

/datum/trait/slowstrider
name = "Slow Strider"
desc = "What's the rush? You can't sprint anymore."
id = "slowstrider"
category = list("stats")
points = 2
afterlife_blacklisted = TRUE

onAdd(var/mob/owner)
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
APPLY_ATOM_PROPERTY(H, PROP_MOB_CANTSPRINT, "trait")

//Category: Background.

/datum/trait/stowaway
Expand Down Expand Up @@ -947,6 +960,13 @@ ABSTRACT_TYPE(/datum/trait/job)
points = 1
afterlife_blacklisted = TRUE

/datum/trait/trippy
name = "Trippy"
desc = "You have a tendency to randomly trip while moving."
id = "trippy"
points = 1
afterlife_blacklisted = TRUE

/datum/trait/scaredshitless
name = "Scared Shitless"
desc = "Literally. When you scream, you fart. Be careful around Bibles!"
Expand Down
6 changes: 6 additions & 0 deletions code/mob/input.dm
Expand Up @@ -202,6 +202,12 @@
last_move_trigger = ticker ? ticker.round_elapsed_ticks : 0 //Wire note: Fix for Cannot read null.round_elapsed_ticks
deliver_move_trigger(running ? "sprint" : m_intent)

// Tripping (the physical kind)
var/trip_chance = 5
if (src.traitHolder && src.traitHolder.hasTrait("trippy") && prob(trip_chance))
src.setStatus("resting", INFINITE_STATUS)
src.force_laydown_standup()
src.visible_message(SPAN_ALERT("<B>[src]</B> trips!"))

src.glide_size = glide // dumb hack: some Move() code needs glide_size to be set early in order to adjust "following" objects
src.animate_movement = SLIDE_STEPS
Expand Down

0 comments on commit 1c6dd39

Please sign in to comment.