[MIRROR] Cult vs Heretic overall polishing (#28981)

* Cult vs Heretic overall polishing

* Update signals_mob_living.dm

---------

Co-authored-by: carlarctg <53100513+carlarctg@users.noreply.github.com>
Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
This commit is contained in:
SkyratBot
2024-07-24 22:42:29 +05:30
committed by GitHub
co-authored by carlarctg SpaceLoveSs13
parent 32a11e8201
commit 112ee9893f
22 changed files with 67 additions and 61 deletions
+1 -1
View File
@@ -58,5 +58,5 @@ GLOBAL_LIST(sacrificed)
// Used to keep track of items rewarded after a heretic is sacked.
#define CURSED_BLADE_UNLOCKED "Cursed Blade"
#define CRIMSON_FOCUS_UNLOCKED "Crimson Focus"
#define CRIMSON_MEDALLION_UNLOCKED "Crimson Medallion"
#define PROTEON_ORB_UNLOCKED "Proteon Orb"
@@ -294,5 +294,8 @@
#define COMSIG_MOB_HAPPINESS_CHANGE "happiness_change"
/// From /obj/item/melee/baton/baton_effect(): (datum/source, mob/living/user, /obj/item/melee/baton)
#define COMSIG_MOB_BATONED "mob_batoned"
/// Sent to the mob when their mind is slaved
#define COMSIG_MOB_ENSLAVED_TO "mob_enslaved_to"
/// From /obj/item/proc/attack_atom: (mob/living/attacker, atom/attacked)
#define COMSIG_LIVING_ATTACK_ATOM "living_attack_atom"
+3 -3
View File
@@ -549,9 +549,9 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
construct_owner = null
// construct track
if(construct_owner?.seeking && construct_owner.master)
blood_target = construct_owner.master
desc = "Your blood sense is leading you to [construct_owner.master]"
if(construct_owner?.seeking && construct_owner.construct_master)
blood_target = construct_owner.construct_master
desc = "Your blood sense is leading you to [construct_owner.construct_master]"
// cult track
var/datum/antagonist/cult/antag = owner.mind.has_antag_datum(/datum/antagonist/cult,TRUE)
+8 -2
View File
@@ -10,14 +10,17 @@
var/allow_renaming
/// Allows channeling
var/allow_channeling
/// Allows exorcism
var/allow_exorcism
///mob contained in the item.
var/mob/living/basic/shade/bound_spirit
/datum/component/spirit_holding/Initialize(datum/mind/soul_to_bind, mob/awakener, allow_renaming = TRUE, allow_channeling = TRUE)
/datum/component/spirit_holding/Initialize(datum/mind/soul_to_bind, mob/awakener, allow_renaming = TRUE, allow_channeling = TRUE, allow_exorcism = TRUE)
if(!ismovable(parent)) //you may apply this to mobs, i take no responsibility for how that works out
return COMPONENT_INCOMPATIBLE
src.allow_renaming = allow_renaming
src.allow_channeling = allow_channeling
src.allow_exorcism = allow_exorcism
if(soul_to_bind)
bind_the_soule(soul_to_bind, awakener, soul_to_bind.name)
@@ -107,7 +110,8 @@
bound_spirit.get_language_holder().omnitongue = TRUE //Grants omnitongue
RegisterSignal(parent, COMSIG_ATOM_RELAYMOVE, PROC_REF(block_buckle_message))
RegisterSignal(parent, COMSIG_BIBLE_SMACKED, PROC_REF(on_bible_smacked))
if(allow_exorcism)
RegisterSignal(parent, COMSIG_BIBLE_SMACKED, PROC_REF(on_bible_smacked))
/**
* custom_name : Simply sends a tgui input text box to the blade asking what name they want to be called, and retries it if the input is invalid.
@@ -139,6 +143,8 @@
* * exorcist: user who is attempting to remove the spirit
*/
/datum/component/spirit_holding/proc/attempt_exorcism(mob/exorcist)
if(!allow_exorcism)
return // just in case
var/atom/movable/exorcised_movable = parent
to_chat(exorcist, span_notice("You begin to exorcise [parent]..."))
playsound(parent, 'sound/hallucinations/veryfar_noise.ogg',40,TRUE)
+2 -1
View File
@@ -215,9 +215,10 @@
N.nukeop_outfit = null
add_antag_datum(N,converter.nuke_team)
enslaved_to = WEAKREF(creator)
SEND_SIGNAL(current, COMSIG_MOB_ENSLAVED_TO, creator)
current.faction |= creator.faction
creator.faction |= "[REF(current)]"
+1 -1
View File
@@ -12,7 +12,7 @@
default_button_position = DEFAULT_BLOODSPELLS
var/list/spells = list()
var/channeling = FALSE
/// If the magic has been enhanced somehow, likely due to a crimson focus.
/// If the magic has been enhanced somehow, likely due to a crimson medallion.
var/magic_enhanced = FALSE
/datum/action/innate/cult/blood_magic/Remove()
@@ -211,6 +211,7 @@ Striking a noncultist, however, will tear their flesh."}
awakener = awakener,\
allow_renaming = FALSE,\
allow_channeling = FALSE,\
allow_exorcism = FALSE,\
)
// Get the heretic's new body and antag datum.
@@ -2,7 +2,7 @@
#define CULT_BLINDFOLD "Zealot's Blindfold"
#define CURSE_ORB "Shuttle Curse"
#define VEIL_WALKER "Veil Walker Set"
#define CRIMSON_FOCUS "Crimson Focus"
#define CRIMSON_MEDALLION "Crimson Medallion"
// Cult archives. Gives out utility items.
/obj/structure/destructible/cult/item_dispenser/archives
@@ -38,11 +38,11 @@
options += extra_item
/obj/structure/destructible/cult/item_dispenser/archives/extra_options()
if(!cult_team?.unlocked_heretic_items[CRIMSON_FOCUS_UNLOCKED])
if(!cult_team?.unlocked_heretic_items[CRIMSON_MEDALLION_UNLOCKED])
return
return list(CRIMSON_FOCUS = list(
PREVIEW_IMAGE = image(icon = 'icons/obj/clothing/neck.dmi', icon_state = "crimson_focus"),
OUTPUT_ITEMS = list(/obj/item/clothing/neck/heretic_focus/crimson_focus),
return list(CRIMSON_MEDALLION = list(
PREVIEW_IMAGE = image(icon = 'icons/obj/clothing/neck.dmi', icon_state = "crimson_medallion"),
OUTPUT_ITEMS = list(/obj/item/clothing/neck/heretic_focus/crimson_medallion),
),
)
@@ -56,4 +56,4 @@
#undef CULT_BLINDFOLD
#undef CURSE_ORB
#undef VEIL_WALKER
#undef CRIMSON_FOCUS
#undef CRIMSON_MEDALLION
@@ -22,7 +22,7 @@
/// List that keeps track of which items have been unlocked after a heretic was sacked.
var/list/unlocked_heretic_items = list(
CURSED_BLADE_UNLOCKED = FALSE,
CRIMSON_FOCUS_UNLOCKED = FALSE,
CRIMSON_MEDALLION_UNLOCKED = FALSE,
PROTEON_ORB_UNLOCKED = FALSE,
)
@@ -55,6 +55,8 @@
particle_to_spawn = /obj/effect/particle_effect/sparks/electricity
new particle_to_spawn(get_turf(loccer))
loccer.shake_up_animation()
playsound(loccer, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
if(prob(resist_chance))
flinged_sword.forceMove(get_turf(loccer))
@@ -82,6 +84,9 @@
flinged_sword.throw_at(cast_on, cast_range, flinged_sword.throw_speed, owner)
flinged_sword.visible_message(\
span_warning("\the [flinged_sword] lunges at \the [cast_on]!"))
playsound(flinged_sword, 'sound/items/haunted/ghostitemattack.ogg', 100, TRUE)
flinged_sword.add_filter("cool_glow", 2, list("type" = "outline", "color" = COLOR_HERETIC_GREEN, "size" = 0.7))
addtimer(CALLBACK(flinged_sword, TYPE_PROC_REF(/datum, remove_filter), "cool_glow"), 0.7 SECONDS)
/obj/effect/temp_visual/eldritch_sparks
icon_state = "purplesparkles"
@@ -88,7 +88,7 @@
/// List that keeps track of which items have been gifted to the heretic after a cultist was sacrificed. Used to alter drop chances to reduce dupes.
var/list/unlocked_heretic_items = list(
/obj/item/melee/sickly_blade/cursed = 0,
/obj/item/clothing/neck/heretic_focus/crimson_focus = 0,
/obj/item/clothing/neck/heretic_focus/crimson_medallion = 0,
/mob/living/basic/construct/harvester/heretic = 0,
)
/// Simpler version of above used to limit amount of loot that can be hoarded
@@ -584,7 +584,6 @@
var/datum/antagonist/heretic_monster/heretic_monster = summoned.mind.add_antag_datum(/datum/antagonist/heretic_monster)
heretic_monster.set_owner(user.mind)
summoned.RegisterSignal(user, COMSIG_LIVING_DEATH, TYPE_PROC_REF(/mob/living/, on_master_death))
var/datum/objective/heretic_summon/summon_objective = locate() in user.mind.get_all_objectives()
summon_objective?.num_summoned++
@@ -28,6 +28,7 @@
*/
/datum/antagonist/heretic_monster/proc/set_owner(datum/mind/master)
src.master = master
owner.enslave_mind_to_creator(master.current)
var/datum/objective/master_obj = new()
master_obj.owner = owner
@@ -38,7 +39,3 @@
owner.announce_objectives()
to_chat(owner, span_boldnotice("You are a [ishuman(owner.current) ? "shambling corpse returned":"horrible creation brought"] to this plane through the Gates of the Mansus."))
to_chat(owner, span_notice("Your master is [master]. Assist them to all ends."))
if(istype(owner.current, /mob/living/basic/construct/harvester/heretic))
var/mob/living/basic/construct/harvester/heretic/shitcode = owner.current
shitcode.master = master
@@ -9,16 +9,16 @@
. = ..()
AddElement(/datum/element/heretic_focus)
/obj/item/clothing/neck/heretic_focus/crimson_focus
name = "Crimson Focus"
/obj/item/clothing/neck/heretic_focus/crimson_medallion
name = "Crimson Medallion"
desc = "A blood-red focusing glass that provides a link to the world beyond, and worse. Its eye is constantly twitching and gazing in all directions. It almost seems to be silently screaming..."
icon_state = "crimson_focus"
icon_state = "crimson_medallion"
/// The aura healing component. Used to delete it when taken off.
var/datum/component/component
/// If active or not, used to add and remove its cult and heretic buffs.
var/active = FALSE
/obj/item/clothing/neck/heretic_focus/crimson_focus/equipped(mob/living/user, slot)
/obj/item/clothing/neck/heretic_focus/crimson_medallion/equipped(mob/living/user, slot)
. = ..()
if(!(slot & ITEM_SLOT_NECK))
return
@@ -51,7 +51,7 @@
healing_color = team_color, \
)
/obj/item/clothing/neck/heretic_focus/crimson_focus/dropped(mob/living/user)
/obj/item/clothing/neck/heretic_focus/crimson_medallion/dropped(mob/living/user)
. = ..()
if(!istype(user))
@@ -75,7 +75,7 @@
magic_holder?.magic_enhanced = FALSE
/obj/item/clothing/neck/heretic_focus/crimson_focus/attack_self(mob/living/user, modifiers)
/obj/item/clothing/neck/heretic_focus/crimson_medallion/attack_self(mob/living/user, modifiers)
. = ..()
to_chat(user, span_danger("You start tightly squeezing [src]..."))
if(!do_after(user, 1.25 SECONDS, src))
@@ -90,7 +90,7 @@
user.reagents?.add_reagent(/datum/reagent/eldritch, rand(6, 10))
qdel(src)
/obj/item/clothing/neck/heretic_focus/crimson_focus/examine(mob/user)
/obj/item/clothing/neck/heretic_focus/crimson_medallion/examine(mob/user)
. = ..()
var/magic_dude
@@ -214,7 +214,7 @@
heretic_datum.knowledge_points += 3
heretic_datum.high_value_sacrifices++
feedback += " <i>graciously</i>"
else if(cultist_datum)
if(cultist_datum)
heretic_datum.knowledge_points += 1
grant_reward(user, sacrifice, loc)
// easier to read
@@ -229,9 +229,9 @@
span_narsie(" one of our own. Destroy and sacrifice the infidel before it claims more!")
to_chat(mind.current, message)
// he(retic) gets a warn too
var/message = span_cult_bold("You feel that your action has attracted") + \
span_cult_bold_italic(" attention.")
to_chat(user, message)
to_chat(user, span_narsiesmall("How DARE you!? I will see you destroyed for this."))
var/non_flavor_warning = span_cult_bold("You feel that your action has attracted ") + span_hypnophrase("attention") + span_cult_bold(".")
to_chat(user, non_flavor_warning)
return
else
heretic_datum.knowledge_points += 2
@@ -263,12 +263,6 @@
var/datum/antagonist/heretic/antag = IS_HERETIC(user)
antag.rewards_given++
// We limit the amount so the heretic doesn't just turn into a frickin' god (early)
to_chat(user, span_hierophant("You feel the rotten energies of the infidel warp and twist, mixing with that of your own..."))
if(prob(8 * antag.rewards_given))
to_chat(user, span_hierophant("Faint, dark red sparks flit around the dust, then fade. It looks like your patrons weren't able to fashion something out of it."))
return
// Cool effect for the rune as well as the item
var/obj/effect/heretic_rune/rune = locate() in range(2, user)
if(rune)
@@ -285,7 +279,7 @@
/datum/heretic_knowledge/hunt_and_sacrifice/proc/deposit_reward(mob/user, turf/loc, loop = 0, obj/rune)
if(loop > 5) // Max limit for retrying a reward
return
// Remove the rays, we don't need them anymore.
// Remove the outline, we don't need it anymore.
rune?.remove_filter("reward_outline")
playsound(loc, 'sound/magic/repulse.ogg', 75, TRUE)
var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user)
@@ -516,7 +516,7 @@
playsound(newstruct, 'sound/effects/constructform.ogg', 50)
if(stoner)
newstruct.faction |= "[REF(stoner)]"
newstruct.master = stoner
newstruct.construct_master = stoner
var/datum/action/innate/seek_master/seek_master = new
seek_master.Grant(newstruct)
+1 -1
View File
@@ -316,7 +316,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list(
playsound(src,'sound/hallucinations/veryfar_noise.ogg',40,TRUE)
if(do_after(user, 4 SECONDS, target = sword))
playsound(src,'sound/effects/pray_chaplain.ogg',60,TRUE)
new /obj/item/nullrod/claymore(get_turf(sword))
new /obj/item/nullrod/nullblade(get_turf(sword))
user.visible_message(span_notice("[user] exorcises [sword]!"))
qdel(sword)
return ITEM_INTERACT_SUCCESS
@@ -35,7 +35,7 @@
/// Flavor text shown to players when they spawn as this construct
var/playstyle_string = "You are a generic construct. Your job is to not exist, and you should probably adminhelp this."
/// The construct's master
var/master = null
var/mob/construct_master = null
/// Whether this construct is currently seeking nar nar
var/seeking = FALSE
/// Whether this construct can repair other constructs or cult buildings. Gets the healing_touch component if so.
@@ -80,9 +80,9 @@
var/datum/objective/eldergod/summon_objective = locate() in cult_status.cult_team.objectives
if(summon_objective.check_completion())
the_construct.master = cult_status.cult_team.blood_target
the_construct.construct_master = cult_status.cult_team.blood_target
if(!the_construct.master)
if(!the_construct.construct_master)
to_chat(the_construct, span_cult_italic("You have no master to seek!"))
the_construct.seeking = FALSE
return
@@ -122,8 +122,8 @@
to_chat(the_construct, span_cult_italic("Nar'Sie has completed her harvest!"))
return
the_construct.master = pick(GLOB.cult_narsie.souls_needed)
var/mob/living/real_target = the_construct.master //We can typecast this way because Narsie only allows /mob/living into the souls list
the_construct.construct_master = pick(GLOB.cult_narsie.souls_needed)
var/mob/living/real_target = the_construct.construct_master //We can typecast this way because Narsie only allows /mob/living into the souls list
to_chat(the_construct, span_cult_italic("You are now tracking your prey, [real_target.real_name] - harvest [real_target.p_them()]!"))
desc = "Activate to track Nar'Sie!"
button_icon_state = "sintouch"
@@ -150,21 +150,26 @@
lighting_cutoff_red = 10
lighting_cutoff_green = 20
lighting_cutoff_blue = 5
playstyle_string = "<B>You are a Rusted Harvester, built to serve the Sanguine Apostate, twisted to work the will of the Mansus. You are fragile and weak, but you rend cultists (only) apart on each attack. Follow your Master's orders!<B>"
playstyle_string = span_bold("You are a Rusted Harvester, built to serve the Sanguine Apostate, twisted to work the will of the Mansus. You are fragile and weak, but you rend cultists (only) apart on each attack. Follow your Master's orders!")
theme = THEME_HERETIC
/mob/living/basic/construct/harvester/heretic/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_MANSUS_TOUCHED, REF(src))
add_filter("rusted_harvester", 3, list("type" = "outline", "color" = COLOR_GREEN, "size" = 2, "alpha" = 40))
RegisterSignal(src, COMSIG_MIND_TRANSFERRED, TYPE_PROC_REF(/datum/mind, enslave_mind_to_creator))
RegisterSignal(src, COMSIG_MOB_ENSLAVED_TO, PROC_REF(link_master))
/mob/living/basic/construct/harvester/heretic/proc/link_master(mob/self, mob/master)
src.construct_master = master
RegisterSignal(construct_master, COMSIG_LIVING_DEATH, PROC_REF(on_master_death))
SIGNAL_HANDLER
/**
* Somewhat janky proc called when a heretic monster's master dies
* Used to kill any living Rusted Harvester
*/
/mob/living/proc/on_master_death()
return
/mob/living/basic/construct/harvester/heretic/proc/on_master_death(mob/self, mob/master)
SIGNAL_HANDLER
to_chat(src, span_userdanger("Your link to the mansus suddenly snaps as your master [construct_master] perishes! Without [construct_master.p_their()] support, your body crumbles..."))
visible_message(span_alert("[src] suddenly crumbles to dust!"))
death()
/mob/living/basic/construct/harvester/heretic/attack_animal(mob/living/simple_animal/user, list/modifiers)
// They're pretty fragile so this is probably necessary to prevent bullshit deaths.
@@ -172,11 +177,6 @@
return
return ..()
/mob/living/basic/construct/harvester/heretic/on_master_death()
to_chat(src, span_userdanger("Your link to the mansus suddenly snaps as your master perishes! Without its support, your body crumbles..."))
visible_message(span_alert("[src] suddenly crumbles to dust!"))
death()
/mob/living/basic/construct/harvester/heretic/grant_abilities()
AddElement(/datum/element/wall_walker, or_trait = TRAIT_RUSTY)
AddElement(/datum/element/leeching_walk)
@@ -233,9 +233,6 @@
. = ..()
the_construct = Target
the_construct.seeking = TRUE
var/datum/antagonist/heretic_monster/antag = IS_HERETIC_MONSTER(the_construct)
if(antag)
the_construct.master = antag.master
// no real reason for most of this weird oldcode
/datum/action/innate/seek_master/Activate()
@@ -442,6 +442,9 @@
// Shake animation
if (incapacitated())
shake_up_animation()
/mob/proc/shake_up_animation()
var/direction = prob(50) ? -1 : 1
animate(src, pixel_x = pixel_x + SHAKE_ANIMATION_OFFSET * direction, time = 1, easing = QUAD_EASING | EASE_OUT, flags = ANIMATION_PARALLEL)
animate(pixel_x = pixel_x - (SHAKE_ANIMATION_OFFSET * 2 * direction), time = 1)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB