Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/__DEFINES/~darkpack/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai

#define TRAIT_IN_FRENZY "in_frenzy"

// Can't examine people
#define TRAIT_CANNOT_FOCUS "cannot_focus"

// Is the mob silenced (by Quietus 1 for example)
#define TRAIT_SILENCED "silenced"
// is the vampire weak to Dominate?
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_BYPASS_MEASURES" = TRAIT_BYPASS_MEASURES,
"TRAIT_CANNOT_BE_UNBUCKLED" = TRAIT_CANNOT_BE_UNBUCKLED,
"TRAIT_CANNOT_CRYSTALIZE" = TRAIT_CANNOT_CRYSTALIZE,
"TRAIT_CANNOT_FOCUS" = TRAIT_CANNOT_FOCUS,
"TRAIT_CANNOT_OPEN_PRESENTS" = TRAIT_CANNOT_OPEN_PRESENTS,
"TRAIT_CANT_RIDE" = TRAIT_CANT_RIDE,
"TRAIT_CAN_GET_AI_TRACKING_MESSAGE" = TRAIT_CAN_GET_AI_TRACKING_MESSAGE,
Expand Down
44 changes: 29 additions & 15 deletions code/datums/status_effects/debuffs/debuffs.dm

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You make a buncha non-modular changes here..

Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,10 @@
/datum/status_effect/knocked_out/on_apply()
owner.become_blind(TRAIT_STATUS_EFFECT(id))
owner.apply_status_effect(/datum/status_effect/grouped/see_no_names, TRAIT_STATUS_EFFECT(id))
owner.apply_status_effect(/datum/status_effect/grouped/static_look, TRAIT_STATUS_EFFECT(id))
owner.add_traits(list(TRAIT_HANDS_BLOCKED, TRAIT_IMMOBILIZED, TRAIT_BLOCK_SECHUD, TRAIT_BLOCK_MEDHUD, TRAIT_INCAPACITATED, TRAIT_FLOORED), TRAIT_STATUS_EFFECT(id))
owner.update_eyes() // updates eyelids
RegisterSignal(owner, COMSIG_MOB_STATCHANGE, PROC_REF(on_mob_statchange))
RegisterSignal(owner, COMSIG_MOB_CLIENT_LOGIN, PROC_REF(show_unconscious_hud))
if(GET_CLIENT(owner)) // let's not waste time giving the hud to non-player characters
show_unconscious_hud(owner)
return TRUE

/datum/status_effect/knocked_out/on_creation(mob/living/new_owner, ...)
Expand All @@ -171,35 +169,51 @@
/datum/status_effect/knocked_out/on_remove()
owner.cure_blind(TRAIT_STATUS_EFFECT(id))
owner.remove_status_effect(/datum/status_effect/grouped/see_no_names, TRAIT_STATUS_EFFECT(id))
owner.remove_status_effect(/datum/status_effect/grouped/static_look, TRAIT_STATUS_EFFECT(id))
owner.remove_traits(list(TRAIT_HANDS_BLOCKED, TRAIT_IMMOBILIZED, TRAIT_BLOCK_SECHUD, TRAIT_BLOCK_MEDHUD, TRAIT_INCAPACITATED, TRAIT_FLOORED), TRAIT_STATUS_EFFECT(id))
owner.update_eyes() // updates eyelids
UnregisterSignal(owner, list(COMSIG_MOB_CLIENT_LOGIN, COMSIG_MOB_STATCHANGE))
if(GET_CLIENT(owner))
hide_unconscious_hud(owner)
UnregisterSignal(owner, list(COMSIG_MOB_STATCHANGE))

/datum/status_effect/knocked_out/tick(seconds_between_ticks)
owner.adjust_stamina_loss(-3 * seconds_between_ticks)

/datum/status_effect/knocked_out/proc/on_mob_statchange(mob/living/source, ...)
SIGNAL_HANDLER
if(owner.stat == DEAD)
stop_ticking()
else
start_ticking()

