Files
EnterTheJake a2c7c8e57b Heretic Antagonist Full Overhaul. (#92119)
## About The Pull Request

Heretic has received a complete overhaul. This PR touches nearly every
aspect of the antagonist. For readability's sake, not every change is
going to be listed in this pull request.

For the full list of changes please refer to the design doc:
https://hackmd.io/@BiST8PJVRjiwVPY86U3bLQ/B11HyChz1g.

Code by Me, @Xander3359 and @Arturlang 

TGUI by @Arturlang 

Sprites by OrcaCora and GregorDM

Writing bits by @necromanceranne 

### Core changes

- Cross-pathing has been removed. Main knowledge spells are now
exclusive to their path (for the most part).

- For every main knowledge unlocked (save for the robes and the blade
upgrade), Heretics can choose one option from a draft of 3 random side
knowledges (this is a free point).

- Heretics can now purchase side knowledges from a new tab, the
"Knowledge Shop". Side-knowledges have been divided by tier (Stealth,
Defense, Summons, Combat and Main). Tiers are unlocked as you progress
toward your main path.

- Heretics now gain the grasp and mark upgrade immediately, but their
main knowledge choices cost twice as much (except for the first spell,
the robes and the blade upgrade).

- Path specific robes have been introduced! They come with their own set
of quirks.

- Each Path has received a passive ability. This passive is upgraded
when you first create your robes, and again when you complete the Ritual
of Knowledge.

- Paths have been rebalanced as a result of the removal of cross-path
progression. Cosmic and Moon paths have received soft reworks.

- Upon unlocking the path 2nd level or reaching a total of 8 points
worth of knowledge, Heretics will lose the ability to blade break (and
the limit on blades all together).

- Ascension now automatically calls the shuttle with no possibility of a
recall.

- Late join Heretic has been removed.

### New UI 
<img width="750" height="635" alt="moon path ui"
src="https://github.com/user-attachments/assets/184ef783-5c9c-48a1-a2f7-4807ca93e990"
/>


### Knowledge shop

<img width="787" height="669" alt="Knowledge shop"
src="https://github.com/user-attachments/assets/3dc89b84-8c70-4d47-b612-54396e3ea6e7"
/>




### Quality of life //General balance changes

- Heretics will now gain X-ray vision for a few seconds when nearby an
eldritch essence (this effect has a cooldown).

- Ritual of knowledge now requires 1 uncommon item instead of 2. You may
now use a stunprod instead of a baton to complete the ritual. Beartraps
have been removed from the list of possible reagents.

- The maximum number of possible sacrifices required to ascend has been
reduced from 6 to 5 while the minimum has been upped to 4.

- Codex Cicatrix no longer requires a special pen to be made.

### Passive abilities

- Heretics now start with a passive ability. You can find what it does
on the path info tab after a path has been selected, and what they gain
when upgraded.

- Crafting your first set of Eldritch robes will bump your passive to
level 2.

- Unlocking the 2nd level will subsequently unlock your "Ritual Of
Knowledge"

- Completing the ritual of knowledge or ascending will net you the final
level.

### Path Specific Robes

- Armorer's Ritual is no longer a side knowledge. Each path will have
their own unique version of the ritual. This is placed after the 2nd
spell in the tree.

- Robes can no longer be destroyed by fire and acid, grant t4 flash
protection (Moth Heretics stay winning) and protection against basic
syringes, to bring them on par with other antagonist's armor sets.

- The recipe to craft the robes is now a set of armor/vest, a mask (any
mask will do now, not just gas masks), plus the unique reagent required
for the blades (Plasma for Cosmic, Trash For Rust, match for Ash and so
on)

- Wearing the robes as a non-heretic may yield some unfortunate
side-effects.

### Moon Path Rework

Moon path  rework.

Moon Heretics gain immunity to brain traumas and slowly regenerate brain
health. Equipping the moon amulette channels its effects through the
moon blade; making it unblockable and cause sanity damage instead of
brute. Ring leader's Rise now summons an army of harmless clones that
explode when attacked; the explosion briefly stuns non-heretics and
cause sanity and brain damage to them. Moon blade can also now be used
when pacified and Moon spells are no longer blocked by regular anti
magic, only mind magic protection.


**Cosmic Path Rework**

Cosmic path has received the biggest batch of changes alongside Moon.
The path has been dead last in ascension and pickrate (less than 5%) for
almost 2 years. It did gain some popularity over the last few months,
reaching the highest ascension rate in the game (12%) while mantaining a
relatively low pickrate.

Cosmic sits in a weird spot, where pretty much every knowledge
surrounding the path is either mediocre or, in the case of the
ascension, dysfunctional. Yet it has maintained a smidge of relevancy
due to how quickly Cosmic heretics can capture and sacrifice targets
thanks to Star Touch.

As a result, the best course of action would be to rebalance the
entirety of the kit; granting the heretic more tools to manipulate space
and dictate the flow of a fight, while lessening their ability to end a
confrontation by instantly sleeping their opponents.

lastly The Star Gazer is now ghost controlled ; And they shoot lazers!

<img width="636" height="451" alt="gazer gag 3"
src="https://github.com/user-attachments/assets/601d6881-c042-4e42-8ce6-ac90cd27848b"
/>


## Why It's Good For The Game


### Ok...but why do we want this?

Again, if you want my full reasoning, please check my doc
https://hackmd.io/@BiST8PJVRjiwVPY86U3bLQ/B11HyChz1g.

To keep it short and concise; Heretic is too complex and unintuitive for
its own good. Too impenetrable for new players and too abusable for
experienced players. This can be chalked up to a lot of poor design
decisions. But ultimately, what I believe being the biggest contributor
to the current status of Heretic is the ability to move into different
paths, also known as "Cross-Pathing".

### Cross Pathing my beloathed.

Cross-pathing, while cool in theory, overcomplicates the antagonist and
overloads them with power. Players dealing with the heretic are
incapable of working out what a given heretic can do. This also leads to
late game heretics having 3 rows Worth of action buttons and virtually
no weakness.

Over the last year, I've often received the understandable but also kind
of unfair accusations of making Heretic too powerful without a clear aim
or purpose.

My goal with the paths I've reworked over the last year (Rust,Void and
Blade) wasn't necessarily to just make them stronger (although that was
also part of the goal, as they were paths that were underperforming),
but for them to have more interactions with the sandbox and to better
live up to the fantasy presented to the player.

