Skip to content

Commit

Permalink
Adds a Heresy phobia, fixes some typos in heretic code, places the st…
Browse files Browse the repository at this point in the history
…argazer and fire shark under heretic_summon (#77306)

## About The Pull Request

Instead of a supernatural phobia, sacrificed people will now get a
HERESY phobia, which specifically targets heretic stuff, instead of all
of magic. Other heretics, however, do not get this, but instead get
knowledge points sapped from them, as their mind is ruined in a
different way than normal people. This comes with different flavour text
and a harsher but shorter lasting mood debuff. Also fixes some
"knowlege" code typos and places the star gazer and fire shark all in
under heretic_summon
## Why It's Good For The Game

Heretics, Wizards, Chaplains and Cultists will now be able to keep
playing the game after getting sacrificed without overdosing on
psicodine, while still retaining the phobia's original design purpose.
placing the fire shark and star gazer under the same type also is useful
as they share a lot of values. typos bad.
## Changelog
:cl:
add: Sacrificed heretic targets will now receive a phobia of heresy
instead of a phobia of the supernatural. Sacrificed heretics will not
get this phobia, but will lose knowledge points instead.
/:cl:
Huge thanks to Helg2 for doing the original PR and helping me with this
one, couldn't be done without them

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 21, 2023
1 parent 0552b41 commit e025950
Show file tree
Hide file tree
Showing 18 changed files with 155 additions and 56 deletions.
32 changes: 32 additions & 0 deletions code/_globalvars/phobias.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ GLOBAL_LIST_INIT(phobia_types, sort_list(list(
"falling",
"greytide",
"guns",
"heresy",
"insects",
"lizards",
"robots",
Expand All @@ -37,6 +38,7 @@ GLOBAL_LIST_INIT(phobia_regexes, list(
"falling" = construct_phobia_regex("falling"),
"greytide" = construct_phobia_regex("greytide"),
"guns" = construct_phobia_regex("guns"),
"heresy" = construct_phobia_regex("heresy"),
"insects" = construct_phobia_regex("insects"),
"lizards" = construct_phobia_regex("lizards"),
"ocky icky" = construct_phobia_regex("ocky icky"),
Expand Down Expand Up @@ -68,6 +70,10 @@ GLOBAL_LIST_INIT(phobia_mobs, list(
/mob/living/basic/pet/penguin,
)),
"doctors" = typecacheof(list(/mob/living/simple_animal/bot/medbot)),
"heresy" = typecacheof(list(
/mob/living/basic/heretic_summon,
/mob/living/simple_animal/hostile/heretic_summon,
)),
"insects" = typecacheof(list(
/mob/living/basic/cockroach,
/mob/living/basic/bee,
Expand All @@ -89,6 +95,7 @@ GLOBAL_LIST_INIT(phobia_mobs, list(
/mob/living/basic/demon,
/mob/living/basic/faithless,
/mob/living/basic/ghost,
/mob/living/basic/heretic_summon,
/mob/living/simple_animal/bot/mulebot/paranormal,
/mob/living/simple_animal/hostile/construct,
/mob/living/simple_animal/hostile/dark_wizard,
Expand Down Expand Up @@ -356,6 +363,31 @@ GLOBAL_LIST_INIT(phobia_objs, list(
/obj/machinery/porta_turret,
/obj/machinery/power/emitter,
)),
"heresy" = typecacheof(list(
/obj/effect/floating_blade,
/obj/effect/forcefield/cosmic_field,
/obj/effect/heretic_rune,
/obj/effect/heretic_influence,
/obj/effect/visible_heretic_influence,
/obj/item/ammo_box/strilka310/lionhunter,
/obj/item/ammo_casing/strilka310/lionhunter,
/obj/item/clothing/mask/madness_mask,
/obj/item/clothing/neck/eldritch_amulet,
/obj/item/clothing/neck/fake_heretic_amulet,
/obj/item/clothing/neck/heretic_focus,
/obj/item/clothing/suit/hooded/cultrobes/eldritch,
/obj/item/codex_cicatrix,
/obj/item/coin/eldritch,
/obj/item/gun/ballistic/rifle/lionhunter,
/obj/item/melee/rune_carver,
/obj/item/melee/sickly_blade,
/obj/item/melee/touch_attack/mansus_fist,
/obj/item/reagent_containers/cup/beaker/eldritch,
/obj/item/toy/eldritch_book,
/obj/item/toy/reality_pierce,
/obj/projectile/curse_hand,
/obj/structure/destructible/eldritch_crucible,
)),
"insects" = typecacheof(list(
/obj/item/clothing/mask/animal/small/bee,
/obj/item/clothing/suit/hooded/bee_costume,
Expand Down
4 changes: 2 additions & 2 deletions code/datums/actions/mobs/open_mob_commands.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// Weakref for storing our stargazer
var/datum/weakref/our_mob

/datum/action/cooldown/open_mob_commands/Grant(mob/granted_to, mob/living/basic/star_gazer/our_mob_input)
/datum/action/cooldown/open_mob_commands/Grant(mob/granted_to, mob/living/basic/heretic_summon/star_gazer/our_mob_input)
. = ..()
our_mob = WEAKREF(our_mob_input)

Expand All @@ -18,7 +18,7 @@

/// Opens the pet command options menu for a mob.
/datum/action/cooldown/open_mob_commands/proc/open_menu()
var/mob/living/basic/star_gazer/our_mob_resolved = our_mob?.resolve()
var/mob/living/basic/heretic_summon/star_gazer/our_mob_resolved = our_mob?.resolve()
if(our_mob_resolved)
var/datum/component/obeys_commands/command_component = our_mob_resolved.GetComponent(/datum/component/obeys_commands)
if(command_component)
Expand Down
4 changes: 4 additions & 0 deletions code/datums/brain_damage/phobia.dm
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@
phobia_type = "guns"
random_gain = FALSE

/datum/brain_trauma/mild/phobia/heresy
phobia_type = "heresy"
random_gain = FALSE

/datum/brain_trauma/mild/phobia/insects
phobia_type = "insects"
random_gain = FALSE
Expand Down
14 changes: 7 additions & 7 deletions code/datums/memory/general_memories.dm
Original file line number Diff line number Diff line change
Expand Up @@ -725,14 +725,14 @@
return list("[protagonist_name] [mood_verb] as they [result] the deadly game of roulette.")

/// When a heretic finishes their ritual of knowledge
/datum/memory/heretic_knowlege_ritual
/datum/memory/heretic_knowledge_ritual
story_value = STORY_VALUE_AMAZING
// Protagonist = heretic

/datum/memory/heretic_knowlege_ritual/get_names()
/datum/memory/heretic_knowledge_ritual/get_names()
return list("[protagonist_name] absorbing boundless knowledge through eldritch research.")

/datum/memory/heretic_knowlege_ritual/get_starts()
/datum/memory/heretic_knowledge_ritual/get_starts()
return list(
"[protagonist_name] laying out a circle of green tar and candles",
"multiple books around [protagonist_name] flipping open",
Expand All @@ -742,16 +742,16 @@
"a wide, strange looking circle, with [protagonist_name] sketching it"
)

/datum/memory/heretic_knowlege_ritual/get_moods()
/datum/memory/heretic_knowledge_ritual/get_moods()
return list("[protagonist_name] [mood_verb] as their hand glows with power.")

/datum/memory/heretic_knowlege_ritual/get_happy_moods()
/datum/memory/heretic_knowledge_ritual/get_happy_moods()
return list("cackling madly")

/datum/memory/heretic_knowlege_ritual/get_neutral_moods()
/datum/memory/heretic_knowledge_ritual/get_neutral_moods()
return list("staring blankly with a wide grin")

/datum/memory/heretic_knowlege_ritual/get_sad_moods()
/datum/memory/heretic_knowledge_ritual/get_sad_moods()
return list("cackling insanely")

/// Failed to defuse a bomb, by triggering it early.
Expand Down
8 changes: 4 additions & 4 deletions code/modules/antagonists/heretic/heretic_knowledge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
var/list/required_atoms
/// Paired with above. If set, the resulting spawned atoms upon ritual completion.
var/list/result_atoms = list()
/// Cost of knowledge in knowlege points
/// Cost of knowledge in knowledge points
var/cost = 0
/// The priority of the knowledge. Higher priority knowledge appear higher in the ritual list.
/// Number itself is completely arbitrary. Does not need to be set for non-ritual knowledge.
Expand Down Expand Up @@ -116,11 +116,11 @@
* Called whenever the knowledge's associated ritual is completed successfully.
*
* Creates atoms from types in result_atoms.
* Override this is you want something else to happen.
* Override this if you want something else to happen.
* This CAN sleep, such as for summoning rituals which poll for ghosts.
*
* Arguments
* * user - the mob who did the ritual
* * user - the mob who did the ritual
* * selected_atoms - an list of atoms chosen as a part of this ritual.
* * loc - the turf the ritual's occuring on
*
Expand Down Expand Up @@ -636,7 +636,7 @@
to_chat(user, span_hypnophrase(span_big("[drain_message]")))
desc += " (Completed!)"
log_heretic_knowledge("[key_name(user)] completed a [name] at [worldtime2text()].")
user.add_mob_memory(/datum/memory/heretic_knowlege_ritual)
user.add_mob_memory(/datum/memory/heretic_knowledge_ritual)
return TRUE

#undef KNOWLEDGE_RITUAL_POINTS
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/heretic/knowledge/cosmic_lore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
/datum/heretic_knowledge/ultimate/cosmic_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc)
. = ..()
priority_announce("[generate_heretic_text()] A Star Gazer has arrived into the station, [user.real_name] has ascended! This station is the domain of the Cosmos! [generate_heretic_text()]","[generate_heretic_text()]", ANNOUNCER_SPANOMALIES)
var/mob/living/basic/star_gazer/star_gazer_mob = new /mob/living/basic/star_gazer(loc)
var/mob/living/basic/heretic_summon/star_gazer/star_gazer_mob = new /mob/living/basic/heretic_summon/star_gazer(loc)
star_gazer_mob.maxHealth = INFINITY
star_gazer_mob.health = INFINITY
user.AddElement(/datum/element/death_linked, star_gazer_mob)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@
LAZYADD(target_blacklist, sacrifice.mind)
heretic_datum.remove_sacrifice_target(sacrifice)


var/feedback = "Your patrons accept your offer"
var/sac_department_flag = sacrifice.mind?.assigned_role?.departments_bitflags | sacrifice.last_mind?.assigned_role?.departments_bitflags
if(sac_department_flag & DEPARTMENT_BITFLAG_COMMAND)
Expand Down Expand Up @@ -374,8 +373,11 @@
sac_target.remove_status_effect(/datum/status_effect/unholy_determination)
sac_target.reagents?.del_reagent(/datum/reagent/inverse/helgrasp/heretic)
sac_target.clear_mood_event("shadow_realm")
sac_target.gain_trauma(/datum/brain_trauma/mild/phobia/supernatural, TRAUMA_RESILIENCE_MAGIC)

if(IS_HERETIC(sac_target))
var/datum/antagonist/heretic/victim_heretic = sac_target.mind?.has_antag_datum(/datum/antagonist/heretic)
victim_heretic.knowledge_points -= 3
else
sac_target.gain_trauma(/datum/brain_trauma/mild/phobia/heresy, TRAUMA_RESILIENCE_MAGIC)
// Wherever we end up, we sure as hell won't be able to explain
sac_target.adjust_timed_status_effect(40 SECONDS, /datum/status_effect/speech/slurring/heretic)
sac_target.adjust_stutter(40 SECONDS)
Expand Down Expand Up @@ -444,7 +446,10 @@
*/
/datum/heretic_knowledge/hunt_and_sacrifice/proc/after_return_live_target(mob/living/carbon/human/sac_target)
to_chat(sac_target, span_hypnophrase("The fight is over, but at great cost. You have been returned to the station in one piece."))
to_chat(sac_target, span_big(span_hypnophrase("You don't remember anything leading up to the experience - All you can think about are those horrific hands...")))
if(IS_HERETIC(sac_target))
to_chat(sac_target, span_big(span_hypnophrase("You don't remember anything leading up to the experience, but you feel your connection with the Mansus weakened - Knowledge once known, forgotten...")))
else
to_chat(sac_target, span_big(span_hypnophrase("You don't remember anything leading up to the experience - All you can think about are those horrific hands...")))

// Oh god where are we?
sac_target.flash_act()
Expand All @@ -457,7 +462,10 @@

// Glad i'm outta there, though!
sac_target.add_mood_event("shadow_realm_survived", /datum/mood_event/shadow_realm_live)
sac_target.add_mood_event("shadow_realm_survived_sadness", /datum/mood_event/shadow_realm_live_sad)
if(IS_HERETIC(sac_target))
sac_target.add_mood_event("shadow_realm_survived_sadness", /datum/mood_event/shadow_realm_live_sad_heretic)
else
sac_target.add_mood_event("shadow_realm_survived_sadness", /datum/mood_event/shadow_realm_live_sad)

// Could use a little pick-me-up...
sac_target.reagents?.add_reagent(/datum/reagent/medicine/atropine, 8)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@
description = "The hands! The horrible, horrific hands! I see them when I close my eyes!"
mood_change = -6
timeout = 10 MINUTES

/datum/mood_event/shadow_realm_live_sad_heretic
description = "I've been humiliated! My knowledge sapped from my being! The world feels much duller again..."
mood_change = -8
timeout = 8 MINUTES
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/obj/item/organ/internal/liver = 1,
/obj/item/stack/sheet/mineral/plasma = 1,
)
mob_to_summon = /mob/living/basic/fire_shark
mob_to_summon = /mob/living/basic/heretic_summon/fire_shark
cost = 1
route = PATH_SIDE
poll_ignore_define = POLL_IGNORE_FIRE_SHARK
Expand Down
10 changes: 5 additions & 5 deletions code/modules/antagonists/heretic/magic/star_touch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
return target_turfs

/// To set the star gazer
/datum/action/cooldown/spell/touch/star_touch/proc/set_star_gazer(mob/living/basic/star_gazer/star_gazer_mob)
/datum/action/cooldown/spell/touch/star_touch/proc/set_star_gazer(mob/living/basic/heretic_summon/star_gazer/star_gazer_mob)
star_gazer = WEAKREF(star_gazer_mob)

/// To obtain the star gazer if there is one
/datum/action/cooldown/spell/touch/star_touch/proc/get_star_gazer()
var/mob/living/basic/star_gazer/star_gazer_resolved = star_gazer?.resolve()
var/mob/living/basic/heretic_summon/star_gazer/star_gazer_resolved = star_gazer?.resolve()
if(star_gazer_resolved)
return star_gazer_resolved
return FALSE
Expand Down Expand Up @@ -94,7 +94,7 @@

/obj/item/melee/touch_attack/star_touch/attack_self(mob/living/user)
var/datum/action/cooldown/spell/touch/star_touch/star_touch_spell = spell_which_made_us?.resolve()
var/mob/living/basic/star_gazer/star_gazer_mob = star_touch_spell?.get_star_gazer()
var/mob/living/basic/heretic_summon/star_gazer/star_gazer_mob = star_touch_spell?.get_star_gazer()
if(!star_gazer_mob)
balloon_alert(user, "no linked star gazer!")
return ..()
Expand Down Expand Up @@ -229,7 +229,7 @@

/// What to add when the beam connects to a target
/datum/status_effect/cosmic_beam/proc/on_beam_hit(mob/living/target)
if(!istype(target, /mob/living/basic/star_gazer))
if(!istype(target, /mob/living/basic/heretic_summon/star_gazer))
target.AddElement(/datum/element/effect_trail, /obj/effect/forcefield/cosmic_field/fast)
return

Expand All @@ -241,6 +241,6 @@

/// What to remove when the beam disconnects from a target
/datum/status_effect/cosmic_beam/proc/on_beam_release(mob/living/target)
if(!istype(target, /mob/living/basic/star_gazer))
if(!istype(target, /mob/living/basic/heretic_summon/star_gazer))
target.RemoveElement(/datum/element/effect_trail, /obj/effect/forcefield/cosmic_field/fast)
return
2 changes: 1 addition & 1 deletion code/modules/antagonists/heretic/status_effects/debuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
return ..()

/datum/status_effect/star_mark/on_apply()
if(istype(owner, /mob/living/basic/star_gazer))
if(istype(owner, /mob/living/basic/heretic_summon/star_gazer))
return FALSE
var/mob/living/spell_caster_resolved = spell_caster?.resolve()
var/datum/antagonist/heretic_monster/monster = owner.mind?.has_antag_datum(/datum/antagonist/heretic_monster)
Expand Down
16 changes: 2 additions & 14 deletions code/modules/mob/living/basic/heretic/fire_shark.dm
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
/mob/living/basic/fire_shark
/mob/living/basic/heretic_summon/fire_shark
name = "fire shark"
desc = "It is a eldritch dwarf space shark, also known as a fire shark."
icon = 'icons/mob/nonhuman-player/eldritch_mobs.dmi'
icon_state = "fire_shark"
icon_living = "fire_shark"
pass_flags = PASSTABLE | PASSMOB
combat_mode = TRUE
mob_biotypes = MOB_ORGANIC | MOB_BEAST
basic_mob_flags = DEL_ON_DEATH
unsuitable_atmos_damage = 0
unsuitable_cold_damage = 0
unsuitable_heat_damage = 0
speed = -0.5
health = 16
maxHealth = 16
Expand All @@ -26,15 +20,9 @@
mob_size = MOB_SIZE_TINY
speak_emote = list("screams")
basic_mob_flags = DEL_ON_DEATH
death_message = "implodes into itself."
ai_controller = null

/mob/living/basic/fire_shark/Initialize(mapload)
/mob/living/basic/heretic_summon/fire_shark/Initialize(mapload)
. = ..()
var/static/list/death_loot
if(!death_loot)
death_loot = string_list(list(/obj/effect/gibspawner/human))
AddElement(/datum/element/death_drops, death_loot)
AddElement(/datum/element/death_gases, /datum/gas/plasma, 40)
AddElement(/datum/element/simple_flying)
AddElement(/datum/element/venomous, /datum/reagent/phlogiston, 2)
Expand Down
33 changes: 33 additions & 0 deletions code/modules/mob/living/basic/heretic/heretic_summon.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/mob/living/basic/heretic_summon
name = "Eldritch Demon"
real_name = "Eldritch Demon"
desc = "A horror from beyond this realm."
icon = 'icons/mob/nonhuman-player/eldritch_mobs.dmi'
faction = list(FACTION_HERETIC)
basic_mob_flags = DEL_ON_DEATH
gender = NEUTER
mob_biotypes = NONE

unsuitable_atmos_damage = 0
unsuitable_cold_damage = 0
unsuitable_heat_damage = 0
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
speed = 0

attack_sound = 'sound/weapons/punch1.ogg'
response_help_continuous = "thinks better of touching"
response_help_simple = "think better of touching"
response_disarm_continuous = "flails at"
response_disarm_simple = "flail at"
response_harm_continuous = "reaps"
response_harm_simple = "tears"
death_message = "implodes into itself."

combat_mode = TRUE
ai_controller = null
speak_emote = list("screams")
gold_core_spawnable = NO_SPAWN

/mob/living/basic/heretic_summon/Initialize(mapload)
. = ..()
AddElement(/datum/element/death_drops, string_list(list(/obj/effect/gibspawner/generic)))
Loading

0 comments on commit e025950

Please sign in to comment.