//CANNOT RECOGNIZE ANYONE
/datum/status_effect/grouped/static_look
id = "static look"
duration = STATUS_EFFECT_PERMANENT

/datum/status_effect/grouped/static_look/on_apply()
. = ..()
RegisterSignal(owner, COMSIG_MOB_CLIENT_LOGIN, PROC_REF(show_unconscious_hud))
if(GET_CLIENT(owner)) // let's not waste time giving the hud to non-player characters
show_unconscious_hud(owner)

/datum/status_effect/grouped/static_look/on_remove()
UnregisterSignal(owner, list(COMSIG_MOB_CLIENT_LOGIN))
if(GET_CLIENT(owner))
hide_unconscious_hud(owner)
return ..()

/// Global list of images that correspond to a mob's unconscious appearance
GLOBAL_LIST_EMPTY(unconscious_appearances)

/datum/status_effect/knocked_out/proc/show_unconscious_hud(mob/living/source)
/datum/status_effect/grouped/static_look/proc/show_unconscious_hud(mob/living/source)
SIGNAL_HANDLER

source.client?.images += (GLOB.unconscious_appearances - source.unconscious_appearance)

/datum/status_effect/knocked_out/proc/hide_unconscious_hud(mob/living/source)
/datum/status_effect/grouped/static_look/proc/hide_unconscious_hud(mob/living/source)
SIGNAL_HANDLER

source.client?.images -= GLOB.unconscious_appearances

/datum/status_effect/knocked_out/proc/on_mob_statchange(mob/living/source, ...)
SIGNAL_HANDLER
if(owner.stat == DEAD)
stop_ticking()
else
start_ticking()

//SLEEPING
/datum/status_effect/incapacitating/sleeping
id = "sleeping"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
return null

/mob/living/carbon/examine(mob/user)
if(HAS_TRAIT(src, TRAIT_UNKNOWN_APPEARANCE) && !isobserver(user))
if((HAS_TRAIT(src, TRAIT_UNKNOWN_APPEARANCE) || HAS_TRAIT(user, TRAIT_CANNOT_FOCUS)) && !isobserver(user)) //DARKPACK EDIT ADD: TRAIT THAT MAKES YOU UNABLE TO EXAMINE PEOPLE
return list(span_warning("You're struggling to make out any details..."))

var/t_He = p_They()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/mob/living/send_speech(message_raw, message_range = 6, obj/source = src, bubble_type = bubble_icon, list/spans, datum/language/message_language = null, list/message_mods = list(), forced = null, tts_message, list/tts_filter)
if(HAS_TRAIT(src, TRAIT_IN_FRENZY))
var/list/random_emote = list("growl", "hiss") //I would include *scream but for some reason it isn't working.
emote(pick(random_emote))
return

. = ..()
if(!blooper)
return
Expand Down
11 changes: 9 additions & 2 deletions modular_darkpack/modules/frenzy/code/frenzy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@
return
if(IS_UNCONSCIOUS(src))
return
add_traits(list(TRAIT_IN_FRENZY, TRAIT_NOSOFTCRIT, TRAIT_ANALGESIA), FRENZY_TRAIT)
add_traits(list(TRAIT_IN_FRENZY, TRAIT_NOSOFTCRIT, TRAIT_ANALGESIA, TRAIT_CANNOT_FOCUS, TRAIT_ILLITERATE), FRENZY_TRAIT)

set_jitter_if_lower(1 SCENES)

message_admins("[ADMIN_LOOKUPFLW(src)] has entered frenzy[target ? " targeting [ADMIN_LOOKUPFLW(target)]": ""]. ([source])")
log_combat(src, (src || target), "has frenzied on because of \"[source]\" on")