If an harbringer of frost gets countered by a cup of coffee, we probably
messed something up.


Unfortunately, the current incarnation of Heretic doesn't really allow
for surgical balance changes to specific paths. Every time a knowledge
gets buffed, we make every path that can easily tap onto that knowledge
stronger by default. It doesn't take a genius to understand why this
system is ultimately unsustainable.

### Blade Breaking

I feel that after a heretic has reached the near peak of their power,
they no longer need the ability to instantly escape any encounter. Check
my doc for my full reasoning.

## Less versatile, more specialized paths.

By removing cross-pathing, we remove a huge maintainability burden from
the antagonist. Paths can now be designed around clearer strengths and
weaknesses. They become easier to balance and less of an headache to
understand for everyone.

It also means we can give paths some needed quality of life quirks
without having to worry how such a change might have a knock-on effect
for other paths.

Ash heretics can finally let loose without dying by their own flames.
Cosmic Heretic can go to space without having to carry a modsuit. Moon
Heretic can use their abilities without fear of one random trauma
ruining their day, and so on.

### What a horrible night to have a curse...., wait how do I curse
people again?

As of right now the heretic tree has quite a hefty amount of trinkets
that pretty much never see use.

Partly because the tree itself is a nightmare to navigate. And partly
because why would anyone set up an elaborate plan or scheme when they
can unleash 2 rows of spell in the span of bunch of seconds.

Heretics mostly gravitate towards powers that push them towards greater,
more potent combat strength. If it doesn't contribute to killing people
quicker, it isn't worth doing for most. And given the opportunity cost
associated for taking those powers, they will remain that way so long as
there are better choices to be poached.

