Skip to content

Commit

Permalink
[MIRROR] Partial revert of "Heretic Rebalance - Main Knowledge gives …
Browse files Browse the repository at this point in the history
…free Side points" (the side path part) [MDB IGNORE] (#720)

* Partial revert of "Heretic Rebalance - Main Knowledge gives free Side points" (the side path part)

* Update heretic_antag.dm

* Update heretic_antag.dm

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: MrMelbert <[email protected]>
Co-authored-by: Bloop <[email protected]>
  • Loading branch information
4 people authored Nov 20, 2023
1 parent 24a6c27 commit fbee9a5
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 67 deletions.
30 changes: 7 additions & 23 deletions code/modules/antagonists/heretic/heretic_antag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
var/heretic_path = PATH_START
/// A sum of how many knowledge points this heretic CURRENTLY has. Used to research.
var/knowledge_points = 2 //SKYRAT EDIT - ORIGINAL 1
/// How many side path points the heretic has. He gains one of these per main path that splits into two sidepaths. These can be used in place of knowledge points for side paths only.
var/side_path_points = 0
/// The time between gaining influence passively. The heretic gain +1 knowledge points every this duration of time.
var/passive_gain_timer = 20 MINUTES
/// Assoc list of [typepath] = [knowledge instance]. A list of all knowledge this heretic's reserached.
Expand Down Expand Up @@ -87,7 +85,6 @@
var/list/data = list()

data["charges"] = knowledge_points
data["side_charges"] = side_path_points
data["total_sacrifices"] = total_sacrifices
data["ascended"] = ascended

Expand All @@ -101,10 +98,7 @@
knowledge_data["desc"] = initial(knowledge.desc)
knowledge_data["gainFlavor"] = initial(knowledge.gain_text)
knowledge_data["cost"] = initial(knowledge.cost)
if(initial(knowledge.route) == PATH_SIDE)
knowledge_data["disabled"] = (initial(knowledge.cost) > knowledge_points + side_path_points)
else
knowledge_data["disabled"] = (initial(knowledge.cost) > knowledge_points)
knowledge_data["disabled"] = initial(knowledge.cost) > knowledge_points

// Final knowledge can't be learned until all objectives are complete.
if(ispath(knowledge, /datum/heretic_knowledge/ultimate))
Expand Down Expand Up @@ -145,25 +139,16 @@
switch(action)
if("research")
var/datum/heretic_knowledge/researched_path = text2path(params["path"])
if(!ispath(researched_path))
if(!ispath(researched_path, /datum/heretic_knowledge))
CRASH("Heretic attempted to learn non-heretic_knowledge path! (Got: [researched_path])")

// If side path and has path points, buy!
var/coupon = FALSE
if((initial(researched_path.route) == PATH_SIDE) && side_path_points)
coupon = TRUE
// else try normal purchase
else if(initial(researched_path.cost) > knowledge_points)
return

if(initial(researched_path.cost) > knowledge_points)
return TRUE
if(!gain_knowledge(researched_path))
return TRUE

log_heretic_knowledge("[key_name(owner)] gained knowledge: [initial(researched_path.name)][coupon ? "(via free side-path point)" : ""]")
if(coupon)
side_path_points -= initial(researched_path.cost)
else
knowledge_points -= initial(researched_path.cost)
log_heretic_knowledge("[key_name(owner)] gained knowledge: [initial(researched_path.name)]")
knowledge_points -= initial(researched_path.cost)
return TRUE

/datum/antagonist/heretic/submit_player_objective(retain_existing = FALSE, retain_escape = TRUE, force = FALSE)
Expand Down Expand Up @@ -793,7 +778,7 @@
// Add in the base research we spawn with, otherwise it'd be too easy.
target_amount += length(GLOB.heretic_start_knowledge)
// And add in some buffer, to require some sidepathing, especially since heretics get some free side paths.
target_amount += rand(5, 7)
target_amount += rand(2, 4)
update_explanation_text()