if(fleeing)
to_chat(src, span_danger("FLEE."))
add_traits(list(TRAIT_PACIFISM), FRENZY_TRAIT) //Lore inaccurate, but this forces them to flee instead of ignoring rotshreck and continuing to fight.
else
to_chat(src, span_bolddanger("FRENZY."))
if(!HAS_TRAIT(src, TRAIT_PERMAFANGS)) //If you already have fangs, you don't grow them suddenly.
src.balloon_alert_to_viewers("grows fangs!")
add_traits(list(TRAIT_PERMAFANGS, TRAIT_STRONG_GRABBER), FRENZY_TRAIT) //You're hangry and can't wait to eat.

SEND_SOUND(src, sound('modular_darkpack/modules/frenzy/sounds/frenzy.ogg', volume = 50))

Expand All @@ -25,7 +32,7 @@
/mob/living/proc/exit_frenzy_mode()
if(!HAS_TRAIT(src, TRAIT_IN_FRENZY))
return
remove_traits(list(TRAIT_IN_FRENZY, TRAIT_NOSOFTCRIT, TRAIT_ANALGESIA), FRENZY_TRAIT)
remove_traits(list(TRAIT_IN_FRENZY, TRAIT_NOSOFTCRIT, TRAIT_ANALGESIA, TRAIT_PACIFISM, TRAIT_PERMAFANGS, TRAIT_STRONG_GRABBER, TRAIT_CANNOT_FOCUS, TRAIT_ILLITERATE), FRENZY_TRAIT)
log_message("exited frenzy.", LOG_ATTACK, color="red")

remove_status_effect(/datum/status_effect/frenzy)
Expand Down
9 changes: 9 additions & 0 deletions modular_darkpack/modules/frenzy/code/status_effect.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
var/datum/weakref/frenzy_overlay_ref
var/seconds_alone = 0

/datum/status_effect/frenzy/on_apply()
owner.apply_status_effect(/datum/status_effect/grouped/see_no_names, TRAIT_STATUS_EFFECT(id))
owner.apply_status_effect(/datum/status_effect/grouped/static_look, TRAIT_STATUS_EFFECT(id))
owner.add_blocked_language(subtypesof(/datum/language), language_flags = UNDERSTOOD_LANGUAGE, source = id)
return TRUE

/datum/status_effect/frenzy/on_creation(mob/living/new_owner, atom/frenzy_target)
. = ..()
if(!.)
Expand All @@ -35,6 +41,9 @@
owner.remove_client_colour(FRENZY_TRAIT)
var/mob/living/carbon/carbon_owner = astype(owner)
carbon_owner?.exit_frenzy_mode()
owner.remove_status_effect(/datum/status_effect/grouped/see_no_names, TRAIT_STATUS_EFFECT(id))
owner.remove_status_effect(/datum/status_effect/grouped/static_look, TRAIT_STATUS_EFFECT(id))
owner.remove_blocked_language(subtypesof(/datum/language), language_flags = UNDERSTOOD_LANGUAGE, source = id)
return ..()

/datum/status_effect/frenzy/tick(seconds_between_ticks)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
var/hostile = FALSE
/// If use of this power creates a visible Masquerade breach.
var/violates_masquerade = FALSE
/// Can this be used while in frenzy
var/frenzy_usable = TRUE

/* HOW AND WHEN IT'S ACTIVATED AND DEACTIVATED */
/// If this Discipline doesn't automatically expire, but rather periodically drains blood.
Expand Down Expand Up @@ -269,6 +271,11 @@
//feedback is sent by the proc preventing activation
return FALSE

if(!frenzy_usable && HAS_TRAIT(owner, TRAIT_IN_FRENZY))
if(alert)

Check failure on line 275 in modular_darkpack/modules/powers/code/discipline/__discipline_power.dm

View workflow job for this annotation

GitHub Actions / Run Linters / linters