The new draft system encourages Heretics to play more with the tools at
their disposal. If you want to go for a specific combo from the side
path options, you may now do so by tapping into the knowledge shop.

Yes, the shop does include a few knowledges from the other paths. But
these are limited to 1 per path, are very expensive and can only be
unlocked very late into the shift.

## Drip Of the Mansus

The iconic heretic robe is actually sequestered to a side path that is
most easily access by only two paths at a time. Since heretic paths are
being made to be much more specialized, the most obvious way in which
this can be showcased is through an easily
identifiable outfit.

By using the robes, we can both telegraph WHAT heretic you are looking
at, and just how much power they've accumulated and when it is
reasonable to take the kid gloves off and treat them as a genuine
threat. If a heretic is in their
robes, that heretic is now a significantly more prominent danger to the
station.

It also serves as a useful means for gating some of the more powerful
effects of a heretic's path behind the robes, AND enable options for
disarming them of that power should they be captured without making it
something endemic to their mob.

A major problem with heretics is a lack of certainty as to how powerful
they have become. A heretics robes is one of the milestones to help
players dealing with heretics identify that.

### Will this be 100% fair and balanced?

This is a massive overhaul to a pretty complex and bloated antagonist.
I've done my best to show the changes to several maintainers and other
members of the community for their feedback. But at some point we'll
have to see how this behave in the environment to get a feel if
something is over or undertuned. (that's my way of saying, yes this is
likely gonna require a testmerge or two).

What I will say is that I'm not trying to change the core identity of
Heretic.

Heretics should have the upperhand in single encounters early on, be
able to joust a small group of players after they unlock their final
spell, and end the round when they ascend. They're a progression
antagonist. They should retain their payoff as well as pose a danger as
they grow stronger.

But if more players feel like they are more reliably able to play the
antagonist in more varied and interesting ways, rather than the
antagonist largely existing as a measuring stick for 'robustness' due to
its elitist design philosophy, then the rework has been a success. There
should be something for
everyone in the antagonist, as is true for all of our antagonist roles.
2025-10-15 22:34:51 +00:00

305 lines
12 KiB
Plaintext

