Skip to content

Commit

Permalink
document stuff (#912)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapu1178 authored Apr 15, 2024
1 parent c1794c5 commit 326a445
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/modules/three_dsix/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
. += 1
if(incapacitated())
. -= 10 //lol fucked
if(get_timed_status_effect_duration(/datum/status_effect/confusion))
if(has_status_effect(/datum/status_effect/confusion))
. -= -1
if(IsKnockdown())
. -= -2
if(eye_blurry)
. -= -1
if(eye_blind)
if(is_blind())
. -= -4
if(HAS_TRAIT(src, TRAIT_CLUMSY))
. -= -1
Expand Down
11 changes: 11 additions & 0 deletions code/modules/three_dsix/roll.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* Perform a stat roll, returning one of: CRIT_SUCCESS, SUCCESS, CRIT_FAILURE, FAILURE
*
*
* args:
* * requirement (int) The baseline value required to roll a Success.
* * stat (string) The stat, if applicable, to take into account.
* * skill (string) The skill, if applicable, to take into account.
* * modifier (int) A modifier applied to the value after roll. Higher means the roll is more difficult.
* * crit_fail_modifier (int) A value added to requirement, which dictates the crit fail threshold.
*/
/mob/living/proc/stat_roll(requirement = 10, stat, skill, modifier, crit_fail_modifier = 10)
var/stat_mod = stat ? (gurps_stats.get_stat(stat) - 10) : 0
var/skill_mod = skill ? -(gurps_stats.get_skill(skill)) : 0
Expand Down
3 changes: 3 additions & 0 deletions code/modules/three_dsix/stats.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/datum/gurps_stats
var/mob/living/owner

// Higher is better with stats. 10 is the baseline.
VAR_PRIVATE/strength = 10
VAR_PRIVATE/dexterity = 10
VAR_PRIVATE/intelligence = 10
Expand All @@ -14,12 +15,14 @@
ENDURANCE = list()
)

// Higher is better with skills. 0 is the baseline.
VAR_PRIVATE/list/skills = list(
)

/datum/gurps_stats/New(owner)
. = ..()
src.owner = owner

/datum/gurps_stats/Destroy()
owner = null
return ..()
Expand Down

0 comments on commit 326a445

Please sign in to comment.