got '{', expected one of: '}', ';', 'if', 'while', 'do', 'for', 'spawn', 'switch', 'try', 'set', 'break', 'continue', 'del', 'var', 'return', 'CRASH', 'throw', 'goto', operator, literal, variable, proc call
to_chat(owner, span_warning("You cannot do this while in frenzy!"))

Check failure on line 276 in modular_darkpack/modules/powers/code/discipline/__discipline_power.dm

View workflow job for this annotation

GitHub Actions / Run Linters / linters

inconsistent multiple indentation: 2 > 1
return FALSE

//can't activate if the owner isn't capable of it
if (!can_activate_untargeted(alert))
return FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
check_flags = DISC_CHECK_CONSCIOUS
vitae_cost = 0
cooldown_length = 1 TURNS
frenzy_usable = FALSE

toggled = TRUE

Expand Down Expand Up @@ -274,6 +275,7 @@
var/datum/storyteller_roll/disguise_voice_roll/disguise_roll
COOLDOWN_DECLARE(mind_read_cd)
COOLDOWN_DECLARE(implant_tht_cd)
frenzy_usable = FALSE

/datum/storyteller_roll/telepathy_success
bumper_text = "mind reading"
Expand Down Expand Up @@ -416,6 +418,7 @@
check_flags = DISC_CHECK_CONSCIOUS
vitae_cost = 0
cooldown_length = 1 TURNS
frenzy_usable = FALSE

/datum/discipline_power/auspex/psychic_projection/activate()
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
range = 7
level = 1
vitae_cost = 0
frenzy_usable = FALSE

cancelable = TRUE
var/datum/storyteller_roll/sense_the_sin/sense_the_sin_roll
Expand Down Expand Up @@ -260,6 +261,7 @@
vitae_cost = 0
var/datum/storyteller_roll/condemnation/condemnation_roll
var/list/available_curses
frenzy_usable = FALSE

/datum/storyteller_roll/condemnation
bumper_text = "condemnation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
name = "Dominate power name"
desc = "Dominate power description"
vitae_cost = 0 //No Dominate 1-5 abilities cost blood.
frenzy_usable = FALSE

activate_sound = 'modular_darkpack/modules/powers/sounds/dominate.ogg'

Expand Down Expand Up @@ -122,6 +123,9 @@
if(HAS_TRAIT(target, TRAIT_WEAK_WILLED))
theirpower -= 2

if(HAS_TRAIT(target, TRAIT_IN_FRENZY))
theirpower += 2

if((!(owner.obscured_slots & HIDEFACE))&(HAS_TRAIT(owner, TRAIT_DISFIGURED_APPEARANCE))) // Are we visibly disfigured?
theirpower += 2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

aggravating = TRUE
hostile = TRUE
frenzy = FALSE

cooldown_length = 20 SECONDS

Expand All @@ -71,6 +72,7 @@
range = 1

violates_masquerade = TRUE
frenzy = FALSE

cooldown_length = 5 SECONDS

Expand Down Expand Up @@ -112,6 +114,7 @@
check_flags = DISC_CHECK_CONSCIOUS | DISC_CHECK_CAPABLE | DISC_CHECK_IMMOBILE | DISC_CHECK_FREE_HAND
target_type = TARGET_LIVING
range = 1
frenzy = FALSE

cooldown_length = 5 SECONDS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

vitae_cost = 1 // All Melpominee powers below 5 dots cost blood except for Missing Voice
var/obj/effect/abstract/particle_holder/particle_generator
frenzy_usable = FALSE

/datum/discipline_power/melpominee/proc/setup_particles()
if(!particle_generator)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
check_flags = DISC_CHECK_CONSCIOUS | DISC_CHECK_CAPABLE
target_type = TARGET_MOB
range = 7
frenzy_usable = FALSE

cooldown_length = 10 SECONDS

Expand All @@ -45,6 +46,7 @@
check_flags = DISC_CHECK_CONSCIOUS | DISC_CHECK_CAPABLE | DISC_CHECK_IMMOBILE | DISC_CHECK_FREE_HAND | DISC_CHECK_LYING
target_type = TARGET_LIVING
range = 3
frenzy_usable = FALSE