/**
* Base class for all grenades.
*/
/obj/item/grenade
name = "grenade"
desc = "It has an adjustable timer."
w_class = WEIGHT_CLASS_SMALL
icon = 'icons/obj/weapons/grenade.dmi'
icon_state = "grenade"
inhand_icon_state = "flashbang"
worn_icon_state = "grenade"
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
throw_speed = 3
throw_range = 7
flags_1 = PREVENT_CONTENTS_EXPLOSION_1 // We detonate upon being exploded.
obj_flags = CONDUCTS_ELECTRICITY
slot_flags = ITEM_SLOT_BELT
action_slots = ALL
max_integrity = 40
pickup_sound = 'sound/items/handling/grenade/grenade_pick_up.ogg'
drop_sound = 'sound/items/handling/grenade/grenade_drop.ogg'
sound_vary = TRUE
/// Bitfields which prevent the grenade from detonating if set. Includes ([GRENADE_DUD]|[GRENADE_USED])
var/dud_flags = NONE
///Is this grenade currently armed?
var/active = FALSE
/// Sound played when the grenade is armed
var/grenade_arm_sound = 'sound/items/weapons/armbomb.ogg'
/// If the sound of the grenade should be varied
var/grenade_sound_vary = TRUE
///Is it a cluster grenade? We don't wanna spam admin logs with these.
var/type_cluster = FALSE
///How long it takes for a grenade to explode after being armed
var/det_time = 5 SECONDS
///Will this state what its det_time is when examined?
var/display_timer = TRUE
///Used in botch_check to determine how a user's clumsiness affects that user's ability to prime a grenade correctly.
var/clumsy_check = GRENADE_CLUMSY_FUMBLE
///Was sticky tape used to make this sticky?
var/sticky = FALSE
// I moved the explosion vars and behavior to base grenades because we want all grenades to call [/obj/item/grenade/proc/detonate] so we can send COMSIG_GRENADE_DETONATE
///how big of a devastation explosion radius on prime
var/ex_dev = 0
///how big of a heavy explosion radius on prime
var/ex_heavy = 0
///how big of a light explosion radius on prime
var/ex_light = 0
///how big of a flame explosion radius on prime
var/ex_flame = 0
// dealing with creating a [/datum/component/pellet_cloud] on detonate
/// if set, will spew out projectiles of this type
var/shrapnel_type
/// the higher this number, the more projectiles are created as shrapnel
var/shrapnel_radius
///Did we add the component responsible for spawning shrapnel to this?
var/shrapnel_initialized
///Possible timers that can be assigned for detonation. Values are strings in SECONDS
var/list/possible_fuse_time = list("Instant", "3", "4", "5")
/obj/item/grenade/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_ODD_CUSTOMIZABLE_FOOD_INGREDIENT, type)
RegisterSignal(src, COMSIG_ITEM_USED_AS_INGREDIENT, PROC_REF(on_used_as_ingredient))
/obj/item/grenade/suicide_act(mob/living/carbon/user)
user.visible_message(span_suicide("[user] primes [src], then eats it! It looks like [user.p_theyre()] trying to commit suicide!"))
playsound(src, 'sound/items/eatfood.ogg', 50, TRUE)
arm_grenade(user, det_time)
user.transferItemToLoc(src, user, TRUE)//>eat a grenade set to 5 seconds >rush captain
sleep(det_time)//so you don't die instantly
return dud_flags ? SHAME : BRUTELOSS
/obj/item/grenade/atom_deconstruct(disassembled = TRUE)
if(!disassembled)
detonate()
/obj/item/grenade/apply_fantasy_bonuses(bonus)
. = ..()
apply_grenade_fantasy_bonuses(bonus)
/obj/item/grenade/remove_fantasy_bonuses(bonus)
remove_grenade_fantasy_bonuses(bonus)
return ..()
/obj/item/grenade/proc/apply_grenade_fantasy_bonuses(quality)
if(ex_dev == 0 && ex_heavy == 0 && ex_light == 0 && ex_flame == 0)
return
var/devIncrease = round(quality / 10)
var/heavyIncrease = round(quality / 5)
var/lightIncrease = round(quality / 2)
ex_dev = modify_fantasy_variable("ex_dev", ex_dev, devIncrease, 0)
ex_heavy = modify_fantasy_variable("ex_heavy", ex_heavy, heavyIncrease, 0)
ex_light = modify_fantasy_variable("ex_light", ex_light, lightIncrease, 0)
/obj/item/grenade/proc/remove_grenade_fantasy_bonuses(quality)
ex_dev = reset_fantasy_variable("ex_dev", ex_dev)
ex_heavy = reset_fantasy_variable("ex_heavy", ex_heavy)
ex_light = reset_fantasy_variable("ex_light", ex_light)
/**
* Checks for various ways to botch priming a grenade.
*
* Arguments:
* * mob/living/carbon/human/user - who is priming our grenade?
*/
/obj/item/grenade/proc/botch_check(mob/living/carbon/human/user)
if(sticky && prob(50)) // to add risk to sticky tape grenade cheese, no return cause we still prime as normal after.
to_chat(user, span_warning("What the... [src] is stuck to your hand!"))
ADD_TRAIT(src, TRAIT_NODROP, STICKY_NODROP)
var/clumsy = HAS_TRAIT(user, TRAIT_CLUMSY)
if(clumsy && (clumsy_check == GRENADE_CLUMSY_FUMBLE) && prob(50))
to_chat(user, span_warning("Huh? How does this thing work?"))
arm_grenade(user, 5, FALSE)
return TRUE
else if(!clumsy && (clumsy_check == GRENADE_NONCLUMSY_FUMBLE))
to_chat(user, span_warning("You pull the pin on [src]. Attached to it is a pink ribbon that says, \"[span_clown("HONK")]\""))
arm_grenade(user, 5, FALSE)
return TRUE
/obj/item/grenade/examine(mob/user)
. = ..()
if(display_timer)
if(det_time > 0)
. += "The timer is set to [DisplayTimeText(det_time)]."
else
. += "\The [src] is set for instant detonation."
if (dud_flags & GRENADE_USED)
. += span_warning("It looks like [p_theyve()] already been used.")
/obj/item/grenade/attack_self(mob/user)
if(HAS_TRAIT(src, TRAIT_NODROP))
to_chat(user, span_notice("You try prying [src] off your hand..."))
if(do_after(user, 7 SECONDS, target = src))
to_chat(user, span_notice("You manage to remove [src] from your hand."))
REMOVE_TRAIT(src, TRAIT_NODROP, STICKY_NODROP)
return
if (active)
return
if(!botch_check(user)) // if they botch the prime, it'll be handled in botch_check
arm_grenade(user)
/obj/item/grenade/proc/log_grenade(mob/user)
if(!type_cluster)
log_bomber(user, "has primed a", src, "for detonation", message_admins = dud_flags != NONE)
/**
* arm_grenade (formerly preprime) refers to when a grenade with a standard time fuze is activated, making it go beepbeepbeep and then detonate a few seconds later.
* Grenades with other triggers like remote igniters probably skip this step and go straight to [/obj/item/grenade/proc/detonate]
*/
/obj/item/grenade/proc/arm_grenade(mob/user, delayoverride, msg = TRUE, volume = 60)
log_grenade(user) //Inbuilt admin procs already handle null users
if(user)
add_fingerprint(user)
if(msg)
to_chat(user, span_warning("You prime [src]! [capitalize(DisplayTimeText(det_time))]!"))
if(shrapnel_type && shrapnel_radius)
shrapnel_initialized = TRUE
AddComponent(/datum/component/pellet_cloud, projectile_type = shrapnel_type, magnitude = shrapnel_radius)
playsound(src, grenade_arm_sound, volume, grenade_sound_vary)
if(istype(user))
user.add_mob_memory(/datum/memory/bomb_planted, antagonist = src)
active = TRUE
icon_state = (base_icon_state || initial(icon_state)) + "_active"
SEND_SIGNAL(src, COMSIG_GRENADE_ARMED, det_time, delayoverride)
addtimer(CALLBACK(src, PROC_REF(detonate)), isnull(delayoverride)? det_time : delayoverride)
/**
* detonate (formerly prime) refers to when the grenade actually delivers its payload (whether or not a boom/bang/detonation is involved)
*
* Arguments:
* * lanced_by- If this grenade was detonated by an elance, we need to pass that along with the COMSIG_GRENADE_DETONATE signal for pellet clouds
*/
/obj/item/grenade/proc/detonate(mob/living/lanced_by)
if (dud_flags)
active = FALSE
update_appearance()
return FALSE
for(var/obj/effect/forcefield/cosmic_field/potential_field as anything in GLOB.active_cosmic_fields)
if(get_dist(potential_field, src) < 3)
new /obj/effect/temp_visual/revenant(get_turf(src))
active = FALSE
update_appearance()
return FALSE
dud_flags |= GRENADE_USED // Don't detonate if we have already detonated.
if(shrapnel_type && shrapnel_radius && !shrapnel_initialized) // add a second check for adding the component in case whatever triggered the grenade went straight to prime (badminnery for example)
shrapnel_initialized = TRUE
AddComponent(/datum/component/pellet_cloud, projectile_type = shrapnel_type, magnitude = shrapnel_radius)
SEND_SIGNAL(src, COMSIG_GRENADE_DETONATE, lanced_by)
if(ex_dev || ex_heavy || ex_light || ex_flame)
explosion(src, ex_dev, ex_heavy, ex_light, ex_flame)
return TRUE
/obj/item/grenade/proc/update_mob()
if(ismob(loc))
var/mob/mob = loc
mob.dropItemToGround(src)
///Signal sent by someone putting the grenade in as an ingredient. Registers signals onto what it was put into so it can explode.
/obj/item/grenade/proc/on_used_as_ingredient(datum/source, atom/used_in)
SIGNAL_HANDLER
RegisterSignal(used_in, COMSIG_FOOD_EATEN, PROC_REF(ingredient_detonation))
RegisterSignal(used_in, COMSIG_TOOL_ATOM_ACTED_PRIMARY(TOOL_KNIFE), PROC_REF(ingredient_detonation))
RegisterSignal(used_in, COMSIG_TOOL_ATOM_ACTED_PRIMARY(TOOL_ROLLINGPIN), PROC_REF(ingredient_detonation))
///Signal sent by someone eating food this is an ingredient in "used_in". Makes the grenade go kerblooey, destroying the food.
/obj/item/grenade/proc/ingredient_detonation(atom/used_in, mob/living/target, mob/living/user, bitecount, bitesize)
SIGNAL_HANDLER
detonate()
//can't remove it as an ingredient so we need to get rid of the food. deleted ingredients not good
return DESTROY_FOOD
/obj/item/grenade/screwdriver_act(mob/living/user, obj/item/tool)
if(active)
return FALSE
if(change_det_time())
tool.play_tool_sound(src)
if(det_time == 0)
to_chat(user, span_notice("You modify the time delay. It's set to be instantaneous."))
else
to_chat(user, span_notice("You modify the time delay. It's set for [DisplayTimeText(det_time)]."))
return TRUE
/obj/item/grenade/multitool_act(mob/living/user, obj/item/tool)
. = ..()
if(active)
return FALSE
. = TRUE
var/newtime = tgui_input_list(user, "Please enter a new detonation time", "Detonation Timer", possible_fuse_time)
if (isnull(newtime))
return
if(!user.can_perform_action(src))
return
if(newtime == "Instant" && change_det_time(0))
to_chat(user, span_notice("You modify the time delay. It's set to be instantaneous."))
return
newtime = round(text2num(newtime))
if(change_det_time(newtime))
to_chat(user, span_notice("You modify the time delay. It's set for [DisplayTimeText(det_time)]."))
/**
* Sets det_time to a number in SECONDS
*
* if time is passed as an argument, `det_time` will be `time SECONDS`
*
* Cycles the duration of the fuse of the grenade `det_time` based on the options provided in list/possible_fuse_time
*/
/obj/item/grenade/proc/change_det_time(time)
. = TRUE
//Multitool
if(!isnull(time))
det_time = round(clamp(time SECONDS, 0, 5 SECONDS)) //This is fine for now but consider making this a variable if you want >5s fuse
return
//Screwdriver
if(det_time == 0)
det_time = "Instant"
else
det_time = num2text(det_time * 0.1)
var/old_selection = possible_fuse_time.Find(det_time) //Position of det_time in the list
if(old_selection >= possible_fuse_time.len)
det_time = possible_fuse_time[1]
else
det_time = possible_fuse_time[old_selection+1]
if(det_time == "Instant")
det_time = 0 //String to num conversion because I hate coders
return
det_time = text2num(det_time) SECONDS
/obj/item/grenade/attack_paw(mob/user, list/modifiers)
return attack_hand(user, modifiers)
/obj/item/grenade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
if(damage && attack_type == PROJECTILE_ATTACK && damage_type != STAMINA && prob(15))
owner.visible_message(span_danger("[attack_text] hits [owner]'s [src], setting it off! What a shot!"))
var/turf/source_turf = get_turf(src)
var/logmsg = "held a grenade detonated by a projectile ([hitby]) at [COORD(source_turf)]"
owner.log_message(logmsg, LOG_GAME)
owner.log_message(logmsg, LOG_VICTIM, log_globally = FALSE)
message_admins("A projectile ([hitby]) detonated a grenade held by [key_name_admin(owner)] at [ADMIN_COORDJMP(source_turf)]")
detonate()
if(!QDELETED(src)) // some grenades don't detonate but we want them destroyed
qdel(src)
return TRUE //It hit the grenade, not them
/obj/item/grenade/ranged_interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(active)
user.throw_item(interacting_with)
return ITEM_INTERACT_SUCCESS
return NONE