/datum/objective/heretic_research/update_explanation_text()
Expand Down Expand Up @@ -822,4 +807,3 @@
suit = /obj/item/clothing/suit/hooded/cultrobes/eldritch
head = /obj/item/clothing/head/hooded/cult_hoodie/eldritch
r_hand = /obj/item/melee/touch_attack/mansus_fist

6 changes: 1 addition & 5 deletions code/modules/antagonists/heretic/heretic_knowledge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
var/list/banned_atom_types = list()
/// Cost of knowledge in knowledge points
var/cost = 0
/// If true, adds side path points according to value. Only main branch powers that split into sidepaths should have this.
var/adds_sidepath_points = 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.
var/priority = 0
Expand Down Expand Up @@ -63,8 +61,6 @@

if(gain_text)
to_chat(user, span_warning("[gain_text]"))
// Usually zero
our_heretic.side_path_points += adds_sidepath_points
on_gain(user, our_heretic)

/**
Expand Down Expand Up @@ -288,7 +284,7 @@
/datum/heretic_knowledge/mark
abstract_parent_type = /datum/heretic_knowledge/mark
mutually_exclusive = TRUE
cost = 1
cost = 2
/// The status effect typepath we apply on people on mansus grasp.
var/datum/status_effect/eldritch/mark_type

Expand Down
3 changes: 0 additions & 3 deletions code/modules/antagonists/heretic/knowledge/ash_lore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
name = "Ashen Passage"
desc = "Grants you Ashen Passage, a silent but short range jaunt."
gain_text = "He knew how to walk between the planes."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/mark/ash_mark,
/datum/heretic_knowledge/summon/fire_shark,
Expand Down Expand Up @@ -127,7 +126,6 @@
The mask instills fear into heathens who witness it, causing stamina damage, hallucinations, and insanity. \
It can also be forced onto a heathen, to make them unable to take it off..."
gain_text = "The Nightwatcher was lost. That's what the Watch believed. Yet he walked the world, unnoticed by the masses."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/blade_upgrade/ash,
/datum/heretic_knowledge/reroll_targets,
Expand Down Expand Up @@ -166,7 +164,6 @@
If any victims afflicted are in critical condition, they will also instantly die."
gain_text = "The fire was inescapable, and yet, life remained in his charred body. \
The Nightwatcher was a particular man, always watching."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/ultimate/ash_final,
/datum/heretic_knowledge/summon/ashy,
Expand Down
3 changes: 0 additions & 3 deletions code/modules/antagonists/heretic/knowledge/blade_lore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
towards your attacker. This effect can only trigger once every 20 seconds."
gain_text = "The footsoldier was known to be a fearsome duelist. \
Their general quickly appointed them as their personal Champion."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/limited_amount/risen_corpse,
/datum/heretic_knowledge/mark/blade_mark,
Expand Down Expand Up @@ -246,7 +245,6 @@
you gain increased resistance to gaining wounds and resistance to batons."
gain_text = "In time, it was he who stood alone among the bodies of his former comrades, awash in blood, none of it his own. \
He was without rival, equal, or purpose."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/blade_upgrade/blade,
/datum/heretic_knowledge/reroll_targets,
Expand Down Expand Up @@ -376,7 +374,6 @@
at a target, dealing damage and causing bleeding."
gain_text = "Without thinking, I took the knife of a fallen soldier and threw with all my might. My aim was true! \
The Torn Champion smiled at their first taste of agony, and with a nod, their blades became my own."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/summon/maid_in_mirror,
/datum/heretic_knowledge/ultimate/blade_final,
Expand Down
3 changes: 0 additions & 3 deletions code/modules/antagonists/heretic/knowledge/cosmic_lore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
However, people with a star mark will get transported along with another person using the rune."
gain_text = "The distant stars crept into my dreams, roaring and screaming without reason. \
I spoke, and heard my own words echoed back."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/mark/cosmic_mark,
/datum/heretic_knowledge/essence,
Expand Down Expand Up @@ -114,7 +113,6 @@
desc = "Fires a projectile that moves very slowly and creates cosmic fields on impact. \
Anyone hit by the projectile will recieve burn damage, a knockdown, and give people in a three tile range a star mark."
gain_text = "The Beast was behind me now at all times, with each sacrifice words of affirmation coursed through me."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/blade_upgrade/cosmic,
/datum/heretic_knowledge/reroll_targets,
Expand Down Expand Up @@ -218,7 +216,6 @@
desc = "Grants you Cosmic Expansion, a spell that creates a 3x3 area of cosmic fields around you. \
Nearby beings will also receive a star mark."
gain_text = "The ground now shook beneath me. The Beast inhabited me, and their voice was intoxicating."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/ultimate/cosmic_final,
/datum/heretic_knowledge/eldritch_coin,
Expand Down
3 changes: 0 additions & 3 deletions code/modules/antagonists/heretic/knowledge/flesh_lore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
Voiceless Dead are mute ghouls and only have 50 health, but can use Bloody Blades effectively. \
You can only create two at a time."
gain_text = "I found notes of a dark ritual, unfinished... yet still, I pushed forward."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/mark/flesh_mark,
/datum/heretic_knowledge/void_cloak,
Expand Down Expand Up @@ -239,7 +238,6 @@
the ability to link minds to communicate with ease, but are very fragile and weak in combat."
gain_text = "I could not continue alone. I was able to summon The Uncanny Man to help me see more. \
The screams... once constant, now silenced by their wretched appearance. Nothing was out of reach."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/blade_upgrade/flesh,
/datum/heretic_knowledge/reroll_targets,
Expand Down Expand Up @@ -281,7 +279,6 @@
Stalkers can jaunt, release EMPs, shapeshift into animals or automatons, and are strong in combat."
gain_text = "I was able to combine my greed and desires to summon an eldritch beast I had never seen before. \
An ever shapeshifting mass of flesh, it knew well my goals. The Marshal approved."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/ultimate/flesh_final,
/datum/heretic_knowledge/summon/ashy,
Expand Down
3 changes: 0 additions & 3 deletions code/modules/antagonists/heretic/knowledge/lock_lore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
You can use it in-hand to change its form to a card you fused. \
Does not preserve the card used in the ritual."
gain_text = "The Keeper sneered. \"These plastic rectangles are a mockery of keys, and I curse every door that desires them.\""
adds_sidepath_points = 1
required_atoms = list(
/obj/item/storage/wallet = 1,
/obj/item/stack/rods = 1,
Expand Down Expand Up @@ -144,7 +143,6 @@
desc = "Grants you Burglar's Finesse, a single-target spell \
that puts a random item from the victims backpack into your hand."
gain_text = "Consorting with Burglar spirits is frowned upon, but a Steward will always want to learn about new doors."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/spell/apetra_vulnera,
/datum/heretic_knowledge/spell/opening_blast,
Expand Down Expand Up @@ -173,7 +171,6 @@
While in refuge, you cannot use your hands or spells, and you are immune to slowdown. \
You are invincible but unable to harm anything. Cancelled by being hit with an anti-magic item."
gain_text = "Jealously, the Guard and the Hound hunted me. But I unlocked my form, and was but a haze, untouchable."
adds_sidepath_points = 1
next_knowledge = list(/datum/heretic_knowledge/ultimate/lock_final)
route = PATH_LOCK
spell_to_add = /datum/action/cooldown/spell/caretaker
Expand Down
3 changes: 0 additions & 3 deletions code/modules/antagonists/heretic/knowledge/rust_lore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
name = "Leeching Walk"
desc = "Grants you passive healing and resistance to batons while standing over rust."
gain_text = "The speed was unparalleled, the strength unnatural. The Blacksmith was smiling."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/mark/rust_mark,
/datum/heretic_knowledge/armor,
Expand Down Expand Up @@ -175,7 +174,6 @@
desc = "Grants you Aggressive Spread, a spell that spreads rust to nearby surfaces. \
Already rusted surfaces are destroyed."
gain_text = "All wise men know well not to visit the Rusted Hills... Yet the Blacksmith's tale was inspiring."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/blade_upgrade/rust,
/datum/heretic_knowledge/reroll_targets,
Expand Down Expand Up @@ -205,7 +203,6 @@
at friend or foe wildly. Also rusts and destroys and surfaces it hits."
gain_text = "The corrosion was unstoppable. The rust was unpleasable. \
The Blacksmith was gone, and you hold their blade. Champions of hope, the Rustbringer is nigh!"
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/ultimate/rust_final,
/datum/heretic_knowledge/summon/rusty,
Expand Down
3 changes: 0 additions & 3 deletions code/modules/antagonists/heretic/knowledge/void_lore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
You can still take damage due to a lack of pressure."
gain_text = "I found a thread of cold breath. It lead me to a strange shrine, all made of crystals. \
Translucent and white, a depiction of a nobleman stood before me."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/mark/void_mark,
/datum/heretic_knowledge/void_cloak,
Expand Down Expand Up @@ -127,7 +126,6 @@
Additionally causes damage to heathens around your original and target destination."
gain_text = "The entity calls themself the Aristocrat. They effortlessly walk through air like \
nothing - leaving a harsh, cold breeze in their wake. They disappear, and I am left in the blizzard."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/blade_upgrade/void,
/datum/heretic_knowledge/reroll_targets,
Expand Down Expand Up @@ -162,7 +160,6 @@
desc = "Grants you Void Pull, a spell that pulls all nearby heathens towards you, stunning them briefly."
gain_text = "All is fleeting, but what else stays? I'm close to ending what was started. \
The Aristocrat reveals themselves to me again. They tell me I am late. Their pull is immense, I cannot turn back."
adds_sidepath_points = 1
next_knowledge = list(
/datum/heretic_knowledge/ultimate/void_final,
/datum/heretic_knowledge/spell/cleave,
Expand Down
21 changes: 3 additions & 18 deletions tgui/packages/tgui/interfaces/AntagInfoHeretic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ type KnowledgeInfo = {

type Info = {
charges: number;
side_charges: number;
total_sacrifices: number;
ascended: BooleanLike;
objectives: Objective[];
Expand Down Expand Up @@ -180,7 +179,7 @@ const GuideSection = () => {

const InformationSection = (props, context) => {
const { data } = useBackend<Info>(context);
const { charges, side_charges, total_sacrifices, ascended } = data;
const { charges, total_sacrifices, ascended } = data;
return (
<Stack.Item>
<Stack vertical fill>
Expand All @@ -202,13 +201,6 @@ const InformationSection = (props, context) => {
<span style={hereticBlue}>
knowledge point{charges !== 1 ? 's' : ''}
</span>
{!!side_charges && (
<span>
{' '}
and <b>{side_charges}</b> side point
{side_charges !== 1 ? 's' : ''}
</span>
)}{' '}
.
</Stack.Item>
<Stack.Item>
Expand Down Expand Up @@ -283,7 +275,7 @@ const KnowledgeShop = (props, context) => {

const ResearchInfo = (props, context) => {
const { data } = useBackend<Info>(context);
const { charges, side_charges } = data;
const { charges } = data;

return (
<Stack justify="space-evenly" height="100%" width="100%">
Expand All @@ -293,14 +285,7 @@ const ResearchInfo = (props, context) => {
You have <b>{charges || 0}</b>&nbsp;
<span style={hereticBlue}>
knowledge point{charges !== 1 ? 's' : ''}
</span>
{!!side_charges && (
<span>
{' '}
and <b>{side_charges}</b> side point
{side_charges !== 1 ? 's' : ''}
</span>
)}{' '}
</span>{' '}
to spend.
</Stack.Item>
<Stack.Item grow>
Expand Down

0 comments on commit fbee9a5

Please sign in to comment.