Skip to content

Commit

Permalink
Chance to have higher mana/spell points for job spawns
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorDinamit committed Sep 23, 2023
1 parent 157ae27 commit b4024d8
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 227 deletions.
12 changes: 12 additions & 0 deletions code/game/jobs/job/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
var/psi_latency_chance = 2 // Chance of an additional psi latency, if any.
var/give_psionic_implant_on_join = FALSE // If psionic, will be implanted for control.

/// Chance to start with increased mana pool
var/higher_mana_chance = 2
/// Chance to start with increased spell points
var/higher_spell_points_chance = 2

var/use_species_whitelist // If set, restricts the job to players with the given species whitelist. This does NOT restrict characters joining as the job to the species itself.
var/require_whitelist // If set to a string, requires a separate whitelist entry to use the job equal to the given string. Note: If not-null the check happens, so please don't set unless you want the whitelist.

Expand Down Expand Up @@ -101,6 +106,13 @@
imp.part = affected
to_chat(H, SPAN_DANGER("As a registered psionic, you are fitted with a psi-dampening control implant. Using psi-power while the implant is active will result in neural shocks and your violation being reported."))

if(prob(higher_mana_chance))
H.mana.mana_level_max *= 2
H.mana.mana_level = H.mana.mana_level_max
H.mana.mana_recharge_speed *= 2
if(prob(higher_spell_points_chance))
H.mana.spell_points += pickweight(1 = 30, 2 = 12, 3 = 4, 4 = 1)

var/decl/hierarchy/outfit/outfit = get_outfit(H, alt_title, branch, grade)
if(outfit) . = outfit.equip(H, title, alt_title)

Expand Down
8 changes: 3 additions & 5 deletions code/modules/spellbook/_spellbook.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ GLOBAL_LIST_EMPTY(spells_by_categories)
/obj/item/spellbook/interact(mob/living/user)
var/dat = null
dat += "Your spell points: [user.mana.spell_points].<br>"
dat += "Applied categories: [english_list(spell_categories, "None")].<br>"
dat += "Applied categories: <A href='byond://?src=\ref[src];categories=1'>[english_list(spell_categories, "None")].</a><br>"
dat += "<hr>"
for(var/spell_type in allowed_spells)
var/datum/spell/S = spell_type
if(LAZYLEN(spell_categories) && !(GLOB.spells_by_categories[spell_type] & spell_categories))
if(LAZYLEN(spell_categories) && !(spell_type in (GLOB.spells_by_categories[spell_type] & spell_categories)))
continue

dat += "<A href='byond://?src=\ref[src];spell=[spell_type]'>[initial(S.name)]</a><br>"
Expand Down Expand Up @@ -110,7 +110,7 @@ GLOBAL_LIST_EMPTY(spells_by_categories)
dat += "[initial(S.desc)]<br>"
dat += "<hr>"
dat += "Mana cost: [initial(S.mana_cost)].<br>"
dat += "Categories: <A href='byond://?src=\ref[src];categories=1'>[english_list(GLOB.spells_by_categories[S], "None")].</a><br>"
dat += "Categories: [english_list(GLOB.spells_by_categories[S], "None")].<br>"

var/datum/browser/popup = new(user, "spellbook_[S]", "Spell Book - [initial(S.name)]")
popup.set_content(dat)
Expand Down Expand Up @@ -239,10 +239,8 @@ GLOBAL_LIST_EMPTY(spells_by_categories)
/obj/item/spellbook/minor_free
book_flags = NO_OWNER
allowed_spells = list(
/datum/spell/noclothes,
/datum/spell/aimed/passage,
/datum/spell/aoe_turf/knock,
/datum/spell/targeted/ethereal_jaunt,
/datum/spell/targeted/heal_target/touch,
/datum/spell/area_teleport,
)
42 changes: 0 additions & 42 deletions code/modules/spellbook/battlemage.dm

This file was deleted.

46 changes: 0 additions & 46 deletions code/modules/spellbook/cleric.dm

This file was deleted.

41 changes: 0 additions & 41 deletions code/modules/spellbook/druid.dm

This file was deleted.

41 changes: 0 additions & 41 deletions code/modules/spellbook/spatial.dm

This file was deleted.

52 changes: 0 additions & 52 deletions code/modules/spellbook/standard.dm

This file was deleted.

2 changes: 2 additions & 0 deletions code/modules/submaps/submap_job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
skill_points = 25
psi_latency_chance = 6
give_psionic_implant_on_join = FALSE
higher_mana_chance = 5
higher_spell_points_chance = 5
max_skill = list( SKILL_BUREAUCRACY = SKILL_MAX,
SKILL_FINANCE = SKILL_MAX,
SKILL_EVA = SKILL_MAX,
Expand Down

0 comments on commit b4024d8

Please sign in to comment.