cooldown_length = 30 SECONDS

Expand Down Expand Up @@ -78,6 +80,7 @@
check_flags = DISC_CHECK_CONSCIOUS | DISC_CHECK_CAPABLE | DISC_CHECK_IMMOBILE | DISC_CHECK_FREE_HAND
target_type = TARGET_MOB
range = 5
frenzy_usable = FALSE

aggravating = TRUE
hostile = TRUE
Expand Down Expand Up @@ -154,6 +157,7 @@
check_flags = DISC_CHECK_CONSCIOUS | DISC_CHECK_CAPABLE | DISC_CHECK_IMMOBILE
target_type = TARGET_LIVING
range = 5
frenzy_usable = FALSE

aggravating = TRUE
hostile = TRUE
Expand All @@ -175,6 +179,7 @@
check_flags = DISC_CHECK_CONSCIOUS | DISC_CHECK_CAPABLE | DISC_CHECK_IMMOBILE | DISC_CHECK_SPEAK
target_type = TARGET_LIVING
range = 7
frenzy_usable = FALSE

cooldown_length = 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
/datum/discipline_power/necromancy
name = "Necromancy power name"
desc = "Necromancy power description"
frenzy_usable = FALSE

//SHROUDSIGHT V20 p. 163
/datum/storyteller_roll/shroudsight
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
var/successes = 0
var/datum/storyteller_roll/anesthetic_touch/touch_roll // these are defined in valeren.dm
var/datum/storyteller_roll/anesthetic_touch/unwilling/touch_roll_unwilling
frenzy_usable = FALSE

/datum/discipline_power/obeah/anesthetic_touch/pre_activation_checks(mob/living/target)
. = ..()
Expand Down Expand Up @@ -222,6 +223,7 @@
check_flags = DISC_CHECK_CONSCIOUS | DISC_CHECK_CAPABLE | DISC_CHECK_FREE_HAND | DISC_CHECK_IMMOBILE
target_type = TARGET_LIVING
range = 1
frenzy_usable = FALSE

violates_masquerade = TRUE
cooldown_length = 1 TURNS
Expand Down Expand Up @@ -249,6 +251,7 @@
willpower_cost = 2
cancelable = TRUE
var/datum/proximity_monitor/advanced/shepherds_watch/area_of_effect
frenzy_usable = FALSE

/datum/discipline_power/obeah/shepherds_watch/activate(atom/target)
. = ..()
Expand Down Expand Up @@ -282,6 +285,7 @@
target_type = TARGET_LIVING
range = 1
var/datum/storyteller_roll/mens_sana/discipline_roll
frenzy_usable = FALSE

/datum/storyteller_roll/mens_sana
bumper_text = "mens sana"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
/datum/discipline_power/obfuscate/vanish_from_the_minds_eye,
/datum/discipline_power/obfuscate/cloak_the_gathering
)
frenzy_usable = FALSE

/datum/discipline_power/obfuscate/cloak_of_shadows/pre_activation_checks()
. = ..()
Expand Down Expand Up @@ -136,6 +137,7 @@
level = 2
check_flags = DISC_CHECK_CAPABLE
vitae_cost = 0
frenzy_usable = FALSE

toggled = TRUE

Expand Down Expand Up @@ -189,6 +191,7 @@
level = 3
check_flags = DISC_CHECK_CAPABLE
vitae_cost = 0 // vitae cost handled in activate()
frenzy_usable = FALSE

toggled = TRUE
grouped_powers = list(
Expand Down Expand Up @@ -359,6 +362,7 @@
level = 5
check_flags = DISC_CHECK_CAPABLE
vitae_cost = 0
frenzy_usable = FALSE

toggled = TRUE

Expand Down
Loading
Loading